Abstract: We propose a novel method to evaluate the theoretical limits of Transformers, allowing us to prove the first lower bounds against one-layer softmax Transformers with infinite precision. We establish those bounds for three tasks that require advanced reasoning: Match3, composition of functions, and composition of binary relations. We formally prove the inability of one-layer softmax Transformers to solve any of these tasks. In an attempt to overcome these limitations, we introduce Strassen attention and prove that with this mechanism a one-layer Transformer can in principle solve all these tasks. We also show that it enjoys sub-cubic running-time complexity, making it more scalable than similar previously proposed mechanisms, such as higher-order attention. Our experimental results highlight that Strassen attention outperforms standard attention significantly on all the tasks.
Introduction
Standard Transformers rely on "pairwise" attention—calculating how much one token should focus on another. While incredibly successful, this architecture struggles with compositionality: the ability to combine multiple pieces of information to solve a task. For example, tasks like "Match3" (finding triplets of tokens that sum to a specific value) or composing functions (calculating $h(g(x))$) are notoriously difficult for shallow Transformers.
Previously, researchers used "communication complexity" to prove these limitations, but those proofs only worked if you assumed the Transformer had limited numerical precision (few bits). This paper asks a deeper question: Is the failure of Transformers due to a lack of "memory" (bits), or is it a fundamental architectural flaw? Furthermore, can we design a more efficient "higher-order" attention that looks at three tokens at once without the massive computational cost usually associated with such methods?
Theoretical Framework: Split VC Dimension
The paper contributes a new theoretical tool called Split VC Dimension to prove the "expressivity" of a model. By measuring how many different patterns a function can "shatter" when its arguments are split into inputs and parameters, the authors prove that a one-layer standard Transformer cannot solve certain reasoning tasks regardless of how much precision it has, unless its internal dimensions (width) grow exponentially with the input size. This confirms that the bottleneck is the structural design of the attention mechanism itself, rather than numerical limitations.
The Strassen Attention Mechanism
To overcome these limits, the authors propose Strassen Attention, a mechanism that considers interactions between triplets of tokens. While "Third-Order" attention exists, it usually requires $O(n^3)$ time, which is too slow for long sequences. Strassen Attention uses a clever algebraic decomposition—inspired by Strassen’s matrix multiplication algorithm—to reduce the complexity to sub-cubic time ($O(n^\omega)$ where $\omega \approx 2.37$).
As shown in the figure above, Strassen attention computes triple-wise interactions using a series of standard matrix multiplications. By framing attention as a specific type of matrix product, the researchers show we can use decades of optimization in linear algebra to make "advanced" attention nearly as fast as the standard version.
Experimental Evaluation
The authors evaluated their mechanism on four synthetic reasoning tasks: Match3, Function Composition, Binary Relation Composition, and a new "Quotient Binary Relation Composition" task designed to disentangle Strassen attention from other specialized mechanisms.
Key Results
- Accuracy: Strassen Attention achieved near-perfect accuracy across all four tasks, whereas standard attention failed significantly on Match3 and the composition tasks.
- Stability: Compared to "Third-Order" attention, Strassen Attention was much more stable during training and reached peak performance faster.
- Efficiency: In benchmarks on NVIDIA A100 GPUs, Strassen Attention demonstrated a clear speed gain over Third-Order attention, maintaining a profile closer to standard attention while providing much higher reasoning power.
- The "Quotient" Test: On the newly introduced Quotient Binary Relation task, Strassen Attention was the only mechanism to succeed, outperforming both Standard and Triangular attention.
Conclusion
The primary limitation is that these results are currently confined to toy tasks and one-layer models. While these tasks are mathematically rigorous "stress tests" for reasoning, it remains to be seen how Strassen Attention performs in massive, multi-layer models trained on natural language. Future work should focus on testing Strassen Attention in real-world linguistic reasoning tasks and exploring higher-order interactions for domains like knowledge graphs or protein structure prediction.
Summary updated