Research & Papers

Dirichlet-Process Cache matches attention recall while storing only distinct items

A learnable cache that stores only unique inputs, matching full attention at fraction of memory.

Deep Dive

State-space models compress history into a fixed vector, capping recall at the state dimension, while attention keeps a key-value for every token at quadratic cost. A new paper from Siddharth Pal and Viktoria Rojkova proposes a middle ground: a sparse cache that allocates a slot only when an input is novel. The allocation rule is the DP-means clustering algorithm (the small-variance limit of a Dirichlet-process mixture), used as the key-value memory operator inside a deep recurrent backbone. The cache comes in two variants: a static version with fixed concentration, and a surprise-adaptive one that tracks recent novelty. The novelty threshold itself is learned via a two-parameter gate trained on the task loss alone—surprisingly, an over-parameterized gate fails, proving the inductive bias is the key ingredient.

On controlled associative-recall benchmarks with redundancy, the DP Cache matches full-attention recall while storing only distinct items, and it dominates fixed-budget eviction caches on the recall-versus-size frontier. On a state-space backbone, it handles both recall queries and long-range aggregates with the lowest memory usage of any model tested. The distinct-items property holds across four real streams: recommendation data, system logs, clinical events, and insurance claims. A companion study validates the approach with a real backbone on real language data. This work opens the door to efficient long-context models that remember what matters without quadratic memory bloat.

Key Points
  • Cache size equals number of distinct items, not tokens, reducing memory for redundant sequences.
  • Matches full-attention recall on associative-recall benchmarks while using less memory than fixed-budget eviction.
  • Learnable two-parameter novelty-threshold gate recovers DP-means rule from task loss alone; over-parameterized gates fail.

Why It Matters

Enables efficient long-context AI models that remember key information without quadratic memory costs.

📬 Get the top 10 AI stories daily