发现语言模型推理能力的临界规模,超16亿参数后性能跃升。
Unveiling Reasoning Thresholds in Language Models: Scaling, Fine-Tuning, and Interpretability through Attention Maps
- 通过分析注意力图,揭示大模型推理时对关键词的聚焦机制。
- 超过16亿参数的模型在长链条推理任务中成功率显著提升。
- 小模型经特定示例微调后,也能生成准确的推理链。
本研究考察了不同规模与训练数据的解码器仅用Transformer语言模型(如GPT2、SmolLM2、OpenELM、TinyLlama、Stable LM、Gemma 2)的上下文学习能力。我们识别出一个关键参数阈值约16亿,在此之上模型的推理性能显著提升,尤其在常识推理和演绎推理任务中表现更好,尤其是在需要长推理链的任务如反证法和析取消去中。针对低于阈值的模型,我们证明使用任务特定示例进行微调可大幅提升推理能力,使模型在无额外示例提示的情况下也能生成正确链式思维(CoT)。最后,通过对注意力图的分析发现,能生成正确CoT的模型在后续正确标记及正确词性部分具有更高的注意力得分,为推理过程提供了可解释性洞察。研究结果深化了对解码器仅用变压器模型推理能力的理解。代码已公开于:https://github.com/AnnonymousForPapers/CoT_Reasoning_Test。
原文摘要 · Abstract (English)
This study investigates the in-context learning capabilities of various decoder-only transformer-based language models with different model sizes and training data, including GPT2, SmolLM2, OpenELM, TinyLlama, Stable LM, and Gemma 2. We identify a critical parameter threshold (~1.6 billion), beyond which reasoning performance improves significantly in tasks such as commonsense reasoning in multiple-choice question answering and deductive reasoning. Specifically, models above this threshold achieve better success rates in chain-of-thought (CoT) prompting for deductive reasoning tasks, especially those requiring longer reasoning chains, such as proof by contradiction and disjunction elimination. To address limitations in sub-threshold models, we demonstrate that fine-tuning with task-specific exemplars substantially enhances reasoning performance, enabling accurate CoT generation even without additional exemplars in the prompt for tasks with shorter reasoning chains. Finally, our analysis of attention maps reveals that models capable of generating correct CoTs exhibit higher token-level attention scores on subsequent correct tokens and the correct parts of speech, providing interpretability insights into reasoning processes. These findings collectively advance understanding of reasoning capabilities in decoder-only transformer-based models. The code is available at: https://github.com/AnnonymousForPapers/CoT_Reasoning_Test.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。