无意义Token,有意义提升:激活偏移如何增强大语言模型推理能力
Meaningless Tokens, Meaningful Gains: How Activation Shifts Enhance LLM Reasoning
AI总结:
本研究揭示插入无意义token提升LLM推理的机制是MLP层激活重分布,据此提出轻量推理时技术ARM,通过自适应偏移近零激活复现增益,在多基准多架构上验证有效且实现简单。
摘要:
受“在查询提示前插入长序列无意义token可持续提升大语言模型(LLM)推理性能”这一令人困惑的观察启发,本研究分析了驱动该现象的底层机制,并基于这些洞见提出了一种更具原则性的方法,可实现相似的性能提升。首先,我们发现性能提升源于LLM的MLP层中激活值的重新分布:接近零的激活出现频率降低,而大数值激活的占比增加。这种重新分布通过抑制弱信号、强化更强且更具信息量的信号,提升了模型的表征能力。基于这一洞见,我们提出激活重分布模块(Activation Redistribution Module, ARM),这是一种轻量级的推理时技术,可直接修改激活值而无需改变输入序列。ARM会自适应识别非线性函数后的近零激活值,并将其向外偏移,以可控的方式隐式复现无意义token的有益效果。我们在多样的基准测试和模型架构上开展了大量实验,结果清晰表明,ARM能持续提升LLM在推理任务上的性能,且仅需几行简单代码即可实现。我们的研究既为无意义token的意外增益提供了清晰的机制解释,也提出了一种简单有效的技术,利用激活重分布进一步提升LLM性能。
英文摘要:
Motivated by the puzzling observation that inserting long sequences of meaningless tokens before the query prompt can consistently enhance LLM reasoning performance, this work analyzes the underlying mechanism driving this phenomenon and based on these insights proposes a more principled method that allows for similar performance gains. First, we find that the improvements arise from a redistribution of activations in the LLM's MLP layers, where near zero activations become less frequent while large magnitude activations increase. This redistribution enhances the model's representational capacity by suppressing weak signals and promoting stronger, more informative ones. Building on this insight, we propose the Activation Redistribution Module (ARM), a lightweight inference-time technique that modifies activations directly without altering the input sequence. ARM adaptively identifies near-zero activations after the non-linear function and shifts them outward, implicitly reproducing the beneficial effects of meaningless tokens in a controlled manner. Extensive experiments across diverse benchmarks and model architectures clearly show that ARM consistently improves LLM performance on reasoning tasks while requiring only a few lines of simple code to implement. Our findings deliver both a clear mechanistic explanation for the unexpected benefits of meaningless tokens and a simple yet effective technique that harnesses activation redistribution to further improve LLM performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。