发现大模型能自动感知题目难易,靠的是特定注意力头的激活模式。
Probing the Difficulty Perception Mechanism of Large Language Models
- 用线性探测法发现模型内部可编码题目难度。
- 最终层注意力头对难易题有相反激活模式,定位准确。
- 适合做自动难度标注,省去人工标注成本。
大型语言模型(LLMs)在复杂推理任务中日益广泛应用,但其内部评估问题难度的能力仍不明确,而这一能力对自适应推理和资源高效分配至关重要。本文研究了LLMs是否在其内部表征中隐式编码问题难度。通过在LLMs的最终标记表示上使用线性探测,我们证明数学问题的难度可被线性建模。进一步定位到最终Transformer层的特定注意力头:这些注意力头对简单与困难问题呈现相反的激活模式,从而实现难度感知。消融实验验证了定位的准确性。关键的是,实验为将LLMs用作自动难度标注器提供了实际支持,可能大幅减少基准构建和课程学习中对昂贵人工标注的依赖。我们还发现,在标记层面,熵值与难度感知存在显著差异。本研究揭示,LLMs中的难度感知不仅存在,且具有结构性组织,为未来研究提供了新的理论见解与实践方向。代码已公开于 https://github.com/Aegis1863/Difficulty-Perception-of-LLMs。
原文摘要 · Abstract (English)
Large language models (LLMs) are increasingly deployed on complex reasoning tasks, yet little is known about their ability to internally evaluate problem difficulty, which is an essential capability for adaptive reasoning and efficient resource allocation. In this work, we investigate whether LLMs implicitly encode problem difficulty in their internal representations. Using a linear probe on the final-token representations of LLMs, we demonstrate that the difficulty level of math problems can be linearly modeled. We further locate the specific attention heads of the final Transformer layer: these attention heads have opposite activation patterns for simple and difficult problems, thus achieving perception of difficulty. Our ablation experiments prove the accuracy of the location. Crucially, our experiments provide practical support for using LLMs as automatic difficulty annotators, potentially substantially reducing reliance on costly human labeling in benchmark construction and curriculum learning. We also uncover that there is a significant difference in entropy and difficulty perception at the token level. Our study reveals that difficulty perception in LLMs is not only present but also structurally organized, offering new theoretical insights and practical directions for future research. Our code is available at https://github.com/Aegis1863/Difficulty-Perception-of-LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。