Elamur Research⌕
☰
home / papers / 2023 / Testing the General Deductive Reasoning Capacity of Large Language Models Using OOD Examples

Testing the General Deductive Reasoning Capacity of Large Language Models Using OOD Examples

Paper · 2023 · Abulhair Saparov, Richard Yuanzhe Pang, Vishakh Padmakumar et al.

Summary

Chain-of-thought prompting lets large language models do some deductive reasoning. However, earlier tests mostly used modus ponens and drew test items from the same distribution as the few-shot demonstrations. This study asks whether LLMs reason deductively in a general sense, meaning whether they can produce proofs more complex than those shown in the prompt. The authors built PrOntoQA-OOD, a programmable synthetic generator that extends PrOntoQA. It covers deduction rules for every propositional connective and lets the user set proof depth, proof width and the combination of rules. Four LLMs are tested on four kinds of generalization: deeper proofs, wider proofs, compositional proofs and unseen rules. Their generated proofs are checked automatically. The models handle compositional proofs better than prior claims suggested. They falter on longer proofs and do not produce hypothetical subproofs unless explicitly demonstrated. Demonstrations from a different distribution sometimes beat in-distribution ones, which suggests in-context learning does not simply mimic supervised learning. This matters for prompt design and for theories of ICL.

Key points

  • Models evaluated: GPT-3.5 175B (text-davinci-003 via the OpenAI API), PaLM 540B, LLaMA 65B and FLAN-T5 11B. Model size did not track performance closely, and smaller instruction-tuned models with longer pretraining matched larger ones.
  • PrOntoQA-OOD includes six rules:
    • implication elimination (modus ponens),
    • conjunction introduction and elimination,
    • disjunction introduction,
    • disjunction elimination (proof by cases),
    • proof by contradiction.
  • Without explicit examples, the models failed to generalize to proof by cases and proof by contradiction. This suggests pretraining alone does not teach hypothetical subproofs.
  • Removing distractors from demonstrations mostly did not hurt OOD performance. One exception was GPT-3.5 on some rules, where it learned to copy distractor sentences into its proofs.
  • Code, generated data (generated_ood_data.zip) and model outputs (except PaLM's) are released at github.com/asaparov/prontoqa. The paper was presented at NeurIPS 2023.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Cite

Cite as Abulhair Saparov, Richard Yuanzhe Pang, Vishakh Padmakumar, Nitish Joshi, Seyed Mehran Kazemi, Najoung Kim and He He. 2023. Testing the General Deductive Reasoning Capacity of Large Language Models Using OOD Examples. arXiv:2305.15269.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2305.15269 · arXiv 2305.15269

@misc{saparov2023testing,
  title = {{Testing the General Deductive Reasoning Capacity of Large Language Models Using OOD Examples}},
  author = {Abulhair Saparov, Richard Yuanzhe Pang, Vishakh Padmakumar, Nitish Joshi, Seyed Mehran Kazemi, Najoung Kim and He He},
  year = {2023},
  doi = {10.48550/arxiv.2305.15269},
  eprint = {2305.15269},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2305.15269}
}

References

40 references, 20 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Ekin Akyürek, Dale Schuurmans, Jacob Andreas, Tengyu Ma, and Denny Zhou. What learning algorithm is in-context learning? Investigations with linear models. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id= 0g0X4H8yN4I. ↗
  2. Shengnan An, Zeqi Lin, Qiang Fu, Bei Chen, Nanning Zheng, Jian-Guang Lou, and Dongmei Zhang. How do in-context examples affect compositional generalization? CoRR, abs/2305.04835, 2023. URL https://arxiv.org/abs/2305.04835. ↗
  3. Cem Anil, Yuhuai Wu, Anders Andreassen, Aitor Lewkowycz, Vedant Misra, Vinay V. Ramasesh, Ambrose Slone, Guy Gur-Ari, Ethan Dyer, and Behnam Neyshabur. Exploring length generalization in large language models. CoRR, abs/2207.04901, 2022. doi: 10.48550/arXiv.2207.04901. URL https://doi.org/10.48550/a…
  4. Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, Parker Schuh, Kensen Shi, Sasha Tsvyashchenko, Joshua Maynez, Abhishek Rao, Parker Barnes, Yi Tay, Noam Shazeer, Vinodkumar Prabhakaran, Emi…
  5. Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Y. Zhao, Yanping Huang…
  6. Damai Dai, Yutao Sun, Li Dong, Yaru Hao, Zhifang Sui, and Furu Wei. Why can gpt learn in-context? language models secretly perform gradient descent as meta optimizers. In Findings of the Association for Computational Linguistics: ACL 2023, Toronto, Canada, 2023. Association for Computational Linguis…
  7. G. Gentzen. Untersuchungen über das logische schließen i. Mathematische Zeitschrift, 39:176–210, 1935. find
  8. Nicolas Gontier, Koustuv Sinha, Siva Reddy, and Christopher Pal. Measuring systematic generalization in neural proof generation with transformers. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Syst… find
  9. Simeng Han, Hailey Schoelkopf, Yilun Zhao, Zhenting Qi, Martin Riddell, Luke Benson, Lucy Sun, Ekaterina Zubova, Yujie Qiao, Matthew Burtell, David Peng, Jonathan Fan, Yixin Liu, Brian Wong, Malcolm Sailor, Ansong Ni, Linyong Nan, Jungo Kasai, Tao Yu, Rui Zhang, Shafiq R. Joty, Alexander R. Fabbri,…
  10. Arian Hosseini, Ankit Vani, Dzmitry Bahdanau, Alessandro Sordoni, and Aaron C. Courville. On the compositional generalization gap of in-context learning. In Jasmijn Bastings, Yonatan Belinkov, Yanai Elazar, Dieuwke Hupkes, Naomi Saphra, and Sarah Wiegreffe, editors, Proceedings of the Fifth Blackbox… find
  11. Jie Huang and Kevin Chen-Chuan Chang. Towards reasoning in large language models: A survey. CoRR, abs/2212.10403, 2022. doi: 10.48550/arXiv.2212.10403. URL https://doi.org/10. 48550/arXiv.2212.10403.
  12. Seyed Mehran Kazemi, Najoung Kim, Deepti Bhatia, Xin Xu, and Deepak Ramachandran. LAM-BADA: backward chaining for automated reasoning in natural language. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics, Toronto, Canada, July 2023. Association for Computati… find
  13. Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. Large language models are zero-shot reasoners. In Advances in Neural Information Processing Systems, 2022. URL http://papers.nips.cc/paper_files/paper/2022/hash/ 8bb0d291acd4acf06ef112099c16f326-Abstract-Conference.ht… ↗
  14. Keito Kudo, Yoichi Aoki, Tatsuki Kuribayashi, Ana Brassard, Masashi Yoshikawa, Keisuke Sakaguchi, and Kentaro Inui. Do deep neural networks capture compositionality in arithmetic reasoning? In Andreas Vlachos and Isabelle Augenstein, editors, Proceedings of the 17th Conference of the European Chapte… find
  15. Itay Levy, Ben Bogin, and Jonathan Berant. Diverse demonstrations improve in-context compositional generalization. CoRR, abs/2212.06800, 2022. doi: 10.48550/arXiv.2212.06800. URL https://doi.org/10.48550/arXiv.2212.06800. ↗
  16. Aitor Lewkowycz, Anders Johan Andreassen, David Dohan, Ethan Dyer, Henryk Michalewski, Vinay Venkatesh Ramasesh, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, Yuhuai Wu, Behnam Neyshabur, Guy Gur-Ari, and Vedant Misra. Solving quantitative reasoning problems with language models. In Alic…
  17. Percy Liang, Rishi Bommasani, Tony Lee, Dimitris Tsipras, Dilara Soylu, Michihiro Yasunaga, Yian Zhang, Deepak Narayanan, Yuhuai Wu, Ananya Kumar, Benjamin Newman, Binhang Yuan, Bobby Yan, Ce Zhang, Christian Cosgrove, Christopher D. Manning, Christopher Ré, Diana Acosta-Navas, Drew A. Hudson, Eric… find
  18. Jian Liu, Leyang Cui, Hanmeng Liu, Dandan Huang, Yile Wang, and Yue Zhang. Logiqa: A challenge dataset for machine reading comprehension with logical reasoning. In Christian Bessiere, editor, Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI 2020, pages…
  19. Ian McKenzie, Alexander Lyzhov, Alicia Parrish, Ameya Prabhu, Aaron Mueller, Najoung Kim, Sam Bowman, and Ethan Perez. Inverse scaling prize: Second round winners, 2022. URL https://irmckenzie.co.uk/round2. ↗
  20. Maxwell I. Nye, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, Charles Sutton, and Augustus Odena. Show your work: Scratchpads for intermediate computation with language models. CoRR, abs/2112.00114, 2021…
  21. Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Gray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. Training l…
  22. Frank Pfenning. Natural deduction. Lecture notes in 15-815 Automated Theorem Proving, 2004. URL https://www.cs.cmu.edu/~fp/courses/atp/handouts/ch2-natded.pdf. ↗
  23. Ofir Press, Muru Zhang, Sewon Min, Ludwig Schmidt, Noah A. Smith, and Mike Lewis. Measuring and narrowing the compositionality gap in language models. CoRR, abs/2210.03350, 2022. doi: 10.48550/arXiv.2210.03350. URL https://doi.org/10.48550/arXiv.2210.03350. ↗
  24. Linlu Qiu, Peter Shaw, Panupong Pasupat, Tianze Shi, Jonathan Herzig, Emily Pitler, Fei Sha, and Kristina Toutanova. Evaluating the impact of model scale for compositional generalization in semantic parsing. In Yoav Goldberg, Zornitsa Kozareva, and Yue Zhang, editors, Proceedings of the 2022 Confere… find
  25. Soumya Sanyal, Zeyi Liao, and Xiang Ren. Robustlr: A diagnostic benchmark for evaluating logical robustness of deductive reasoners. In Yoav Goldberg, Zornitsa Kozareva, and Yue Zhang, editors, Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022, Abu Dha… find
  26. Abulhair Saparov and He He. Language models are greedy reasoners: A systematic formal analysis of chain-of-thought. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=qFVVBzXxR2V. ↗
  27. Koustuv Sinha, Shagun Sodhani, Jin Dong, Joelle Pineau, and William L. Hamilton. CLUTRR: A diagnostic benchmark for inductive reasoning from text. In Kentaro Inui, Jing Jiang, Vincent Ng, and Xiaojun Wan, editors, Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing… find
  28. Oyvind Tafjord, Bhavana Dalvi, and Peter Clark. Proofwriter: Generating implications, proofs, and abductive statements over natural language. In Chengqing Zong, Fei Xia, Wenjie Li, and Roberto Navigli, editors, Findings of the Association for Computational Linguistics: ACL/IJCNLP 2021, Online Event,…
  29. Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurélien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. LLaMA: Open and efficient foundation language models. CoRR, abs/2302…
  30. Johannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento, Alexander Mordvintsev, Andrey Zhmoginov, and Max Vladymyrov. Transformers learn in-context by gradient descent. CoRR, abs/2212.07677, 2022. doi: 10.48550/arXiv.2212.07677. URL https://doi.org/10. 48550/arXiv.2212.07677.
  31. Xinyi Wang, Wanrong Zhu, and William Yang Wang. Large language models are implicitly topic models: Explaining and finding good demonstrations for in-context learning. CoRR, abs/2301.11916, 2023. doi: 10.48550/arXiv.2301.11916. URL https://doi.org/10.48550/arXiv.2301. 11916. ↗
  32. Jason Wei, Yi Tay, and Quoc V. Le. Inverse scaling can become u-shaped. CoRR, abs/2211.02011, 2022a. doi: 10.48550/arXiv.2211.02011. URL https://doi.org/10.48550/arXiv.2211. 02011. ↗
  33. Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, brian ichter, Fei Xia, Ed H. Chi, Quoc V Le, and Denny Zhou. Chain of thought prompting elicits reasoning in large language models. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho, editors, Advances in Neural Information Pro…
  34. Yuhuai Wu, Albert Q. Jiang, Jimmy Ba, and Roger Baker Grosse. INT: an inequality benchmark for evaluating generalization in theorem proving. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. find
  35. OpenReview.net, 2021. URL https://openreview.net/forum?id=O6LPudowNQm. ↗
  36. Sang Michael Xie, Aditi Raghunathan, Percy Liang, and Tengyu Ma. An explanation of in-context learning as implicit bayesian inference. In The Tenth International Conference on Learning Representations, ICLR 2022, Virtual Event, April 25-29, 2022.
  37. OpenReview.net, 2022. URL https://openreview.net/forum?id=RdJVFCHjUMI. ↗
  38. Xi Ye, Srinivasan Iyer, Asli Celikyilmaz, Ves Stoyanov, Greg Durrett, and Ramakanth Pasunuru. Complementary explanations for effective in-context learning. CoRR, abs/2211.13892, 2022. doi: 10.48550/arXiv.2211.13892. URL https://doi.org/10.48550/arXiv.2211.13892. ↗
  39. Hanlin Zhang, Yi-Fan Zhang, Li Erran Li, and Eric P. Xing. The impact of symbolic representations on in-context learning for few-shot reasoning. CoRR, abs/2212.08686, 2022a. doi: 10.48550/arXiv. 2212.08686. URL https://doi.org/10.48550/arXiv.2212.08686. — [doi:10.48550/arxiv](https://doi.org/10.48550/arxiv) ↗
  40. Honghua Zhang, Liunian Harold Li, Tao Meng, Kai-Wei Chang, and Guy Van den Broeck. On the paradox of learning to reason from data. CoRR, abs/2205.11502, 2022b. doi: 10.48550/arXiv. 2205.11502. URL https://doi.org/10.48550/arXiv.2205.11502. — [doi:10.48550/arxiv](https://doi.org/10.48550/arxiv) ↗

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/saparov-2023-testing-general-deductive-reasoning-capacity/