arXiv:2605.09515cs.AI2026-05

用博弈论能量原理分析注意力头的高阶协同,发现三重冗余并可安全剪枝。

A Game Theoretic Free Energy Analysis of Higher Order Synergy in Attention Heads of Large Language Models

论文配图:A Game Theoretic Free Energy Analysis of Higher Order Synergy in Attention Heads of Large Language Models
图 1 · 摘自论文原文
  • 将注意力头视为有限理性代理,用变分自由能优化建模其协作机制。
  • 在BERT/GPT2/Llama上发现三重协同信息为负,表明存在高阶冗余。
  • 可剪掉20%头部,计算量降18%,速度提22%,性能损失仅小幅上升。

大型语言模型依赖多头注意力,但头之间的相互作用仍不清晰。本文引入博弈论自由能原理(GTFEP),将多智能体系统视为分布式变分推断,将注意力头视为有界理性的代理。每个头最小化其变分自由能,集体行为服从基于联盟结构能量的吉布斯分布,该能量由哈桑尼红利分解。在可计算近似下(均匀先验、确定性动态),联盟自由能简化为离散头输出(argmax键索引)的联合香农熵。成对红利为互信息(非负),三重红利对应交互信息,可为负值。在BERT、GPT2和Llama使用GSM8K数据集测试中,三重红利始终为负,揭示了高阶冗余。纳什自由能对应关系保证集体自由能的稳定点为ε-纳什均衡;因此,贡献低的头可被剪枝而性能损失极小。例如,剪掉GPT2中20%的头可使浮点运算减少18%,吞吐量提升22%,困惑度仅从28.4升至33.4。本工作证明GTFEP为分析与优化Transformer架构提供了严谨基础。

原文摘要 · Abstract (English)

Large language models rely on multihead attention, but interactions among heads remain poorly understood. We apply the Game Theoretic Free Energy Principle (GTFEP): a framework casting multiagent systems as distributed variational inference to analyze attention heads as bounded rational agents. According to GTFEP, each head minimizes its variational free energy, and collective behavior follows a Gibbs distribution over coalition structures whose energy is decomposed into Harsanyi dividends. Using a tractable approximation (uniform prior, deterministic dynamics), coalition free energy reduces to joint Shannon entropy of discretized head outputs (argmax key index). Pairwise dividends become mutual information (nonnegative), while triple dividends correspond to interaction information and can be negative. On BERT, GPT2, and Llama with GSM8K, triple dividends are consistently negative, revealing higher order redundancy. The Nash FEP correspondence guarantees that stationary points of collective free energy are epsilon Nash equilibria; thus, heads with negligible contribution can be pruned with minimal performance loss. Pruning heads with low marginal contribution reduces computational cost with minimal performance loss: for example, pruning 20% of heads in GPT2 reduces FLOPs by 18%, increases throughput by 22%, and raises perplexity only modestly (from 28.4 to 33.4 on GSM8K). Our work shows GTFEP provides a principled foundation for analyzing and optimizing transformer architectures.

注意力机制博弈论模型剪枝自由能

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。