arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.05459cs.LGcs.CLstat.ML
收藏

从稀疏依赖到稀疏注意力:揭示思维链如何提升Transformer的样本效率

From Sparse Dependence to Sparse Attention: Unveiling How Chain-of-Thought Enhances Transformer Sample Efficiency

Stanford University(斯坦福大学);IIIS, Tsinghua University(清华大学信息科学技术学院(IIIS));Amazon(亚马逊公司);Shanghai AI Lab(上海人工智能实验室);Shanghai Qizhi Institute(上海智慧研究院)

Kaiyue Wen, Huaqing Zhang, Hongzhou Lin, Jingzhao Zhang

AI总结:

本文通过奇偶校验学习证明,即使表示能力充足,CoT也能使Transformer的样本需求从指数级降至多项式级,其核心机制在于引入稀疏序列依赖并产生稀疏注意力,从而提升样本效率。

摘要:

思维链(CoT)显著提升了大型语言模型(LLM)的推理性能。虽然当前的理论研究通常将这种提升归因于表达能力和计算能力的增加,但我们认为在LLM机制中表达能力并非主要限制,因为当前的大型模型在简单任务上仍会失败。使用奇偶校验学习设置,我们证明了即使表示能力充足,CoT也能大幅提升样本效率。具体而言,借助CoT,Transformer能在多项式级样本内学习该函数,而不用CoT时所需样本量呈指数级。此外,我们表明CoT通过在输入标记间引入稀疏的序列依赖来简化学习过程,并产生稀疏且可解释的注意力。我们通过合成和真实实验验证了理论分析,证实注意力层的稀疏性是CoT引发改善的关键因素。

英文摘要:

Chain-of-thought (CoT) significantly enhances the reasoning performance of large language models (LLM). While current theoretical studies often attribute this improvement to increased expressiveness and computational capacity, we argue that expressiveness is not the primary limitation in the LLM regime, as current large models will fail on simple tasks. Using a parity-learning setup, we demonstrate that CoT can substantially improve sample efficiency even when the representation power is sufficient. Specifically, with CoT, a transformer can learn the function within polynomial samples, whereas without CoT, the required sample size is exponential. Additionally, we show that CoT simplifies the learning process by introducing sparse sequential dependencies among input tokens, and leads to a sparse and interpretable attention. We validate our theoretical analysis with both synthetic and real-world experiments, confirming that sparsity in attention layers is a key factor of the improvement induced by CoT.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑