Mechanistic Interpretability of GPT-like Models on Summarization Tasks

📄 arXiv: 2505.17073v1 📥 PDF

作者: Anurag Mishra

分类: cs.CL, cs.AI, cs.LG

发布日期: 2025-05-20

备注: 8 pages (6 content + 2 references/appendix), 6 figures, 2 tables; under review for the ACL 2025 Student Research Workshop


💡 一句话要点

提出机制可解释性框架以分析GPT模型在摘要任务中的表现

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 机制可解释性 GPT模型 摘要生成 差异分析 LoRA适应 信息选择 内部激活 注意力机制

📋 核心要点

  1. 现有的可解释性研究主要集中在分类和生成任务,缺乏对摘要任务的深入分析。
  2. 本文提出了一种新的可解释性框架,通过差异分析揭示GPT类模型在摘要任务中的适应机制。
  3. 实验结果表明,针对特定层和注意力头的LoRA适应显著提升了模型性能,减少了训练周期。

📝 摘要(中文)

机制可解释性研究旨在揭示大型语言模型的内部工作原理,但大多数研究集中在分类或生成任务,而非摘要任务。本文提出了一种可解释性框架,用于分析GPT类模型如何适应摘要任务。通过对预训练模型与微调模型进行差异分析,量化注意力模式和内部激活的变化,识别出经历显著转变的特定层和注意力头,从而定位模型架构中的“摘要电路”。研究发现,中间层(尤其是第2、3和5层)表现出最显著的变化,62%的注意力头显示出熵降低,表明信息选择趋向集中。我们展示了针对这些识别电路的LoRA适应能够在较少的训练周期内显著提升性能,弥合了黑箱评估与机制理解之间的差距。

🔬 方法详解

问题定义:本文旨在解决现有可解释性研究对摘要任务关注不足的问题,揭示GPT类模型在摘要生成中的内部机制。现有方法多集中于分类和生成任务,缺乏对摘要任务的深入理解。

核心思路:通过对预训练和微调模型进行差异分析,量化注意力模式和内部激活的变化,识别出模型架构中的“摘要电路”,从而提供对信息选择和压缩过程的机制理解。

技术框架:研究采用差异分析的方法,主要包括预训练模型与微调模型的比较,关注中间层的变化,特别是第2、3和5层的注意力头。

关键创新:本文的创新在于识别出特定的“摘要电路”,并通过针对这些电路的LoRA适应实现了显著的性能提升,与传统的LoRA微调方法相比,具有更高的效率和效果。

关键设计:在实验中,选择了特定的层和注意力头进行分析,使用了LoRA适应技术,优化了训练周期,确保在较少的训练时间内获得更好的性能。

📊 实验亮点

实验结果显示,针对识别出的摘要电路进行的LoRA适应在性能上显著优于标准的LoRA微调,且训练周期减少,62%的注意力头表现出熵降低,表明信息选择更加集中。这些结果为理解模型在摘要任务中的表现提供了重要的实证支持。

🎯 应用场景

该研究的潜在应用领域包括自动摘要生成、信息检索和自然语言处理等。通过深入理解模型的内部机制,可以为改进摘要生成技术提供理论支持,推动相关领域的发展。未来,该框架可能会被应用于其他任务,进一步提升模型的可解释性和性能。

📄 摘要(原文)

Mechanistic interpretability research seeks to reveal the inner workings of large language models, yet most work focuses on classification or generative tasks rather than summarization. This paper presents an interpretability framework for analyzing how GPT-like models adapt to summarization tasks. We conduct differential analysis between pre-trained and fine-tuned models, quantifying changes in attention patterns and internal activations. By identifying specific layers and attention heads that undergo significant transformation, we locate the "summarization circuit" within the model architecture. Our findings reveal that middle layers (particularly 2, 3, and 5) exhibit the most dramatic changes, with 62% of attention heads showing decreased entropy, indicating a shift toward focused information selection. We demonstrate that targeted LoRA adaptation of these identified circuits achieves significant performance improvement over standard LoRA fine-tuning while requiring fewer training epochs. This work bridges the gap between black-box evaluation and mechanistic understanding, providing insights into how neural networks perform information selection and compression during summarization.