FactorEngram: Factorized N-gram Memory with Basis-Level Gating for Language Models
Not on the map. Why?
Abstract (arXiv)
Lookup-based memory has been a promising way to scale the parameters of large language models (LLMs). It retrieves learned representations of local token patterns, such as n-grams, instead of reconstructing them through successive layers of computation. However, existing designs such as Engram treat each retrieved embedding as a monolithic unit. Each embedding is stored in its own hashed slot and modulated by a single scalar gate. As a result, polysemous patterns cannot selectively read out the components of their memory that are relevant to the context. Moreover, parameters are shared only through hash collisions, which are largely unrelated to semantics. We propose FactorEngram, a factorized n-gram memory with basis-level contextual gating. FactorEngram retrieves sparsity-regularized coefficients over a dictionary of basis vectors shared across patterns, so related patterns can reuse common components. The same dictionary is also used for gating. The backbone hidden state is scored against each basis vector to gate the corresponding coefficient before reconstruction, which lets the context modulate each memory component individually. FactorEngram also covers both individual tokens and multi-token n-grams, and we systematically study where the memory branch should be inserted. On 340M- and 1B-parameter Transformer backbones, FactorEngram improves language modeling and downstream task performance. Ablation studies confirm the contribution of each component and identify insertion before the attention sublayer in the middle layers as an effective configuration.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 21 of its 27 references that are in the map. First posted on arXiv 28 Sep 2026.
Builds on
21 of 27 references.
References · 21
- 2017Attention Is All You Needcited by 60,361
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2016Pointer Sentinel Mixture Modelscited by 3,096
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
- 2020GLU Variants Improve Transformercited by 1,804
- 2019Root Mean Square Layer Normalizationcited by 1,480
- 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 992
- 2026Scaling Monosemanticity: Extracting Interpretable Features from Claude 3 Sonnetcited by 191
- 2026Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Modelscited by 86
- 2026DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compressioncited by 76
9 more
- 2026Scaling Embeddings Outperforms Scaling Experts in Language Modelscited by 15
- 2026STEM: Scaling Transformers with Embedding Modulescited by 12
- 2026Memory Grafting: Scaling Language Model Pre-training via Offline Conditional Memorycited by 5
- 2026Lngram: N-gram Conditional Memory in Latent Spacecited by 3
- 2026Tensorizing Engram: Sharing Latents Across N-Gram Embeddings is Beneficial in LLMscited by 3
- 2026A Collision-Free Hot-Tier Extension for Engram-Style Conditional Memory: A Controlled Study of Training Dynamicscited by 2
- 2026Pooling Engram Conditional Memory in Large Language Models using CXLcited by 2
- 2026TF-Engram: A Train-Free Engram with SSD-Backed Memory for Large Language Modelscited by 2
- 2026Tokenizer-Agnostic Engram Modulecited by 1
Built on by
Not cited yet.