Sourav Chakraborty Home

Large language models (LLMs)

How much can a linear-attention model remember, and how do we make it remember more?

Softmax attention keeps every key and value it has seen, so its memory grows with the context. Linear attention folds them all into one state of fixed size, $S_t = S_{t-1} + \psi(k_t)\,v_t^\top$, and recall degrades once too many key–value pairs share it. Treating recall as packing unit vectors on a sphere shows where the limit comes from. Feature maps built on self-dual cones keep attention weights nonnegative, and the rank-one PSD map $\psi(u) = uu^\top$ squares the overlap between keys: in an idealized analysis, the number of keys it can tell apart grows from about $2p$ to about $p^2$ with the same number of projection parameters.

a stored keythe key being readlinear featuresPSD features (KATA)
(a) Softmax attention keeps every key and value it has seen; linear attention adds each pair into one state of fixed size. (b) Reading that state back means telling stored keys apart by direction. With more keys $T$ than dimensions $d$, some pair must overlap (the Welch bound), and each overlap leaks into the answer. Drawn in two dimensions, where $T$ directions can be at most $180^\circ/T$ apart. (c) The rank-one PSD map $\psi(u) = uu^\top$ squares every overlap and turns $p$ numbers into a feature of dimension $p(p+1)/2$. In the paper's idealized analysis (Theorem 4, distractors at the Welch floor, $p = 8$), the signal falls to the crosstalk level at 16 keys ($2p$) with linear features and near 78 keys ($\approx p^2 + 2p - 2$) with PSD features. schematic

This is new ground for me. The next step is RL post-training for reasoning, where my bandit and RL background applies directly.

Papers

Kernelized Linear Attention: Breaking the Capacity Wall with Symmetric Conesunder review

Ayoub Ghriss, Sourav Chakraborty

Associative recall in linear attention as a sphere-packing problem, with feature maps over self-dual symmetric cones. Rank-one PSD features enlarge the recurrent state without adding parameters. My part was the mathematics.

Back to the home pageAll five threads