Neuro-Symbolic Language Modeling with Automaton-augmented Retrieval
Not on the map. Why?
Abstract (arXiv)
Retrieval-based language models (R-LM) model the probability of natural language text by combining a standard language model (LM) with examples retrieved from an external datastore at test time. While effective, a major bottleneck of using these models in practice is the computationally costly datastore search, which can be performed as frequently as every time step. In this paper, we present RetoMaton - retrieval automaton - which approximates the datastore search, based on (1) saving pointers between consecutive datastore entries, and (2) clustering of entries into "states". This effectively results in a weighted finite automaton built on top of the datastore, instead of representing the datastore as a flat list. The creation of the automaton is unsupervised, and a RetoMaton can be constructed from any text collection: either the original training corpus or from another domain. Traversing this automaton at inference time, in parallel to the LM inference, reduces its perplexity by up to 1.85, or alternatively saves up to 83% of the nearest neighbor searches over kNN-LM (Khandelwal et al., 2020) without hurting perplexity. Our code and trained models are available at https://github.com/neulab/retomaton .
Key facts. Cited by 60 papers in the map (data through 14 Oct 2026). Builds on 33 of its 47 references that are in the map. First posted on arXiv 28 Jan 2022.
Builds on
33 of 47 references.
References · 33
- 2017Attention Is All You Needcited by 60,361
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
- 2016Pointer Sentinel Mixture Modelscited by 3,096
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
- 2017Billion-scale similarity search with GPUscited by 2,497
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,141
- 2021Improving language models by retrieving from trillions of tokenscited by 1,293
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 800
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
- 2017Six Challenges for Neural Machine Translationcited by 335
- 2018Adaptive Input Representations for Neural Language Modelingcited by 226
- 2020Nearest Neighbor Machine Translationcited by 209
21 more
- 2019Facebook FAIR's WMT19 News Translation Task Submissioncited by 179
- 2020Unsupervised Domain Clusters in Pretrained Language Modelscited by 160
- 2021Efficient Nearest Neighbor Language Modelscited by 93
- 2017Generating Sentences by Editing Prototypescited by 88
- 2021Adaptive Semiparametric Language Modelscited by 83
- 2018A Retrieve-and-Edit Framework for Predicting Structured Outputscited by 73
- 2016Efficient softmax approximation for GPUscited by 67
- 2017Extracting Automata from Recurrent Neural Networks Using Queries and Counterexamplescited by 66
- 2018Guiding Neural Machine Translation with Retrieved Translation Piecescited by 63
- 2021Learning to Retrieve Passages without Supervisioncited by 46
- 2018Retrieval-Based Neural Code Generationcited by 41
- 2017Unbounded cache model for online language modeling with open vocabularycited by 37
- 2021GNN-LM: Language Modeling based on Global Contexts via GNNcited by 27
- 2021Learning Kernel-Smoothed Machine Translation with Retrieved Examplescited by 25
- 2019Learning Deterministic Weighted Automata with Queries and Counterexamplescited by 22
- 2018Rational Recurrencescited by 18
- 2020Learning Sparse Prototypes for Text Generationcited by 15
- 2021Lexically Aware Semi-Supervised Learning for OCR Post-Correctioncited by 12
- 2016Generalizing and Hybridizing Count-based and Neural Language Modelscited by 11
- 2018SoPa: Bridging CNNs, RNNs, and Weighted Finite-State Machinescited by 8
- 2021Capturing Structural Locality in Non-parametric Language Modelscited by 8
Built on by
Citing papers per year: 2022: 9; 2023: 21; 2024: 15; 2025: 11; 2026: 4.
60 papers.
Sort:
By area:
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
- 2023In-Context Retrieval-Augmented Language Modelscited by 702
- 2024From Persona to Personalization: A Survey on Role-Playing Language Agentscited by 212
- 2023Unlimiformer: Long-Range Transformers with Unlimited Length Inputcited by 128
- 2023Test-Time Training on Nearest Neighbors for Large Language Modelscited by 88
- 2023Learning to Filter Context for Retrieval-Augmented Generationcited by 83
- 2022Efficient Methods for Natural Language Processing: A Surveycited by 78
- 2025PathRAG: Pruning Graph-based Retrieval Augmented Generation with Relational Pathscited by 61
- 2024Instruction-tuned Language Models are Better Knowledge Learnerscited by 55
- 2022Nonparametric Masked Language Modelingcited by 40
- 2022Decoupling Knowledge from Memorization: Retrieval-augmented Prompt Learningcited by 36
- 2023Neural Graph Reasoning: Complex Logical Query Answering Meets Graph Databasescited by 35
38 more
- 2023How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent Advancescited by 33
- 2024Algorithmic progress in language modelscited by 31
- 2023Why do Nearest Neighbor Language Models Work?cited by 29
- 2023Copy Is All You Needcited by 27
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processingcited by 25
- 2023Goodtriever: Adaptive Toxicity Mitigation with Retrieval-augmented Modelscited by 23
- 2023Chameleon: a Heterogeneous and Disaggregated Accelerator System for Retrieval-Augmented Language Modelscited by 23
- 2025LiMuon: Light and Fast Muon Optimizer for Large Modelscited by 22
- 2022Chunk-based Nearest Neighbor Machine Translationcited by 21
- 2024Accelerating Retrieval-Augmented Language Model Serving with Speculationcited by 20
- 2022You can't pick your neighbors, or can you? When and how to rely on retrieval in the kNN-LMcited by 18
- 2023What can we learn from Data Leakage and Unlearning for Law?cited by 15
- 2023kNN-Adapter: Efficient Domain Adaptation for Black-Box Language Modelscited by 14
- 2024On the Vulnerability of Applying Retrieval-Augmented Generation within Knowledge-Intensive Application Domainscited by 14
- 2022Relation Extraction as Open-book Examination: Retrieval-enhanced Prompt Tuningcited by 13
- 2024Retrieval-Enhanced Machine Learning: Synthesis and Opportunitiescited by 11
- 2023KNN-LM Does Not Improve Open-ended Text Generationcited by 10
- 2024Neuro-Symbolic AI: Explainability, Challenges, and Future Trendscited by 10
- 2024Vocabulary-Defined Semantics: Latent Space Clustering for Improving In-Context Learningcited by 8
- 2024Great Memory, Shallow Reasoning: Limits of kNN-LMscited by 8
- 2025Bring Your Own Knowledge: A Survey of Methods for LLM Knowledge Expansioncited by 8
- 2023Has It All Been Solved? Open NLP Research Questions Not Solved by Large Language Modelscited by 7
- 2025On the Predictive Power of Representation Dispersion in Language Modelscited by 7
- 2026Query-Aware Flow Diffusion for Graph-Based RAG with Retrieval Guaranteescited by 7
- 2022Schema-aware Reference as Prompt Improves Data-Efficient Knowledge Graph Constructioncited by 6
- 2024Generation with Dynamic Vocabularycited by 6
- 2022EUREKA: EUphemism Recognition Enhanced through Knn-based methods and Augmentationcited by 5
- 2023LUNA: A Model-Based Universal Analysis Framework for Large Language Modelscited by 4
- 2024LIAR: Leveraging Inference Time Alignment (Best-of-N) to Jailbreak LLMs in Secondscited by 4
- 2024Vector Retrieval with Similarity and Diversity: How Hard Is It?cited by 3
- 2024Enhancing Conflict Resolution in Language Models via Abstract Argumentationcited by 3
- 2025Neuroplasticity and Corruption in Model Mechanisms: A Case Study Of Indirect Object Identificationcited by 3
- 2022Nearest Neighbor Language Models for Stylistic Controllable Generationcited by 2
- 2023BRENT: Bidirectional Retrieval Enhanced Norwegian Transformercited by 2
- 2025From Retrieval to Generation: Comparing Different Approachescited by 2
- 2023Algorithms for Acyclic Weighted Finite-State Automata with Failure Arcscited by 1
- 2023N-Gram Nearest Neighbor Machine Translationcited by 1
- 2023knn-seq: Efficient, Extensible kNN-MT Frameworkcited by 1
50 most cited of 60 All 60 (JSON)
- 2026Oilbird: Training-Free Speculative Decoding with Keys the Verifier Already Computes4 Aug 2026
- 2026Temporal Reasoning Is Not the Bottleneck: A Probabilistic Inconsistency Framework for Neuro-Symbolic QA5 May 2026
- 2026Query-Aware Flow Diffusion for Graph-Based RAG with Retrieval Guarantees21 Apr 2026
- 2026Logos: An evolvable reasoning engine for rational molecular design10 Mar 2026
- 2025Retrieval-augmented Prompt Learning for Pre-trained Foundation Models23 Dec 2025
- 2025LiMuon: Light and Fast Muon Optimizer for Large Models18 Sep 2025
- 2025Case-Based Decision-Theoretic Decoding with Quality Memories16 Sep 2025
- 2025Rethinking Reasoning in LLMs: Neuro-Symbolic Local RetoMaton Beyond ICL and CoT22 Aug 2025
- 2025On the Predictive Power of Representation Dispersion in Language Models30 Jun 2025
- 2025Long-Tail Crisis in Nearest Neighbor Language Models28 Mar 2025
- 2025Neuroplasticity and Corruption in Model Mechanisms: A Case Study Of Indirect Object Identification27 Feb 2025
- 2025From Retrieval to Generation: Comparing Different Approaches27 Feb 2025
38 more
- 2025Mitigating Data Scarcity in Time Series Analysis: A Foundation Model with Series-Symbol Data Generation21 Feb 2025
- 2025PathRAG: Pruning Graph-based Retrieval Augmented Generation with Relational Paths18 Feb 2025
- 2025Bring Your Own Knowledge: A Survey of Methods for LLM Knowledge Expansion18 Feb 2025
- 2024Enhancing Conflict Resolution in Language Models via Abstract Argumentation21 Dec 2024
- 2024LIAR: Leveraging Inference Time Alignment (Best-of-N) to Jailbreak LLMs in Seconds6 Dec 2024
- 2024Neuro-Symbolic AI: Explainability, Challenges, and Future Trends7 Nov 2024
- 2024Generation with Dynamic Vocabulary11 Oct 2024
- 2024On the Vulnerability of Applying Retrieval-Augmented Generation within Knowledge-Intensive Application Domains12 Sep 2024
- 2024Great Memory, Shallow Reasoning: Limits of kNN-LMs21 Aug 2024
- 2024Retrieval-Enhanced Machine Learning: Synthesis and Opportunities17 Jul 2024
- 2024Vector Retrieval with Similarity and Diversity: How Hard Is It?5 Jul 2024
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processing30 Apr 2024
- 2024From Persona to Personalization: A Survey on Role-Playing Language Agents28 Apr 2024
- 2024Algorithmic progress in language models9 Mar 2024
- 2024Instruction-tuned Language Models are Better Knowledge Learners20 Feb 2024
- 2024Massively Multilingual Text Translation For Low-Resource Languages29 Jan 2024
- 2024Vocabulary-Defined Semantics: Latent Space Clustering for Improving In-Context Learning29 Jan 2024
- 2024Accelerating Retrieval-Augmented Language Model Serving with Speculation25 Jan 2024
- 2023Retrieval-Augmented Generation for Large Language Models: A Survey18 Dec 2023
- 2023Learning to Filter Context for Retrieval-Augmented Generation14 Nov 2023
- 2023LUNA: A Model-Based Universal Analysis Framework for Large Language Models22 Oct 2023
- 2023knn-seq: Efficient, Extensible kNN-MT Framework18 Oct 2023
- 2023Chameleon: a Heterogeneous and Disaggregated Accelerator System for Retrieval-Augmented Language Models15 Oct 2023
- 2023Goodtriever: Adaptive Toxicity Mitigation with Retrieval-augmented Models11 Oct 2023
- 2023How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent Advances11 Oct 2023
- 2023What can we learn from Data Leakage and Unlearning for Law?19 Jul 2023
- 2023Copy Is All You Need13 Jul 2023
- 2023Test-Time Training on Nearest Neighbors for Large Language Models29 May 2023
- 2023KNN-LM Does Not Improve Open-ended Text Generation24 May 2023
- 2023Has It All Been Solved? Open NLP Research Questions Not Solved by Large Language Models21 May 2023
- 2023Unlimiformer: Long-Range Transformers with Unlimited Length Input2 May 2023
- 2023BRENT: Bidirectional Retrieval Enhanced Norwegian Transformer19 Apr 2023
- 2023Revisiting k-NN for Fine-tuning Pre-trained Language Models18 Apr 2023
- 2023Neural Graph Reasoning: Complex Logical Query Answering Meets Graph Databases26 Mar 2023
- 2023kNN-Adapter: Efficient Domain Adaptation for Black-Box Language Models21 Feb 2023
- 2023In-Context Retrieval-Augmented Language Models31 Jan 2023
- 2023N-Gram Nearest Neighbor Machine Translation30 Jan 2023
- 2023Algorithms for Acyclic Weighted Finite-State Automata with Failure Arcs17 Jan 2023
50 newest of 60 All 60 (JSON)
- 2023In-Context Retrieval-Augmented Language Modelscited by 702
- 2023Learning to Filter Context for Retrieval-Augmented Generationcited by 83
- 2025PathRAG: Pruning Graph-based Retrieval Augmented Generation with Relational Pathscited by 61
- 2022Decoupling Knowledge from Memorization: Retrieval-augmented Prompt Learningcited by 36
- 2023Why do Nearest Neighbor Language Models Work?cited by 29
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processingcited by 25
- 2023Goodtriever: Adaptive Toxicity Mitigation with Retrieval-augmented Modelscited by 23
- 2023Chameleon: a Heterogeneous and Disaggregated Accelerator System for Retrieval-Augmented Language Modelscited by 23
- 2024Accelerating Retrieval-Augmented Language Model Serving with Speculationcited by 20
- 2024On the Vulnerability of Applying Retrieval-Augmented Generation within Knowledge-Intensive Application Domainscited by 14
- 2023KNN-LM Does Not Improve Open-ended Text Generationcited by 10
- 2024Vector Retrieval with Similarity and Diversity: How Hard Is It?cited by 3
12 most cited of 15 All 15 (JSON)
- 2025Retrieval-augmented Prompt Learning for Pre-trained Foundation Models23 Dec 2025
- 2025Long-Tail Crisis in Nearest Neighbor Language Models28 Mar 2025
- 2025From Retrieval to Generation: Comparing Different Approaches27 Feb 2025
- 2025PathRAG: Pruning Graph-based Retrieval Augmented Generation with Relational Paths18 Feb 2025
- 2024On the Vulnerability of Applying Retrieval-Augmented Generation within Knowledge-Intensive Application Domains12 Sep 2024
- 2024Vector Retrieval with Similarity and Diversity: How Hard Is It?5 Jul 2024
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processing30 Apr 2024
- 2024Accelerating Retrieval-Augmented Language Model Serving with Speculation25 Jan 2024
- 2023Learning to Filter Context for Retrieval-Augmented Generation14 Nov 2023
- 2023Chameleon: a Heterogeneous and Disaggregated Accelerator System for Retrieval-Augmented Language Models15 Oct 2023
- 2023Goodtriever: Adaptive Toxicity Mitigation with Retrieval-augmented Models11 Oct 2023
- 2023KNN-LM Does Not Improve Open-ended Text Generation24 May 2023
12 newest of 15 All 15 (JSON)
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
- 2023Neural Graph Reasoning: Complex Logical Query Answering Meets Graph Databasescited by 35
- 2024Great Memory, Shallow Reasoning: Limits of kNN-LMscited by 8
- 2026Query-Aware Flow Diffusion for Graph-Based RAG with Retrieval Guaranteescited by 7
- 2025Rethinking Reasoning in LLMs: Neuro-Symbolic Local RetoMaton Beyond ICL and CoTcited by 0
- 2026Logos: An evolvable reasoning engine for rational molecular designcited by 0
- 2026Temporal Reasoning Is Not the Bottleneck: A Probabilistic Inconsistency Framework for Neuro-Symbolic QAcited by 0
- 2026Temporal Reasoning Is Not the Bottleneck: A Probabilistic Inconsistency Framework for Neuro-Symbolic QA5 May 2026
- 2026Query-Aware Flow Diffusion for Graph-Based RAG with Retrieval Guarantees21 Apr 2026
- 2026Logos: An evolvable reasoning engine for rational molecular design10 Mar 2026
- 2025Rethinking Reasoning in LLMs: Neuro-Symbolic Local RetoMaton Beyond ICL and CoT22 Aug 2025
- 2024Great Memory, Shallow Reasoning: Limits of kNN-LMs21 Aug 2024
- 2023Retrieval-Augmented Generation for Large Language Models: A Survey18 Dec 2023
- 2023Neural Graph Reasoning: Complex Logical Query Answering Meets Graph Databases26 Mar 2023
- 2023Unlimiformer: Long-Range Transformers with Unlimited Length Inputcited by 128
- 2023Test-Time Training on Nearest Neighbors for Large Language Modelscited by 88
- 2022Efficient Methods for Natural Language Processing: A Surveycited by 78
- 2024Instruction-tuned Language Models are Better Knowledge Learnerscited by 55
- 2022Nonparametric Masked Language Modelingcited by 40
- 2023How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent Advancescited by 33
- 2024Algorithmic progress in language modelscited by 31
- 2023Copy Is All You Needcited by 27
- 2025LiMuon: Light and Fast Muon Optimizer for Large Modelscited by 22
- 2022Chunk-based Nearest Neighbor Machine Translationcited by 21
- 2022You can't pick your neighbors, or can you? When and how to rely on retrieval in the kNN-LMcited by 18
- 2023kNN-Adapter: Efficient Domain Adaptation for Black-Box Language Modelscited by 14
12 most cited of 34 All 34 (JSON)
- 2025LiMuon: Light and Fast Muon Optimizer for Large Models18 Sep 2025
- 2025Case-Based Decision-Theoretic Decoding with Quality Memories16 Sep 2025
- 2025On the Predictive Power of Representation Dispersion in Language Models30 Jun 2025
- 2025Neuroplasticity and Corruption in Model Mechanisms: A Case Study Of Indirect Object Identification27 Feb 2025
- 2025Mitigating Data Scarcity in Time Series Analysis: A Foundation Model with Series-Symbol Data Generation21 Feb 2025
- 2025Bring Your Own Knowledge: A Survey of Methods for LLM Knowledge Expansion18 Feb 2025
- 2024Enhancing Conflict Resolution in Language Models via Abstract Argumentation21 Dec 2024
- 2024Neuro-Symbolic AI: Explainability, Challenges, and Future Trends7 Nov 2024
- 2024Generation with Dynamic Vocabulary11 Oct 2024
- 2024Retrieval-Enhanced Machine Learning: Synthesis and Opportunities17 Jul 2024
- 2024Algorithmic progress in language models9 Mar 2024
- 2024Instruction-tuned Language Models are Better Knowledge Learners20 Feb 2024
12 newest of 34 All 34 (JSON)