Datasets:
File size: 151,917 Bytes
f06250e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 | | | | LOGIC-LM: | | | Empowering | | Large | Language | | Models | with | |
| --- | ------------ | --------- | -------- | --- | ----------- | -------- | --------- | -------- | --- | --------------- | ---- | --- |
| | | | Symbolic | | Solvers for | Faithful | | Logical | | Reasoning | | |
| | LiangmingPan | | | | AlonAlbalak | | XinyiWang | | | WilliamYangWang | | |
UniversityofCalifornia,SantaBarbara
{liangmingpan, alon_albalak, xinyi_wang, wangwilliamyang}@ucsb.edu
Abstract
| | | | | | | | | | Problem | Goal | | |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | ------- | ---- | --- | --- |
LargeLanguageModels(LLMs)haveshown
| human-like | | reasoning | | abilities | but still strug- | | | | | | | |
| ---------- | ---- | --------- | ------- | --------- | ---------------- | --- | --- | --- | --- | --- | --- | --- |
| gle | with | complex | logical | problems. | This | pa- | | | | | | |
Problem
Symbolic
| per | introduces | | a novel | framework, | LOGIC- | | | | | | | |
| ------- | ---------- | ---------- | -------- | ---------------- | ------------- | --- | --- | ----- | --- | ----------- | ----------- | --- |
| | | | | | | | | | | Formulator | Formulation | |
| LM, | which | integrates | | LLMs | with symbolic | | | | | | | |
| solvers | | to improve | logical | problem-solving. | | | | | | | | |
| Our | method | first | utilizes | LLMs | to translate | | | Self- | | | | |
a natural language problem into a symbolic Refine Symbolic Symbolic
| | | | | | | | | | | Reasoner | | Result |
| ----------------------------------------- | ------ | ---------- | --- | ------------------ | ----------- | --- | --- | --- | --- | --------- | --- | ------ |
| formulation. | | Afterward, | | adeterministicsym- | | | | | | | | |
| bolic | solver | performs | | inference | on the for- | | | | | | | |
| mulated | | problem. | We | also introduce | a self- | | | | | | | |
| refinementmodule,whichutilizesthesymbolic | | | | | | | | | | Result | | |
| solver’serrormessagestorevisesymbolicfor- | | | | | | | | | | | | Answer |
Interpreter
| malizations. | | WedemonstrateLOGIC-LM’sef- | | | | | | | | | | |
| ------------ | --- | -------------------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
fectivenessonfivelogicalreasoningdatasets:
| | | | | | | | | Figure1: | OverviewofourLOGIC-LMframework. | | | |
| ------------ | --- | ------------ | --- | ----------- | ---------- | --- | --- | -------- | ------------------------------- | --- | --- | --- |
| ProofWriter, | | PrOntoQA, | | FOLIO, | LogicalDe- | | | | | | | |
| duction, | | and AR-LSAT. | | On average, | LOGIC- | | | | | | | |
DespitetheadvancesofLLMs,theystillstrug-
LMachievesasignificantperformanceboost
glewithcomplexlogicalreasoningproblems(Liu
of39.2%overusingLLMalonewithstandard
promptingand18.4%overLLMwithchain-of- et al., 2023b). Recent studies (Golovneva et al.,
2023;Ribeiroetal.,2023b;Lyuetal.,2023)found
| thoughtprompting. | | | Ourfindingssuggestthat | | | | | | | | | |
| ----------------- | --- | --- | ---------------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
LOGIC-LM, by combining LLMs with sym- that LLMs occasionally make unfaithful reason-
boliclogic,offersapromisingavenueforfaith-
| | | | | | | | ing, | i.e., | the derived | conclusion | does | not follow |
| --- | --- | --- | --- | --- | --- | --- | ---- | ----- | ----------- | ---------- | ---- | ---------- |
1
fullogicalreasoning. the previously generated reasoning chain. While
chain-of-thoughtmayimitatehumanreasoningpro-
1 Introduction
| | | | | | | | cesses, | the | fundamental | nature | of LLMs | remains |
| --- | --- | --- | --- | --- | --- | --- | ------- | --- | ----------- | ------ | ------- | ------- |
Logical reasoning is a cognitive process that in- that of black-box probabilistic models, lacking a
volvesusingevidence,arguments,andlogictoar- mechanismtoguaranteethefaithfulnessofreason-
riveatconclusionsormakejudgments(Huangand ing(Shanahan,2022). Incontrast,symbolicinfer-
Chang,2023). Itplaysacentralroleinintelligent enceengines,suchasexpertsystems(Metaxiotis
systemsforproblem-solving,decision-making,and etal.,2002), arefaithfulandtransparentbecause
criticalthinking. Recently,largelanguagemodels the reasoning is based on symbolic-represented
(LLMs)(Brownetal.,2020;Ouyangetal.,2022a; knowledgeandfollowswell-definedinferencerules
OpenAI,2023)haveexhibitedemergentabilityto thatadheretologicalprinciples. Themainobsta-
“reason” like human (Wei et al., 2022a). When cle is how to accurately translate a problem into
promptedwithstep-wiseexplanationsofreasoning symbolicrepresentations,consideringtheinherent
(“chain of thoughts”), or a simple prompt “Let’s ambiguityandflexibilityofnaturallanguage. This
think step by step.”, these models are able to an- is precisely where LLMs excel, making LLMs a
swerquestionswithexplicitreasoningsteps(Wei promisingcomplementtosymbolicsolvers.
etal.,2022b;Kojimaetal.,2022). This drives our exploration of neuro-symbolic
methodsthatintegrateLLMswithsymbolicreason-
1Codeanddataarepubliclyavailableathttps://github.
com/teacherpeterpan/Logic-LLM. ing. AsillustratedinFigure1,wepresentLOGIC-
3806
FindingsoftheAssociationforComputationalLinguistics:EMNLP2023,pages3806–3824
December6-10,2023©2023AssociationforComputationalLinguistics
LM,anovelframeworkthatdecomposesalogical (§ 4.3). Finally, by analyzing the impact of self-
ProblemFor-
reasoningproblemintothreestages: refinement,wehighlighttheeffectivenessofincre-
mulation, Symbolic Reasoning, and Result Inter- mentally revising symbolic formalizations when
pretation. During problem formulation, an LLM interactingwiththesymbolicsolver(§4.4).
| converts | the natural | | language | description | | of the | | | | | | | |
| -------------------------------------------- | ----------- | ---------- | -------- | ------------- | ----- | ------- | ---------------------------------- | --- | --- | --- | --- | --- | --- |
| problemintoanappropriatesymbolicformulation, | | | | | | | 2 RelatedWork | | | | | | |
| identifying | key | entities, | facts, | and | rules | present | | | | | | | |
| | | | | | | | LanguageModelsforLogicalReasoning. | | | | | | Re- |
| in the problem | | statement. | | Subsequently, | | at the | | | | | | | |
centworksinadaptingLLMsforlogicalreasoning
symbolicreasoningstage,adeterministicsymbolic
taskscanbebroadlycategorizedintotwogroups:
solverperformsinferenceonthesymbolicformula-
1)fine-tuningapproachesthatoptimizeLLMs’rea-
tion. Lastly,aresultinterpreterexplainstheoutput
soningabilitythroughfine-tuningortrainingspe-
andmapsittothecorrectanswer. Byincorporating cializedmodules(Clarketal.,2020;Tafjordetal.,
| LLMs with | symbolic | | solvers, | we can | exploit | the | | | | | | | |
| --------- | -------- | --- | -------- | ------ | ------- | --- | --- | --- | --- | --- | --- | --- | --- |
2022;Yangetal.,2022),and2)in-contextlearning
robustnaturallanguageunderstandingcapabilities
| | | | | | | | approaches | that | design | special | prompts | | to elicit |
| --- | --- | --- | --- | --- | --- | --- | ---------- | ---- | ------ | ------- | ------- | --- | --------- |
ofLLMstopreciselyrepresenttheproblemusing
| | | | | | | | LLMs’step-by-stepreasoningcapabilities. | | | | | | Typical |
| --- | --- | --- | --- | --- | --- | --- | --------------------------------------- | --- | --- | --- | --- | --- | ------- |
symbolicrepresentations,whilealsotakingadvan-
methodsincludechain-of-thoughtprompting(Wei
| tage of | the logical | faithfulness | | and | transparency | | | | | | | | |
| ------- | ----------- | ------------ | --- | --- | ------------ | --- | --- | --- | --- | --- | --- | --- | --- |
etal.,2022b;Wangetal.,2023)thatgeneratesex-
| offeredbysymbolicsolvers. | | | | Toimprovetheaccu- | | | | | | | | | |
| ------------------------- | --- | --- | --- | ----------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
planationsbeforethefinalanswerandtheleast-to-
racyofthesymbolicparsing,wealsoincorporate mostprompting(Zhouetal.,2023)thatbreaksthe
theideaofself-refinementtoiterativelyrevisethe
| | | | | | | | problem | down | into | simpler | components | | that can |
| --------- | ------- | ---- | ----- | --------- | -------- | --- | --------------------- | ---- | ---- | ---------------------- | ---------- | --- | -------- |
| generated | logical | form | using | the error | messages | | | | | | | | |
| | | | | | | | besolvedindividually. | | | Boththeaboveapproaches | | | |
fromthesymbolicsolverasfeedback.
performreasoningdirectlyovernaturallanguage
We showcase the adaptability and effective- (NL),providinggreaterflexibilitythansymbolic-
| ness of | LOGIC-LM | | on five | logical | reasoning | | | | | | | | |
| --------- | ------------------------------------ | --- | ------- | ------- | --------- | --- | --------------- | --- | ------------------------------ | ---- | ----- | --------- | ------ |
| | | | | | | | basedreasoning. | | However,theintrinsiccomplexity | | | | |
| datasets: | ProofWriter(Tafjordetal.,2021),PrOn- | | | | | | | | | | | | |
| | | | | | | | and ambiguity | | of NL | also | bring | undesired | issues |
toQA(SaparovandHe,2023),FOLIO(Hanetal., suchasunfaithfulreasoningandhallucinations.
2022),AR-LSAT (Zhongetal.,2022),andtheLog- Different from prior works, we use symbolic
icalDeductiondatasetfromBigBench(Srivastava
| | | | | | | | languageasthebasicunitofreasoning. | | | | | | Thiseffec- |
| ------------ | ------------------------------ | --- | --- | --- | --- | --- | ---------------------------------- | --- | ---------- | --- | ------------ | --- | ---------- |
| etal.,2022). | Thesedatasetscoverawiderangeof | | | | | | | | | | | | |
| | | | | | | | tively transfers | | the burden | | of executing | | complex, |
logicalreasoningproblems,including: precisereasoningfromLLMstomorereliable,in-
DeductiveReasoningproblems terpretableexternalsymbolicsolvers. Simultane-
•
First-OrderLogic(FOL)reasoningproblems ously, we leverage the strong in-context learning
•
| | | | | | | | ability | of LLMs | to formulate | | the | NL-based | prob- |
| --- | --- | --- | --- | --- | --- | --- | ------- | ------- | ------------ | --- | --- | -------- | ----- |
ConstraintSatisfactionProblems(CSP)
•
| | | | | | | | lem into | suitable | symbolic | | representations, | | thus |
| --- | --- | --- | --- | --- | --- | --- | -------- | -------- | -------- | --- | ---------------- | --- | ---- |
AnalyticalReasoning(AR)problems
•
maintainingthebenefitofflexibility.
Weintegratefourtypesofsymbolicinferencetools
Althoughpriorworks(Maoetal.,2019;Gupta
| tailoredtotheseproblems: | | | | 1)logicprogramming | | | | | | | | | |
| ------------------------ | --- | --- | --- | ------------------ | --- | --- | --- | --- | --- | --- | --- | --- | --- |
etal.,2020;Manhaeveetal.,2021;Caietal.,2021;
enginethatsupportsdeductivereasoningthrough
Tianetal.,2022;Pryoretal.,2023)alsopropose
forward/backwardchaining;2)FOLinferenceen-
| | | | | | | | neuro-symbolic | | methods | | to combine | neural | net- |
| --------- | ------- | --- | ----------- | ----- | --- | --- | -------------- | --- | ------- | --- | ---------- | ------ | ---- |
| gine that | derives | new | conclusions | based | on | FOL | | | | | | | |
workswithsymbolicreasoning,thesemethodssuf-
rulesandfacts,3)constraintoptimizationengine
| | | | | | | | fer from | limitations | | such | as hand-crafted | | or spe- |
| --- | --- | --- | --- | --- | --- | --- | -------- | ----------- | --- | ---- | --------------- | --- | ------- |
thatprovidessolversforCSPoverfinitedomains,
| | | | | | | | cialized | module | designs | that | are | not easily | gen- |
| --- | --- | --- | --- | --- | --- | --- | -------- | ------ | ------- | ---- | --- | ---------- | ---- |
and4)booleansatisfiabilityproblem(SAT)solver
| | | | | | | | eralizable, | or | brittleness | due | to | the difficulty | of |
| --- | --- | --- | --- | --- | --- | --- | ----------- | --- | ----------- | --- | --- | -------------- | --- |
thatsolvesanalyticalreasoningproblems.
| | | | | | | | optimization. | | Incontrast,weproposeamoregen- | | | | |
| --------------- | --- | ---- | ---- | ------------ | --- | -------- | ------------- | --- | ----------------------------- | --- | --- | --- | --- |
| Our evaluations | | show | that | the strategy | | of inte- | | | | | | | |
eralizableframeworkthatintegratesmodernLLMs
gratingLLMswithsymbolicsolversperformssig-
withsymboliclogicwithouttheneedfortraining
nificantlybetterthanpurelyrelyingonLLMsfor
ordesigningcomplexproblem-specificmodules.
| logical | reasoning, | with | an | average | improvement | | | | | | | | |
| ------- | ---------- | ---- | --- | ------- | ----------- | --- | --- | --- | --- | --- | --- | --- | --- |
of39.2%overthestandardpromptingand18.4% Tool-augmentedLanguageModels. Language
over the chain-of-thought prompting (§ 4.1). We modelshaveinherentlimitationssuchastheinabil-
alsofindthatLOGIC-LMbecomesincreasinglyef- itytoaccessup-to-dateinformation,takeactions,
fective as the required reasoning depth increases or perform precise mathematical reasoning. To
3807
Metals conduct electricity. No giant language model could have bad performance. In an antique car show, there are three vehicles: a tractor,
Insulators do not conduct electricity. If a language model has good performance, it is used by some researchers. a convertible, and a minivan. The tractor is the second-
If something is made of iron, then it is metal. A work used by some researchers should be popular. newest. The minivan is newer than the convertible.
Nails are made of iron. If BERT is a giant language model, then the same for GPT3.
BERT is a giant language model. Which of the following is true?
A) The tractor is the oldest.
Is the following statement true, false, or Is the following statement true, false, or unknown? GPT3 is popular. B) The convertible is the oldest.
unknown? Nails cannot conduct electricity. C) The minivan is the oldest.
Problem Formulator
Rules: Facts: Domain: Variables:
• Metal𝑥,True →ConductElectricity𝑥,True • ¬(∃𝑥(LanguageModel𝑥 ∧Giant𝑥 ∧¬GoodPerformance(𝑥))) 1: oldest tractor ∈ [1, 2, 3]
• MadeOfIron𝑥,True →Metal(𝑥,True) • ∀𝑥(LanguageModel𝑥 ∧GoodPerformance𝑥 →UsedbySomeReseachers(𝑥)) 3: newest minivan ∈ [1, 2, 3]
Facts: • ∀𝑥 UsedbySomeResearchers𝑥 →Popular𝑥 convertible ∈ [1, 2, 3]
• MadeOfIronNails,True • LanguageModelbert ∧𝐺𝑖𝑎𝑛𝑡bert →LanguageModelgpt3 ∧Giantgpt3 Constraints:
• ConductElectricityInsulator,False • Languagebert tractor == 2
Query: • Giantbert minivan > convertible
• ConductElectricityNail,False Query: Polulargpt3 AllDifferentConstraint(tractor, minivan, convertible)
Symbolic
Logic Programming First-order Logic Prover Constraint Optimization SMT Solver
Reasoner
Result
ConductElectricityNail,True Entailment {convertible:1,tractor:2,minivan:3}
Interpreter
Answer The statement “Nails cannot The statement “GPT3 A) The convertible is the oldest.
conduct electricity” is false. is popular” is true.
Figure2: OverviewofourLOGIC-LMmodel,whichconsistsofthreemodules: (1)ProblemFormulatorgenerates
asymbolicrepresentationfortheinputproblemwithLLMsviain-contextlearning(2)SymbolicReasonerperforms
logicalinferenceontheformulatedproblem,and(3)ResultInterpreterinterpretsthesymbolicanswer.
addressthis,recentworkhasbeguntoaugmentlan- et al., 2022; He-Yueya et al., 2023; Jiang et al.,
guagemodelswithaccesstoexternaltoolsandre- 2023). These works demonstrate the proficiency
sources,suchastheinformationretriever(Nakano ofLLMsintranslatingaconsiderablefractionof
et al., 2021; Shi et al., 2023; Lazaridou et al., mathematicalproblemsintoformalspecifications
2022), calculator (Cobbe et al., 2021), code in- definedintoolslikeSymPy(Meureretal.,2017),
terpreter (Wang et al., 2022), planner (Liu et al., Isabelle/HOL(Paulson,1994),andLean(deMoura
2023a),andotherpre-trainedmodels(Shenetal., etal.,2015). Mathematicalreasoningcanbecon-
2023). Recentworks(Gaoetal.,2023;Chenetal., sidered a specialized subset of logical reasoning,
2022) have achieved improved performance on primarilyfocusedonnumericdeductions. Dueto
arithmetic reasoning tasks by generating Python thisnumericspecificity,mathematicalproblemsare
programsthatspecifythereasoningprocedureas oftenmorereadilytranslatabletosymbolicforms.
chainedcommandsintheorderofexecution. How- Incontrast,logicalreasoningcoversawiderarray
ever, this idea has not been extended to logical ofproblemtypes,oftenrequiringadeeperunder-
reasoningproblems,primarilyduetothechallenge standing of world knowledge and commonsense
ofrepresentingtheirhighly“non-linear”reasoning foreffectiveparsingintosymbolicforms. Despite
procedure(e.g.,hypothesizing,case-by-caseanaly- plentyofworksstudyingmathematicalreasoning,
sis,andtheprocessofelimination)withfunctional ourworkpioneersinextendingtheconceptofauto-
programming. Our work provides a novel way formalizationtoabroaderrangeoflogicalreason-
to solve this within the framework of augmented ingtaskswithmodernLLMs.
LLMs. Insteadofparsingtheproblem-solvingpro-
cedureasprograms,weonlydescribetheproblem 3 LOGIC-LM
withsymboliclanguageusingLLMsandthenof-
AsshowninFigure2,theinputsofourmodelare
floadthereasoningtoexternalsymbolicsolvers.
alogicalreasoningproblemP describedinnatural
Auto-Formalization. The concept of convert- language, along with a goal G in the form of a
ingnaturallanguageintosymbolicrepresentations multiple-choiceorfree-formquestion. LOGIC-LM
hasbeenwidelyadoptedinauto-formalizationfor thenfollowsaproblemformulation-and-reasoning
mathematical reasoning (Wu et al., 2022; Drori paradigmtosolvetheproblem.
3808
IntheProblemFormulationstage,wepromptan Logic Programming (LP) Language. Deduc-
LLMtotranslatetheproblemandthegoalintoa tivereasoningtypicallystartsfromknownfactsand
task-specificsymboliclanguage. IntheSymbolic rules,anditerativelymakesnewinferencesuntilthe
Reasoningstage,wecalladeterministicsymbolic goalstatementcanbeprovedordisproved(Poole
Prolog
solver, e.g., a logic programming engine, to ob- and Mackworth, 2010). The logic pro-
tain a symbolic-represented answer. Finally, an gramminglanguage(ClocksinandMellish,2003;
LLM- or rule-based Result Interpreter is respon- Körneretal.,2022)isarguablythemostprominent
sible for translating the answer back to natural symboliclanguagetodescribedeductivereasoning
language. Using this approach, the reasoning is problems. We adopt its grammar to represent a
guaranteed to be faithful as long as the problem problemasfacts,rules,andqueries.
formulation is correct since the answer A is the Facts: a fact F is a simple statement with a
•
resultofexecutingdeterministicalgorithms(e.g., predicate and a set of arguments, formulated as
forward/backward-chaining)embeddedwithinthe
| | | | | | | P(a , | ,a ),whereP | | isthepredicatenameand | | | |
| ----------------- | --- | ------------------------- | --- | --- | --- | ------------- | ----------- | ------- | --------------------- | --- | ------- | ---- |
| | | | | | | 1 ··· | n | | | | | |
| symbolicreasoner. | | Comparedtopreviousmethods | | | | | | | | | | |
| | | | | | | each argument | | a i can | be a variable, | | entity, | num- |
basedonchain-of-thought,ourframeworkreduces ber,orbool. Forexample,Age(Peter,31)means
| the burden | of LLMs | by | shifting | their focus | from | | | | | | | |
| ---------- | ------- | --- | -------- | ----------- | ---- | --- | --- | --- | --- | --- | --- | --- |
“Peter’sageis31”,andMadeOfIron(Nails,True)
“solvingtheproblembyreasoningstep-by-step”to
representsthefact“Nailsaremadeofiron”.
“representingtheprobleminsymboliclanguage”.
| | | | | | | Rules: | rules | are written | in | the form | of | clauses: |
| --- | --- | --- | --- | --- | --- | ------ | ----- | ----------- | --- | -------- | --- | -------- |
•
| | | | | | | F 1 | F m | F m+1 | | F n ,whereeachF | | i is |
| --------------------- | --- | --- | --- | --- | --- | -------------------------------- | --- | ----- | ----- | --------------- | --- | ---- |
| | | | | | | ∧···∧ | → | | ∧···∧ | | | |
| 3.1 ProblemFormulator | | | | | | afactandtherulemeans“ifthefactsF | | | | | , | ,F |
| | | | | | | | | | | | 1 | m |
···
| | | | | | | aretrue,thenthefactsF | | | | F | arealsotrue.” | |
| -------------------------------------------- | --- | --- | --- | --- | --- | --------------------- | --- | --- | --- | --- | ------------- | --- |
| Intuitively,LLMsmaystrugglewithdirectlysolv- | | | | | | | | | m+1 | n | | |
···
| | | | | | | Queries: | a | query | Q is simply | another | | fact re- |
| ----------- | --------- | --- | --------- | -------- | ---- | -------- | --- | ----- | ----------- | ------- | --- | -------- |
| ing complex | reasoning | | problems. | However, | they | | | | | | | |
•
havedemonstratedanotableabilitytocomprehend quiredtobeprovedbasedonknownfactsandrules.
| textual | inputs and | translate | them | into formal | pro- | | | | | | | |
| ------- | ---------- | --------- | ---- | ----------- | ---- | ---------------------- | --- | --- | --- | ----------------- | --- | --- |
| | | | | | | First-OrderLogic(FOL). | | | | Whilethelogicpro- | | |
grams,suchasmathematicalequations(He-Yueya
gramminglanguageefficientlyrepresentscommon
| etal.,2023)orPythoncodes(Gaoetal.,2023). | | | | | We | | | | | | | |
| ---------------------------------------- | --- | --- | --- | --- | --- | --------- | --------- | --- | --------- | ------ | ---- | ------- |
| | | | | | | deductive | reasoning | | problems, | it may | fail | to rep- |
positthatthiscapabilitytoformulateproblemsinto
resentmorecomplexfirst-orderlogic(FOL)prob-
| different | languages | can | be extended | to symbolic | | | | | | | | |
| ---------------- | --------- | --------------------------- | ----------- | ----------- | --- | -------- | ------- | ----- | ------- | ------- | --- | ------- |
| | | | | | | lems. To | address | this, | we also | include | | the FOL |
| languagesaswell. | | Weleveragethefew-shotgener- | | | | | | | | | | |
grammar(Enderton,2001)inAppendixA.Aprob-
| alizationabilityofLLMstoachievethis. | | | | | Bypro- | | | | | | | |
| ------------------------------------ | --- | --- | --- | --- | ------ | ----------- | ------ | ---- | ------ | ------ | --------- | --- |
| | | | | | | lem is then | parsed | into | a list | of FOL | formulas, | |
vidingtheLLMwithdetailedinstructionsaboutthe
| | | | | | | which are | divided | into | Premises | (the | known | in- |
| --- | --- | --- | --- | --- | --- | --------- | ------- | ---- | -------- | ---- | ----- | --- |
grammarofthesymboliclanguage,alongsideafew
formationfromtheproblem)andConclusion(the
demonstrationsasin-contextexamples,weobserve
| | | | | | | unknownformulatobeproved). | | | | Anexamplesen- | | |
| --- | --- | --- | --- | --- | --- | -------------------------- | --- | --- | --- | ------------- | --- | --- |
thatLLMs,likeInstructGPT(Ouyangetal.,2022b)
tenceanditsFOLformulaaregiveninTable1.
andGPT-4(OpenAI,2023),caneffectivelyfollow
theinstructionstoidentifykeyentities,facts,and ConstraintSatisfaction(CSP). Constraintsat-
| rules present | in | the problem | statement, | | and then | | | | | | | |
| ------------- | --- | ----------- | ---------- | --- | -------- | --------- | -------- | ------ | --- | ------- | ----- | ---- |
| | | | | | | isfaction | problems | (CSPs) | | (Kumar, | 1992) | aims |
translate these elements into symbolic language to find the value assignment of a set of objects
followingourdefinedgrammar. that satisfy a number of constraints. A CSP
Specifically,weusefourdifferentsymbolicfor- is often defined as a triple (X,D,C), where
| | | | | | | X = x | , | ,x | | | | D = |
| --- | --- | --- | --- | --- | --- | ----- | --- | --- | --- | --- | --- | --- |
mulationstocoverfourcommontypesoflogical 1 n is a set of variables,
| | | | | | | { | ··· | } | | | | |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
reasoning problems: deductive reasoning, first- D , ,D isasetoftheirrespectivedomains
| | | | | | | 1 | n | | | | | |
| --- | --- | --- | --- | --- | --- | ----- | --- | --- | --- | --- | --- | --- |
| | | | | | | { ··· | } | | | | | |
orderlogicreasoning,constraintsatisfactionprob- ofvalues,andC = C , ,C isasetofcon-
| | | | | | | | | { | 1 ··· | m } | | |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | ----- | --- | --- | --- |
lem, and analytical reasoning. These formula- straints. Each variable x i can take on the values
tions provide a foundation for translating natu- inthenonemptydomainD . EveryconstraintC
| | | | | | | | | | i | | | j |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
rallanguage-basedproblemstatements. Bydefin- is a pair t ,R , where t X is a subset of k
| | | | | | | | j | j | j | | | |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| | | | | | | | ⟨ | ⟩ | ⊂ | | | |
ingadditionalproblem-specificformulations,our variables and R j is a k-ary relation on the corre-
spondingsubsetofdomainsD
frameworkretainstheflexibilitytoaccommodatea j . Weusetheabove
widerrangeofreasoningtasks. Next,wewilldelve syntax to define a CSP problem as variables, do-
into the grammar of each symbolic formulation. mains, and constraints. An example is given in
| ExamplesofeachproblemtypeareinFigure2. | | | | | | bothFigure2andTable1. | | | | | | |
| -------------------------------------- | --- | --- | --- | --- | --- | --------------------- | --- | --- | --- | --- | --- | --- |
3809
Example
| Problem | Formulation | | | | | | | | | Solver | | Dataset |
| --------- | ----------- | -------------------------- | ---------- | --- | --- | ------------------ | ------------------- | ---------- | ----- | ------ | --- | ----------- |
| | | | NLSentence | | | | SymbolicFormulation | | | | | |
| | | Ifthecircuitiscompleteand | | | | Complete(Circuit, | | True) | | | | |
| Deductive | | | | | | | | | ∧ | | | ProntoQA, |
| | LP | thecircuithasthelightbulb | | | | Has(Circuit, | | LightBulb) | | Pyke | | |
| Reasoning | | | | | | | | | | | | ProofWriter |
| | | thenthelightbulbisglowing. | | | | Glowing(LightBulb, | | | True) | | | |
→
First-Order ACzechpersonwroteabook x2∃ x1(Czech(x1) Author(x2,x1)
| | FOL | | | | | ∃ Book(x2) | Publish(x2,1946)) | ∧ | | Prover9 | | FOLIO |
| ---------- | --- | --------------------------- | --- | --- | --- | ---------- | ----------------- | --------- | --- | ------- | --- | ----- |
| Logic | | in1946. | | | | | | | | | | |
| | | | | | | ∧ | ∧ | | | | | |
| | | Onashelf,therearefivebooks. | | | | blue_book | | 1,2,3,4,5 | | | | |
| Constraint | | | | | | | | | | python- | | |
CSP Thebluebookistotheright yellow_book ∈{ 1,2,3,4,5 } LogicalDeduction
| Satisfaction | | | | | | | | | | constraint | | |
| ------------ | --- | ------------------------ | --- | --- | --- | ---------------------- | --------- | ------- | ------ | ---------- | --- | ------- |
| | | oftheyellowbook. | | | | blue_book>yellow_book | | ∈{ | } | | | |
| | | | | | | repairs(Xena, | | radios) | | | | |
| Analytical | | Xenaandexactlythreeother | | | | | | | ∧ | | | |
| | SAT | | | | | Count([t:technicians], | | | t=Xena | Z3 | | AR-LSAT |
| Reasoning | | techniciansrepairradios | | | | | | | ̸ | | | |
| | | | | | | repairs(t, | radios))) | | == 3) | | | |
∧
Table1: Asummaryofthesymbolicformulations(withexamples)andsymbolicsolversweuseforthefivedatasets
inourstudy,representingfourdifferenttypesoflogicalreasoningproblems.
BooleanSatisfiability(SAT)Formulation. SAT FOL Prover. We use Prover92 as the FOL in-
Prover9isanautomatedtheorem
| istheproblemofdecidingifthereisanassignment | | | | | | ferenceengine. | | | | | | |
| ------------------------------------------- | --- | --- | --- | --- | --- | -------------- | --- | --- | --- | --- | --- | --- |
to the variables of a Boolean formula such that proverthatsupportsfirst-orderlogicandequational
theformulaissatisfied. Manyanalyticalreasoning logic. ItinitiallyconvertsFOLstatementstocon-
problemscanbeformulatedasSATproblems. We junctive normal form (CNF) and then performs
adopt the grammar defined in Ye et al. (2023) to resolution(Robinson,1965)ontheCNFtodeduce
formulateanSATproblem as(Φ, , ),where whetheraconclusionistrue,false,orunknown.
| | | P | | T Q | | | | | | | | |
| ----------------------------------------- | --- | --- | --- | --- | --- | --- | ------- | --- | ------- | ----- | ----- | -------------- |
| Φisasetofconstraintsdefinedunderthetheory | | | | | | , | | | | | | |
| | | | | | T | CSP | Solver. | | Solving | a CSP | is to | find value as- |
and isthequeryofinterest.
| Q | | | | | | signments | | for all | variables | that | satisfy | all given |
| ----- | ------------ | --- | ---------- | --- | ------- | ------------ | --- | -------- | --------- | ---- | ---------- | --------- |
| Table | 1 summarizes | the | four types | of | logical | | | | | | | |
| | | | | | | constraints. | | Commonly | | used | algorithms | for this |
reasoningproblems,theirtypicaldatasets,andthe taskincludebacktracking,constraintpropagation,
symbolicformulationusedtorepresenteachtypeof and local search variants. To this end, we incor-
problem. Wealsogiveanexampleofanaturallan- python-constraint3
| | | | | | | porate | the | | | | package | which |
| --- | --- | --- | --- | --- | --- | ------ | --- | --- | --- | --- | ------- | ----- |
guagestatementwithitscorrespondingsymbolic
offerssolversforCSPsoverfinitedomains.
| formulationforeachtype. | | AppendixCshowsthe | | | | | | | | | | |
| ----------------------- | --- | ----------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
full prompts we use for the problem formulator. SATSolver. ForsolvingSATproblems,weuse
| | | | | | | the | Z3 theorem | | prover | (de | Moura | and Bjørner, |
| --- | --- | --- | --- | --- | --- | --- | ---------- | --- | ------ | --- | ----- | ------------ |
ToteachLLMstobetteraligneachstatementwith
| | | | | | | 2008), | a | satisfiability | | modulo | theories | (SMT) |
| ----------------- | -------- | --- | -------- | --- | -------- | ------ | --- | -------------- | --- | ------ | -------- | ----- |
| its corresponding | symbolic | | form, we | use | the for- | | | | | | | |
solverdevelopedbyMicrosoft4.
TheSMTsolver
| mat SYMBOLIC_FORMULA | | | ::: NL_STATEMENT | | | | | | | | | |
| -------------------- | --- | --- | ---------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
inin-contextexamplestoenablebettergrounding. providesalgorithmstodeterminewhetherasetof
| | | | | | | mathematicalformulasissatisfiable. | | | | | | Itgeneralizes |
| --- | --- | --- | --- | --- | --- | ---------------------------------- | --- | --- | --- | --- | --- | ------------- |
3.2 SymbolicReasoner the SAT problems to more complex formulas in-
After the problem formulator parses the problem volving real numbers, integers, and various data
| | | | | | | structures | | such | as lists, | arrays, | bit | vectors, and |
| --------- | ----------- | -------- | --------------- | --- | --- | ---------- | --- | ---- | --------- | ------- | --- | ------------ |
| P and the | goal G into | symbolic | representations | | | | | | | | | |
Pˆ and Gˆ , we call a deterministic external solver strings. A lot of real-world analytical reasoning
dependingonthetask,toobtaintheanswerA. Ta- problemscanberepresentedasproblemsofsolv-
ingasystemofequations.
ble1summarizesthesymbolicsolversweusefor
eachtypeoflogicalreasoningproblem.
| | | | | | | 3.3 | Self-Refiner | | | | | |
| --- | --- | --- | --- | --- | --- | --- | ------------ | --- | --- | --- | --- | --- |
LPSystem. Fordeductivereasoning,weincor- Forcomplexproblems,generatingthecorrectlog-
poratethePykeexpertsystem(Frederiksen,2008),
| | | | | | | icalformmaybecomechallengingforLLMs. | | | | | | To |
| ----------------- | ---------- | ----------------------- | --- | --------- | ---- | ------------------------------------ | ----- | ------ | --------- | ---------- | --------------- | ------------ |
| which makes | inferences | based | on | the logic | pro- | | | | | | | |
| | | | | | | address | this, | we | introduce | a | self-refinement | mod- |
| gramminglanguage. | | Inresponsetoaquery,Pyke | | | | | | | | | | |
| | | | | | | ule | that | learns | to modify | inaccurate | | logical for- |
firstcreatesaknowledgebase,populatingitwith
2https://www.cs.unm.edu/~mccune/prover9/
| known facts | and rules. | Subsequently, | | it | applies | | | | | | | |
| ----------- | ---------- | ------------- | --- | --- | ------- | --- | --- | --- | --- | --- | --- | --- |
3https://github.com/python-constraint/
forward-andbackward-chainingalgorithmstoin-
python-constraint
fernewfactsandsubstantiatethegoal. 4https://github.com/Z3Prover/z3
3810
mulationsusingtheerrormessagesfromthesym- eachpartrequiring0, 1, 2, 3,and 5hops
≤ ≤ ≤ ≤
bolic reasoner as feedback. Recent works (Chen ofreasoning,respectively. Weevaluatethehardest
etal.,2023;Madaanetal.,2023)haveadoptedsim- depth-5subset. Toreduceoverallexperimentation
ilarideastoimprovecodegeneration,byteaching costs, we randomly sample 600 examples in the
LLMstodebugtheirpredictedprogramsviafew- testsetandensureabalancedlabeldistribution.
shotdemonstrations. Hereweextendthisideato FOLIO (Han et al., 2022) is a challenging
refinegeneratedlogicrepresentations. Ifthesym- expert-written dataset for logical reasoning. The
bolicsolverreturnsanexecutionerror,weinstruct problemsaremostlyalignedwithreal-worldknowl-
the LLM to refine the incorrect logical form, by edgeandusehighlynaturalwordings,andtheques-
prompting it with the erroneous logic form, the tionsrequirecomplexfirst-orderlogicreasoningto
solver’serrormessage,andasetofdemonstrations solve. WeusetheentireFOLIOtestsetforevalua-
showingcommonerrorcases(e.g.,afreevariable tion,consistingof204examples.
isnotboundedtoanyquantifierinFOL)andtheir LogicalDeductionisachallenginglogicalrea-
remedies. Werunthisprocessiterativelyuntilei- soning task from the BigBench (Srivastava et al.,
ther no error messages are returned, or the maxi- 2022)collaborativebenchmark. Theproblemsare
mumnumberofallowablerevisionsisreached. mostlyaboutdeducingtheorderofasequenceof
objectsfromaminimalsetofconditions. Weuse
3.4 ResultInterpreter thefulltestsetconsistingof300examples.
Finally,theresultinterpretertranslatestheresults AR-LSAT(Zhongetal.,2022)isadatasetthat
returnedfromthesymbolicsolverbacktoanatural collects all analytical logic reasoning questions
language answer. For certain problems, this can fromtheLawSchoolAdmissionTestfrom1991to
beachievedthroughpredefinedrules;forexample, 2016. Weusethetestsetwhichhas231multiple-
mappingEntailmenttotrue. However,thispro- choice questions. AR-LSAT is particularly chal-
cesscanbemorecomplexforCSPs,e.g.,translat- lenging,withstate-of-the-artmodelsonlyachiev-
ing{convertible: 1,tractor: 2,minivan: 3}to“the ingperformanceslightlybetterthanrandomguess-
convertibleistheoldest.”. Tohandlethesevarying ing(Liangetal.,2022;Ribeiroetal.,2023a).
levelsofcomplexity,wedesignedbothrule-based Weconvertallexamplesintoastandardmultiple-
andLLM-basedresultinterpreters. Detailsofthe choiceformat,comprisingaproblemstatement,a
resultinterpreteraregiveninAppendixD. question,andpotentialanswers,asshowninFig-
ure2. Wealsoselect1-5examplesfromthetrain-
4 Experiments ingsetofeachdatasetasin-contextexamples. De-
taileddatastatisticsareinAppendixB.
Datasets. Weevaluate LOGIC-LM onfivecom-
monlogicalreasoningdatasets,asfollows. Baselines. We compare our model against two
PrOntoQA(SaparovandHe,2023)isarecent baselinesthatdependsolelyonLLMsforlogical
syntheticdatasetcreatedtoanalyzethecapacityof reasoning: 1)Standard LLMs,whichleveragein-
LLMsfordeductivereasoning. Weusethehardest context learning to directly answer the question;
fictionalcharactersversionofthedataset,basedon and2)Chain-of-Thought(CoT)(Weietal.,2022b),
theresultsinSaparovandHe(2023). Eachversion which adopts a step-by-step problem-solving ap-
isdividedintodifferentsubsetsdependingonthe proach,generatingexplanationsbeforeproviding
number of reasoning hops required. We use the the final answer. We separately evaluate the set-
hardest5-hopsubsetforevaluation. Eachquestion tings that ChatGPT (gpt-3.5-turbo), GPT-3.5
inPrOntoQAaimstovalidateanewfact’sveracity, (text-davinci-003) (Ouyang et al., 2022a) and
suchas“Trueorfalse: Alexisnotshy.”. GPT-4(gpt-4)(OpenAI,2023)serveastheunder-
ProofWriter (Tafjord et al., 2021) is another lying LLMs for all models. To ensure fair com-
commonlyuseddatasetfordeductivelogicalrea- parisons,weusethesamein-contextexamplesfor
soning. ComparedwithPrOntoQA,theproblems all models. For reproducible results, we set the
areexpressedinamorenaturalisticlanguageform. temperatureto0andselecttheresponsewiththe
Weusetheopen-worldassumption(OWA)subset highestprobabilityfromLLMs. Sinceallexamples
in which each example is a (problem, goal) pair areformedasmultiple-choicequestions,weeval-
and the label is one of {PROVED, DISPROVED, uatemodelperformancebasedontheaccuracyof
UNKNOWN}. Thedatasetisdividedintofiveparts, selectingthecorrectanswer.
3811
ChatGPT(gpt-3.5-turbo) GPT-3.5(text-davinci-003) GPT-4(gpt-4)
Dataset
Standard CoT Logic-LM Standard CoT Logic-LM Standard CoT Logic-LM
PrOntoQA 47.40 67.80 61.00 51.80 83.00 85.00 77.40 98.79 83.20
ProofWriter 35.50 49.17 58.33 36.16 48.33 71.45 52.67 68.11 79.66
FOLIO 45.09 57.35 62.74 54.60 57.84 61.27 69.11 70.58 78.92
LogicalDeduction 40.00 42.33 65.67 41.33 48.33 62.00 71.33 75.25 87.63
AR-LSAT 20.34 17.31 26.41 22.51 22.51 25.54 33.33 35.06 43.04
Table2: Accuracyofstandardpromoting(Standard),chain-of-thoughtpromoting(CoT),andourmethod(LOGIC-
LM,withoutself-refinement)onfivereasoningdatasets. ThebestresultswithineachbaseLLMarehighlighted.
4.1 MainResults GPT-3.5 GPT-4
Dataset SR
Exe_Rate Exe_Acc Exe_Rate Exe_Acc
WereporttheresultsofLOGIC-LM (withoutself-
99.4% 84.9 100.0% 83.2
refinement)andbaselinesinTable2. For LOGIC- ProntoQA − + 100.0% 0.6 85.0 0.1 100.0% 83.2
↑ ↑
LM,asymbolicsolverdoesnotreturnananswer
87.3% 73.6 99.0% 79.6
ProofWriter −
when there are grammar errors in the symbolic + 95.6% 8.3 74.1 0.5 99.0% 79.6
↑ ↑
formulation. For these un-executable cases, we 66.7% 61.8 79.9% 80.4
FOLIO −
+ 84.3% 17.6 64.3 2.5 85.8% 5.9 79.9 0.5
fallbackonusingchain-of-thoughttopredictthe ↑ ↑ ↑ ↓
Logical 100.0% 62.0 100.0% 87.6
answer. Wehavethreemajorobservations. −
Deduction + 100.0% 62.0 100.0% 87.6
1. Logic-LM significantly outperforms stan-
11.3% 57.7 32.6% 60.0
AR-LSAT −
dardLLMsandCoTacrossalldatasets.WithGPT- + 21.8% 10.5 60.3 2.6 39.8% 7.2 58.8 1.2
↑ ↑ ↑ ↓
3.5,ourmethodoutperformsstandardLLMonall
Table3: Analysisofaccuracyandexecutionstatusof
datasets, withanaverageimprovementof39.2%.
LOGIC-LM.Wepresentthepercentageofexecutable
This highlights the benefit of combining LLMs
logicalformulations(Exe_Rate)togetherwiththeaccu-
withexternalsymbolicsolversforlogicalreason- racyoftheexecution(Exe_Acc). SRrepresentsbefore
ing. LOGIC-LMalsoimprovesCoTbyalargemar- ( )andafter(+)self-refinement.
−
ginof18.4%onaverage,showingthatoffloading
thereasoningtosymbolicsolversgreatlyimproves
faithfulness compared with pure language-based thatCoTemulateshumanforward-chainreasoning:
reasoningwithCoT. beginning with known facts and sequentially de-
rivingnewconclusionsuntilthegoalismet. This
2. GPT-4outperformsGPT-3.5byalargemargin
reasoning style aligns well with problems in the
of48.46%onaverageforthestandardprompting.
PrOntoQA and ProofWriter datasets. However,
This aligns with the assertion that the main en-
FOL and CSP problems often necessitate more
hancementofGPT-4liesinitsabilitytocarryout
sophisticated reasoning strategies that are “non-
complexreasoning(OpenAI,2023). Althoughthis
linear” compared to standard forward-chain rea-
mayindicatethatthelogicalreasoningcapability
soning. Theseincludehypothesizing,conditioning,
canbeboostedbyscalinguptheLLM,weobserve
recursive inference, and the process of elimina-
thatGPT-4stillmakesnumerousunfaithfulreason-
tion. ComparedtoCoT,theintegrationofsymbolic
ingerrors. Bydelegatingthereasoningtosymbolic
solvers is better suited to these reasoning styles,
solvers, our method can further improve GPT-4
henceyieldingamoremarkedimprovementonFO-
byanaverageof24.98%and10.44%forstandard
LIO(+21.85%),LogicalDeduction(+45.67%),and
promptingandCoTprompting,respectively.
AR-LSAT(+24.14%).
3. While integrating CoT generally enhances
LLM performance, we find its benefits compara-
4.2 EffectivenessofProblemFormulator
tivelylesssubstantialorevennegativeonFOLIO,
LogicalDeduction,andAR-LSAT,withamodest We then evaluate how well LLM can translate a
improvement of 11.75%, 9.41%, and -3.2%, re- givenproblemintothesymbolicformulationused
spectively. On the contrary, the benefits of CoT byeachsymbolicsolver. InTable3,wereportthe
on ProntoQA and ProofWriter are 51.59% and percentageofsymbolicformulationsthatareexe-
33.82%, respectively. A plausible explanation is cutablebythecorrespondingsymbolicsolverfor
3812
Accuracy Standard CoT Logic-LM CoT (GPT-3.5) Logic-LM (GPT-3.5)
| | | | | | | Accuracy | | CoT (GPT-4) | | Logic-LM (GPT-4) | |
| --- | --- | --- | --- | --- | --- | -------- | --- | ----------- | --- | ---------------- | --- |
90
| 81.7 | | | | | | 85 | | | | | |
| ---- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
77.3
| 80 | | 73.6 | | | | | 78.92 | | | 79.9 | 79.41 |
| --- | --- | ---- | --- | ---- | ---- | --- | ----- | ----- | --- | ---- | ----- |
| | | | | 71.3 | 71.1 | 80 | | 78.43 | | | |
7076.3
73.6
75
57.7
| 60 | | 65.3 | | | | | | | | | |
| --- | ---- | ---- | --- | ---- | --- | --- | --- | --- | --- | --- | ----- |
| | 52.6 | | | 59.4 | | 70 | | | | | 70.58 |
47.3
| 50 | | | | | | | | | | 64.56 | 63.84 |
| --- | --- | --- | --- | --- | --- | --- | ----- | ----- | --- | ----- | ----- |
| | | | | | 51 | 65 | 61.27 | 62.25 | | | |
38.3
| 40 | | | | | 33.5 | | | | | | |
| --- | --- | --- | --- | --- | ---- | --- | --- | --- | --- | --- | --- |
60
57.87
30
55
| 0 | 1 | 2 | | 3 | 5 | Rounds | 0 | | 1 | 2 | 3 |
| --- | --- | --- | --- | --- | --- | ------ | --- | --- | --- | --- | --- |
Reasoning Depth
| | | | | | | GPT-3.5 | 66.7% | 79.4% | | 82.4% | 84.3% |
| --- | --- | --- | --- | --- | --- | ------- | ----- | ----- | --- | ----- | ----- |
Figure3: Accuracyofdifferentmodelsforincreasing GPT-4 79.9% 85.3% 85.3% 85.8%
sizeofreasoningdepthontheProofWriterdataset.
| | | | | | | Figure 4: | The | accuracy | for different | rounds | of self- |
| --- | --- | --- | --- | --- | --- | --------- | --- | -------- | ------------- | ------ | -------- |
refinement,withthecorrespondingexecutablerates.
| eachdataset(Exe_Rate). | | Generally,LLMdemon- | | | | | | | | | |
| ---------------------- | --- | ------------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
strates high proficiency in transcribing problems ple,LOGIC-LMoutperformsCoTby7.1%,5.0%,
1
intosymbolicformats,evidencedbyitsnear100%
| | | | | | | 12.7%, | 20.0%, | and 39.4% | | on depth-0, | depth-1, |
| -------- | ------------ | ------------ | --- | --- | ----- | -------- | -------- | --------- | ------- | ----------- | -------- |
| Exe_Rate | on ProntoQA, | ProofWriter, | | and | Logi- | | | | | | |
| | | | | | | depth-2, | depth-4, | and | depth-5 | problems, | respec- |
calDeduction. However,thehighperformanceon tively. InLOGIC-LM,multi-steplogicalreasoning
thesedatasetsissomewhatanticipated,giventhat
isdelegatedtoexternalsymbolicsolvers,thereby
theirproblemsaremostlysyntheticallygenerated,
transitioningthechallengeofLLMfromproblem-
| limiting language | variability. | | When | it | comes to | | | | | | |
| ----------------- | ------------ | --- | ---- | --- | -------- | ------------------------------- | --- | --- | --- | --------------- | --- |
| | | | | | | solvingtoproblemrepresentation. | | | | Ideally,thecom- | |
datasets comprising real-world, expertly crafted plexity of formally representing a problem state-
| problems, | such as FOLIO | | and AR-LSAT, | | GPT- | | | | | | |
| --------- | ------------- | --- | ------------ | --- | ---- | --- | --- | --- | --- | --- | --- |
mentinlogicalformshouldremainrelativelycon-
| 4’s performance | is notably | | less promising, | | with | | | | | | |
| --------------- | ---------- | --- | --------------- | --- | ---- | --- | --- | --- | --- | --- | --- |
stant,regardlessofwhetherthequestionsrequire
Exe_Ratescoresof79.9%and32.6%respectively.
| | | | | | | simple | or complex | reasoning. | | The trends | in Fig- |
| ---------------- | ----------- | --- | --- | -------- | ----- | --------------------------- | ---------- | ---------- | --- | ---------------- | ------- |
| This discrepancy | underscores | | the | inherent | chal- | | | | | | |
| | | | | | | ure3validatethisassumption. | | | | Theperformanceof | |
lengesassociatedwithconvertingreal-worldprob-
| | | | | | | Standard | andCoT | declinesprecipitouslywiththe | | | |
| --- | --- | --- | --- | --- | --- | -------- | ------ | ---------------------------- | --- | --- | --- |
lemsintotheirlogicalequivalents.
| | | | | | | escalation | of problem | | complexity. | However, | this |
| --- | --- | --- | --- | --- | --- | ---------- | ---------- | --- | ----------- | -------- | ---- |
Exe_Rateonlyreflectsthegrammarcorrectness
| | | | | | | trendislessprominentfor | | | LOGIC-LM,indicating | | |
| -------------- | ----- | ------- | ------ | --- | -------- | ----------------------- | --- | --- | ------------------- | --- | --- |
| of the logical | form. | We also | report | the | accuracy | | | | | | |
thattherobustreasoningcapabilitiesprovidedby
| of the executable | samples | | (Exe_Acc) | to | measure | | | | | | |
| ----------------- | ------- | --- | --------- | --- | ------- | --- | --- | --- | --- | --- | --- |
externalsolverssubstantiallymitigateperformance
the semantic correctness. We find that logical degradationforcomplexreasoningproblems.
formsgeneratedbyGPT-4generallyachievehigh
Exe_Acc,evenforthemostchallengingAR-LSAT 4.4 ImpactofSelf-Refinement
dataset. Suchperformanceaccentuatesthepoten- InTable3,wefindthatself-refinementiseffective
tialofsymbolicsolversinbolsteringthemodel’s infixingthein-executablesymbolicformulations,
logicalreasoningprowess, contingentonthepre- increasingtheExe_Rateby5.01onaverage.
For
cisetranslationofproblemsintosymbolicforms. an in-depth analysis, we then evaluate the accu-
racyandExe_Rateacrossdifferentroundsofself-
4.3 RobustnessofReasoning
refinementonFOLIO,namely,0(norefinement),
Incorporatingsymbolicsolversalsoleadstomore 1,2,and3rounds. TheresultsareinFigure4.
robust reasoning. To illustrate this, we report Wefindthatastheroundsofself-refinementin-
theperformanceofLOGIC-LM andbaselinesfor crease,thepercentageofexecutableformulations
questions of varying complexity levels. We ran- consistentlyincreases,leadingtoanenhancement
domly selected 300 examples from each subset in the final performance. This suggests that self-
of ProofWriter, ensuring a balanced label distri- refinementservesasaneffectivetoolinaidingthe
bution. The problems in these subsets require 0, LLM to accurately frame the problem. However,
<=1,<=2,<=3,and<=5hopsofreasoning,respec- theaccuracytendstostagnateinsubsequentrounds,
tively. The results, shown in Figure 3, indicate even though the Exe_Rate continues to increase.
thatLOGIC-LMbecomesincreasinglyeffectiveas This can be attributed to the type of feedback re-
therequiredreasoningdepthincreases. Forexam- ceived by the self-refiner, which is the error mes-
3813
Problem: "Stranger Things" is a popular Netflix show. If a Netflix show is popular, Karen will binge-watch it.
If and only if Karen binge-watches a Netflix show, she will download it. Karen does not download "Black Mirror".
"Black Mirror" is a Netflix show. If Karen binge-watches a Netflix show, she will share it to Lisa.
Question: Is the following statement true, false, or uncertain? "Black Mirror" is popular.
(A) True (B) False (C) Uncertain
Generated symbolic Formulations:
Predicates:
NetflixShow(x) # x is a Netflix show.
Popular(x) # x is popular.
BingeWatch(x, y) # x binge-watches y.
Download(x, y) # x downloads y.
Share(x, y, z) # x shares y to z.
Premises:
NetflixShow(strangerThings) ∧ Popular(strangerThings) # "Stranger Things" is a popular Netflix show.
∀x (NetflixShow(x) ∧ Popular(x) → BingeWatch(karen, x)) # If a Netflix show is popular, Karen will binge-watch it.
∀x (NetflixShow(x) ∧ BingeWatch(karen, x) ↔ Download(karen, x)) # If and only if Karen … , she will download it.
NetflixShow(blackMirror) ∧ ¬Download(karen, blackMirror) # Karen does not … "Black Mirror" is a Netflix show.
∀x (NetflixShow(x) ∧ BingeWatch(karen, x) → Share(karen, x, lisa)) # If Karen … , she will share it to Lisa.
Conclusion:
Popular(blackMirror) # "Black Mirror" is popular.
Predicted answer: B
Figure5: AnexampleofthegeneratedsymbolicrepresentationandthepredictedanswerbyLOGIC-LM.
sagefromthesymbolicsolver. Thisfeedbackaids expressionsaccurately. Inthiscase,themodelfails
in converting “invalid” symbolic representations to distinguish between the meanings of “below”
intovalidones. However,avalidsymbolicrepre- and “above”, resulting in an incorrect constraint
sentationdoesnotnecessarilyequatetoa“correct” Dan > Eve. Example4exemplifiesGPT-4’schal-
problemformulationthataccuratelyrepresentsthe lenge with fully grasping the rules of FOL gram-
problem. This issue could be tackled by enhanc- mar, evidenced by the invalid generated formula:
ingtheself-refinertoincorporatefeedbackbeyond Rating(subway, y) y > 9. Theseerrorcases
∧
the error message, e.g., a reward signal from an underscore that transforming problems into logi-
additionalmoduleevaluatingtheaccuracyofagen- cal forms remains a challenging task for modern
eratedsymbolicform. Weleavethisasapromising LLMs,duetotheintricaciesofFOLformulation,
directionforfutureexploration. the innate flexibility of natural language, and the
complexityofglobalproblemcomprehension.
4.5 CaseStudy
InFigure5,weshowanexampleofthesymbolic 5 ConclusionandFutureWork
representationsgeneratedbyGPT-4,togetherwith
thepredictedanswer. Ingeneral,LOGIC-LMhas In this work, we propose a novel approach to ad-
demonstrated a potent capacity to interpret com- dress logical reasoning problems by combining
plexproblemsintosymbolicforms. Nonetheless, largelanguagemodelswithsymbolicsolvers. We
there remain certain difficulties in accurately un- introduce Logic-LM, one instantiation of such a
derstandingthesemanticsoftheproblem. framework, and demonstrate how it significantly
We further analyze some error cases in Fig- improvesperformanceoverpureLLMsandchain-
ure 6 of Appendix E. Example 1 shows a case of-thoughtpromptingtechniques.
whereGPT-4generatesanincorrectFOLrepresen- WhileLogic-LMhasproventobeacapablesys-
tation, stemming from its inability to define ap- tem,itcanbefurtherimprovedwithextensionto
propriatepredicates. Here,insteadofcreatingthe moreflexibleandpowerfullogicsystems. Forex-
predicate EasternWildTurkey, the model gener- ample,statisticalrelationallearning(SRL)systems
atesaconstant,WildTurkey(eastern),inwhich such as Markov logic networks (Richardson and
WildTurkey is the predicate and eastern is the Domingos,2006)andprobabilisticsoftlogic(Bach
constant. Whilethisrepresentationisvalidiniso- et al., 2017) have demonstrated great promise in
lation, it does not interact well with subsequent reasoning under uncertainty and integration with
constants. Thisinconsistencyisarecurringissue ourframeworkwouldenableevenmoreadaptive
inGPT-4’ssymbolicformgeneration,illustrating problem-solving capabilities. Additionally, our
thatthemodelsometimesstrugglestomaintainan method can be extended to reasoning problems
overarching understanding of the problem when requiringcommonsense,whichremainsasignifi-
forminglogicalsymbols. Example3highlightsa cantchallengeastheyoftenrequirereasoningover
case where GPT-4 struggles to interpret specific complexandambiguousrules.
3814
| Limitations | | | | | | | and probabilistic | | soft | logic. | Journal | of Machine | |
| ----------- | --- | --- | --- | --- | --- | --- | ----------------- | --- | ---- | ------ | ------- | ---------- | --- |
LearningResearch(JMLR),18(1):1–67.
| We identify | two | main | limitations | of | LOGIC-LM. | | | | | | | | |
| ----------- | --- | ---- | ----------- | --- | --------- | --- | --- | --- | --- | --- | --- | --- | --- |
TomB.Brown,BenjaminMann,NickRyder,Melanie
| First, LOGIC-LM | | relies | on translating | | reasoning | | | | | | | | |
| --------------- | --- | ------ | -------------- | --- | --------- | --- | -------- | ----- | ------- | -------- | --------- | --- | ------ |
| | | | | | | | Subbiah, | Jared | Kaplan, | Prafulla | Dhariwal, | | Arvind |
problemsintologicalformatsthatcanbetackledby
Neelakantan,PranavShyam,GirishSastry,Amanda
| symbolicsolvers. | | Asaconsequence,themodel’s | | | | | | | | | | | |
| ---------------- | --- | ------------------------- | --- | --- | --- | --- | ------- | -------- | -------- | --- | ----- | ------------- | --- |
| | | | | | | | Askell, | Sandhini | Agarwal, | | Ariel | Herbert-Voss, | |
applicabilityisinherentlyboundedbytheexpres- Gretchen Krueger, Tom Henighan, Rewon Child,
| | | | | | | | Aditya | Ramesh, | Daniel | M. | Ziegler, | Jeffrey | Wu, |
| --- | --- | --- | --- | --- | --- | --- | ------ | ------- | ------ | --- | -------- | ------- | --- |
sivenessofthesymbolicsolver,forexample,notall
ClemensWinter,ChristopherHesse,MarkChen,Eric
problemscanbeeasilyencodedinfirst-orderlogic.
Sigler,MateuszLitwin,ScottGray,BenjaminChess,
| Nevertheless, | | this limitation | can | be | mitigated | by | | | | | | | |
| ------------- | --- | --------------- | --- | --- | --------- | --- | ----------- | ----------- | --- | ------- | --- | ----------- | --- |
| | | | | | | | Jack Clark, | Christopher | | Berner, | Sam | McCandlish, | |
integratingamorediversesetofsymbolicsolvers. Alec Radford, Ilya Sutskever, and Dario Amodei.
| | | | | | | | 2020. | Language | models | are | few-shot | learners. | In |
| ------------------- | -------------------------------- | --- | -------- | --------------- | --- | --- | ----------- | -------- | ------ | ------ | ---------- | --------- | ------ |
| Theflexibledesignof | | | LOGIC-LM | facilitatesthis | | | | | | | | | |
| | | | | | | | Proceedings | | of the | Annual | Conference | on | Neural |
| integration. | Thewiderangeofreasoningtasksthat | | | | | | | | | | | | |
InformationProcessingSystems(NeurIPS).
| wecaninstantiateour | | | LOGIC-LM | frameworkon | | | | | | | | | |
| ------------------- | --- | --- | -------- | ----------- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
showsitsgeneralapplicability. Le-Wen Cai, Wang-Zhou Dai, Yu-Xuan Huang, Yu-
| | | | | | | | Feng | Li, Stephen | H. | Muggleton, | | and Yuan | Jiang. |
| -------- | -------- | ---- | --------------- | --- | ---------- | --- | ---------------------------------------------- | ----------- | -------- | ---------- | ----------- | --------- | ------ |
| Second, | LOGIC-LM | | depends | on | in-context | | | | | | | | |
| | | | | | | | 2021. | Abductive | learning | | with ground | knowledge | |
| learning | coupled | with | self-refinement | | to convert | | | | | | | | |
| | | | | | | | base. InProceedingsofthe30thInternationalJoint | | | | | | |
anaturallanguage(NL)problemintothesymbolic ConferenceonArtificialIntelligence(IJCAI),pages
| representation. | | While | this method | has | proven | to | 1815–1821. | | | | | | |
| --------------- | --- | ----- | ----------- | --- | ------ | --- | ---------- | --- | --- | --- | --- | --- | --- |
beeffective,itmayfacedifficultieswhendealing
| | | | | | | | Wenhu | Chen, | Xueguang | Ma, | Xinyi | Wang, | and |
| --- | --- | --- | --- | --- | --- | --- | ----- | ----- | -------- | --- | ----- | ----- | --- |
withlogicalrepresentationswithintricategrammar
| | | | | | | | William | W. | Cohen. | 2022. | Program | of thoughts | |
| --- | --- | --- | --- | --- | --- | --- | ------- | --- | ------ | ----- | ------- | ----------- | --- |
structures, such as probabilistic soft logic. This prompting: Disentangling computation from rea-
| | | | | | | | soning | for numerical | | reasoning | | tasks. | CoRR, |
| ----------------------------------------- | --- | ---------- | ------------ | --- | ------- | --- | --------------- | ------------- | --- | --------- | --- | ------ | ----- |
| arises from | the | difficulty | in conveying | | complex | | | | | | | | |
| grammaticalrulestothelanguagemodelthrough | | | | | | | abs/2211.12588. | | | | | | |
alimitednumberofdemonstrationswithinacon-
| | | | | | | | Xinyun Chen, | Maxwell | | Lin, | Nathanael | Schärli, | and |
| --- | --- | --- | --- | --- | --- | --- | ------------ | ------- | --- | ---- | --------- | -------- | --- |
strainedcontextsize. Asapotentialsolution,future DennyZhou.2023. Teachinglargelanguagemodels
workscouldexplorethedevelopmentofspecialized toself-debug. CoRR,abs/2304.05128.
modulestoenhancethemappingbetweenNLand
PeterClark,OyvindTafjord,andKyleRichardson.2020.
symbolic language, e.g., fine-tuning LLMs with Transformersassoftreasonersoverlanguage. InPro-
syntheticdatageneratedviasymbolicsolvers. ceedingsofthe29thInternationalJointConference
onArtificialIntelligence(IJCAI),pages3882–3890.
EthicsStatement
WilliamFClocksinandChristopherSMellish.2003.
| | | | | | | | ProgramminginPROLOG. | | | | SpringerScience&Busi- | | |
| --- | --- | --- | --- | --- | --- | --- | -------------------- | --- | --- | --- | --------------------- | --- | --- |
Theuseoflargelanguagemodelsrequiresasignifi-
nessMedia.
cantamountofenergyforcomputationfortraining,
| | | | | | | | Karl Cobbe, | Vineet | Kosaraju, | | Mohammad | Bavarian, | |
| --- | --- | --- | --- | --- | --- | --- | ----------- | ------ | --------- | --- | -------- | --------- | --- |
whichcontributestoglobalwarming(Strubelletal.,
2019). Our work performs few-shot in-context JacobHilton,ReiichiroNakano,ChristopherHesse,
| | | | | | | | andJohnSchulman.2021. | | | Trainingverifierstosolve | | | |
| --- | --- | --- | --- | --- | --- | --- | --------------------- | --- | --- | ------------------------ | --- | --- | --- |
learninginsteadoftrainingmodelsfromscratch,so
| | | | | | | | mathwordproblems. | | | CoRR,abs/2110.14168. | | | |
| ---------------------------------- | --- | --- | --- | --- | -------- | --- | ----------------- | --- | --- | -------------------- | --- | --- | --- |
| theenergyfootprintofourworkisless. | | | | | Thelarge | | | | | | | | |
languagemodelswhoseAPIweuseforinference, LeonardoMendonçadeMouraandNikolajS.Bjørner.
| | | | | | | | 2008. | Z3:anefficientSMTsolver. | | | | InProceedingsof | |
| --- | --- | --- | --- | --- | --- | --- | ----- | ------------------------ | --- | --- | --- | --------------- | --- |
especiallyGPT-4,consumesignificantenergy.
the14thInternationalConferenceofToolsandAlgo-
rithmsfortheConstructionandAnalysisofSystems
Acknowledgements
(TACAS),volume4963ofLectureNotesinComputer
Science,pages337–340.
ThisworkwassupportedbytheNationalScience
LeonardoMendonçadeMoura,SoonhoKong,Jeremy
| FoundationAward#2048122. | | | Theviewsexpressed | | | | | | | | | | |
| ------------------------ | --- | --- | ----------------- | --- | --- | --- | ------- | ------ | ---------- | --- | --------- | --- | ------- |
| | | | | | | | Avigad, | Floris | van Doorn, | | and Jakob | von | Raumer. |
arethoseoftheauthorsanddonotreflecttheoffi-
| | | | | | | | 2015. | Theleantheoremprover(systemdescription). | | | | | |
| --- | --- | --- | --- | --- | --- | --- | ----- | ---------------------------------------- | --- | --- | --- | --- | --- |
cialpolicyorpositionoftheUSgovernment.
InProceedingsofthe25thInternationalConference
| | | | | | | | on Automated | | Deduction | (ICAD), | | volume | 9195 of |
| --- | --- | --- | --- | --- | --- | --- | ------------ | --- | --------- | ------- | --- | ------ | ------- |
LectureNotesinComputerScience,pages378–388.
References
IddoDrori,SarahZhang,ReeceShuttleworth,Leonard
StephenBach, MatthiasBroecheler, BertHuang, and Tang, Albert Lu, Elizabeth Ke, Kevin Liu, Linda
LiseGetoor.2017. Hinge-lossmarkovrandomfields Chen,SunnyTran,NewmanCheng,etal.2022. A
3815
neuralnetworksolves,explains,andgeneratesuni- Philipp Körner, Michael Leuschel, João Barbosa,
versitymathproblemsbyprogramsynthesisandfew- Vítor Santos Costa, Verónica Dahl, Manuel V.
shotlearningathumanlevel. ProceedingsoftheNa- Hermenegildo, José F. Morales, Jan Wielemaker,
tionalAcademyofSciences,119(32):e2123433119.
| | | | | | | DanielDiaz,andSalvadorAbreu.2022. | | | | Fiftyyears |
| ---------------------- | --- | ------------------------- | --- | --- | --- | --------------------------------- | ------------------------- | --- | --- | ---------- |
| | | | | | | ofprologandbeyond. | TheoryPract.Log.Program., | | | |
| HerbertBEnderton.2001. | | Amathematicalintroduction | | | | | | | | |
22(6):776–858.
| tologic. | Elsevier. | | | | | | | | | |
| -------------------------- | --------- | ------------------------- | ------ | -------- | --- | --------------------- | ---------------- | --- | ---------------- | ----------- |
| | | | | | | Vipin Kumar. | 1992. Algorithms | | for | constraint- |
| BruceFrederiksen.2008. | | Applyingexpertsystemtech- | | | | | | | | |
| | | | | | | satisfactionproblems: | Asurvey. | | AIMag.,13(1):32– | |
| nologytocodereusewithpyke. | | | PyCon: | Chicago. | | | | | | |
44.
| Luyu Gao, | Aman | Madaan, Shuyan | Zhou, | Uri | Alon, | | | | | |
| --------- | ---- | -------------- | ----- | --- | ----- | --- | --- | --- | --- | --- |
PengfeiLiu, YimingYang, JamieCallan, andGra- Angeliki Lazaridou, Elena Gribovskaya, Wojciech
hamNeubig.2023. PAL:program-aidedlanguage Stokowiec, and Nikolai Grigorev. 2022. Internet-
models. In Proceedings of the International Con- augmented language models through few-shot
ferenceonMachineLearning(ICML),volume202, prompting for open-domain question answering.
CoRR,abs/2203.05115.
pages10764–10799.
Olga Golovneva, Moya Chen, Spencer Poff, Martin Percy Liang, Rishi Bommasani, Tony Lee, Dimitris
Corredor,LukeZettlemoyer,MaryamFazel-Zarandi, Tsipras, Dilara Soylu, Michihiro Yasunaga, Yian
and Asli Celikyilmaz. 2023. ROSCOE: A suite of Zhang,DeepakNarayanan,YuhuaiWu,AnanyaKu-
metricsforscoringstep-by-stepreasoning. InPro- mar,BenjaminNewman,BinhangYuan,BobbyYan,
| ceedings | of the | 11th International | | Conference | on | | | | | |
| -------- | ------ | ------------------ | --- | ---------- | --- | --- | --- | --- | --- | --- |
CeZhang,ChristianCosgrove,ChristopherD.Man-
LearningRepresentations(ICLR).
ning,ChristopherRé,DianaAcosta-Navas,DrewA.
Hudson,EricZelikman,EsinDurmus,FaisalLadhak,
NitishGupta,KevinLin,DanRoth,SameerSingh,and
FriedaRong,HongyuRen,HuaxiuYao,JueWang,
Matt Gardner. 2020. Neural module networks for KeshavSanthanam,LaurelJ.Orr,LuciaZheng,Mert
| reasoning | over | text. In Proceedings | | of the | 8th In- | | | | | |
| --------- | ---- | -------------------- | --- | ------ | ------- | ------------ | ------------- | --- | ------ | --------- |
| | | | | | | Yüksekgönül, | Mirac Suzgun, | | Nathan | Kim, Neel |
ternationalConferenceonLearningRepresentations
| | | | | | | Guha, Niladri | S. Chatterji, | Omar | Khattab, | Peter |
| --- | --- | --- | --- | --- | --- | ------------- | ------------- | ---- | -------- | ----- |
(ICLR).
| | | | | | | Henderson, | Qian Huang, | Ryan | Chi, Sang | Michael |
| --- | --- | --- | --- | --- | --- | ------------ | ----------- | ----- | --------- | --------- |
| | | | | | | Xie, Shibani | Santurkar, | Surya | Ganguli, | Tatsunori |
SimengHan,HaileySchoelkopf,YilunZhao,Zhenting
| | | | | | | Hashimoto, | Thomas Icard, | Tianyi | Zhang, | Vishrav |
| ---------- | -------- | ------------ | --- | --------- | ---- | ---------- | ------------- | ------ | ------ | ------- |
| Qi, Martin | Riddell, | Luke Benson, | | Lucy Sun, | Eka- | | | | | |
terinaZubova,YujieQiao,MatthewBurtell,David Chaudhary,WilliamWang,XuechenLi,YifanMai,
| | | | | | | YuhuiZhang,andYutaKoreeda.2022. | | | Holisticeval- | |
| -------------- | --- | --------------- | ----- | ----- | ---- | ------------------------------- | --- | -------------------- | ------------- | --- |
| Peng, Jonathan | | Fan, Yixin Liu, | Brian | Wong, | Mal- | | | | | |
| | | | | | | uationoflanguagemodels. | | CoRR,abs/2211.09110. | | |
colmSailor,AnsongNi,LinyongNan,JungoKasai,
TaoYu,RuiZhang,ShafiqR.Joty,AlexanderR.Fab-
bri,WojciechKryscinski,XiVictoriaLin,Caiming BoLiu,YuqianJiang,XiaohanZhang,QiangLiu,Shiqi
Xiong, and Dragomir Radev. 2022. FOLIO: natu- Zhang, Joydeep Biswas, and Peter Stone. 2023a.
LLM+P:empoweringlargelanguagemodelswithop-
| rallanguagereasoningwithfirst-orderlogic. | | | | | CoRR, | | | | | |
| ----------------------------------------- | --- | --- | --- | --- | ----- | ------------------------- | --- | -------------------- | --- | --- |
| | | | | | | timalplanningproficiency. | | CoRR,abs/2304.11477. | | |
abs/2209.00840.
Joy He-Yueya, Gabriel Poesia, Rose E Wang, and HanmengLiu,RuoxiNing,ZhiyangTeng,JianLiu,Qiji
NoahDGoodman.2023. Solvingmathwordprob- Zhou, andYueZhang.2023b. Evaluatingthelogi-
lemsbycombininglanguagemodelswithsymbolic calreasoningabilityofchatgptandGPT-4. CoRR,
| solvers. | CoRR,abs/2304.09102. | | | | | abs/2304.03439. | | | | |
| ------------------------------------ | -------------------- | ---------- | ------ | ----- | -------- | --------------- | ---------------- | -------- | ----------- | --------- |
| Jie Huang | and Kevin | Chen-Chuan | Chang. | 2023. | To- | | | | | |
| | | | | | | Qing Lyu, | Shreya Havaldar, | Adam | Stein, | Li Zhang, |
| wardsreasoninginlargelanguagemodels: | | | | | Asurvey. | | | | | |
| | | | | | | Delip Rao, | Eric Wong, | Marianna | Apidianaki, | and |
InFindingsofthe61stAnnualMeetingoftheAsso- Chris Callison-Burch. 2023. Faithful chain-of-
ciationforComputationalLinguistics(ACL),pages
| | | | | | | thoughtreasoning. | CoRR,abs/2301.13379. | | | |
| --- | --- | --- | --- | --- | --- | ----------------- | -------------------- | --- | --- | --- |
1049–1065.
| | | | | | | AmanMadaan, | NiketTandon,PrakharGupta,Skyler | | | |
| -------------- | ------ | ------------- | --- | -------- | ----- | ----------- | ------------------------------- | ---------- | --- | --------- |
| Albert Qiaochu | Jiang, | Sean Welleck, | | Jin Peng | Zhou, | | | | | |
| | | | | | | Hallinan, | Luyu Gao, Sarah | Wiegreffe, | | Uri Alon, |
TimothéeLacroix,JiachengLiu,WendaLi,Mateja
Jamnik, GuillaumeLample, andYuhuaiWu.2023. Nouha Dziri, Shrimai Prabhumoye, Yiming Yang,
| | | | | | | Sean Welleck, | Bodhisattwa | | Prasad | Majumder, |
| -------------------------- | --- | -------------- | ------------------ | ------ | ------- | ------------- | ------------ | ------------- | ---------- | --------- |
| Draft, sketch, | and | prove: Guiding | | formal | theorem | | | | | |
| | | | | | | Shashank | Gupta, Amir | Yazdanbakhsh, | | and Peter |
| proverswithinformalproofs. | | | InProceedingsofthe | | | | | | | |
| | | | | | | Clark. 2023. | Self-refine: | Iterative | refinement | with |
11thInternationalConferenceonLearningRepresen-
| | | | | | | self-feedback. | CoRR,abs/2303.17651. | | | |
| --- | --- | --- | --- | --- | --- | -------------- | -------------------- | --- | --- | --- |
tations(ICLR).
TakeshiKojima,ShixiangShaneGu,MachelReid,Yu- RobinManhaeve,SebastijanDumancic,AngelikaKim-
takaMatsuo,andYusukeIwasawa.2022. Largelan- mig, ThomasDemeester, andLucDeRaedt.2021.
guagemodelsarezero-shotreasoners. InProceed- Neural probabilistic logic programming in deep-
ingsoftheAnnualConferenceonNeuralInformation problog. TheJournalofArtificialIntelligence(AIJ),
| ProcessingSystems(NeurIPS). | | | | | | 298:103504. | | | | |
| --------------------------- | --- | --- | --- | --- | --- | ----------- | --- | --- | --- | --- |
3816
JiayuanMao,ChuangGan,PushmeetKohli,JoshuaB. ConnorPryor,CharlesDickens,EriqAugustine,Alon
Tenenbaum, and Jiajun Wu. 2019. The neuro- Albalak,WilliamYangWang,andLiseGetoor.2023.
symbolicconceptlearner: Interpretingscenes,words, Neupsl: Neuralprobabilisticsoftlogic. InProceed-
| | | | | InProceed- | | ingsofthe32ndInternationalJointConferenceon | | | | | | |
| --- | --- | --- | --- | ---------- | --- | ------------------------------------------- | --- | --- | --- | --- | --- | --- |
andsentencesfromnaturalsupervision.
ingsofthe7thInternationalConferenceonLearning ArtificialIntelligence(IJCAI),pages4145–4153.
Representations(ICLR).
| | | | | | | Danilo Neves | Ribeiro, | | Shen | Wang, | Xiaofei | Ma, |
| --- | --- | --- | --- | --- | --- | ------------ | -------- | --- | ---- | ----- | ------- | --- |
KostasS.Metaxiotis, DimitrisAskounis, andJohnE. Henghui Zhu, Rui Dong, Deguang Kong, Juli-
Psarras.2002. Expertsystemsinproductionplanning ette Burger, Anjelica Ramos, Zhiheng Huang,
andscheduling: Astate-of-the-artsurvey. Journalof WilliamYangWang,GeorgeKarypis,BingXiang,
IntelligentManufacturing,13(4):253–260.
| | | | | | | andDanRoth.2023a. | | | STREET:Amulti-taskstruc- | | | |
| ------------- | ----------- | --- | --------- | ------- | --- | -------------------------------------- | --- | --- | ------------------------ | --- | --- | ------ |
| | | | | | | turedreasoningandexplanationbenchmark. | | | | | | InPro- |
| Aaron Meurer, | Christopher | | P. Smith, | Mateusz | Pa- | | | | | | | |
ceedingsoftheEleventhInternationalConferenceon
procki,OndrejCertík,SergeyB.Kirpichev,Matthew
LearningRepresentations(ICLR).
| Rocklin, | Amit Kumar, | Sergiu | Ivanov, | Jason | Keith | | | | | | | |
| -------- | ----------- | ------ | ------- | ----- | ----- | --- | --- | --- | --- | --- | --- | --- |
Moore,SartajSingh,ThilinaRathnayake,SeanVig, DaniloNevesRibeiro,ShenWang,XiaofeiMa,Henry
Brian E. Granger, Richard P. Muller, Francesco Zhu,RuiDong,DeguangKong,JulietteBurger,An-
Bonazzi,HarshGupta,ShivamVats,FredrikJohans-
jelicaRamos,WilliamYangWang,ZhihengHuang,
| son, FabianPedregosa, | | MatthewJ.Curry, | | AndyR. | | | | | | | | |
| --------------------- | --- | --------------- | --- | ------ | --- | --- | --- | --- | --- | --- | --- | --- |
GeorgeKarypis,BingXiang,andDanRoth.2023b.
Terrel,StepánRoucka,AshutoshSaboo,IsuruFer-
STREET:Amulti-taskstructuredreasoningandex-
nando, Sumith Kulal, Robert Cimrman, and An- planation benchmark. In Proceedings of the 11th
thony M. Scopatz. 2017. Sympy: symbolic com- International Conference on Learning Representa-
| putinginpython. | PeerJComputerScience,3:e103. | | | | | | | | | | | |
| --------------- | ---------------------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
tions(ICLR).
ReiichiroNakano,JacobHilton,SuchirBalaji,JeffWu,
| | | | | | | Matthew Richardson | | and | Pedro | M. | Domingos. | 2006. |
| ------------ | --------- | --- | ---------------- | --- | ------ | ------------------ | ----- | --------- | ------- | --- | --------- | ----- |
| Long Ouyang, | Christina | | Kim, Christopher | | Hesse, | | | | | | | |
| | | | | | | Markov | logic | networks. | Machine | | Learning, | 62(1- |
ShantanuJain,VineetKosaraju,WilliamSaunders,
2):107–136.
| Xu Jiang, | Karl Cobbe, | Tyna | Eloundou, | Gretchen | | | | | | | | |
| --------- | ----------- | ---- | --------- | -------- | --- | --- | --- | --- | --- | --- | --- | --- |
Krueger,KevinButton,MatthewKnight,Benjamin JohnAlanRobinson.1965. Amachine-orientedlogic
Chess,andJohnSchulman.2021. Webgpt: Browser- basedontheresolutionprinciple. TheJournalofthe
| assisted question-answering | | | with human | feedback. | | | | | | | | |
| --------------------------- | --- | --- | ---------- | --------- | --- | --- | --- | --- | --- | --- | --- | --- |
ACM(JACM),12(1):23–41.
CoRR,abs/2112.09332.
| | | | | | | AbulhairSaparovandHeHe.2023. | | | | Languagemodels | | |
| ------------- | ----- | --------- | ------- | --- | ----- | ---------------------------- | --- | --- | ------------------------- | -------------- | --- | --- |
| OpenAI. 2023. | GPT-4 | technical | report. | | CoRR, | | | | | | | |
| | | | | | | aregreedyreasoners: | | | Asystematicformalanalysis | | | |
abs/2303.08774.
| | | | | | | ofchain-of-thought. | | | InProceedingsofthe11thIn- | | | |
| --- | --- | --- | --- | --- | --- | ------------------- | --- | --- | ------------------------- | --- | --- | --- |
ternationalConferenceonLearningRepresentations
LongOuyang,JeffreyWu,XuJiang,DiogoAlmeida,
(ICLR).
| Carroll L. | Wainwright, | Pamela | Mishkin, | | Chong | | | | | | | |
| ---------- | ----------- | ------ | -------- | --- | ----- | --- | --- | --- | --- | --- | --- | --- |
Zhang,SandhiniAgarwal,KatarinaSlama,AlexRay,
| | | | | | | MurrayShanahan.2022. | | | Talkingaboutlargelanguage | | | |
| --- | --- | --- | --- | --- | --- | -------------------- | --- | --- | ------------------------- | --- | --- | --- |
JohnSchulman,JacobHilton,FraserKelton,Luke
| | | | | | | models. | CoRR,abs/2212.03551. | | | | | |
| --- | --- | --- | --- | --- | --- | ------- | -------------------- | --- | --- | --- | --- | --- |
Miller,MaddieSimens,AmandaAskell,PeterWelin-
der,PaulF.Christiano,JanLeike,andRyanLowe.
YongliangShen,KaitaoSong,XuTan,DongshengLi,
| 2022a. Traininglanguagemodelstofollowinstruc- | | | | | | | | | | | | |
| --------------------------------------------- | --------------- | --- | -------------- | --- | ------ | --------------------------------------------- | --- | --- | --- | --- | --- | -------- |
| | | | | | | WeimingLu,andYuetingZhuang.2023. | | | | | | Hugging- |
| tions with | human feedback. | | In Proceedings | | of the | | | | | | | |
| | | | | | | gpt: SolvingAItaskswithchatgptanditsfriendsin | | | | | | |
AnnualConferenceonNeuralInformationProcess-
| | | | | | | huggingface. | CoRR,abs/2303.17580. | | | | | |
| --- | --- | --- | --- | --- | --- | ------------ | -------------------- | --- | --- | --- | --- | --- |
ingSystems(NeurIPS).
LongOuyang,JeffreyWu,XuJiang,DiogoAlmeida, WeijiaShi,SewonMin,MichihiroYasunaga,Minjoon
Seo,RichJames,MikeLewis,LukeZettlemoyer,and
| Carroll L. | Wainwright, | Pamela | Mishkin, | | Chong | | | | | | | |
| ---------- | ----------- | ------ | -------- | --- | ----- | ---------------- | --- | -------------------------- | --- | --- | --- | --- |
| | | | | | | Wen-tauYih.2023. | | REPLUG:retrieval-augmented | | | | |
Zhang,SandhiniAgarwal,KatarinaSlama,AlexRay,
| | | | | | | black-boxlanguagemodels. | | | | CoRR,abs/2301.12652. | | |
| --- | --- | --- | --- | --- | --- | ------------------------ | --- | --- | --- | -------------------- | --- | --- |
JohnSchulman,JacobHilton,FraserKelton,Luke
Miller,MaddieSimens,AmandaAskell,PeterWelin-
| | | | | | | Aarohi Srivastava, | | Abhinav | Rastogi, | | Abhishek | Rao, |
| --- | --- | --- | --- | --- | --- | ------------------ | --- | ------- | -------- | --- | -------- | ---- |
der,PaulF.Christiano,JanLeike,andRyanLowe.
| | | | | | | Abu Awal | Md | Shoeb, | Abubakar | | Abid, | Adam |
| --------------------------------------------- | --------------- | --- | -------------- | --- | ------ | ----------- | ----- | --------------- | -------- | --------- | -------- | ------- |
| 2022b. Traininglanguagemodelstofollowinstruc- | | | | | | | | | | | | |
| | | | | | | Fisch, Adam | | R. Brown, | Adam | | Santoro, | Aditya |
| tions with | human feedback. | | In Proceedings | | of the | | | | | | | |
| | | | | | | Gupta, | Adrià | Garriga-Alonso, | | Agnieszka | | Kluska, |
AnnualConferenceonNeuralInformationProcess-
AitorLewkowycz,AkshatAgarwal,AletheaPower,
ingSystems(NeurIPS.
| | | | | | | Alex Ray, | Alex | Warstadt, | | Alexander | W. | Kocurek, |
| ----------------------- | --- | --- | --------------------- | --- | --- | ----------- | ---- | --------- | ----- | --------- | --- | ----------- |
| | | | | | | Ali Safaya, | Ali | Tazarv, | Alice | Xiang, | | Alicia Par- |
| LawrenceC.Paulson.1994. | | | Isabelle-AGenericThe- | | | | | | | | | |
orem Prover (with a contribution by T. Nipkow), rish, Allen Nie, Aman Hussain, Amanda Askell,
volume828ofLectureNotesinComputerScience. AmandaDsouza,AmeetRahane,AnantharamanS.
Iyer,AndersAndreassen,AndreaSantilli,Andreas
Springer.
Stuhlmüller,AndrewM.Dai,AndrewLa,AndrewK.
DavidPooleandAlanK.Mackworth.2010. Artificial Lampinen,AndyZou,AngelaJiang,AngelicaChen,
Intelligence-FoundationsofComputationalAgents. AnhVuong,AnimeshGupta,AnnaGottardi,Anto-
CambridgeUniversityPress. nioNorelli,AnuVenkatesh,ArashGholamidavoodi,
3817
Arfa Tabassum, Arul Menezes, Arun Kirubarajan, EmpiricalMethodsinNaturalLanguageProcessing
AsherMullokandov,AshishSabharwal,AustinHer- (EMNLP),pages89–105.
| rick, Avia | Efrat, Aykut | Erdem, | Ayla Karakas, | and | | | | | |
| ---------- | ----------------------- | ------ | ------------- | ----------- | -------------------------- | ----- | ------------ | --- | ------------- |
| | | | | | Xi Ye, Qiaochu | Chen, | Isil Dillig, | and | Greg Durrett. |
| etal.2022. | Beyondtheimitationgame: | | | Quantifying | | | | | |
| | | | | | 2023. Satisfiability-aided | | language | | models using |
andextrapolatingthecapabilitiesoflanguagemodels.
| | | | | | declarative | prompting. | In | Proceedings | of the An- |
| --- | --- | --- | --- | --- | ----------- | ---------- | --- | ----------- | ---------- |
CoRR,abs/2206.04615.
nualConferenceonNeuralInformationProcessing
| EmmaStrubell,AnanyaGanesh,andAndrewMcCal- | | | | | Systems(NeurIPS). | | | | |
| ----------------------------------------- | ------ | ---------- | -------------- | --- | ----------------- | --- | --- | --- | --- |
| lum. 2019. | Energy | and policy | considerations | for | | | | | |
deep learning in NLP. In Proceedings of the 57th WanjunZhong,SiyuanWang,DuyuTang,ZenanXu,
AnnualMeetingoftheAssociationforComputational DayaGuo,YiningChen,JiahaiWang,JianYin,Ming
| | | | | | Zhou,andNanDuan.2022. | | | Analyticalreasoningof | |
| --- | --- | --- | --- | --- | --------------------- | --- | --- | --------------------- | --- |
Linguistics(ACL),pages3645–3650.
text. InFindingsofthe2022ConferenceoftheNorth
OyvindTafjord,BhavanaDalvi,andPeterClark.2021.
AmericanChapteroftheAssociationforComputa-
Proofwriter: Generating implications, proofs, and tionalLinguistics: HumanLanguageTechnologies
abductivestatementsovernaturallanguage. InFind- (NAACL-HLT),pages2306–2319.
ingsofthe59thAnnualMeetingoftheAssociationfor
ComputationalLinguistics(ACL),pages3621–3634. Denny Zhou, Nathanael Schärli, Le Hou, Jason Wei,
| | | | | | Nathan Scales, | Xuezhi | Wang, | Dale | Schuurmans, |
| --- | --- | --- | --- | --- | -------------- | ------ | ----- | ---- | ----------- |
OyvindTafjord,BhavanaDalviMishra,andPeterClark. ClaireCui,OlivierBousquet,QuocV.Le,andEdH.
| 2022. | Entailer: Answering | questions | | with faithful | | | | | |
| ----- | ------------------- | --------- | --- | ------------- | --------- | ------------------------------------ | --- | --- | --- |
| | | | | | Chi.2023. | Least-to-mostpromptingenablescomplex | | | |
and truthful chains of reasoning. In Proceedings reasoninginlargelanguagemodels. InProceedings
of the 2022 Conference on Empirical Methods in of the 11th International Conference on Learning
NaturalLanguageProcessing(EMNLP),pages2078– Representations(ICLR).
2093.
| JidongTian, | YitianLi, | WenqingChen, | LiqiangXiao, | | | | | | |
| ---------------------------------------- | --------- | ------------ | ---------------- | ------ | --- | --- | --- | --- | --- |
| HaoHe,andYaohuiJin.2022. | | | Weaklysupervised | | | | | | |
| neuralsymboliclearningforcognitivetasks. | | | | InPro- | | | | | |
ceedingsof36thConferenceonArtificialIntelligence
(AAAI),pages5888–5896.
| XingyaoWang,ShaLi,andHengJi.2022. | | | | Code4struct: | | | | | |
| --------------------------------- | --- | --- | --- | ------------ | --- | --- | --- | --- | --- |
Codegenerationforfew-shotstructuredprediction
| fromnaturallanguage. | | CoRR,abs/2210.12810. | | | | | | | |
| -------------------- | --------- | -------------------- | --- | ------ | --- | --- | --- | --- | --- |
| XuezhiWang, | JasonWei, | DaleSchuurmans, | | QuocV. | | | | | |
Le,EdH.Chi,SharanNarang,AakankshaChowd-
| hery,andDennyZhou.2023. | | | Self-consistencyim- | | | | | | |
| ----------------------- | --- | --- | ------------------- | --- | --- | --- | --- | --- | --- |
proveschainofthoughtreasoninginlanguagemod-
els. InProceedingsofthe11thInternationalConfer-
enceonLearningRepresentations(ICLR).
| Jason Wei, | Yi Tay, Rishi | Bommasani, | Colin | Raffel, | | | | | |
| ---------- | --------------- | ---------- | ----- | --------- | --- | --- | --- | --- | --- |
| Barret | Zoph, Sebastian | Borgeaud, | Dani | Yogatama, | | | | | |
MaartenBosma,DennyZhou,DonaldMetzler,EdH.
| Chi, Tatsunori | Hashimoto, | Oriol | Vinyals, | Percy | | | | | |
| ------------------------------------- | ---------- | ----- | -------- | ------------ | --- | --- | --- | --- | --- |
| Liang,JeffDean,andWilliamFedus.2022a. | | | | Emer- | | | | | |
| gentabilitiesoflargelanguagemodels. | | | | Transactions | | | | | |
onMachineLearningResearch,2022.
JasonWei,XuezhiWang,DaleSchuurmans,Maarten
Bosma,EdH.Chi,QuocLe,andDennyZhou.2022b.
Chainofthoughtpromptingelicitsreasoninginlarge
| languagemodels. | CoRR,abs/2201.11903. | | | | | | | | |
| --------------- | -------------------- | --- | --- | --- | --- | --- | --- | --- | --- |
YuhuaiWu,AlbertQiaochuJiang,WendaLi,MarkusN.
Rabe,CharlesStaats,MatejaJamnik,andChristian
| Szegedy. | 2022. Autoformalization | | with | large lan- | | | | | |
| -------- | ----------------------- | --- | ------ | ----------- | --- | --- | --- | --- | --- |
| guage | models. In Proceedings | | of the | Annual Con- | | | | | |
ferenceonNeuralInformationProcessingSystems
(NeurIPS).
| Kaiyu Yang, | Jia Deng, | and Danqi | Chen. | 2022. Gen- | | | | | |
| ----------- | --------- | --------- | ----- | ---------- | --- | --- | --- | --- | --- |
eratingnaturallanguageproofswithverifier-guided
| search. | InProceedingsofthe2022Conferenceon | | | | | | | | |
| ------- | ---------------------------------- | --- | --- | --- | --- | --- | --- | --- | --- |
3818
| A | SyntaxforFirst-orderLogic(FOL) | | | | | | C.1 | PrOntoQAPrompts | | | | |
| --- | ------------------------------ | --- | --- | --- | --- | --- | --- | --------------- | --- | --- | --- | --- |
StandardIn-ContextLearning
Name FOLNotation Context: Jompuses are not shy. Jompuses are yumpuses.
| | | | | | | | ( more | context | here | ) | | |
| --- | -------- | --- | --- | ---------------- | --- | --- | ----------- | ------- | ------------- | --------- | ------------ | -------------- |
| | | | | | | | Z·u·m·puses | are | rompuse·s·.· | Max | is a yumpus. | |
| | Constant | | | lowercaseletters | | | | | | | | |
| | | | | | | | Question: | Is | the following | statement | | true or false? |
| | Variable | | | x,y,z, | | | | | | | | |
Max is sour.
···
| | Atom | | | P(a | , | ,a ) | Options: | | | | | |
| --- | ---- | --- | --- | --- | ----- | ---- | -------- | --- | --- | --- | --- | --- |
| | | | | | 1 ··· | n | | | | | | |
A) True
B) False
| | Negation | | | | P | | | | | | | |
| --- | -------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
¬
| | | | | | | | The correct | | option | is: B | | |
| --- | --- | --- | --- | --- | --- | --- | ----------- | --- | ------ | ----- | --- | --- |
| | | | | P | P | | | | | | | |
1 2
| | Conjunction | | | | ∧ | | | | | | | |
| --- | ----------- | --- | --- | --- | ------- | --- | ------------------------- | --- | ----- | ------------ | --------- | ----------------- |
| | | | | P | , | , P | | | | | | |
| | | | | | 1 ∧ ··· | ∧ n | Chain-of-ThoughtPrompting | | | | | |
| | | | | P | P | | | | | | | |
| | | | | | 1 2 | | Task Description: | | Given | a problem | statement | as |
| | Disjunction | | | | ∨ | | | | | | | |
| | | | | P | , | , P | contexts, | the | task | is to answer | a | logical reasoning |
| | | | | | 1 ∨ ··· | ∨ n | question. | | | | | |
Implication P 1 P 2 Context: Jompuses are not shy. Jompuses are yumpuses.
→
| | | | | | | | ( more | context | here | ) | | |
| --- | ----------- | --- | --- | --- | --- | --- | ----------- | ------- | ------------ | --- | ------------ | --- |
| | Equivalence | | | P | P | | Z·u·m·puses | | rompuse·s·.· | | | |
| | | | | | 1 | 2 | | are | | Max | is a yumpus. | |
↔
ExistentialQuantifier xP(x, ) Question: Is the following statement true or false?
| | | | | ∃ | | ··· | Max is | sour. | | | | |
| --- | ------------------- | --- | --- | --- | ----- | --- | -------- | ----- | --- | --- | --- | --- |
| | UniversalQuantifier | | | | xP(x, | ) | | | | | | |
| | | | | ∀ | | ··· | Options: | | | | | |
A) True
| | Table4: | | First-OrderLogicGrammar. | | | | B) False | | | | | |
| --- | ------- | --- | ------------------------ | --- | --- | --- | ----------- | --------- | -------------- | ------------ | ------ | ------------ |
| | | | | | | | Reasoning: | Max | is a | yumpus. Each | yumpus | is a dumpus. |
| | | | | | | | ( more | reasoning | here | ) | | |
| | | | | | | | T·u·m·puses | are | not sour·.··So | Max | is not | sour. |
B DatasetStatistics
| | | | | | | | The correct | | option | is: B | | |
| --- | --- | --- | --- | --- | --- | --- | ----------- | --- | ------ | ----- | --- | --- |
Logic-LM
| | Dataset | | Reasoning | | TestSize | #Opts | | | | | | |
| --- | ------- | --- | --------- | --- | -------- | ----- | --- | --- | --- | --- | --- | --- |
PrOntoQA Deductive 500 2 Task Description: You are given a problem description
| | | | | | | | and a | question. | The | task is | to: | |
| --- | --- | --- | --- | --- | --- | --- | ----- | --------- | --- | ------- | --- | --- |
ProofWriter Deductive 600 3 1) define all the predicates in the problem
| | | | | | | | 2) parse | the | problem | into logic | rules | based on |
| --- | ----- | --- | --- | --- | --- | --- | ----------- | --- | ---------- | ---------- | ----- | -------- |
| | FOLIO | | FOL | | 204 | 3 | the defined | | predicates | | | |
LogicalDeduction CSP 300 3,5,7 3) write all the facts mentioned in the problem
| | | | | | | | 4) parse | the | question | into | the logic | form |
| --- | ------- | --- | --- | --- | --- | --- | ----------- | ------- | ------------ | ---------- | --------- | ---- |
| | AR-LSAT | | AR | | 230 | 5 | | | | | | |
| | | | | | | | Context: | Each | jompus | is fruity. | | |
| | | | | | | | ( more | context | here | ) | | |
| | | | | | | | R·o·m·puses | | zumpuse·s·.· | | | |
Table5: Statisticsofthelogicalreasoningdatasets. are Alex is a tumpus.
| | | | | | | | Question: | True | or false: | Alex | is not | shy. |
| --- | --- | --- | --- | --- | --- | --- | --------- | ---- | --------- | ---- | ------ | ---- |
Predicates:
C PromptExamples Jompus(\$x, bool) ::: Does x belong to Jompus?
| | | | | | | | ( more | predicates | here | ) | | |
| --- | --- | --- | --- | --- | --- | --- | -------------- | ---------- | --------- | ------- | -------- | ---------- |
| | | | | | | | Z·u·m·pus(\$x, | | | ·D·o·es | | |
| | | | | | | | | | bool) ::: | | x belong | to Zumpus? |
Inthissectionweprovideexamplesoftheprompts
| usedforeachdatasetandmethod. | | | | | Promptsforstan- | | Facts: | | | | | |
| ---------------------------- | --- | --- | --- | --- | --------------- | --- | -------------- | --- | ----- | --- | --- | --- |
| | | | | | | | Tumpuses(Alex, | | True) | | | |
dardin-contextlearningcontain2demonstrations
Rules:
| consisting | | of 3 | parts each: | a | context, | a question, | | | | | | |
| ----------- | --- | --------------------------------- | ----------- | --- | -------- | ----------- | -------------- | ----- | --------- | ----------- | ----- | ----- |
| | | | | | | | Jompus($x, | | True) >>> | Fruity($x, | True) | |
| | | | | | | | ( more | rules | here | ) | | |
| andoptions. | | Promptsforchain-of-thoughtprompt- | | | | | D·u·m·pus(\$x, | | ·>·>·> | | | |
| | | | | | | | | | True) | Rompus(\$x, | | True) |
ingcontain2demonstrationsconsistingof5parts
Query:
| each: | ataskdescription,acontext,aquestion,op- | | | | | | Shy(Alex, | False) | | | | |
| --------------------------------------- | --------------------------------------- | --- | --- | --- | ---------------- | --- | --------- | ------ | --- | --- | --- | --- |
| tions,andachainofreasoning. | | | | | PromptsforLogic- | | | | | | | |
| LMcontain2demonstrationswith5partseach: | | | | | | a | | | | | | |
taskdescription,acontext,aquestion,options,and
| adomain-specificsymbolicprogram. | | | | | | Forbrevity, | | | | | | |
| -------------------------------- | --- | --- | --- | --- | --- | ----------- | --- | --- | --- | --- | --- | --- |
weshowonlyasingledemonstrationforeachset-
tinginthefollowingsections.
3819
| C.2 ProofWriterPrompts | | | | | | Logic-LM | | | | | |
| ---------------------- | --- | --- | --- | --- | --- | -------- | --- | --- | --- | --- | --- |
StandardIn-ContextLearning Task Description: You are given a problem description
| | | | | | | and a question. | | The task | is to: | | |
| --- | --- | --- | --- | --- | --- | --------------- | --- | -------- | ------ | --- | --- |
Context: The cow is blue. The cow is round. 1) define all the predicates in the problem
| | | | | | | 2) parse | the problem | into | logic | rules | based on |
| ------------ | ------------ | --------- | ------------------ | ------ | ------------- | ----------- | ------------ | ----- | --------- | ----- | ----------- |
| ( more | context here | | ) | | | | | | | | |
| I·f··the cow | is cold | a·n·d· | the cow | visits | the lion then | the defined | predicates | | | | |
| | | | | | | 3) write | all the | facts | mentioned | in | the problem |
| the lion | sees the | squirrel. | | | | | | | | | |
| | | | | | | 4) parse | the question | | into the | logic | form |
| Question: | Based on | the | above information, | | is the | | | | | | |
following statement true, false, or unknown? Context: Anne is quiet. Erin is furry.
| The tiger | is not | young. | | | | ( more | context here | | ) | | |
| --------- | ------ | ------ | --- | --- | --- | ---------- | ------------ | --------- | --- | --- | --- |
| | | | | | | A·l·l· red | people are | y·o·u·ng. | | | |
Options:
| A) True | | | | | | Question: | Based on | the | above information, | | is the |
| ----------- | ------ | --- | --- | --- | --- | ----------- | --------- | ------ | ------------------ | --- | -------- |
| B) False | | | | | | following | statement | true, | false, | or | unknown? |
| C) Unknown | | | | | | Anne is | white. | | | | |
| The correct | option | is: | B | | | Predicates: | | | | | |
| | | | | | | Quiet($x, | bool) | ::: Is | x quiet? | | |
| | | | | | | Furry($x, | bool) | ::: Is | x furry? | | |
Chain-of-ThoughtPrompting
| | | | | | | ( more | predicates | here | ) | | |
| --- | --- | --- | --- | --- | --- | ------------ | ---------- | ---------- | ------ | --- | --- |
| | | | | | | W·h·i·te($x, | bool) | ::: Is··x· | white? | | |
Task Description: Given a problem statement as Young($x, bool) ::: Is x young?
| contexts, | the task | is | to answer | a logical | reasoning | | | | | | |
| ------------ | ------------ | --------- | ------------------ | ------------- | ------------- | --------------- | ----------- | ------------- | ------- | --------- | ---------------- |
| question. | | | | | | Facts: | | | | | |
| | | | | | | Quite(Anne, | True) | ::: | Anne is | quiet. | |
| Context: | The cow | is blue. | The | cow is round. | | ( more | facts here | ) | | | |
| | | | | | | W·h·i·te(Harry, | True)··:·:: | | | | |
| ( more | context here | | ) | | | | | | Harry | is white. | |
| I·f··the cow | is cold | a·n·d· | the cow | visits | the lion then | | | | | | |
| the lion | sees the | squirrel. | | | | Rules: | | | | | |
| | | | | | | Young($x, | True) | >>> Furry($x, | | True) | ::: Young people |
| Question: | Based on | the | above information, | | is the | are | furry. | | | | |
| following | statement | true, | false, | or | unknown? | ( more | rules here | ) | | | |
The tiger is not young. R·e·d·($x, True) >>> ·Y·o·ung($x, True) ::: All red people
| | | | | | | are | young. | | | | |
| --- | --- | --- | --- | --- | --- | --- | ------ | --- | --- | --- | --- |
Options:
| A) True | | | | | | Query: | | | | | |
| -------- | --- | --- | --- | --- | --- | ----------- | ----- | --- | ------- | ----- | --- |
| B) False | | | | | | White(Anne, | True) | ::: | Anne is | white | |
C) Unknown
| Reasoning: | The tiger | likes | the | cow. | | | | | | | |
| -------------- | --------- | ------------- | ------- | ------ | ---------- | --- | --- | --- | --- | --- | --- |
| The tiger | likes | the squirrel. | | | | | | | | | |
| ( more | reasoning | here | ) | | | | | | | | |
| I·f··something | is | nice ·a·n·d | it sees | the | tiger then | | | | | | |
| it is young. | So | the tiger | is | young. | | | | | | | |
| The correct | option | is: | B | | | | | | | | |
3820
| C.3 | FOLIOPrompts | | | | | Logic-LM | | | | | | |
| --- | ------------ | --- | --- | --- | --- | -------- | --- | --- | --- | --- | --- | --- |
StandardIn-ContextLearning Task Description: Given a problem description and a
| | | | | | | question. | | The task | is to | parse | the problem | and |
| --- | --- | --- | --- | --- | --- | --------- | --- | -------- | ----- | ----- | ----------- | --- |
Context: All people who regularly drink coffee are the question into first-order logic formulas.
dependent on caffeine. The grammar of the first-order logic formula is
| ( | more context | here | ) | | | defined | as | follows: | | | | |
| --------- | ------------ | --------- | --------- | --- | ------------ | ---------- | ------------ | -------- | ----- | ----- | --- | --- |
| I·f··Rina | | per·s·o·n | | | | 1) logical | conjunction: | | expr1 | expr2 | | |
| | is | not a | dependent | on | caffeine and | | | | | ∧ | | |
a student, then Rina is either a person dependent 2) logical disjunction: expr1 expr2
disjuncti∨on:
on caffeine and a student, or neither a person 3) logical exclusive expr1 expr2
dependent on caffeine nor a student. 4) logical negation: expr1 ⊕
expr¬2:
| | | | | | | 5) expr1 | implies | | expr1 | expr2 | | |
| --------- | ----- | ------ | ------------------ | --- | ------ | -------- | ------- | ---- | --------------- | ----- | ----- | --- |
| | | | | | | 6) expr1 | if and | only | if expr2:→expr1 | | expr2 | |
| Question: | Based | on the | above information, | | is the | | | | | | ↔x | |
following statement true, false, or uncertain? Rina 7) logical universal quantification:
quantification∀:
is a person who jokes about being addicted to 8) logical existential x
caffeine or unaware that caffeine is a drug. Output format: logic form ::: descripti∃on
| | | | | | | Context: | All people | who | regularly | drink | coffee | are |
| --- | --- | --- | --- | --- | --- | -------- | ---------- | --- | --------- | ----- | ------ | --- |
Options:
| A) True | | | | | | dependent | on caffeine. | | | | | |
| -------- | --- | --- | --- | --- | --- | --------- | ------------ | ---- | --- | --- | --- | --- |
| B) False | | | | | | ( more | context | here | ) | | | |
C) Uncertain I·f··Rina is not a per·s·o·n dependent on caffeine and a
| | | | | | | student, | then | Rina is | either | a person | dependent | |
| --- | ------- | ---------- | --- | --- | --- | ----------- | ----------- | ---------- | -------------- | -------- | --------- | --- |
| | | | | | | on caffeine | and | a student, | or | neither | a person | |
| The | correct | option is: | A | | | | | | | | | |
| | | | | | | dependent | on caffeine | | nor a student. | | | |
Chain-of-ThoughtPrompting Question: Based on the above information, is the
| | | | | | | following | statement | true, | false, | or | uncertain? | |
| --- | --- | --- | --- | --- | --- | --------- | --------- | ----- | ------ | --- | ---------- | --- |
Task Description: Given a problem statement as Rina is either a person who jokes about being
contexts, the task is to answer a logical reasoning addicted to caffeine or is unaware that caffeine
| question. | | | | | | is a drug. | | | | | | |
| --------- | --- | ------------ | ------- | -------- | ---- | ----------- | --- | --- | --- | --- | --- | --- |
| Context: | The | Blake McFall | Company | Building | is a | Predicates: | | | | | | |
commercial warehouse listed on the National Register Dependent(x) ::: x is a person dependent on caffeine
| of Historic | | Places. | | | | ( more | predicates | here | ) | | | |
| ----------- | ------------ | -------- | --------- | --- | --- | ------------- | ---------- | ------ | ---------- | --- | --- | --- |
| ( | more context | here | ) | | | S·t·u·dent(x) | ::: | x is a | ·s·t·udent | | | |
| J·o·h·n | | Em·m·e·t | | | | | | | | | | |
| | works | at the | Building. | | | | | | | | | |
Premises:
Question: Based on the above information, is the x (Drinks(x) Dependent(x)) ::: All people who
∀ regularly→drink
following statement true, false, or uncertain? coffee are dependent on
| The | Blake | McFall Company | Building | is | located in | caffeine. | | | | | | |
| --------- | ----- | -------------- | -------- | --- | ---------- | ------------- | --------------- | -------------- | ------- | -------- | ---------- | ----- |
| Portland, | | Oregon. | | | | ( more | premises | here | ) | | | |
| | | | | | | ·x··(Jokes(x) | | Una·w·a·re(x)) | | | | |
| | | | | | | | | | | ::: No | one who | jokes |
| Options: | | | | | | ∀ about | bei→ng¬addicted | | to | caffeine | is unaware | |
| A) True | | | | | | that | caffeine | is | a drug. | | | |
B) False
| C) Uncertain | | | | | | Conclusion: | | | | | | |
| ------------ | --- | --- | --- | --- | --- | ----------- | --- | ------------- | --- | -------- | --------- | --- |
| | | | | | | Jokes(rina) | | Unaware(rina) | | ::: Rina | is either | a |
Reasoning: The Blake McFall Company Building is person w⊕ho jokes about being addicted to
another name for the Emmet Building. caffeine or is unaware that caffeine is a drug.
| ( | more reasoning | here | ) | | | | | | | | | |
| ------------- | -------------- | ---------- | --------- | --- | ----------- | --- | --- | --- | --- | --- | --- | --- |
| T·h·e·refore, | | | ·M·c·Fall | | | | | | | | | |
| | | the Blake | Company | | Building is | | | | | | | |
| located | in | Portland, | Oregon. | | | | | | | | | |
| The | correct | option is: | A | | | | | | | | | |
3821
| C.4 LogicalDeductionPrompts | | | | | Logic-LM | | | |
| --------------------------- | --- | --- | --- | --- | -------- | --- | --- | --- |
StandardIn-ContextLearning Task Description: You are given a problem description.
| | | | | | The task | is to parse | the problem as | a constraint |
| --- | --- | --- | --- | --- | -------- | ----------- | -------------- | ------------ |
Context: The following paragraphs each describe a satisfaction problem, defining the domain,
set of seven objects arranged in a fixed order. variables, and contraints.
| ( more | context here | ) | | | | | | |
| ------ | ------------ | --- | --- | --- | --- | --- | --- | --- |
E·v·e· A·d·a·. Context: The following paragraphs each describe a
| finished | below | Rob | finished below | Joe. | | | | |
| -------- | ----- | --- | -------------- | ---- | ------------ | ------- | ------------- | ------------ |
| | | | | | set of three | objects | arranged in a | fixed order. |
Question: Which of the following is true? ( more context here )
| | | | | | T·h·e· minivan | is newer···than | the convertible. | |
| --- | --- | --- | --- | --- | -------------- | --------------- | ---------------- | --- |
Options:
| | | | | | Question: | Which of the | following is | true? |
| --------------- | ------ | --- | --- | --- | --------- | ------------ | ------------ | ----- |
| A) Ana finished | third. | | | | | | | |
| B) Eve finished | third. | | | | | | | |
| C) Ada finished | third. | | | | Options: | | | |
D) Dan finished third. A) The station wagon is the second-newest.
E) Rob finished third. B) The convertible is the second-newest.
| | | | | | C) The minivan | is the | second-newest. | |
| --------------- | ------ | --- | --- | --- | -------------- | ------ | -------------- | --- |
| F) Amy finished | third. | | | | | | | |
| G) Joe finished | third. | | | | | | | |
Domain:
| The correct | option is: | A | | | 1: oldest | | | |
| ----------- | ---------- | --- | --- | --- | --------- | --- | --- | --- |
3: newest
Chain-of-ThoughtPrompting
Variables:
| | | | | | station\_wagon | [IN] [1, | 2, 3] | |
| --- | --- | --- | --- | --- | -------------- | -------- | ----- | --- |
Task Description: Given a problem statement as convertible [IN] [1, 2, 3]
| contexts, | the task is | to answer | a logical | reasoning | minivan | [IN] [1, 2, 3] | | |
| --------- | ----------- | --------- | --------- | --------- | ------- | -------------- | --- | --- |
question.
Constraints:
Context: The following paragraphs each describe a station\_wagon == 1 ::: The station wagon is the
| set of five | objects | arranged | in a fixed | order. | oldest. | | | |
| ----------- | ------- | -------- | ---------- | ------ | ------- | --- | --- | --- |
( more context here ) minivan > convertible ::: The minivan is newer than
| T·h·e· raven | is the thi·r·d· | from | the left. | | the | convertible. | | |
| ------------ | --------------- | ---- | --------- | --- | --------------------------------------- | ------------ | --- | ------------ |
| | | | | | AllDifferentConstraint([station\_wagon, | | | convertible, |
Question: Which of the following is true? minivan]) ::: All vehicles have different
values.
Options:
| A) The quail | is the | rightmost. | | | Query: | | | |
| ------------ | ------ | ---------- | --- | --- | ------ | --- | --- | --- |
B) The owl is the rightmost. A) station\_wagon == 2 ::: The station wagon is the
| C) The raven | is the | rightmost. | | | second-newest. | | | |
| ------------ | ------ | ---------- | --- | --- | -------------- | --- | --- | --- |
D) The falcon is the rightmost. B) convertible == 2 ::: The convertible is the
| E) The robin | is the | rightmost. | | | | | | |
| ------------ | ------ | ---------- | --- | --- | --- | --- | --- | --- |
second-newest.
| | | | | | C) minivan | == 2 ::: The | minivan is | the second-newest |
| ------------- | -------------- | ------------- | ----------------- | --------- | ---------- | ------------ | ---------- | ----------------- |
| Reasoning: | The owl is | the leftmost. | This | means owl | . | | | |
| is not the | rightmost. | | | | | | | |
| ( more | reasoning here | ) | | | | | | |
| T·h·i·s means | raven is | a·l·s·o not | the rightmost. | So, | | | | |
| the answer | is: A) The | quail | is the rightmost. | | | | | |
| The correct | option is: | A | | | | | | |
3822
| C.5 AR-LSATPrompts | | | | | | Logic-LM | | | | | | |
| ------------------ | --- | --- | --- | --- | --- | -------- | --- | --- | --- | --- | --- | --- |
StandardIn-ContextLearning Task Description: You are given a problem description.
| | | | | | | The | task is | to parse | the problem | as a | constraint | |
| --- | --- | --- | --- | --- | --- | --- | ------- | -------- | ----------- | ---- | ---------- | --- |
Context: During a single week, from Monday through satisfaction problem, defining the domain,
| Friday, | tours | will | be conducted | of | a company's | variables, | | and contraints. | | | | |
| ------- | ---------- | ----------- | ------------ | ----------- | ----------- | ---------- | -------- | --------------- | --- | --------- | ------- | --- |
| three | divisions: | Operations, | | Production, | and | | | | | | | |
| | | | | | | Context: | A travel | magazine | has | hired six | interns | - |
| Sales. | Exactly | five | tours will | be | conducted | | | | | | | |
that week, one each day. ( more context here Farber, Gombarick, Hall, Jackson, Kanze, and
divi·s·i·on
) If the Operations is toured on Lha - to assist in covering three stories:
·T·h·ursday, then the Production division is Romania, Spain, and Tuscany. ( more context here
Tus·c·a·ny.
| toured | on Friday. | | | | | | ) Jackson | is | assigned | to | Kanze | is |
| --------------- | ---------- | ------ | --------- | ------ | ------- | --- | --------------- | --- | -------- | --- | ----- | --- |
| | | | | | | | ·n·o·t assigned | to | Spain. | | | |
| Question: Which | one | of the | following | CANNOT | be true | | | | | | | |
of the week's tour schedule? Question: Which one of the following interns CANNOT
| | | | | | | | be assigned | to | Tuscany? | | | |
| --- | --- | --- | --- | --- | --- | --- | ----------- | --- | -------- | --- | --- | --- |
Options:
| A) The division | that | is | toured | on Monday | is also | Options: | | | | | | |
| --------------- | ----------- | --- | ------ | --------- | ------- | -------- | --------- | --- | --- | --- | --- | --- |
| toured | on Tuesday. | | | | | (A) | Farber | | | | | |
| B) The division | that | is | toured | on Monday | is also | (B) | Gombarick | | | | | |
| toured | on Friday. | | | | | (C) | Hall | | | | | |
(D) Kanze
| C) The division | that | is | toured | on Tuesday | is also | | | | | | | |
| --------------- | ------------ | --- | ------ | ------------ | ------- | ------------- | --- | --- | --- | --- | --- | --- |
| toured | on Thursday. | | | | | (E) | Lha | | | | | |
| D) The division | that | is | toured | on Wednesday | is also | | | | | | | |
| toured | on Friday. | | | | | Declarations: | | | | | | |
E) The division that is toured on Thursday is also stories = EnumSort([Romania, Spain, Tuscany])
| | | | | | | assistants | | = EnumSort([photographer, | | | writer]) | |
| ----------- | ---------- | ----- | --- | --- | --- | ---------- | ----------------------- | ------------------------- | ------ | ---------------- | -------- | --- |
| toured | on Friday. | | | | | | | | | | | |
| | | | | | | ( | more declarations | | here ) | | | |
| | | | | | | t·r·a·ined | = Function([inte·r·n·s] | | | -> [assistants]) | | |
| The correct | option | is: C | | | | | | | | | | |
Constraints:
Chain-of-ThoughtPrompting trained(Gombarick) == trained(Lha) ::: Gombarick and
| | | | | | | | Lha will | be trained | in | the same | field | |
| --- | --- | --- | --- | --- | --- | --- | -------- | ---------- | --- | -------- | ----- | --- |
Task Description: Given a problem statement as trained(Farber) != trained(Kanze) ::: Farber and
contexts, the task is to answer a logical reasoning Kanze will be trained in different fields
| question. | | | | | | ( | more contraints | here | ) | | | |
| --------------- | -------- | --- | ---------- | ------ | ------- | -------------------- | --------------- | ---- | ---------- | ----------- | --- | -------- |
| | | | | | | a·s·s·igned(Jackson) | | == | T·u·s·cany | ::: Jackson | is | assigned |
| Context: During | a single | | week, from | Monday | through | | to Tuscany | | | | | |
Friday, tours will be conducted of a company's assigned(Kanze) != Spain ::: Kanze is not assigned
| three | divisions: | Operations, | | Production, | and | | to Spain | | | | | |
| ------ | ---------- | ----------- | ---------- | ----------- | ------------ | -------- | -------- | --- | --- | --- | --- | --- |
| Sales. | Exactly | five | tours will | be | conducted | | | | | | | |
| that | week, one | each | day. ( | more | context here | Options: | | | | | | |
divi·s·i·on
) If the Operations is toured on is_unsat(assigned(Farber) == Tuscany) ::: (A)
·T·h·ursday, then the Production division is is_unsat(assigned(Gombarick) == Tuscany) ::: (B)
| toured | on Friday. | | | | | | | | | | | |
| ------ | ---------- | --- | --- | --- | --- | ------------------------ | --- | --- | ----------- | -------- | ------- | --- |
| | | | | | | is_unsat(assigned(Hall) | | | == Tuscany) | ::: | (C) | |
| | | | | | | is_unsat(assigned(Kanze) | | | == | Tuscany) | ::: (D) | |
Question: Which one of the following CANNOT be true is_unsat(assigned(Lha) == Tuscany) ::: (E)
| of the | week's | tour | schedule? | | | | | | | | | |
| ------ | ------ | ---- | --------- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
Options:
A) The division that is toured on Monday is also D ResultInterpreterImplementation
| toured | on Tuesday. | | | | | | | | | | | |
| --------------- | ------------ | --- | ------ | ---------- | ------- | ----------- | -------- | ------ | ------------ | --- | -------- | ----- |
| B) The division | that | is | toured | on Monday | is also | | | | | | | |
| | | | | | | For | PrOntoQA | and | ProofWriter, | the | Pyke | logic |
| toured | on Friday. | | | | | | | | | | | |
| C) The division | that | is | toured | on Tuesday | is also | | | | | | | |
| | | | | | | programming | | engine | returns | the | inferred | value |
| toured | on Thursday. | | | | | | | | | | | |
D) The division that is toured on Wednesday is also of the variable in the query or Unknown if the
| toured | on Friday. | | | | | | | | | | | |
| --------------- | ---------- | --- | ------ | ----------- | ------- | -------------------------------- | ------ | --- | ----------- | --- | -------- | --- |
| | | | | | | variable | cannot | be | determined. | For | example, | for |
| E) The division | that | is | toured | on Thursday | is also | | | | | | | |
| toured | on Friday. | | | | | | | | | | | |
| | | | | | | thequeryConductElectricity(Nail, | | | | | x),Pyke | |
Reasoning: Since Thursday and Friday already have mayreturnx =True. Bycomparingwiththegoal
| tours planned, | only | Monday, | Tuesday | and | Wednesday | | | | | | | |
| ---------------- | ----- | ----------- | ------- | --- | --------- | --------- | --- | ------------------------ | --- | --- | --- | ------- |
| | | | | | | | | ConductElectricity(Nail, | | | | False), |
| tours need | to be | determined. | | | | statement | | | | | | |
| ( more reasoning | here | | ) | | | | | | | | | |
A··d·ifferent ·i·s· we can know that goal to be proved is False.
| | division | | toured | on Thursday. | | | | | | | | |
| --- | -------- | --- | ------ | ------------ | --- | --- | --- | --- | --- | --- | --- | --- |
Therefore, the final answer is C. ForFOLIO,theFOLinferenceenginedirectlyre-
turnstheveracitylabelofthegoalasENTAILMENT,
| The correct | option | is: C | | | | | | | | | | |
| ----------- | ------ | ----- | --- | --- | --- | -------------- | --- | --- | ----------- | --- | ----- | ------ |
| | | | | | | CONTRADICTION, | | and | CONTINGENT, | | which | can be |
mappedtoTrue,False,andUnknown,respectively.
| | | | | | | For | LogicalDeduction, | | the | solver | returns | all the |
| --- | --- | --- | --- | --- | --- | ------------------------------------- | ----------------- | ---- | ------ | -------- | ------------- | ------- |
| | | | | | | possiblevalueassignmentsinanarray. | | | | | Wewrite | |
| | | | | | | rules | to parse | each | option | into the | corresponding | |
| | | | | | | valueandcheckitisinthegeneratedarray. | | | | | | ForAR- |
LSAT,weattempttoseparatelyproveeachoption
tofindthecorrectanswer.
| | | | | | | E | ExampleGenerationsof | | | LOGIC-LM | | |
| --- | --- | --- | --- | --- | --- | --- | -------------------- | --- | --- | -------- | --- | --- |
3823
Example 1
Problem: There are six types of wild turkeys: Eastern wild turkey, Osceola wild turkey, Gould's wild turkey, Merriam's wild turkey, Rio Grande
wild turkey, and Ocellated wild turkey. Tom is not an Eastern wild turkey. Tom is not an Osceola wild turkey. Tom is also not a Gould's wild
turkey, or a Merriam's wild turkey, or a Rio Grande wild turkey. Tom is a wild turkey.
Question: Based on the above information, is the following statement true, false, or uncertain? Tom is an Ocellated wild turkey.
(A) True (B) False (C) Uncertain
Predicted logic programs:
Premises:
WildTurkey(eastern) ∧ WildTurkey(osceola) ∧ WildTurkey(gould) ∧ WildTurkey(merriams) ∧ WildTurkey(rio_grande) ∧ WildTurkey(ocellated)
→ ∀x (WildTurkey(x) → (OcellatedWildTurkey(x) ∨ EasternWildTurkey(x) ∨ OsceolaWildTurkey(x) ∨ GouldsWildTurkey(x) ∨ MerriamsWildTurkey(x)
∨ RioGrandeWildTurkey(x)))
WildTurkey(tom) ∧ ¬EasternWildTurkey(tom) ∧ ¬OsceolaWildTurkey(tom) ∧ ¬GouldsWildTurkey(tom) ∧ ¬MerriamsWildTurkey(tom) ∧
¬RioGrandeWildTurkey(tom)
Conclusion:
OcellatedWildTurkey(tom)
| Predicted answer: | C → A | | |
| ------------------ | ------ | --- | --- |
Example 2
Problem: A Japanese game company created the game the Legend of Zelda. All games in the Top 10 list are made by Japanese game companies. If a
game sells more than one million copies, then it will be selected into the Top 10 list. The Legend of Zelda sold more than one million copies.
Question: Based on the above information, is the following statement true, false, or uncertain? The Legend of Zelda is in the Top 10 list.
(A) True (B) False (C) Uncertain
Predicted logic programs:
Premises:
JapaneseGameCompany(legend_of_zelda)
∀x (Top10List(x) → JapaneseGameCompany(x))
| ∀x (SellMoreThanOneMillionCopies(x) | | → Top10List(x)) | |
| ----------------------------------- | --- | --------------- | --- |
SellMoreThanOneMillionCopies(legend_of_zelda)
Conclusion:
Top10List(legend_of_zelda)
Predicted answer: A
Example 3
Problem: The following paragraphs each describe a set of five objects arranged in a fixed order. The statements are logically consistent within
each paragraph. In a golf tournament, there were five golfers: Rob, Eve, Eli, Amy, and Dan. Dan finished second. Amy finished below Eve. Dan
finished above Eve. Amy finished above Eli.
Question: Which of the following is true?
(A) Rob finished third (B) Eve finished third (C) Eli finished third (D) Amy finished third (E) Dan finished third
Predicted logic programs:
| Domain: | Variables: | | Constraints: |
| -------- | ------------------------ | --- | ------------------------------------------------- |
| 1: first | Rob [IN] [1, 2, 3, 4, 5] | | Dan == 2 |
| 5: last | Eve [IN] [1, 2, 3, 4, 5] | | Amy > Eve |
| | Eli [IN] [1, 2, 3, 4, 5] | | Dan > Eve→ Dan < Eve |
| | Amy [IN] [1, 2, 3, 4, 5] | | Amy < Eli |
| | Dan [IN] [1, 2, 3, 4, 5] | | AllDifferentConstraint([Rob, Eve, Eli, Amy, Dan]) |
Query:
(A) Rob == 3 (B) Eve == 3 (C) Eli == 3 (D) Amy == 3 (E) Dan == 3
| Predicted answer: E | → B | | |
| ------------------- | --- | --- | --- |
Example 4
Problem: If the restaurant is listed in Yelp’s recommendations, then the restaurant does not receive many negative reviews. All restaurants with
a rating greater than 9 are listed in Yelp’s recommendations. Some restaurants that do not provide take-out service receive many negative
reviews. All restaurants that are popular among local residents have ratings greater than 9. Subway has a rating greater than 9 or is popular
among local residents.
Question: Based on the above information, is the following statement true, false, or uncertain? Subway provides take-out service and does not
receive many negative reviews.
(A) True (B) False (C) Uncertain
Predicted logic programs:
Premises:
∀x (Listed(x) → ¬NegativeReviews(x))
| ∀x (Rating(x, y) ∧ | y > 9 → Listed(x)) | → ∀x (GreaterThanNine(x) → Listed(x)) | |
| -------------------------------- | ----------------------- | ---------------------------------------------- | --------------- |
| ∃x (¬TakeOut(x) ∧ | NegativeReviews(x)) | | |
| ∀x (Popular(x) → (Rating(x, y) ∧ | | y > 9)) → ∀x (Popular(x) → GreaterThanNine(x)) | |
| Rating(subway, y) ∧ | y > 9 ∨ Popular(subway) | → GreaterThanNine(subway) ∨ | Popular(subway) |
Conclusion:
| TakeOut(subway) ∧ | ¬NegativeReviews(subway) | | |
| ------------------ | ------------------------ | --- | --- |
| Predicted answer: | C → A | | |
Figure6: Examplesofgeneratedsymbolicrepresentationsandpredictedanswers. Theincorrectsegment(s)and
theircorrespondenceintheproblemaremarkedinred,andthecorrectrevisionsaremarkedingreen.
3824 |