Saved in:
Bibliographic Details
Main Authors: Zhao, Tianyu, Jones, Llion
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2601.00671
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914341091016704
author Zhao, Tianyu
Jones, Llion
author_facet Zhao, Tianyu
Jones, Llion
contents Sequence modeling layers in modern language models typically face a trade-off between storage capacity and computational efficiency. While softmax attention offers unbounded storage at prohibitive quadratic cost, linear variants are more efficient but suffer from limited, fixed-size storage. We introduce Fast-weight Product Key Memory (FwPKM), a sparse fast-weight memory layer that resolves this tension. FwPKM updates sparsely activated parameters at both training and inference time using chunk-level gradient descent on a local memory-rewrite objective. This performs Test-Time Training (TTT)-style gradient updates on activated slots in a sparse memory, enabling rapid memorization and retrieval of many new key-value associations while keeping per-token compute low and fixed. Experiments show that FwPKM functions as an effective episodic memory that complements the semantic memory of standard modules, yielding significant perplexity reductions on long-context datasets. Notably, in Needle-in-a-Haystack evaluations, FwPKM generalizes to 128K-token contexts despite being trained on only 4K-token sequences.
format Preprint
id arxiv_https___arxiv_org_abs_2601_00671
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Fast-weight Product Key Memory
Zhao, Tianyu
Jones, Llion
Computation and Language
Artificial Intelligence
Sequence modeling layers in modern language models typically face a trade-off between storage capacity and computational efficiency. While softmax attention offers unbounded storage at prohibitive quadratic cost, linear variants are more efficient but suffer from limited, fixed-size storage. We introduce Fast-weight Product Key Memory (FwPKM), a sparse fast-weight memory layer that resolves this tension. FwPKM updates sparsely activated parameters at both training and inference time using chunk-level gradient descent on a local memory-rewrite objective. This performs Test-Time Training (TTT)-style gradient updates on activated slots in a sparse memory, enabling rapid memorization and retrieval of many new key-value associations while keeping per-token compute low and fixed. Experiments show that FwPKM functions as an effective episodic memory that complements the semantic memory of standard modules, yielding significant perplexity reductions on long-context datasets. Notably, in Needle-in-a-Haystack evaluations, FwPKM generalizes to 128K-token contexts despite being trained on only 4K-token sequences.
title Fast-weight Product Key Memory
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2601.00671