Research map / Large language models / Language, safety and interpretability
Interpretable Next-token Prediction via the Generalized Induction Head
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes the Generalized Induction-Head Model (GIM), an interpretable retrieval module that combines exact n-gram matching with fuzzy matching via a distilled neural similarity model, improving Infini-gram for language modeling and fMRI response prediction.
Problem
Interpretable next-token predictors such as Infini-gram lag far behind black-box LLMs, largely because exact n-gram matching cannot adapt to novel contexts or minor input variations like typos and rephrasings.
Approach
Generalize the induction head into an interpretable in-context retrieval module that scores sequence similarity by a small distilled Fuzzy Matching Model (trained to match LLaMA-2-7B next-token distributions) and predicts via a similarity-weighted count over tokens following matches, integrated with Infini-gram.
Key results
- Infini-gram with GIM improves BabyLM-test next-token accuracy by about 25 points over Infini-gram with OpenWebText (41.8 vs 16.7 for GPT-2 tokenizer, 43.2 vs 20.1 for LLaMA-2 tokenizer), narrowing the gap to LLMs.
- On fMRI, GIM matching achieves mean correlation 0.087 vs 0.072 for Eng1000 (20% improvement) across all voxels.
- GIM (fuzzy) with speculative decoding achieves up to 2.27x speed-up over LLaMA2-70B alone on H100s.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add GIM to Infini-gram using BabyLM-dev as reference | Infini-gram · BabyLM-test (GPT-2 tokenizer) | accuracy (%): 37.6 -> 42.2 (+4.6) | Helped |
| Add GIM to Infini-gram using OpenWebText as reference | Infini-gram · BabyLM-test (GPT-2 tokenizer) | accuracy (%): 16.7 -> 41.8 (+25.1) | Helped |
| Add GIM to Infini-gram using Pile-train as reference | Infini-gram · FineWeb (LLaMA-2 tokenizer) | accuracy (%): 39.3 -> 38.0 (-1.3) | Hurt |
| Use fuzzy rather than exact matching | GIM · BabyLM-test (LLaMA-2 tokenizer) | accuracy (%): 37.0 -> 42.7 | Helped |
| Add reverse KLD loss to CE training (ablation) | Fuzzy Matching Model · BabyLM-test (LLaMA-2 tokenizer) | accuracy (%): 42.7 -> 43.2 | Helped |
| Replace reverse KLD loss with forward KLD loss (ablation) | Fuzzy Matching Model · BabyLM-test (LLaMA-2 tokenizer) | accuracy (%): 43.2 -> 42.8 | Hurt |
| Add CE loss to reverse KLD training (ablation) | Fuzzy Matching Model · BabyLM-test (LLaMA-2 tokenizer) | accuracy (%): 41.9 -> 43.2 | Helped |
| Replace sinusoidal positional encoding with relative positional encoding (ablation) | Fuzzy Matching Model · BabyLM-test (LLaMA-2 tokenizer) | accuracy (%): 37.0 -> 43.2 | Helped |
| Train the fuzzy model on Pile-of-law instead of OpenWebText (ablation) | Fuzzy Matching Model · BabyLM-test (LLaMA-2 tokenizer) | accuracy (%): 43.2 -> 41.8 | Hurt |
| Remove GIM (fuzzy) (ablation) | Infini-gram with GIM, BabyLM-dev reference · BabyLM-test (LLaMA-2 tokenizer) | accuracy (%): 43.1 -> 42.2 | Hurt |
| Remove GIM (fuzzy) (ablation) | Infini-gram with GIM, OpenWebText reference · BabyLM-test (LLaMA-2 tokenizer) | accuracy (%): 43.2 -> 38.3 | Hurt |
| Remove GIM (exact) (ablation) | Infini-gram with GIM, OpenWebText reference · BabyLM-test (LLaMA-2 tokenizer) | accuracy (%): 43.2 -> 43.1 | No clear effect |
Surprising findings
- Infini-gram built on BabyLM-dev, a tiny 17M-token corpus, still outperforms much larger reference corpora on BabyLM-test.
- Fuzzy matching gives little gain in the fMRI setting, attributed to noise and temporal smoothing.
Limitations
- Does not close the performance gap with black-box LLMs, especially for reasoning or world-knowledge tasks.
- Relies on the input context, giving limited gains when context is short or uninformative.
- Fuzzy matching provides little benefit for fMRI, and fMRI analysis uses only one subject.
Experimental setup
Datasets: BabyLM OpenWebText Pile-train Pile-val FineWeb Pile-of-law fMRI podcast dataset (Huth lab, UTS03)
Benchmarks: BabyLM-test FineWeb Pile-val fMRI voxel correlation on UTS03
Metrics: next-token accuracy voxel-wise correlation speculative decoding speed-up acceptance rate
Baselines: Infini-gram GPT-2 LLaMA-2-7B Eng1000 LLaMA2-70B
Builds on: Infini-gram induction heads kNN-LM Eng1000
Closest papers by meaning
- RABBiT: Rapidly adaptive BOLD foundation model via brain-tuning for accurate zero-shot and few-shot prediction of speech-elicited responses in the brain (NeurIPS 2026 · similarity 0.85)
- Crafting Interpretable Embeddings for Language Neuroscience by Asking LLMs Questions (NeurIPS 2024 · similarity 0.84)
- Language Models as Zero-shot Lossless Gradient Compressors: Towards General Neural Parameter Prior Models (NeurIPS 2024 · similarity 0.84)
- On the Generalization Ability of Next-Token-Prediction Pretraining (ICML 2025 · similarity 0.84)
- Interpreting the Repeated Token Phenomenon in Large Language Models (ICML 2025 · similarity 0.84)
- LensLLM: Unveiling Fine-Tuning Dynamics for LLM Selection (ICML 2025 · similarity 0.84)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
