TL;DR
This paper investigates information bottlenecks in modern sequence models (Transformers, SSMs, and RNNs) using a deceptively simple benchmark: the indexing task. By introducing the concept of "causal complexity," the authors prove unconditional theoretical limits on how token order impacts model capacity, revealing why RNNs excel when queries come first, while standard transformers dominate when queries come last.
What Problem Does This Paper Address?
As deep learning moves beyond standard Transformers to more computationally efficient alternatives like State-Space Models (SSMs, e.g., Mamba) and linear-attention architectures, understanding their theoretical expressive power is crucial. Prior work has used tasks like function composition or induction heads to probe these models. This paper strips things down to an even more fundamental primitive: indexing (retrieving the value of the $i$-th bit from a sequence).
Crucially, the authors explore how the position of the query (the index $i$) affects different architectures. They define two variants: Left-Hand Indexing (LHI), where the query is at the start of the sequence, and Right-Hand Indexing (RHI), where the query is at the very end. The core question is: how many layers do different architectures need to solve these tasks as the sequence length scales?
Methods
The authors develop a rigorous mathematical framework based on a new metric called causal complexity for masked/causal architectures. Causal complexity measures the minimal dimension to which the history (the first $k-1$ inputs) must be compressed to compute the next output.
To prove impossibility results without making restrictive assumptions about numerical precision, they adapt Vapnik-Chervonenkis (VC) dimension techniques combined with arithmetic complexity. This allows them to establish unconditional lower bounds that hold even for models using infinite-precision real arithmetic.
Complementing the theory, they conduct empirical training sweeps using synthetic indexing data up to sequence lengths of $n=64$, testing various architectures (Softmax attention, Linear attention, GRUs, and Mamba2) with different positional encodings.
Datasets
The paper uses synthetically generated datasets for the binary indexing task. For a given sequence length $n \in \{8, 16, 32, 64\}$, bit strings are sampled uniformly at random, and the index $i$ is sampled uniformly from $1$ to $n$. Training uses 50,000 newly generated examples per epoch, and evaluation is performed on a fixed held-out set of 2,000 samples. No standard real-world datasets are used, as this is a pure expressivity benchmark.
Key Insights and Ideas
- The Power of Token Order: The position of the query completely flips which architecture is most efficient.
- Why Causal Models Fail at RHI: In Right-Hand Indexing, all bits are processed before the index is known. A causal model with low causal complexity (like an RNN or SSM) must compress the entire $n$-bit string into a fixed-size hidden state before seeing the query. Since a small hidden state cannot store all $2^n$ possibilities, they fail unconditionally in a constant number of layers.
- Why Softmax Transformers Succeed at RHI: Standard softmax attention has high causal complexity because it can dynamically look back at any token once the query is revealed, solving RHI in just 1 layer.
- RNNs Rule the Beginning (LHI): In Left-Hand Indexing, the query comes first. An RNN can store the index $i$ in its hidden state, count steps until it hits the $i$-th position, grab that bit, and carry it to the end—all in a single layer. SSMs struggle here because their linear update rules make this exact step-counting and conditional routing harder, requiring 2 layers.
Key Results
The paper provides a complete taxonomy of the minimum number of layers required for each architecture to solve LHI and RHI.
- Right-Hand Indexing (RHI): Causal linear-attention, SSMs, and RNNs require a non-constant number of layers ($\omega(1)$) to scale, whereas Full/Causal Softmax Transformers need only 1 layer, and Full Linear-Attention needs 2.
- Left-Hand Indexing (LHI): RNNs are the clear winner, requiring only 1 layer, while all other architectures (Softmax, Linear-attention, SSMs) require 2 layers.
- Empirical Alignment: In practice, at $n=64$, "stress-test" configurations (those predicted to fail by theory) consistently achieved 0% success across all random seeds, while "constructive" configurations (with proven low-layer solutions) succeeded in 158 out of 160 runs when paired with polynomial positional encodings.
Limitations and Future Work
- Positional Encoding Dependency: The empirical success of the constructive solutions heavily depends on the choice of positional encoding; polynomial encodings worked perfectly, but standard sinusoidal or learned encodings often failed to find the theoretical solution.
- LayerNorm Complexity: The theoretical framework currently omits LayerNorm due to the mathematical complexity of bounding the VC dimension for square-root operations, though the authors suggest this could be addressed using Pfaffian activation function bounds in future work.
- Extension to Richer Primitives: Indexing is a minimal retrieval task. Extending causal complexity to more complex, real-world primitives (like associative recall or hierarchical reasoning) remains an open direction.
Summary updated