When Do Program-of-Thoughts Work for Reasoning?

Zhen Bi, Ningyu Zhang, Yinuo Jiang, Shumin Deng, Guozhou Zheng +1 more
8/29/2023
29 citations
cs.CLcs.AIcs.LG

Official code: zjunlp/EasyInstruct (407 stars, Python, MIT, last commit 2024-12-23).

Abstract

In the realm of embodied artificial intelligence, the reasoning capabilities of Large Language Models (LLMs) play a pivotal role. Although there are effective methods like program-of-thought prompting for LLMs which uses programming language to tackle complex reasoning tasks, the specific impact of code data on the improvement of reasoning capabilities remains under-explored.

Show full abstract

To address this gap, we propose complexity-impacted reasoning score (CIRS), which combines structural and logical attributes, to measure the correlation between code and reasoning abilities. Specifically, we use the abstract syntax tree to encode the structural information and calculate logical complexity by considering the difficulty and the cyclomatic complexity. Through an empirical analysis, we find not all code data of complexity can be learned or understood by LLMs. Optimal level of complexity is critical to the improvement of reasoning abilities by program-aided prompting. Then we design an auto-synthesizing and stratifying algorithm, and apply it to instruction generation for mathematical reasoning and code data filtering for code generation tasks. Extensive results demonstrates the effectiveness of our proposed approach. Code will be integrated into the EasyInstruct framework at https://github.com/zjunlp/EasyInstruct.

View on arXivView PDF

Code Implementations(1)

MIT

[ACL 2024] An Easy-to-use Instruction Processing Framework for LLMs.

40736Python, Jupyter NotebookMar 7, 20231 years agoMIT
apichain-of-thoughtchatgpteasyinstructgpt+13 more

Similar Papers

Cite this paper

@article{bi2023when,
  title  = {When Do Program-of-Thoughts Work for Reasoning?},
  author = {Zhen Bi and Ningyu Zhang and Yinuo Jiang and Shumin Deng and Guozhou Zheng and Huajun Chen},
  year   = {2023},
  eprint = {2308.15452},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2308.15452v6}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2308.15452.svg)](https://codeofpaper.com/paper/2308.15452)

Discussion