[Paper Review] Poly-attention: a general scheme for higher-order self-attention
The paper defines poly-attention, a broad framework that generalizes self-attention to higher-order (tensor) interactions, analyzes its complexity and expressive power, and introduces tree-attention which achieves quadratic-time computation while supporting arbitrary-fold function composition.
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.
Motivation & Objective
- Motivate and formalize the limitations of standard self-attention in capturing higher-order relationships.
- Introduce poly-attention as a unifying framework that subsumes self-attention, tensor attention, and Strassen attention.
- Analyze the exact and approximate computational complexity of various poly-attention mechanisms.
- Identify trade-offs between expressiveness and computational efficiency.
- Propose tree-attention as a practical, expressive, and efficient instantiation.
Proposed method
- Define attention polynomials with degree k and sparsity s to drive poly-attention.
- Show poly-attention encompasses self-attention, tensor attention, and Strassen attention as special cases.
- Characterize exact and approximate running times for poly-attention and identify when quadratic-time is possible (tree-attention).
- Prove that tree-attention can perform r-fold function composition for any fixed r, in quadratic time.
- Provide lower bounds using fine-grained complexity and demonstrate subcubic algorithms when applicable (e.g., certain tree polynomials).
- Present experimental validation comparing tree-attention to standard self-attention on function composition tasks.

Experimental results
Research questions
- RQ1Can poly-attention subsume existing higher-order attention mechanisms and what is its full expressive power?
- RQ2What are the exact and approximate time complexities for computing poly-attention across different polynomials?
- RQ3Under what conditions can poly-attention be computed in quadratic time, and which instantiations achieve this?
- RQ4What is the capability of tree-attention for function composition and other expressive tasks compared to self-attention and Strassen/tensor attention?
- RQ5How do approximation bounds on weights influence the feasibility of fast computation for poly-attention?
Key findings
- Poly-attention generalizes self-attention, tensor attention, and Strassen attention via attention polynomials.
- Tree-attention can be computed in quadratic time and can solve r-fold function composition for any fixed r.
- For h_r polynomials with tree structure, Att^(h_r) can be computed exactly in O(r^3 n^2) time and can simulate r-fold composition.
- Non-tree poly-attentions typically require superquadratic time for exact or approximate computation when weight bounds are large.
- For certain non-tree polynomials, fast n^{1+o(1)}-time approximation is possible under small weight bounds, but becomes superquadratic otherwise.
- Empirical results show tree-attention is learnable and inference-time comparable to self-attention, with modest overhead.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.