A Theoretical Understanding of Chain-of-Thought: Coherent Reasoning and Error-Aware Demonstration

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Cui, Yingqian, He, Pengfei, Tang, Xianfeng, He, Qi, Luo, Chen, Tang, Jiliang, Xing, Yue
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917812450099200
author Cui, Yingqian
He, Pengfei
Tang, Xianfeng
He, Qi
Luo, Chen
Tang, Jiliang
Xing, Yue
author_facet Cui, Yingqian
He, Pengfei
Tang, Xianfeng
He, Qi
Luo, Chen
Tang, Jiliang
Xing, Yue
contents Few-shot Chain-of-Thought (CoT) prompting has demonstrated strong performance in improving the reasoning capabilities of large language models (LLMs). While theoretical investigations have been conducted to understand CoT, the underlying transformer used in these studies isolates the CoT reasoning process into separated in-context learning steps (Stepwise ICL). In this work, we theoretically show that, compared to Stepwise ICL, the transformer gains better error correction ability and more accurate predictions if the reasoning from earlier steps (Coherent CoT) is integrated. Given that this coherent reasoning changes the behavior of the transformer, we further investigate the sensitivity of the transformer with Coherent CoT when the demonstration examples are corrupted at the inference stage. Our theoretical results indicate that the transformer is more sensitive to errors in intermediate reasoning steps than the final outcome. Building upon this observation, we propose an improvement on CoT by incorporating both correct and incorrect reasoning paths in the demonstration. Our experiments validate the effectiveness of the proposed approach.
format Preprint
id arxiv_https___arxiv_org_abs_2410_16540
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle A Theoretical Understanding of Chain-of-Thought: Coherent Reasoning and Error-Aware Demonstration
Cui, Yingqian
He, Pengfei
Tang, Xianfeng
He, Qi
Luo, Chen
Tang, Jiliang
Xing, Yue
Computation and Language
Artificial Intelligence
Machine Learning
Few-shot Chain-of-Thought (CoT) prompting has demonstrated strong performance in improving the reasoning capabilities of large language models (LLMs). While theoretical investigations have been conducted to understand CoT, the underlying transformer used in these studies isolates the CoT reasoning process into separated in-context learning steps (Stepwise ICL). In this work, we theoretically show that, compared to Stepwise ICL, the transformer gains better error correction ability and more accurate predictions if the reasoning from earlier steps (Coherent CoT) is integrated. Given that this coherent reasoning changes the behavior of the transformer, we further investigate the sensitivity of the transformer with Coherent CoT when the demonstration examples are corrupted at the inference stage. Our theoretical results indicate that the transformer is more sensitive to errors in intermediate reasoning steps than the final outcome. Building upon this observation, we propose an improvement on CoT by incorporating both correct and incorrect reasoning paths in the demonstration. Our experiments validate the effectiveness of the proposed approach.
title A Theoretical Understanding of Chain-of-Thought: Coherent Reasoning and Error-Aware Demonstration
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2410.16540