arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.09515cs.AI
收藏

基于博弈自由能分析的大型语言模型注意力头中高阶协同效应

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

DAVID Lab, University of Paris-Saclay, UVSQ Campus, 78035 Versailles, France(巴黎萨克雷大学DAVID实验室,UVSQ校区,法国Versailles)

Djamel Bouchaffra

AI总结:

本文通过博弈自由能原理分析大型语言模型注意力头中的高阶协同效应,揭示了高阶冗余性,并展示了通过剪枝降低计算成本的方法。

摘要:

大型语言模型依赖于多头注意力机制,但各头之间的交互仍不明确。本文应用博弈自由能原理(GTFEP)将多智能体系统视为分布式变分推断框架,将注意力头视为有界理性的智能体。根据GTFEP,每个头最小化其变分自由能,集体行为遵循联合联盟结构上的吉布斯分布,其能量分解为哈萨尼红利。使用可处理的近似方法(均匀先验,确定性动力学),联盟自由能减少为离散化头输出的联合香农熵(argmax键索引)。成对红利变为互信息(非负),而三元红利对应于交互信息,可能为负。在BERT、GPT2和Llama-GSM8K上,三元红利始终为负,揭示了高阶冗余性。纳什自由能对应性保证了集体自由能的平稳点是epsilon纳什均衡;因此,贡献微小的头可以剪枝而损失最小。剪枝贡献低的头可降低计算成本并最小化性能损失:例如,在GPT2中剪枝20%的头可减少FLOPs 18%,增加吞吐量22%,并在GSM8K上使困惑度仅小幅上升(从28.4到33.4)。本文展示了GTFEP为分析和优化Transformer架构提供了原理性基础。

英文摘要:

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.

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

↑