Plug, Play, and Generalize: Length Extrapolation with Pointer-Augmented Neural Memory
Hung LeDung NguyenKDKien Do
Svetha Venkatesh
Truyen Tran
Hung Le
Dung Nguyen
KDKien Do

Svetha Venkatesh

Truyen Tran
+5
This paper introduces Pointer-Augmented Neural Memory (PANM), a trainable module that adds an external memory with explicit physical addresses and pointer operations (assignment, dereferencing, arithmetic) to sequence models, from recurrent networks to LLMs. PANM improves symbol processing and, crucially, enables length extrapolation: it helps Transformers reach 100% generalization accuracy in compositional tasks and boosts mathematical reasoning, QA, and machine translation. Gains scale with backbone strength, with LLMs finetuned using PANM handling sequences 10–100 times longer than training data.

OpenReview · June 20, 2024