Reproduce “Softmax is not Enough (for Sharp Size Generalisation)” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Petar Veličković, Christos Perivolaropoulos, Federico Barbero, Razvan Pascanu

Researchers at Google DeepMind and the University of Oxford formally prove that the softmax function, a core component of Transformer attention, inherently disperses its attention coefficients as the number of input items increases, which explains why these models struggle with "sharp" reasoning on larger, out-of-distribution inputs. They also propose an adaptive temperature mechanism that dynamically adjusts softmax behavior, demonstrating improved generalization on algorithmic reasoning tasks.

Key insights

  • Softmax attention coefficients inherently disperse and decay as "Theta(1/n)" as the number of input items (n) increases, leading to an inability to maintain sharp focus.
  • This inherent dispersion directly causes "reasoning failures" in tasks requiring sharp decisions (e.g., identifying specific high-valued items) when input size grows beyond the training distribution.
  • Achieving sharpness in softmax-based attention requires large singular values of query/key matrices and large input vector norms, posing a tension with model stability and generalizability.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.