Skip to main content
QUICK REVIEW

[论文解读] Poly-attention: a general scheme for higher-order self-attention

S. Chakrabarti, Pitassi, Toniann|arXiv (Cornell University)|Feb 2, 2026
Quantum many-body systemsPhysics and Astronomy被引用 0
一句话总结

论文定义了多注意力(poly-attention),这是一个广义框架,将自注意力推广到更高阶(张量)交互,分析其复杂性与表达能力,并引入树型注意力(tree-attention),在支持任意折叠函数组合的同时实现二阶时间计算。

ABSTRACT

The self-attention mechanism, at the heart of the Transformer model, is able to effectively model pairwise interactions between tokens. However, numerous recent works have shown that it is unable to perform basic tasks involving detecting triples of correlated tokens, or compositional tasks where multiple input tokens need to be referenced to generate a result. Some higher-dimensional alternatives to self-attention have been proposed to address this, including higher-order attention and Strassen attention, which can perform some of these polyadic tasks in exchange for slower, superquadratic running times. In this work, we define a vast class of generalizations of self-attention, which we call poly-attention mechanisms. Our mechanisms can incorporate arbitrary higher-order (tensor) computations as well as arbitrary relationship structures between the input tokens, and they include the aforementioned alternatives as special cases. We then systematically study their computational complexity and representational strength, including giving new algorithms and matching complexity-theoretic lower bounds on the time complexity of computing the attention matrix exactly as well as approximately, and tightly determining which polyadic tasks they can each perform. Our results give interesting trade-offs between different desiderata for these mechanisms, including a tight relationship between how expressive a mechanism is, and how large the coefficients in the model may be so that the mechanism can be approximated in almost-linear time. Notably, we give a new attention mechanism which can be computed exactly in quadratic time, and which can perform function composition for any fixed number of functions. Prior mechanisms, even for just composing two functions, could only be computed in superquadratic time, and our new lower bounds show that faster algorithms for them are not possible.

研究动机与目标

  • 激励并形式化标准自注意力在捕捉高阶关系方面的局限性。
  • 引入多注意力作为统一框架,包含自注意力、张量注意力和 Strassen 注意力。
  • 分析各种多注意力机制的精确与近似计算复杂度。
  • 识别表达能力与计算效率之间的权衡。
  • 提出树型注意力作为一种实用、具表达力且高效的实现。

提出的方法

  • 用阶数为 k、稀疏度为 s 的注意力多项式来驱动多注意力。
  • 证明多注意力包含自注意力、张量注意力和 Strassen 注意力作为特例。
  • 刻画多注意力的精确与近似运行时间,并在何时可实现二阶时间(树型注意力)时加以识别。
  • 证明树型注意力可以在二阶时间内对任意固定的 r 次进行函数组合。
  • 利用细粒度复杂性给出下界,并在适用时展示子三次时间算法(例如某些树型多项式)。
  • 给出通过实验对比树型注意力与标准自注意力在函数组合任务上的验证结果。
Figure 2: Accuracy per epoch for learning $f_{1}(f_{2}(x))$ for sequence length $51$ , on a single layer of tree-attention, one layer self-attention and two layer self-attention.
Figure 2: Accuracy per epoch for learning $f_{1}(f_{2}(x))$ for sequence length $51$ , on a single layer of tree-attention, one layer self-attention and two layer self-attention.

实验结果

研究问题

  • RQ1多注意力是否能够包含现有的高阶注意力机制,以及它的完整表达能力是什么?
  • RQ2在不同多项式下计算多注意力的精确与近似时间复杂度是多少?
  • RQ3在什么条件下多注意力可以在二阶时间内计算,哪些实现能够达到这一点?
  • RQ4相较于自注意力和 Strassen/张量注意力,树型注意力在函数组合和其他表达任务上的能力如何?
  • RQ5权重的近似界限如何影响多注意力快速计算的可行性?

主要发现

  • 多注意力通过注意力多项式概括了自注意力、张量注意力和 Strassen 注意力。
  • 树型注意力可以在二阶时间内计算,并且能够对任意固定的 r 次进行函数组合。
  • 对于具有树结构的 h_r 多项式,Att^(h_r) 可以在 O(r^3 n^2) 时间内精确计算并能够模拟 r 次组合。
  • 非树型多注意力在权重界限较大时通常需要超二阶时间来精确或近似计算。
  • 对于某些非树多项式,在权重界限较小时可以实现 n^{1+o(1)} 的快速近似,但在其他情况下会变得超二阶时间。
  • 实验证据表明树型注意力是可学习的,推理时与自注意力相当,开销适中。
Figure 3: Training loss per epoch, averaged over 10 seeds, for learning $f_{1}(f_{2}(x))$ for sequence length $51$ , on a single layer of tree-attention, one layer self-attention and two layer self-attention. Tree-attention learns faster and has less fluctuations.
Figure 3: Training loss per epoch, averaged over 10 seeds, for learning $f_{1}(f_{2}(x))$ for sequence length $51$ , on a single layer of tree-attention, one layer self-attention and two layer self-attention. Tree-attention learns faster and has less fluctuations.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。