Title: A Theoretical Understanding of Chain-of-Thought Subtitle: Coherent Reasoning and Error-Aware Demonstration Resource URL: https://arxiv.org/pdf/2410.16540 Publication Date: 2024-10-21 Format Type: Article Reading Time: 45 minutes Contributors: et al.;Jiliang Tang;Chen Luo;Xianfeng Tang;Pengfei He;Yingqian Cui; Source: arXiv Keywords: [Artificial Intelligence, Natural Language Processing, Chain-of-Thought Reasoning, In-Context Learning, Error-Aware Demonstrations] Job Profiles: Academic/Researcher;Machine Learning Engineer;Artificial Intelligence Engineer;Software Engineer;Chief Technology Officer (CTO); Synopsis: In this scholarly article, a team of computer and data scientists led by Yingqian Cui examines coherent chain-of-thought (CoT) reasoning in transformers. They contrast it with stepwise in-context learning (ICL) and suggest error-aware demonstrations to enhance performance. Takeaways: [Coherent CoT integrates intermediate reasoning steps, improving error correction and prediction accuracy compared to stepwise ICL., Noise in intermediate reasoning steps affects CoT more than errors in final outcomes., Incorporating both correct and incorrect reasoning paths into demonstrations can enhance the model's reasoning capabilities., Providing explanations for incorrect paths is crucial to avoid confusing the model., Model-generated incorrect reasoning paths may yield better performance than handcrafted ones when paired with appropriate error explanations.] Summary: Few-shot Chain-of-Thought (CoT) prompting significantly improves large language models' (LLMs) reasoning abilities by teaching them to perform stepwise reasoning. Existing theoretical analyses often treat CoT as a series of isolated steps, termed Stepwise In-Context Learning (ICL), where predictions at each step rely only on the immediate prior step. The authors argue for a holistic perspective—Coherent CoT—where reasoning integrates all prior steps, enabling better self-correction and improved predictions. The study compares Coherent CoT and Stepwise ICL theoretically and demonstrates that Coherent CoT achieves better performance by reducing dependency on intermediate predictions and incorporating more context. However, Coherent CoT is more sensitive to errors in intermediate reasoning steps than in final predictions. This sensitivity highlights the need for robust error mitigation during the reasoning process. Building on this insight, the authors propose a novel approach to improve CoT by including both correct and incorrect reasoning paths in demonstrations. They show that exposing models to labeled incorrect reasoning, paired with error explanations, enhances their reasoning capabilities. Experiments across multiple datasets and LLMs confirm that this approach improves accuracy, particularly in challenging tasks like date understanding and mathematical reasoning. Additionally, using model-generated incorrect paths outperforms handcrafted ones, as models benefit more from learning from their own errors. The authors' findings suggest a broader implication for designing LLM demonstrations: beyond correct reasoning, teaching models to identify and learn from incorrect logic is vital for enhancing their reasoning robustness and overall accuracy. Content: null