Revisiting Associative Recall in Modern Recurrent Models

Destiny Okpekpe, Antonio Orvieto

TL;DR

This paper investigates why modern recurrent models (like State-Space Models, SSMs) sometimes underperform Transformers on tasks requiring memory and reasoning, like associative recall. They find that the primary culprit isn't necessarily expressivity, but rather critical instabilities in how these recurrent models are trained, particularly their extreme sensitivity to learning rates. This optimization brittleness, coupled with different scaling behaviors (SSMs benefit from width, Transformers from depth), explains much of the observed performance gap.

What Problem Does This Paper Address?

While State-Space Models (SSMs) and other modern recurrent architectures offer computational advantages over Transformers for sequence modeling, empirical studies have suggested they struggle with tasks requiring strong associative recall and in-context learning. This has led to a debate: are these limitations inherent to the expressivity of SSMs, or are they artifacts of practical training challenges? This paper aims to resolve this by thoroughly investigating the learning dynamics and optimization landscapes of SSMs and Transformers on associative recall and copying tasks, hypothesizing that optimization instability is a key factor confounding previous comparisons.

Methods

The authors conduct extensive experiments on two benchmarks: Multi-Query Associative Recall (MQAR) and Copying. They perform a fine-grained learning rate grid search to meticulously analyze the optimization landscape for both Transformer and SSM models. They also investigate the impact of model scaling (width vs. depth) and analyze the training dynamics of single-layer models to understand architectural differences. Ablation studies are performed on Mamba to identify the source of its effectiveness and stability.

Datasets

The primary dataset used is a synthetic dataset designed for Multi-Query Associative Recall (MQAR). This dataset consists of sequences of tokens representing key-value pairs, sampled from a vocabulary of 8,192 tokens. The dataset is structured with varying sequence lengths (64, 128, 256, 512 tokens) and corresponding numbers of key-value pairs to recall (4, 8, 16, 64 pairs). A separate dataset for the Copying task, as studied by Jelassi et al. (2024), is also used.

Key Insights and Ideas

  • Optimization Brittleness is Key: The most significant finding is that modern recurrent models exhibit critical optimization instability, with success heavily dependent on a very narrow window of learning rates. This is a stark contrast to Transformers, which are much more robust to hyperparameter choices. This suggests that many prior performance comparisons might have been confounded by suboptimal tuning of recurrent models.
  • Conflicting Scaling Strategies: Recurrent models (SSMs) benefit from scaling in width (increasing hidden dimension), which helps them retain more information. Transformers, on the other hand, benefit more from scaling in depth (adding layers), especially for tasks like associative recall where they can leverage mechanisms like induction heads.
  • Single-Layer Transformer Puzzles: Even when a single-layer Transformer fails to solve the associative recall task, its training dynamics surprisingly show a "loss bump" reminiscent of induction head formation, a phenomenon typically seen in multi-layer Transformers. This suggests that while the mechanism might be present, the single-layer architecture lacks the expressivity to effectively utilize it.
  • Mamba's Resilience: Ablations on Mamba show that its core sequence mixer (S6) is the primary driver of its expressivity, and it remains effective even when components like gating or convolutions are removed.

Key Results

  • Learning Rate Sensitivity: For Mamba and Hyena, performance on MQAR is near zero outside a very narrow learning rate window, while Transformers maintain high accuracy across a wide range of learning rates.
  • Scaling Benefits: In 1-layer models, increasing the width (hidden dimension) consistently improves SSM performance. For Transformers, a single layer fails to solve MQAR, regardless of width, but a 2-layer model can solve it.
  • MQAR Performance: With careful learning rate tuning, Mamba can solve MQAR at relatively small hidden model sizes, a significant improvement over previous reports.
  • Copying Task: Similar to MQAR, Mamba's success on the copying task is confined to a narrow learning rate window, while Transformers remain robust.
  • Ablation Results: Adding a 1D convolution to a 1-layer Transformer allows it to achieve perfect accuracy on MQAR, while Mamba's performance remains high even after removing convolutions or gating.

Limitations and Future Work

  • Downstream Tasks: The authors acknowledge that their analysis is based on synthetic benchmarks highly correlated with in-context learning. Validating these dynamics on downstream language modeling tasks is a critical next step.
  • Theoretical Explanation: A formal theoretical explanation for the observed optimization brittleness in modern recurrent models is still an open question.
  • Hybrid Models: The paper suggests that understanding the nuances of optimization and inductive biases is key to optimally leveraging both architectures, potentially leading to hybrid models.
  • Newer Architectures: While DeltaNet shows promise in enhancing optimization stability for SSMs, further research is needed to fully understand its mechanisms and generalize these improvements.

Summary updated

BibTeX
@inproceedings{okpekpe2025revisiting,
  author = {Destiny Okpekpe and Antonio Orvieto},
  title = {{Revisiting Associative Recall in Modern Recurrent Models}},
  booktitle = {SCOPE @ ICLR},
  year = {2025},
  url = {https://openreview.net/forum?id=CcqAd5RPk5},
}
Figure