arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2406.19384cs.LGcs.AIcs.CL
收藏

大语言模型的显著鲁棒性:推理的阶段?

The Remarkable Robustness of LLMs: Stages of Inference?

MIT(麻省理工学院);Stanford University(斯坦福大学);University College London(伦敦大学学院)

Vedang Lad, Jin Hwa Lee, Wes Gurnee, Max Tegmark

AI总结:

该研究通过删除、交换推理阶段的相邻层发现LLMs鲁棒性显著,中间层删除对性能影响小,进而提出推理四阶段假设,为解读LLM的深度依赖计算提供了框架。

摘要:

我们通过在推理过程中删除和交换相邻层的结构干预,研究了大语言模型(Large Language Models, LLMs)的鲁棒性。令人惊讶的是,在无需任何微调的情况下,模型仍能保留原始top-1预测准确率的72%-95%。我们发现性能下降在各层之间并不均匀:对早期层和最终层的干预造成的下降最严重,而模型对删除中间层具有显著的鲁棒性。这种局部敏感性模式启发我们提出推理四阶段假设,该假设在不同模型家族和规模中均被观察到:(1)去标记化(detokenization):整合局部上下文,将原始词元嵌入提升为更高层级的表示;(2)特征工程(feature engineering):迭代细化任务特定和实体特定的特征;(3)预测集成(prediction ensembling):将隐藏状态聚合为合理的下一词元预测;(4)残差锐化(residual sharpening):抑制无关特征,最终确定输出分布。结合行为证据和机制证据,我们提出了一个解释LLMs中依赖深度的计算的框架。

英文摘要:

We investigate the robustness of Large Language Models (LLMs) to structural interventions by deleting and swapping adjacent layers during inference. Surprisingly, models retain 72-95% of their original top-1 prediction accuracy without any fine-tuning. We find that performance degradation is not uniform across layers: interventions to the early and final layers cause the most degradation, while the model is remarkably robust to dropping middle layers. This pattern of localized sensitivity motivates our hypothesis of four stages of inference, observed across diverse model families and sizes: (1) detokenization, where local context is integrated to lift raw token embeddings into higher-level representations; (2) feature engineering, where task- and entity-specific features are iteratively refined; (3) prediction ensembling, where hidden states are aggregated into plausible next-token predictions; and (4) residual sharpening, where irrelevant features are suppressed to finalize the output distribution. Synthesizing behavioral and mechanistic evidence, we provide a framework for interpreting depth-dependent computations in LLMs.

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

↑