A Hippocampus for Linear Attention: An Exact Memory for What the Recurrent State Forgets

· Source: Artificial Intelligence · Field: Technology & Digital — Artificial Intelligence & Machine Learning · Depth: Expert, quick

Summary

HOLA (Hippocampal Linear Attention) is a novel architecture designed to address the memory limitations of linear-attention and state-space language models. These models typically compress input prefixes into a fixed-size recurrent state, which often results in lossy memory and degraded recall of earlier information due to overwriting. Inspired by Complementary Learning Systems, HOLA integrates a delta-rule state for compressive memory with a bounded exact Key-Value (KV) cache. This semiparametric test-time memory allows the state to model linearly compressible structures while the cache stores critical associations. The cache writes tokens based on a large beta * ||e|| (prediction residual) and uses a decoupled RMSNorm-gamma read for sharp retrieval. Trained with 340M parameters on 15B SlimPajama tokens, HOLA reduced Wikitext perplexity from 27.32 to 22.92 (-16.1%), surpassing a full-attention Transformer++ (26.88). It also improved LAMBADA perplexity from 30.95 to 30.26 and demonstrated superior in-context retrieval and robustness on RULER needle-in-a-haystack recall up to 32k tokens.

Key takeaway

For Machine Learning Engineers developing long-context language models, HOLA presents a robust solution to memory degradation. If your current linear attention or state-space models struggle with needle recall over extended sequences, consider implementing a complementary exact KV cache. This approach significantly improves perplexity and in-context retrieval. It allows your models to maintain critical information over much longer contexts, up to 32k tokens, without complex learned eviction modules.

Key insights

HOLA enhances linear attention models with an exact KV cache, preventing memory loss and improving long-context recall.

Principles

Method

HOLA integrates a delta-rule state with a bounded exact KV cache. The cache writes tokens with large beta * ||e|| (prediction residual) and uses a decoupled RMSNorm-gamma read for sharp retrieval, avoiding soft averaging.

In practice

Topics

Best for: Research Scientist, AI Scientist, Machine Learning Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence.