脆弱的推理:对大语言模型对意义保持扰动敏感性的机制分析
Fragile Reasoning: A Mechanistic Analysis of LLM Sensitivity to Meaning-Preserving Perturbations
AI总结:
研究评估了三种大语言模型在数学推理任务中的表现,发现其对意义保持的表面扰动敏感,提出MPD框架分析失败机制,提出三种故障分类并验证修复效果。
摘要:
大型语言模型在数学推理基准测试中表现出色,但对意义保持的表面扰动异常脆弱。我们系统评估了Mistral-7B、Llama-3-8B和Qwen2.5-7B三种开源大语言模型,在677个GSM8K问题及其通过名称替换和数字格式改写生成的语义等价变体上。三种模型均表现出显著的答案翻转率(28.8%-45.1%),数字改写比名称替换更具破坏性。为追溯这些失败的机制基础,我们引入了机制扰动诊断(MPD)框架,结合logit lens分析、激活修补、组件消融和级联放大指数(CAI)形成统一的诊断流程。CAI作为一种新的度量标准,量化了层间分歧放大程度,对两种模型(AUC高达0.679)优于第一分歧层作为失败预测指标。logit lens显示,翻转样本在正确预测之前显著更早层发生分歧。激活修补揭示了失败局部化的建筑差异:Llama-3的失败可以通过特定层修补恢复(43/60样本),而Mistral和Qwen的失败则分布广泛(3/60和0/60)。基于这些诊断信号,我们提出了机制性失败分类(局部化、分布和交织)并通过定向修复实验验证:引导向量和层微调恢复12.2%的局部化失败(Llama-3)但仅恢复7.2%的交织(Qwen)和5.2%的分布(Mistral)失败。
英文摘要:
Large language models demonstrate strong performance on mathematical reasoning benchmarks, yet remain surprisingly fragile to meaning-preserving surface perturbations. We systematically evaluate three open-weight LLMs, Mistral-7B, Llama-3-8B, and Qwen2.5-7B, on 677 GSM8K problems paired with semantically equivalent variants generated through name substitution and number format paraphrasing. All three models exhibit substantial answer-flip rates (28.8%-45.1%), with number paraphrasing consistently more disruptive than name swaps. To trace the mechanistic basis of these failures, we introduce the Mechanistic Perturbation Diagnostics (MPD) framework, combining logit lens analysis, activation patching, component ablation, and the Cascading Amplification Index (CAI) into a unified diagnostic pipeline. CAI, a novel metric quantifying layer-wise divergence amplification, outperforms first divergence layer as a failure predictor for two of three architectures (AUC up to 0.679). Logit lens reveals that flipped samples diverge from correct predictions at significantly earlier layers than stable samples. Activation patching reveals a stark architectural divide in failure localizability: Llama-3 failures are recoverable by patching at specific layers (43/60 samples), while Mistral and Qwen failures are broadly distributed (3/60 and 0/60). Based on these diagnostic signals, we propose a mechanistic failure taxonomy (localized, distributed, and entangled) and validate it through targeted repair experiments: steering vectors and layer fine-tuning recover 12.2% of localized failures (Llama-3) but only 7.2% of entangled (Qwen) and 5.2% of distributed (Mistral) failures.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。