Strassen Attention, Split VC Dimension and Compositionality in Transformers

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Kozachinskiy, Alexander, Urrutia, Felipe, Jimenez, Hector, Steifer, Tomasz, Pizarro, Germán, Fuentes, Matías, Meza, Francisco, Calderon, Cristian B., Rojas, Cristóbal
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916968612757504
author Kozachinskiy, Alexander
Urrutia, Felipe
Jimenez, Hector
Steifer, Tomasz
Pizarro, Germán
Fuentes, Matías
Meza, Francisco
Calderon, Cristian B.
Rojas, Cristóbal
author_facet Kozachinskiy, Alexander
Urrutia, Felipe
Jimenez, Hector
Steifer, Tomasz
Pizarro, Germán
Fuentes, Matías
Meza, Francisco
Calderon, Cristian B.
Rojas, Cristóbal
contents We propose the first method to show theoretical limitations for one-layer softmax transformers with arbitrarily many precision bits (even infinite). We establish those limitations for three tasks that require advanced reasoning. The first task, Match 3 (Sanford et al., 2023), requires looking at all possible token triplets in an input sequence. The second and third tasks address compositionality-based reasoning: function composition (Peng et al., 2024) and binary relations composition, respectively. We formally prove the inability of one-layer softmax Transformers to solve any of these tasks. To overcome these limitations, we introduce Strassen attention and prove that, equipped with this mechanism, a one-layer transformer can in principle solve all these tasks. Importantly, we show that it enjoys sub-cubic running-time complexity, making it more scalable than similar previously proposed mechanisms, such as higher-order attention (Sanford et al., 2023). To complement our theoretical findings, we experimentally studied Strassen attention and compared it against standard (Vaswani et al, 2017), higher-order attention (Sanford et al., 2023), and triangular attention (Bergen et al. 2021). Our results help to disentangle all these attention mechanisms, highlighting their strengths and limitations. In particular, Strassen attention outperforms standard attention significantly on all the tasks. Altogether, understanding the theoretical limitations can guide research towards scalable attention mechanisms that improve the reasoning abilities of Transformers.
format Preprint
id arxiv_https___arxiv_org_abs_2501_19215
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Strassen Attention, Split VC Dimension and Compositionality in Transformers
Kozachinskiy, Alexander
Urrutia, Felipe
Jimenez, Hector
Steifer, Tomasz
Pizarro, Germán
Fuentes, Matías
Meza, Francisco
Calderon, Cristian B.
Rojas, Cristóbal
Machine Learning
Artificial Intelligence
We propose the first method to show theoretical limitations for one-layer softmax transformers with arbitrarily many precision bits (even infinite). We establish those limitations for three tasks that require advanced reasoning. The first task, Match 3 (Sanford et al., 2023), requires looking at all possible token triplets in an input sequence. The second and third tasks address compositionality-based reasoning: function composition (Peng et al., 2024) and binary relations composition, respectively. We formally prove the inability of one-layer softmax Transformers to solve any of these tasks. To overcome these limitations, we introduce Strassen attention and prove that, equipped with this mechanism, a one-layer transformer can in principle solve all these tasks. Importantly, we show that it enjoys sub-cubic running-time complexity, making it more scalable than similar previously proposed mechanisms, such as higher-order attention (Sanford et al., 2023). To complement our theoretical findings, we experimentally studied Strassen attention and compared it against standard (Vaswani et al, 2017), higher-order attention (Sanford et al., 2023), and triangular attention (Bergen et al. 2021). Our results help to disentangle all these attention mechanisms, highlighting their strengths and limitations. In particular, Strassen attention outperforms standard attention significantly on all the tasks. Altogether, understanding the theoretical limitations can guide research towards scalable attention mechanisms that improve the reasoning abilities of Transformers.
title Strassen Attention, Split VC Dimension and Compositionality in Transformers
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2501.19215