Elamur Research⌕
☰
home / papers / 2022 / Text and Patterns: For Effective Chain of Thought, It Takes Two to Tango

Text and Patterns: For Effective Chain of Thought, It Takes Two to Tango

Paper · 2022 · Aman Madaan and Amir Yazdanbakhsh

Summary

Chain-of-thought (CoT) prompting adds intermediate reasoning steps to few-shot examples and greatly improves large language models on reasoning tasks, but why it works has been unclear. The authors study this with counterfactual prompting. They split each in-context example into three components: symbols (numbers, player names, dates), patterns (equations, recurring structures) and text (the connecting language). They then change only one component at a time, for example by replacing numbers with abstract placeholders or making the reasoning factually wrong. Experiments cover four tasks and three models, with PaLM-62B as the main subject.

The exact form of symbols and patterns, and even their correctness, barely matters. What matters is that text and patterns are both present and support each other. Text supplies commonsense and meaning, and patterns fix the task format and steer generation. Removing either one cancels the CoT gain.

Using these findings, the authors build a concise CoT (CCoT) that is more than 20% shorter and performs as well or slightly better. The work presents CoT as guided imitation rather than genuine stepwise reasoning.

Key points

  • Models: PaLM-62B (main analysis), with GPT-3 and Codex used for reproducibility; findings are consistent across all three.
  • Tasks: GSM-8K (mathematical), BIG-bench date and sports understanding (commonsense), and a sorting task (symbolic).
  • Insensitivity to symbols and patterns: replacing symbols with abstract tokens, or using factually incorrect patterns, has little effect on solve rate. Changing the style and wording of the text has only a modest effect.
  • Proposed mechanism: intermediate steps mainly show the model what to copy into a well-formed answer, rather than teaching it how to solve the task. A per-layer analysis finds that prompts with similar performance also produce similar attention patterns.
  • CCoT: prunes text and patterns by over 20% of tokens with equal or slightly higher task solve rate. The authors also note that counterfactual explanations can be misleading.

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

 Institutions

 Fields, topics and concepts

📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 18,614 worksArtificial Intelligence · 17,965 worksArts and Humanities · 17,450 worksLanguage and Linguistics · 17,296 works

🧭 Topics 1Research subjects and languages the work is about.Reasoning · 1,685 works

Cite

Cite as Aman Madaan and Amir Yazdanbakhsh. 2022. Text and Patterns: For Effective Chain of Thought, It Takes Two to Tango. arXiv:2209.07686.

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

@misc{madaan2022text,
  title = {{Text and Patterns: For Effective Chain of Thought, It Takes Two to Tango}},
  author = {Aman Madaan and Amir Yazdanbakhsh},
  year = {2022},
  doi = {10.48550/arxiv.2209.07686},
  eprint = {2209.07686},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2209.07686}
}

References

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

  1. Michael Ahn, Anthony Brohan, Noah Brown, Yevgen Chebotar, Omar Cortes, Byron David, Chelsea Finn, Chuyuan Fu, Keerthana Gopalakrishnan, Karol Hausman, Alex Herzog, Daniel Ho, Jasmine Hsu, Julian Ibarz, Brian Ichter, Alex Irpan, Eric Jang, Rosario Jauregui Ruano, Kyle Jeffrey, Sally Jesmonth, Nikhil… — Do As I Can, Not As I Say: Grounding Language in Robotic Affordances
  2. Marcel Binz and Eric Schulz. Using Cognitive Psychology to Understand GPT-3. arXiv preprint arXiv:2206.14576, 2022. Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbe… find
  3. JAIR, 2021. Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick R…
  4. Elaine Espindola. A Systemic Functional Translation Analysis of Thematic Structure: Directing Attention to Yoda’s Linguistic Manifestation. Word, 2016. Amir Feder, Katherine A. Keith, Emaad Manzoor, Reid Pryzant, Dhanya Sridhar, Zach Wood-Doughty, Jacob Eisenstein, Justin Grimmer, Roi Reichart, Marg… find
  5. Yash Goyal, Ziyan Wu, Jan Ernst, Dhruv Batra, Devi Parikh, and Stefan Lee. Counterfactual Visual Explanations. In ICML, 2019. Yuling Gu, Bhavana Dalvi, and Peter Clark. DREAM: Improving Situational QA by First Elaborating the Situation. In NAACL, 2022. Simon Jerome Han, Keith Ransom, Andrew Perfors,… find
  6. PsyArXiv, 2022. Micha Heilbron, Kristijan Armeni, Jan-Mathijs Schoffelen, Peter Hagoort, and Floris P De Lange. A Hierarchy of Linguistic Predictions During Natural Language Comprehension. Proceedings of the National Academy of Sciences, 2022. Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin…
  7. Psychometrika, 1947. Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe, Mike Lewis, Hannaneh Hajishirzi, and Luke Zettlemoyer. Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? arXiv preprint arXiv:2202.12837, 2022. Swaroop Mishra, Daniel Khashabi, Chitta Baral, Yejin Choi,…
  8. Ramaravind K Mothilal, Amit Sharma, and Chenhao Tan. Explaining Machine Learning Classifiers Through Diverse Counterfactual Explanations. In FAT , 2020. Guoshun Nan, Jiaqi Zeng, Rui Qiao, Zhijiang Guo, and Wei Lu. Uncovering Main Causalities for Long-tailed Information Extraction. In EMNLP, 2021. Ma…
  9. Rafael Poyiadzi, Kacper Sokol, Raul Santos-Rodriguez, Tijl De Bie, and Peter Flach. FACE: Feasible and Actionable Counterfactual Explanations. In AAAI, 2020. Danish Pruthi, Mansi Gupta, Bhuwan Dhingra, Graham Neubig, and Zachary C. Lipton. Learning to Deceive with Attention-Based Explanations. In AC…
  10. Victor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Teven Le Scao, Arun Raja, Manan Dey, M Saiful Bari, Canwen Xu, Urmish Thakker, Shanya Sharma Sharma, Eliza Szczechla, Taewoon Kim, Gunjan Chhablani, Nihal Nayak, Debajyoti Da… — Multitask Prompted Training Enables Zero-Shot Task Generalization
  11. Vered Shwartz, Peter West, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. Unsupervised Commonsense Question Answering with Self-Talk. In EMNLP, 2020. Dylan Slack, Anna Hilgard, Himabindu Lakkaraju, and Sameer Singh. Counterfactual Explanations can be Manipulated. find
  12. NeurIPS, 2021. Ilia Stepin, Jose M Alonso, Alejandro Catala, and Martín Pereira-Fariña. A Survey of Contrastive and Counterfactual Explanation Generation Methods for Explainable Artificial Intelligence. find
  13. IEEE Access, 2021. Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and Policy Considerations for Deep Learning in NLP. In ACL, 2019. Kai Sun, Dian Yu, Dong Yu, and Claire Cardie. Improving Machine Reading Comprehension with General Reading Strategies. In NAACL, 2019. Yujin Tang and David H…
  14. NeurIPS, 2021. Romal Thoppilan, Daniel De Freitas, Jamie Hall, Noam Shazeer, Apoorv Kulshreshtha, Heng-Tze Cheng, Alicia Jin, Taylor Bos, Leslie Baker, Yu Du, YaGuang Li, Hongrae Lee, Huaixiu Steven Zheng, Amin Ghafouri, Marcelo Menegali, Yanping Huang, Maxim Krikun, Dmitry Lepikhin, James Qin, Deha…
  15. ACM Computing Surveys, 2020. Jason Wei, Maarten Bosma, Vincent Y Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. Finetuned Language Models are Zero-shot Learners. arXiv preprint arXiv:2109.01652, 2021. Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Ed Chi,…
  16. Wookieepedia. Yoda. Yoda, 2022. Accessed: 2022-08-15. Yuhuai Wu, Albert Q Jiang, Wenda Li, Markus N Rabe, Charles Staats, Mateja Jamnik, and Christian Szegedy. Autoformalization with Large Language Models. arXiv preprint arXiv:2205.12615, 2022. Sang Michael Xie, Aditi Raghunathan, Percy Liang, and T…

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/madaan-2022-text-patterns-effective-chain-thought/