Sign inGet started
Paper · arXiv

Lngram v2: Latent N-Gram Memory with Interpretable Discrete Representations

Transformers lack a native lookup mechanism, requiring repeated dense computation to recognize and reuse local static patterns. Lngram v1 introduces tokenizer-independent conditional memory through discrete latent n-gram addressing, but its memory capacity is coupled with the backbone width, limiting scalability due to high parameter and activation costs. We propose Lngram v2, which decouples the number of routes, memory dimension, and backbone width, and introduces a context-aware grouped-query attention readout to scale memory capacity independently. A zero-value Sink and counterfactual surrogate gradients further improve readout selectivity and routing trainability while preserving har...

AuthorsYunao Zheng, Bin Wen, Xiaojie Wang et al.
Primary categorycs.CL
Published3 September 2026
Last updated at source22 September 2026
cs.CL
Embed this entry
<iframe src="https://silytics.si/embed/item/f7be04c9-3b45-420e-a876-a32ff0dc56f5" width="420" height="190" style="border:0" loading="lazy" title="Silytics entry"></iframe>

Free, no tracking. More about feeds and embeds.

Silytics shows public metadata from arXiv and links to the original. Information may be incomplete or out of date. Last refreshed 17 October 2026. Licenses and terms of the original apply to the work itself. Not financial, legal or professional advice.