Elamur Research⌕
☰
home / papers / 2024 / Forward-Backward Reasoning in Large Language Models for Mathematical Verification

Forward-Backward Reasoning in Large Language Models for Mathematical Verification

Paper · 2024 · Weisen Jiang, Han Shi, Longhui Yu et al.

Summary

The paper addresses a limitation of Self-Consistency in chain-of-thought math solving. Self-Consistency picks the answer that most sampled reasoning chains agree on, and its gains level off as more chains are sampled. Many of its errors are still recoverable, because some sampled chain often reaches the right answer even when the majority vote is wrong.

The authors add a verification step based on backward reasoning. They hide one number in the original question, attach a candidate answer, and ask the LLM to recover the hidden number. A candidate's backward score is the share of backward chains that reproduce the true masked value. FOBAR then ranks candidates by a weighted geometric mean of two scores: the forward vote share and this backward share.

The method is evaluated on six arithmetic benchmarks with three OpenAI models. FOBAR reaches state-of-the-art accuracy and beats both Self-Consistency and Self-Verification. The main lesson is that a very simple masking template, combined with forward voting, yields a more reliable answer selector. It also needs no extra training.

Key points

  • Data sets: AddSub, MultiArith, SingleEQ, SVAMP, GSM8K and AQuA.
  • Models: text-davinci-003, GPT-3.5-Turbo and GPT-4, prompted with CoT or ComplexCoT.
  • Number of chains: accuracy plateaus quickly as forward (M_F) and backward (M_B) chains increase. Only very small values (about ≤5 forward, ≤4 backward) noticeably hurt, so modest sampling budgets are enough.
  • Error analysis (GPT-3.5-Turbo, ComplexCoT):
    • About 60% of Self-Consistency failures (294 of 505) had at least one correct chain.
    • FOBAR fixed 54 of those 294 cases.
  • Extension and limits:
    • FOBAR also outperforms the baselines on two non-math tasks with GPT-3.5-Turbo: Date Understanding and Last Letter Concatenation.
    • Tasks like CSQA and StrategyQA remain open, because it is unclear which word to mask.

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

Cite

Cite as Weisen Jiang, Han Shi, Longhui Yu, Zhengying Liu, Yu Zhang, Zhenguo Li and James Kwok. 2024. Forward-Backward Reasoning in Large Language Models for Mathematical Verification. Findings of the Association for Computational Linguistics: ACL 2024.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2024.findings-acl.397 · arXiv 2308.07758

@inproceedings{jiang2024forward,
  title = {{Forward-Backward Reasoning in Large Language Models for Mathematical Verification}},
  author = {Weisen Jiang, Han Shi, Longhui Yu, Zhengying Liu, Yu Zhang, Zhenguo Li and James Kwok},
  booktitle = {Findings of the Association for Computational Linguistics: ACL 2024},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.397},
  eprint = {2308.07758},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.18653/v1/2024.findings-acl.397}
}

References

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

  1. David H Ackley, Geoffrey E Hinton, and Terrence J Sejnowski. 1985. A learning algorithm for Boltzmann machines. Cognitive Science. find
  2. Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chri… — Language Models are Few-Shot Learners
  3. Xinyun Chen, Maxwell Lin, Nathanael Schärli, and Denny Zhou. 2023. Teaching large language models to Self-Debug. Preprint arXiv:2304.05128. find
  4. Yanda Chen, Ruiqi Zhong, Sheng Zha, George Karypis, and He He. 2022. Meta-learning via language model in-context tuning. In Annual Meeting of the Association for Computational Linguistics. find
  5. 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… — PaLM: Scaling Language Modeling with Pathways
  6. Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Hesse Christopher, and Schulman John. 2021. Training verifiers to solve math word problems. Preprint arXiv:2110.14168.
  7. Shizhe Diao, Pengcheng Wang, Yong Lin, and Tong Zhang. 2023. Active prompting with chain-of-thought for large language models. Preprint arXiv:2302.12246. find
  8. Jessica Ficler and Yoav Goldberg. 2017. Controlling linguistic style aspects in neural language generation. In Workshop on Stylistic Variation.
  9. Yao Fu, Hao Peng, Ashish Sabharwal, Peter Clark, and Tushar Khot. 2023. Complexity-based prompting for multi-step reasoning. In International Conference on Learning Representations.
  10. Mohammad Javad Hosseini, Hannaneh Hajishirzi, Oren Etzioni, and Nate Kushman. 2014. Learning to solve arithmetic word problems with verb categorization. In Conference on Empirical Methods in Natural Language Processing.
  11. Weisen Jiang, Yu Zhang, and James Kwok. 2023. Effective structured-prompting by meta-learning and representitive verbalizer. In International Conference on Machine Learning. find
  12. Seyed Mehran Kazemi, Najoung Kim, Deepti Bhatia, Xin Xu, and Deepak Ramachandran. 2023. LAMBADA: Backward chaining for automated reasoning in natural language. In Annual Meeting of the Association for Computational Linguistics.
  13. Tushar Khot, Daniel Khashabi, Kyle Richardson, Peter Clark, and Ashish Sabharwal. 2021. Text modular networks: Learning to decompose tasks in the language of existing models. In Conference of the North American Chapter of the Association for Computational Linguistics.
  14. Geunwoo Kim, Pierre Baldi, and Stephen McAleer. 2023. Language models can solve computer tasks. In Neural Information Processing Systems.
  15. Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. In Neural Information Processing Systems.
  16. Rik Koncel-Kedziorski, Hannaneh Hajishirzi, Ashish Sabharwal, Oren Etzioni, and Siena Dumas Ang. 2015. Parsing algebraic word problems into equations. Transactions of the Association for Computational Linguistics. find
  17. Xuan Li, Zhanke Zhou, Jianing Zhu, Jiangchao Yao, Tongliang Liu, and Bo Han. 2023. DeepInception: Hypnotize large language model to be jailbreaker. Preprint arXiv:2311.03191.
  18. Zhengzhong Liang, Steven Bethard, and Mihai Surdeanu. 2021. Explainable multi-hop verbal reasoning through internal monologue. In Conference of the North American Chapter of the Association for Computational Linguistics. find
  19. Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. 2023. Let’s verify step by step. Preprint arXiv:2305.20050.
  20. Wang Ling, Dani Yogatama, Chris Dyer, and Phil Blunsom. 2017. Program induction by rationale generation: Learning to solve and explain algebraic word problems. In Annual Meeting of the Association for Computational Linguistics. find
  21. Zhan Ling, Yunhao Fang, Xuanlin Li, Zhiao Huang, Mingu Lee, Roland Memisevic, and Hao Su. 2023. Deductive verification of Chain-of-Thought reasoning. In Neural Information Processing Systems.
  22. Pan Lu, Liang Qiu, Kai-Wei Chang, Ying Nian Wu, Song-Chun Zhu, Tanmay Rajpurohit, Peter Clark, and Ashwin Kalyan. 2022. Dynamic prompt learning via policy gradient for semi-structured mathematical reasoning. In International Conference on Learning Representations.
  23. Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V Le, Ed H. Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. 2023. Self-Consistency improves chain of thought reasoning in language models. In International Conference on Learning Representations.
  24. Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Shashank Gupta, Bodhisattwa Prasad Majumder, Katherine Hermann, Sean Welleck, Amir Yazdanbakhsh, and Peter Clark. 2023. Self-Refine: Iterative refinement with… find
  25. Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed H. Chi, Quoc V Le, and Denny Zhou. 2022. Chain of thought prompting elicits reasoning in large language models. In Neural Information Processing Systems.
  26. Sewon Min, Mike Lewis, Luke Zettlemoyer, and Hannaneh Hajishirzi. 2022. MetaICL: Learning to learn in context. In North American Chapter of the Association for Computational Linguistics. find
  27. OpenAI. 2022a. GPT-3.5. Technical Report. find
  28. OpenAI. 2022b. Introducing ChatGPT. Technical Report. find
  29. OpenAI. 2023. GPT-4. Technical Report. — GPT-4 Technical Report
  30. Arkil Patel, Satwik Bhattamishra, and Navin Goyal. 2021. Are NLP models really able to solve simple math word problems? In Conference of the North American Chapter of the Association for Computational Linguistics.
  31. Debjit Paul, Mete Ismayilzada, Maxime Peyrard, Beatriz Borges, Antoine Bosselut, Robert West, and Boi Faltings. 2023. REFINER: Reasoning feedback on intermediate representations. Preprint arXiv:2304.01904.
  32. Philip Pettit and Robert Sugden. 1989. The backward induction paradox. The Journal of Philosophy. find
  33. Silviu Pitis, Michael R Zhang, Andrew Wang, and Jimmy Ba. 2023. Boosted prompt ensembles for large language models. Preprint arXiv:2304.05970. find
  34. Gabriel Poesia and Noah D Goodman. 2023. Peano: learning formal mathematical reasoning. Philosophical Transactions of the Royal Society A.
  35. Tim Rocktäschel and Sebastian Riedel. 2016. Learning knowledge base inference with neural theorem provers. In Workshop on Automated Knowledge Base Construction. find
  36. Subhro Roy and Dan Roth. 2015. Solving general arithmetic word problems. In Empirical Methods in Natural Language Processing.
  37. Staurt J Russell and Peter Norvig. 1995. Artificial Intelligence: A Modern Approach. Prentice Hall. find
  38. Zhihong Shao, Yeyun Gong, Yelong Shen, Minlie Huang, Nan Duan, and Weizhu Chen. 2023. Synthetic prompting: Generating chain-of-thought demonstrations for large language models. In International Conference on Machine Learning. find
  39. Noah Shinn, Federico Cassano, Beck Labash, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. 2023. Reflexion: Language agents with verbal reinforcement learning. In Neural Information Processing Systems.
  40. Mingzhe Wang and Jia Deng. 2020. Learning to prove theorems by learning to generate theorems. In Neural Information Processing Systems.
  41. Yanbin Wei, Shuai Fu, Weisen Jiang, James T Kwok, and Yu Zhang. 2024. Rendering graphs for graph reasoning in multimodal large language models. Preprint arXiv:2402.02130. — [arXiv:2402.02130](https://arxiv.org/abs/2402.02130) find
  42. Sean Welleck, Ximing Lu, Peter West, Faeze Brahman, Tianxiao Shen, Daniel Khashabi, and Yejin Choi. 2023. Generating sequences by learning to Self-Correct. In International Conference on Learning Representations.
  43. Yixuan Weng, Minjun Zhu, Fei Xia, Bin Li, Shizhu He, Shengping Liu, Bin Sun, Kang Liu, and Jun Zhao. 2023. Large language models are better reasoners with Self-Verification. In Empirical Methods in Natural Language Processing.
  44. Zhenyu Wu, YaoXiang Wang, Jiacheng Ye, Jiangtao Feng, Jingjing Xu, Yu Qiao, and Zhiyong Wu. 2023. OpenICL: An open-source framework for in-context learning. In Annual Meeting of the Association for Computational Linguistics. find
  45. Jing Xiong, Zixuan Li, Chuanyang Zheng, Zhijiang Guo, Yichun Yin, Enze Xie, YANG Zhicheng, Qingxing Cao, Haiming Wang, Xiongwei Han, et al. 2024. DQ-LoRe: Dual queries with low rank approximation re-ranking for in-context learning. In International Conference on Learning Representations.
  46. Xiaohan Xu, Chongyang Tao, Tao Shen, Can Xu, Hongbo Xu, Guodong Long, and Jian-guang Lou. 2023. Re-Reading improves reasoning in language models. Preprint arXiv:2309.06275. — [arXiv:2309.06275](https://arxiv.org/abs/2309.06275) find
  47. Tianci Xue, Ziqi Wang, Zhenhailong Wang, Chi Han, Pengfei Yu, and Heng Ji. 2023. RCOT: Detecting and rectifying factual inconsistency in reasoning by reversing chain-of-thought. Preprint arXiv:2305.11499. — [arXiv:2305.11499](https://arxiv.org/abs/2305.11499) find
  48. Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L Griffiths, Yuan Cao, and Karthik Narasimhan. 2023. Tree of Thoughts: Deliberate problem solving with large language models. In Neural Information Processing Systems. find
  49. Fei Yu, Hongbo Zhang, and Benyou Wang. 2023. Nature language reasoning: A survey. Preprint arXiv:2303.14725.
  50. Longhui Yu, Weisen Jiang, Han Shi, Yu Jincheng, Zhengying Liu, Yu Zhang, James Kwok, Zhenguo Li, Adrian Weller, and Weiyang Liu. 2024. MetaMath: Bootstrap your own mathematical questions for large language models. In International Conference on Learning Representations.
  51. Kechi Zhang, Zhuo Li, Jia Li, Ge Li, and Zhi Jin. 2023a. Self-Edit: Fault-aware code editor for code generation. In Annual Meeting of the Association for Computational Linguistics.
  52. Zhuosheng Zhang, Aston Zhang, Mu Li, and Alex Smola. 2023b. Automatic chain of thought prompting in large language models. In International Conference on Learning Representations.
  53. Zhuosheng Zhang, Aston Zhang, Mu Li, Hai Zhao, George Karypis, and Alex Smola. 2023c. Multimodal chain-of-thought reasoning in language models. In International Conference on Machine Learning.
  54. Chuanyang Zheng, Zhengying Liu, Enze Xie, Zhenguo Li, and Yu Li. 2023. Progressive-hint prompting improves reasoning in large language models. Preprint arXiv: 2304.09797.
  55. Denny Zhou, Nathanael Schärli, Le Hou, Jason Wei, Nathan Scales, Xuezhi Wang, Dale Schuurmans, Claire Cui, Olivier Bousquet, Quoc V Le, and Ed H. Chi. 2023. Least-to-most prompting enables complex reasoning in large language models. In International Conference on Learning Representations.

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/jiang-2024-forward-backward-reasoning-large-language/