Paper deep dive
Co-LMLM: Continuous-Query Limited Memory Language Models
Yair Feldman, Linxi Zhao, Nathan Godey, Dongyoung Go, Yilun Hua, Kilian Q. Weinberger, Jennifer J. Sun, Yoav Artzi
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 92%
Last extracted: 7/18/2026, 8:49:08 AM
Summary
The paper introduces Continuous-Query Limited Memory Language Models (CO-LMLM), a framework that externalizes factual knowledge to a dense vector-based knowledge base (KB) rather than memorizing it in model weights. Unlike prior relational LMLMs that rely on structured queries and Wikipedia, CO-LMLM uses continuous vector queries generated from hidden states to retrieve free-form textual knowledge spans. The authors propose an automated annotation pipeline to tag factual spans in arbitrary text (e.g., FineWeb-Edu) and pair them with synthetic questions. Experiments show CO-LMLM outperforms standard LLMs and previous LMLMs in perplexity and factual precision, achieving performance comparable to larger models like GPT-4o-mini at a much smaller scale (360M parameters).
Entities (12)
Relation Signals (10)
Authors â affiliatedwith â Cornell University
confidence 95% · Yair Feldman ... Department of Computer Science Cornell University
CO-LMLM â isa â LMLM
confidence 95% · We propose continuous-query LMLM (CO-LMLM)... This recently introduced paradigm [LMLM] provides multiple advantages
CO-LMLM â trainson â Wikipedia
confidence 95% · Across pretraining on Wikipedia and FineWeb-Edu
CO-LMLM â trainson â FineWeb-Edu
confidence 95% · Across pretraining on Wikipedia and FineWeb-Edu
CO-LMLM â uses â Knowledge Base
confidence 95% · CO-LMLM, where the KB pairs continuous keys with textual knowledge values
CO-LMLM â achievesperformancecomparableto â GPT-4o-mini
confidence 90% · SimpleQA-verified performance that is in line with gpt-4o-mini
CO-LMLM â achievesperformancehigherthan â claude-sonnet-4.5
confidence 90% · SimpleQA-verified performance that is ... higher than Claude Sonnet 4.5.
CO-LMLM â outperforms â Standard LLMs
confidence 90% · CO-LMLM outperforms prior LMLMs and vanilla LLMs in both perplexity and factual precision.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Limited memory language models (LMLMs) externalize factual knowledge during pretraining to a knowledge base (KB), rather than memorizing it in their weights. During generation, the model then fetches knowledge from the KB as needed. This recently introduced paradigm provides multiple advantages, including knowledge control capabilities that remain beyond conventional LLMs. We propose continuous-query LMLM (CO-LMLM), where the KB pairs continuous keys with textual knowledge values, a significant departure from prior reliance on relational KB and queries. CO-LMLM generates flexible vector queries at minimal cost, while still integrating human-readable and attributable retrieved knowledge into its generation. We pair this design with an annotation pipeline that tags free-form factual spans in arbitrary text, removing prior work's restriction to Wikipedia. Across pretraining on Wikipedia and FineWeb-Edu and at multiple model scales, CO-LMLM outperforms prior LMLMs and vanilla LLMs in both perplexity and factual precision. At 360M scale, this includes lower perplexity than models pretrained on 40x more data, and SimpleQA-verified performance that is in line with gpt-4o-mini and higher than Claude Sonnet 4.5.
Tags
Links
- Source: https://arxiv.org/abs/2607.07707v1
- Canonical: https://arxiv.org/abs/2607.07707v1
Trouble viewing inline? Open PDF directly â
Full Text
103,391 characters extracted from source content.
Expand or collapse full text
Co-LMLM: Continuous-Query Limited Memory Language Models Yair Feldman * Linxi Zhao Nathan Godey Dongyoung Go Yilun Hua Kilian Q. Weinberger Jennifer J. Sun Yoav Artzi Department of Computer Science Cornell University yairf@cs.cornell.edu lz586, ng554, dg793, yh2228, kilian, jennifer.sun, yoavartzi@cornell.edu Abstract Limited memory language models (LMLMs) externalize factual knowledge during pre-training to a knowledge base (KB), rather than memorizing it in their weights. During generation, the model then fetches knowledge from the KB as needed. This recently introduced paradigm provides multiple advantages, including knowl- edge control capabilities that remain beyond conventional LLMs. We propose continuous-query LMLM (CO-LMLM), where the KB pairs continuous keys with textual knowledge values, a significant departure from prior reliance on relational KB and queries. CO-LMLM generates flexible vector queries at minimal cost, while still integrating human-readable and attributable retrieved knowledge into its generation. We pair this design with an annotation pipeline that tags free-form factual spans in arbitrary text, removing prior workâs restriction to Wikipedia. Across pretraining on Wikipedia and FineWeb-Edu and at multiple model scales, CO-LMLM outperforms prior LMLMs and vanilla LLMs in both perplexity and factual precision. At 360M scale, this includes lower perplexity than models pre- trained on 40Ămore data, and SimpleQA-verified performance that is in line with gpt-4o-mini and higher than Claude Sonnet 4.5. 1 Introduction Recently, there has been increasing interest in large language models (LLMs) that are trained to externalize knowledge [Ghosal et al., 2025, Zhao et al., 2026, Pouransari et al., 2026]. A particularly compelling approach is the limited memory language model [LMLM; Zhao et al., 2026], where the LLM is pre-trained to externalize knowledge into a human-readable knowledge base (KB). This design offers several advantages. The KB is interpretable and easily editable, allowing for unlearning with no utility tradeoff, and enabling easy attribution of knowledge used to the source material. Zhao et al. instantiate the LMLM approach with a relational KB, which we refer to as REL-LMLM. Although representing a significant departure from conventional LLMs, REL-LMLM proposes a training process that follows the common scalable next-token-prediction pre-training, with the key difference of pre-processing the data to simulate knowledge retrieval. Experiments demonstrate significantly lower perplexities compared to conventional LLMs and factuality scores similar to models several orders of magnitude larger, while retaining similar utility (i.e., NLU scores) to LLMs of the same size. * Individual author contributions are detailed in the acknowledgments. Preprint. arXiv:2607.07707v1 [cs.CL] 8 Jul 2026 Figure 1: Knowledge separation across three regimes. A standard LLM with RAG retrieves over external documents but keeps factual knowledge in its parameters (left); LMLM externalizes facts to a relational KB queried with an explicit decoded query (middle); CO-LMLM externalizes facts to an unstructured index, retrieved directly from the modelâs hidden state (right). However, REL-LMLM has several key limitations that constrain the scaling of the pre-training process and the knowledge retrieval expressivity. Pre-training relies on Wikipedia, where each article is centered on a specific entity, making it straightforward to automatically annotate relational queries at scale during data pre-processing. Although Wikipedia is sufficient for a proof-of-concept demonstration, it provides no avenue to scale much further. The relational representation itself, although human readable, introduces several limitations. It restricts the data that can be externalized to items that are the object of natural language relational tuples, where both the subject and relation are mentioned previously in the text. This same mechanism limits the expressivity of the retrieval itself to queries that can be expressed as simple subject-relation natural language queries, and generating these queries incurs the added cost of decoding multiple additional tokens during inference. Finally, synthesizing the exact queries in the data pre-processing step holds retrieval pathways as constant and pre-determined, significantly restricting the expressivity of the learned retrieval mechanism. We propose continuous-query limited-memory language models (CO-LMLM), an approach that addresses these limitations, while retaining all the advantages that the LMLM design offers. The key modeling difference from REL-LMLM is that queries are issued as single continuous vectors rather than structured relational tuples. The KB stores vector keys and string values instead of relational tuples. We jointly train the LLM Transformer for language modeling and retrieval using pre-training data pre-processed to simulate KB queries. The pre-processing specifies only when retrieval takes place and what string it returns, rather than dictating the explicit query representation. The query vector emitted by the LLM are optimized via a contrastive loss over synthesized positive and negative pairs. This allows CO-LMLM to retrieve knowledge at the cost of a single generation step, generate flexible queries, externalize a much broader set of knowledge without role or relational constraints, and generalize to pre-training data well beyond Wikipedia. We evaluate CO-LMLM against REL-LMLM models of comparable size and standard baselines trained on the same corpus without knowledge externalization. Across model scales, CO-LMLM achieves lower perplexity than standard models, substantially improves factual precision over both standard and REL-LMLM, while preserving downstream NLU performance. At the 360M scale, CO- LMLM achieves lower perplexities than off-the-shelf HF/SMOLLM2-360M, which is pre-trained on 40Ămore data, and SimpleQA-verified [Haas et al., 2026] scores that are in line with gpt-4o-mini and higher than Claude Sonnet 4.5. At the same time, CO-LMLM retains the controllability benefits of LMLM: its external memory remains editable and supports direct unlearning through database operations. Finally, extending pre-training from Wikipedia to FineWeb-Edu further improves factual precision, showing CO-LMLMâs benefit from scaling the pre-training data. Code, data, and models are available at: https://lil-lab.github.io/co-lmlm-web. 2 Related Work Parametric Knowledge and its LimitationsPre-trained language models store factual knowledge implicitly in their parameters and recall it at generation time [Petroni et al., 2019, Roberts et al., 2020]. This form of storage is inherently limited: factual recall scales with model size and exposure frequency, making long-tail knowledge difficult to capture [Kandpal et al., 2023, Mallen et al., 2023]. Moreover, factual associations are entangled with linguistic representations, making individual facts difficult to attribute, edit, or remove, and contributing to hallucinations and stale knowledge [Elhage et al., 2022, Dai et al., 2022, Huang et al., 2024]. They also make knowledge editing and unlearning 2 challenging: removing or modifying specific facts typically requires additional training or specialized objectives, often trading off with general capabilities [Maini et al., 2024]. MemSinks isolates memorization-specific parameters, but still keeps knowledge within the model [Ghosal et al., 2025]. These challenges motivate approaches that move factual knowledge into separate, editable stores. Externalizing Knowledge from Model Weights A growing line of work augments language models with non-parametric or semi-parametric memory, or aims to move factual knowledge more explicitly out of model parameters. kNN-LM retrieves nearest-neighbor examples from an external datastore and interpolates their probabilities with the model distribution [Khandelwal et al., 2020], while RETRO retrieves neighboring chunks and conditions on them through cross-attention [Borgeaud et al., 2022]. Other approaches introduce sparse memory layers or learned key-value memories to increase model capacity and factuality [Lample et al., 2019, Berges et al., 2025, Wu et al., 2022, Peng et al., 2023, Yang et al., 2024, Cheng et al., 2026, Tseng and Sa, 2026]. These methods can improve perplexity or factuality, but the stored information remains not directly inspectable or editable. Limited Memory Language Models Zhao et al. [2026] is the most related work to ours. They propose Limited Memory Language Models (LMLMs), which externalize factual knowledge into a textual relational KB during pretraining rather than encoding it in model parameters. We refer to this approach as REL-LMLM to distinguish it from our continuous-query formulation. REL-LMLM enables faster pre-training, interpretable retrieval, and direct editing, but its relational design limits the external memory coverage: facts must be expressible as Wikipedia-style subject-relation-object tuples, and retrieval depends on brittle textual queries and introduces additional generation token overhead. CO-LMLM preserves the benefits of externalized and editable KB while relaxing these constraints. It replaces relational tuples with free-form textual knowledge spans; and decoded relational queries with continuous queries emitted from the modelâs hidden states. These queries can carry richer contextual information for retrieval, allowing CO-LMLM to scale beyond Wikipedia-style relational facts to general corpora (e.g., FineWeb-Edu), while reducing the token overhead of query generation. Retrieval-Augmented Language Models Retrieval-Augmented Generation (RAG) conditions generation on retrieved passages during inference [Lewis et al., 2020, Izacard and Grave, 2021], while retrieval-aware pretraining methods incorporate retrieval into model training [Guu et al., 2020, Borgeaud et al., 2022, Izacard et al., 2023]. Other methods let models decide when to retrieve and issue textual queries, as in Self-RAG, DRAGIN, and LMLM [Asai et al., 2024, Su et al., 2024, Zhao et al., 2026]. Our technique is related to methods that generate retrieval signals directly from internal representations rather than decoded queries [Muennighoff et al., 2025, Zhang et al., 2024a, 2025]. Unlike most retrieval-augmented methods, which add external context while leaving parametric knowledge largely intact, CO-LMLM uses retrieval to define the parametric/non-parametric boundary during pretraining: factual spans are externalized into a schema-free index, and the model learns when and how to retrieve them through a contrastive objective trained jointly with next-token prediction. 3 Method The CO-LMLM model is a decoder-only Transformer, which functions as both a language model and a dense retriever. Figure 2 provides a high-level overview of the method. The model generates query vectors similar to tool calling, and the returned values are encoded by the model, before decoding resumes (Section 3.1). We jointly train the language modeling and retriever functions (Section 3.2), using pre-training data that is pre-processed to simulate retrieval and synthetic questions that provide supervision for the contrastive retrieval objective (Section 3.3). 3.1 Modeling and Inference CO-LMLM performs retrieval through continuous tool calls. The external memory is a key-value store: each key is a dense vector produced by the model, and each value is a factual text span. Unlike standard tool-calling methods [Schick et al., 2023], the retrieval query is not represented as text. Instead, the query is the modelâs hidden state at a special token. At inference time, the model decodes tokens autoregressively. When it emits the special<FACT> token, we read the last-layer hidden state at that position as a retrieval query, query the index, and retrieve the top-1 fact text snippet. We splice the retrieved snippet into the context immediately 3 Figure 2: Overview of CO-LMLM. Top: We annotate the pre-training corpus with fact spans and paired questions, while leaving the document text unchanged. Middle: During training, a single decoder-only Transformer processes both the annotated document and its paired questions. We optimize next-token prediction over non-fact tokens and a bidirectional InfoNCE loss that aligns the query representation at each<FACT>token with the question representation at the corresponding <FACT-q>token. Bottom: At inference, emitting<FACT>triggers dense retrieval using the hidden state at the emitted<FACT>position as the query. The retrieved fact span is inserted into the context, followed by </FACT>, and decoding continues. No textual query is decoded. after<FACT>, append a closing</FACT>special token, and resume autoregressive decoding from </FACT>onward. Each retrieval therefore costs one extra autoregressive step (the opening<FACT> token) and grows the context by the length of the retrieved span. 3.2 Training Our training data consists of raw text in which factual spans are enclosed by<FACT>and</FACT>. Each marked span is paired with a natural-language question whose answer is the span. Figure 2 (top) illustrates a single example. Section 3.3 describes how we pre-process raw pre-training data to create this data. Our objectives are to train the model to both predict the next token and externalize the information in the delimited spans, construct a KB from all such spans, and to emit retrieval queries to fetch spans from the KB as needed. The key to training the retrieval function is contrastive query pairs between documents and questions, allowing for both positive and negative pairs. Letxbe an input document with factual spans bracketed by<FACT>and</FACT>. For each factual span, we have a questionQ. The question is synthesized so its answer is the corresponding bracketed span inx, and it is appended with a query marker token<FACT-q>. The retrieval vectors at the query markers appended to the questions are used as positive examples for the contrastive retrieval loss. The pre-training panel of Figure 2 (middle) visualized how x and Q are used. Letp(x t |x <t ;Ξ)be the probability of the tokenx t in the sequence documentx, parameterized byΞ. In our model,p Ξ is computed by a Transformer. We denoteÏ t (x <t ;Ξ)as the features computed by the Transformer for index t in sequence x. 1 . This is the same Transformer used for p Ξ . We jointly minimize next-token prediction (NTP) and bidirectional contrastive losses. The NTP loss is:L NTP (Ξ) = â P t/âM logp(x t | x <t ;Ξ), whereMis the set of positions inxthat are strictly between<FACT>and</FACT>, inclusive of the closing</FACT>, but excluding the opening<FACT>. This NTP formulation means that we do not optimize our model to memorize the bracketed fact tokens, which represent the knowledge we aim to externalize. This is a critical design choice to externalize knowledge. We do optimize the loss of the opening<FACT>token, because the model 1 We L2-normalize the feature representations as they are used as retrieval queries [Chen et al., 2020]. 4 Figure 3: Annotation pipeline. Left: A frontier model annotates a small seed set of documents in the <FACT q=... a=...>span</FACT>format. Middle: We use the seed set to train two lightweight annotators: a fact span annotator that BIO-tags fact spans in raw text, and a question generator that produces a question-answer pair for each span; the document prefix is KV-cached and reused across all spans. Right: We run the two annotator over the full pre-training corpus, converting raw documents into the annotated pre-training corpus for CO-LMLM. must know to generate it in order to trigger retrieval. The closing</FACT>is appended mechanically, so does not require optimization. The contrastive loss treats each fact query from the documentxand its corresponding questionQas a positive pair, and all other questions as negatives. For a fact that starts at indextin a document x, letf = Ï t (x <t ;Ξ)be the query representation for retrieving this fact. Meaning, the feature representation for the<FACT>token opening this fact span. Correspondingly, for a questionQwhere the query marker<FACT-q>is at indext, letq = Ï t (Q <t )be the query representation. That is, the feature representation computed for<FACT-q>. We use the InfoNCE loss [van den Oord et al., 2018], compute on the current batch. LetB =(f (i) ,q (i) ) B i=1 be the set of all paired fact document queries f (i) and question queries q (i) in the current batch. For each (f (i) ,q (i) )â B, the loss terms are: â (i) fâq = log exp(f (i) · q (i) /Ï) P B k=1 exp(f (i) · q (k) /Ï) â (i) qâf = log exp(q (i) · f (i) /Ï) P B k=1 exp(q (i) · f (k) /Ï) ,(1) where Ï is a temperature hyperparameter. We average the two directions: L CL = â 1 2B B X i=1 â (i) fâq + â (i) qâf .(2) We optimize the joint lossL =L NTP + λL CL , with λ a hyperparameter set to 0.25 by default. Building the Index We build a dense retrieval index from our pre-training data. The index pairs vector keys with fact spans. We run the pre-trained language model over the pre-training corpus, extract the L2-normalized hidden stateÏ(·;Ξ)at every<FACT>position, and store it as a key in a dense vector index whose value is the verbatim in-text span at that position. Indexing a new corpus therefore requires only pre-processing it (Section 3.3) and a forward pass of CO-LMLM. 3.3 Training Data Pre-processing Training requires documents annotated with fact spans and paired questions (Section 3.2). We design an automated, scalable process to annotate raw pre-training data. The pre-processing pipeline has three stages: annotate a seed set with by prompting a state-of-the-art frontier LLM; fine-tune lightweight annotators on the seed data; and apply them to full pre-training corpus. Critically, we fine-tune smaller models because of the cost of annotating at scale with a large frontier model. Annotation Specification We annotate each training document with a set of fact spans. A fact span is a sub-string of a pre-training documentxthat encodes world knowledge we want our model to externalize â to retrieve rather than memorize. Each fact span is associated with two additional pieces of information: a context-dependent question that captures the retrieval intent at this position without itself carrying any factual content, and a snippet-form answer that answers the question in a form that need not match the surface form of the span. The question is used as the questionQduring training. An annotated fact takes the form <FACT q=question a=answer>span</FACT>. The annotation reflects three guidelines: (a) spans are the narrowest self-contained sub-string that fully answers the question; (b) questions are written as standalone search queries that name their 5 subject explicitly, and they avoid mentioning information that appears later in the document so that no future fact leaks through the question; and (c) answers vary the surface form of the span, so the model is exposed at training time to retrieved values that differ lexically from the surrounding context. We provide more details about the prompt used for the seed annotation in Appendix C. Annotation Pipeline Figure 3 visualizes the annotation pipeline. We first use Gemini-3.1-Pro to annotate a small seed of documents using theq="..."/a="..."format defined above. The seed set is then used to distill two efficient annotators for the entire pre-training corpus. The fact span annotator is a masked language model that detects fact spans on the original text via BIO tagging, 2 built on a ModernBERT encoder [Warner et al., 2025]. The question generator is a decoder-only generator that, conditioned on the document with span markers inserted, emits a question-answer pair for each tagged span; the document context is encoded once and reused across all facts. Why Two Annotators? A single end-to-end generator that produces the full annotated text in one shot is the obvious alternative. We chose the split design for three reasons. First, for efficiency reasons: the question generator only emits questions and answers, not the document text, which lets us prefill the document context once and reuse it across all of its facts. Second, predicting spans as offsets into the original text makes the annotations faithful by construction: the in-text span is always a verbatim substring of the source document, while a generative annotator can drift away from the source (i.e., hallucinate), especially on long documents. 3 Finally, indexing new data is highly efficient as it only involves two forward passes (one for the span annotator and one for CO-LMLM). 4 Experiments 4.1 Experimental Setup We train CO-LMLM using the SMOLLM2-135M and SMOLLM2-360M architectures, with a standard language model trained at each size as the STANDARD baseline. We use a high-quality Wikipedia corpus (âŒ3B tokens) 4 , following Zhao et al. [2026]. We train all models for 100K steps with a context length of 4,096 tokens. For a fair comparison with REL-LMLM, we train two REL-LMLM models based on the same SMOLLM2-135M and SMOLLM2-360M architectures. We provide additional REL-LMLM training details in Appendix A.5. In addition, we evaluate the generalization of our process to general web text by training CO-LMLM and a corresponding STANDARD baseline on 90B tokens sampled from FINEWEB-EDU [Penedo et al., 2024]. In all our retrieval experiments, we create the KB from the entire Wikipedia training corpus. This allows for a direct comparison with the REL-LMLM KB that is constructed from this same corpus. It also guarantees the KB does not cover information not available to the baselines. The CO-LMLM KB includes⌠240Mitems, compared to REL-LMLMâs⌠145M, demonstrating the less restricted, and more aggressive externalization of CO-LMLM. Appendix A.1 provides additional details. 4.2 Language Modeling Perplexity Evaluation Setup We evaluate using perplexity on 1,000 randomly sampled Simple English Wikipedia articles. 5 These articles are not included in our pretraining corpus, but their underlying facts are likely covered by our index in different surface forms, because the information in Simple Wikipedia is largely a subset of Wikipedia. This setup avoids coverage issues, and helps distinguish retrieval or annotation errors in CO-LMLM from imperfect parametric memorization in STANDARD. The focus on Wikipedia knowledge makes the comparison to off-the-shelf models complex, because of the domain shift. The key evaluation is between the models we train, controlling for the training data. We also report numbers for off-the-shelf models, even though the comparison is not as clean. We report two perplexity variants, following Zhao et al. [2026]. Static (Oracle) assumes perfect lookup behavior by supplying the correct retrieved spans as context, giving an optimistic estimate 2 BIO stands for begin-inside-outside [Ramshaw and Marcus, 1995]. 3 E.g. in preliminary experiments a LLAMA-3.2-1B [Grattafiori et al., 2024] model trained as the single generative annotator produced faithful annotations for only 33% of the documents. 4 https://huggingface.co/datasets/allenai/dolmino-mix-1124 5 https://simple.wikipedia.org/ 6 135M360M360M-FW Model 0 5 10 15 Perplexity â 11.6 9.1 14.4 14.0 9.6 11.8 10.5 7.7 8.0 7.4 5.8 Standard Standard HF Ref. Co-LMLM-Dyn. Co-LMLM-Stat. (a) Perplexity across model sizes Simple-WikiFineWeb Dataset 0 5 10 15 Perplexity â 9.1 12.0 9.6 12.2 8.0 14.4 8.0 11.1 5.8 10.0 Standard Standard HF Ref. Co-LMLM-Stat. Co-LMLM-Dyn. (Wiki 240M) Co-LMLM-Dyn. (Wiki+FW 2.2B) (b) Perplexity across index configurations Figure 4: Perplexity Evaluation. (a) Simple-Wiki test perplexity comparison between STANDARD and CO-LMLM across two model sizes (135M and 360M) and two training corpora (Wikipedia only vs. Wikipedia and FINEWEB-EDU). (b) Perplexities of STANDARD and CO-LMLM (FINEWEB), both with 360M-FW variants, on Simple-Wiki and FineWeb test splits under different KB index scales â 240M items from Wikipedia vs. 2.2B from Wikipedia and FINEWEB-EDU. We show two perplexity variants for CO-LMLM (dynamics and static). The dashed gray line reports the size-respective HF/SmolLM2 model standard PPL for context. The HF models are trained on much more data. The left figure uses PQ240 quantization, while the right uses PQ96 to maintain the same quantization and fit the larger KB in memory. 3040506070 NLU (%) 0 10 20 30 40 FactScore (%) 360M 135M 1.7B 360M 135M 360M 135M 360M 135M 360M-FW 360M-FW Standard Std. HF Ref. Rel-LMLM Co-LMLM (a) Factuality vs. NLU 02040 Unlearning Steps 10 11 10 9 10 7 10 5 10 3 10 1 Forget Quality (p-value ) 2e-24 p=0.05 02040 Unlearning Steps 0.3 0.4 0.5 0.6 0.7 Model Utility (-) Standard - Base Standard - Unlearn (NPO) Co-LMLM - Base Co-LMLM - Unlearn (b) Unlearning on TOFU Figure 5: Factuality, NLU, and Unlearning Evaluation. (a) FactScore and NLU tradeoff for various models â CO-LMLM substantially improves factual precision while preserving NLU performance comparable to models of similar size. (b) Machine unlearning on TOFU â CO-LMLM forgets through direct KB operations, without additional training or utility degredation. of language modeling quality. Dynamic performs actual lookups during decoding, so retrieval performance is reflected in the score. While dynamic follows the standard perplexity calculation, it introduces some complexities in our case. We discuss this in depth in Appendix A.6 and provide a worst-case analysis. Importantly, this worst-case analysis does not change our conclusions. Results Figure 4 visualizes perplexity results. CO-LMLM consistently achieves lower perplexity than STANDARD across model sizes and perplexity variants. Under the more realistic Dynamic setting, CO-LMLM reduces perplexity from 14.4 to 11.8 for 135M and from 14.0 to 10.5 for 360M. These gains suggest that our annotated pretraining data and training objective successfully improve language modeling over factual text. The FineWeb (FW) results indicate that benefit of data scale, charting an initial trends for scaling. The comparison to off-the-shelf models (HF/SMOLLM2-135M and HF/SMOLLM2-360M, dashed line) provides context. The relative gap CO-LMLM-360M-FW 7 Table 1: Factual precision evaluation. Green subscripts show the absolute difference from the respective STANDARD baseline. We provide * models for contextualization, even though they are trained on much larger corpora (2T/4T/11T tokens for 135M/360M/1.7B models). We report a rebuilt REL-LMLM baseline that follows the original setup with engineering improvements for a stronger, fairer comparison (Appendix A.5). Model Short-form QAKnowledge CompletionLong-form Generation TriviaQAâPopQAâSimpleQAâT-REx EMâFactScoreâ HF/SMOLLM2-135M â 14.718.91.336.19.0 STANDARD-135M6.415.20.138.210.4 REL-LMLM-135M13.427.26.242.923.1 CO-LMLM-135M28.4 +22.0 47.3 +32.1 18.2 +18.1 40.5 +2.3 35.0 +24.6 HF/SMOLLM2-360M â 25.422.71.445.812.5 STANDARD-360M7.516.20.346.310.0 STANDARD-360M-FW18.618.91.350.511.9 REL-LMLM-360M15.626.65.647.422.9 CO-LMLM-360M31.4 +23.9 46.5 +30.3 21.2 +20.9 47.4 +1.1 34.2 +24.2 CO-LMLM-360M-FW36.9 +18.3 50.6 +31.7 21.7 +20.4 54.5 +4.0 33.3 +21.4 HF/SMOLLM2-1.7B â 45.124.02.157.217.5 shows is particularly promising given the orders of magnitude more training data of the HF models. However, this experiment has a likely domain confounder, so we consider this result qualified. We also experiment with scaling up the index to include the entire FW and Wikipedia corpora used for training our models. This reflects a more realistic KB construction, both in source document diversity and size. This results in a much larger index of 2.2B entries, compared to the 240M entries in the Wiki-only index. Figure 4b reports results on both the Simple English Wikipedia dataset, as well as a 895-document held-out test set from the FW dataset. We compute these results with higher quantization for an additional 2.5Ămemory reduction per vector, so we can fit all indices in memory. We present results for both a Wikipedia-only index and a combined FW and Wikipedia index. We do not expect benefits from scaling up the index to include FW data for Simple-Wiki, because the corresponding knowledge is expected to be contained in the English Wikipedia dataset. Indeed, under the same quantization level, we only see a minor increase in perplexity even though the index is one order of magnitude larger, which speaks to the robustness of our learned retriever. For the FW test set, on the other hand, we observe a substantial improvement over the wiki-only index, producing a significantly lower perplexity than that of the HF/SMOLLM2-360M model, which is pretrained on those documents and overall much more data (4T tokens). The poor performance of the Wiki-only index on the FW test-set demonstrates Wikipediaâs limited coverage of knowledge and the need to scale up the factual KB. This result demonstrates effective scaling beyond Wikipedia data. 4.3 Factuality and General Benchmark Performance Evaluation Setup We evaluate factuality across five complementary settings that probe differ- ent forms of factual knowledge in pre-trained models. TriviaQA [Joshi et al., 2017] tests broad open-domain QA, while PopQA [Mallen et al., 2023] focuses on long-tail entities. SimpleQA Verified [hereafter SimpleQA; Wei et al., 2024, Haas et al., 2026] targets short-form, fact-seeking questions that are deliberately difficult and have a single, indisputable answer. T-REx [Petroni et al., 2021] evaluates controlled factual completion, where the model completes a factual statement with the correct object entity. FactScore [Min et al., 2023] evaluates long-form factual precision in biography generation by decomposing generations into atomic facts and verifying them against external evidence. We also evaluate CO-LMLM on standard NLU benchmarks to verify that factual offloading does not compromise language understanding. We use greedy decoding for all factuality evaluations. For REL-LMLM and CO-LMLM, retrieved factual spans are removed before scoring. The original REL-LMLM experiments in Zhao et al. [2026] use partial KB as an approximation, due to the computational costs of indexing the entire KB. We use the complete KB, leading to slightly different numbers compared to the original paper. Appendix A.6 provides additional details. ResultsTable 1 shows that CO-LMLM consistently improves over the corresponding STANDARD baselines, with especially large gains on short-form QA and FactScore, exceeding18points in each 8 case. Similar to perplexity, we report numbers for off-the-shelf models for contextualization, but under similar caveats. CO-LMLM also outperforms REL-LMLM, demonstrating that continuous queries are more robust than textual entity-relation queries. We attribute these gains to two factors: free-form factual spans provide richer external knowledge than relational triplets, and hidden-state queries can use the full generation context rather than a short and restricted decoded query. Training on FineWeb-Edu further improves short-form QA and knowledge completion, showing that our design remains effective beyond Wikipedia-style pretraining data. CO-LMLM-360M-FW achieves 21.7 on SimpleQA, in line with gpt-4o-mini and above Claude Sonnet 4.5 and Grok 2 according to the public leaderboard. 6 CO-LMLM achieves a better factuality-NLU trade-off that standard models, and benefits from the larger FineWeb-Edu pre-training data (Figure 5a). Table 12 in Appendix B.1 details NLU performance across tasks, further illustrating that CO-LMLM retains similar NLU capabilities, while achieving much higher factuality. Table 2: Comparison of RAG vs. CO-LMLM on factual precision. ModelTriviaQAPopQASimpleQAT-REx HF/SMOLLM2-360M â 25.422.71.445.8 + RAG52.236.917.986.7 STANDARD-360M-FW18.618.91.350.5 + RAG42.533.915.386.4 CO-LMLM-360M-FW36.950.621.754.5 + RAG48.851.827.886.5 * Off-the-shelf models trained on 4T general domain tokens. Comparison with RAG RAG and CO- LMLM are complementary: RAG expands inference-time context through document re- trieval, while CO-LMLM externalizes free- form factual knowledge during pretraining into an editable memory. We study the behavioral outcomes of CO-LMLM and a controlled RAG baseline, which uses BM25 to retrieve the top- 4 100-word Wikipedia passages and prepends them to the input during generation (Table 2). We also apply the same retrieval on top of CO-LMLM. RAG significantly improves factuality for standard LMs. Nevertheless, the superiority of CO-LMLM is mostly maintained in this setting as well, as RAG gains accumulate over the already-high factuality scores. This suggests that CO- LMLM+RAG is a viable path forward, where RAG provides broad document-level context, while CO-LMLM provides controllable, and editable factual memory. 4.4 Unlearning Externalizing knowledge simplifies unlearning: instead of retraining the model, we just remove the relevant entries from memory. We test whether CO-LMLM preserves this benefit while replacing relational queries with continuous queries. We evaluate this property with TOFU [Maini et al., 2024], following the same setup as REL-LMLM. TOFU tests whether a model can forget a designated forget set while preserving general utility. Its main metric, forget quality, tests whether the unlearned model is statistically indistinguishable from a retain-only model on the forgotten examples. Appendix A.7 provides additional details. Figure 5b shows how simple memory operations achieve effective forgetting (p-value> 0.05) while preserving model utility. In contrast, training-based unlearning methods such as NPO [Zhang et al., 2024b] update model parameters and sacrifice utility due to entangled parametric knowledge. CO-LMLM retains the controllability benefit of REL-LMLM while extending LMLMs to a more expressive and efficient continuous-query KB. 4.5 Knowledge Memorization Table 3: No KB retrieval ablation. Disabling retrieval substantially reduces performance. ModelTriviaQAPopQASimpleQAT-RExFactScore STANDARD-135M6.415.20.138.210.4 CO-LMLM-135M28.447.318.240.535.0 w/o KB4.7 â23.7 15.4 â31.9 1.0 â17.2 21.7 â18.8 18.0 â17.0 STANDARD-360M7.516.20.346.310.0 CO-LMLM-360M31.446.521.247.434.2 w/o KB6.0 â25.4 13.5 â33.0 0.7 â20.5 27.4 â20.0 18.7 â15.5 STANDARD-360M-FW18.618.91.350.511.9 CO-LMLM-360M-FW36.950.621.754.533.3 w/o KB9.2 â27.7 17.3 â33.3 0.5 â21.2 33.3 â21.2 16.2 â17.1 We test whether CO-LMLM reduces factual memorization by evaluating it without the KB. Table 3 shows that factual precision drops substantially, forcing the model to rely on its inter- nal parameters alone. This shows that CO-LMLM genuinely shifts factual knowledge from model weights to the external memory. 6 https://w.kaggle.com/benchmarks/deepmind/simpleqa-verified 9 Table 4: Comparison with LMLM-ASKER baseline. The three rightmost columns give the model- side query-formation cost per retrieval (milliseconds). CO-LMLM generates no query (Query Gen.= 0) and reads its query vector directly from the decoder hidden state â a single<FACT> forward (Encode). LMLM-ASKER instead decodes a natural-language question (âŒ13 tokens, Query Gen.) and re-encodes it with a separate sentence encoder (Encode). LM Overhead is their sum. We exclude the faiss lookup, which is shared by both methods and dominated by index placement (GPU/CPU) rather than the model. Red subscript denotes degradation w.r.t. CO-LMLM. Model TypeTriviaQAâPopQAâSimpleQAâT-RExâFactScoreâQuery Gen. (ms)âEncode (ms)âLM Overhead (ms)â LMLM-ASKER-360M-FW15.4 â21.5 43.2 â7.4 7.5 â14.2 38.5 â16.0 25.0 â8.3 27.51.128.6 Ă13 CO-LMLM-360M-FW36.950.621.754.533.30.02.22.2 4.6 Continuous vs. Natural Language Queries We isolate the impact of using continuous queries by comparing CO-LMLM to a LMLM-ASKER, a variant that generates free-form natural language questions as queries. LMLM-ASKER is trained on the same annotated corpus. It generates a<QUESTION>. . .</QUESTION>block before each factual span and retrieves using the decoded question, while CO-LMLM retrieves directly from the hidden state. Table 4 shows that CO-LMLM outperforms LMLM-ASKER, demonstrating that advantage of a continuous queries. Intuitively, questions are constrained by the structure of language, whereas the continuous queries can learn arbitrary retrieval mechanism. Inference Overhead Text queries also add generation cost: LMLM-ASKER writes a question of arbitrary length before every lookup, while REL-LMLM writes an entity-relation query. CO-LMLM instead produces the query from the hidden state, saving a cost that is linear in the length of the question. Empirically, forming a retrieval query costs CO-LMLM a singleâŒ2.2ms hidden-state forward, versusâŒ28ms for LMLM-ASKER, which is dominated by decoding theâŒ13-token question. We provide additional overhead comparisons in Appendix B.2. 4.7 Evaluating Query Timing Table 5: Enforced lookup ablation. We compare standard inference with a variant enforcing lookup before answering. ModelTriviaQAPopQASimpleQAT-REx CO-LMLM-135M28.447.318.240.5 w/ EnforceLookup31.7 +3.3 47.2 â0.1 19.3 +1.1 49.8 +9.3 CO-LMLM-360M31.446.521.247.4 w/ EnforceLookup33.4 +2.0 46.9 +0.4 21.5 +0.3 53.0 +5.6 CO-LMLM-360M-FW36.950.621.754.5 w/ EnforceLookup43.3 +6.4 53.3 +2.7 27.6 +5.9 59.3 +4.8 We evaluate the ability of our model to form queries when needed by forc- ing query generation before answer- ing short-form QA and knowledge- completion prompts. This setup dif- fers from earlier results in that the model is forced to retrieve, while still using the query content generated by the model. Table 5 shows that forcing to query increase performance on both model scales across four benchmarks, illustrating that our retrieval performance is inhibited by the timing problem, and there remains room for improvement. 5 Discussion We present CO-LMLM, a scalable method to train LLMs for verifiable and controllable use of knowledge. This includes a large-scale annotation pipeline that can be applied to hundreds of billions of tokens at relatively modest costs. Critically, the CO-LMLM training process, beyond the pre- processing step, departs only modestly from the conventional LLM training process that has been shown to scale to many trillions of both tokens and model parameters. Our method and results open an avenue to train LLMs with factuality, transparency, and control- lability properties that are sorely lacking in current LLMs, which has significantly hampered their trustworthiness and utility. CO-LMLM provides a flexible free-form span substrate for studying how externalized knowledge scales across broader knowledge domains, memory sizes, and retrieval mechanisms. This establishes a foundation for future work to study knowledge scaling laws. Our current study has several limitations that outline important directions for future work. Although we experiment along model and data scaling axes to outline scaling trends, our experiments remain modest in model and data scale. We focus on probing the behavior of CO-LMLM in controlled 10 pretraining settings, and leave larger-scale pretraining and downstream adaptation to future work. Our factual evaluations mainly target Wikipedia-style knowledge, a key factor in creating a clean experimental setup. Although, as shown, our pipeline can naturally extend to broader corpora such as FineWeb-Edu, there remains work to be done to systematically evaluate factuality across more diverse knowledge domains. Constructing a retrieval index at pretraining scale introduces a one-time computational cost. However, an important problem to address in the context of post-training and continual learning is how to adapt such an index once a model is fine-tuned. Studying these and many other important problems will be enabled by the scalable design of our methods, and by our large-scale release of annotations of Wikipedia and 100B FineWeb tokens. Acknowledgments and Disclosure of Funding This research was supported by AI-MI and NSF Award DMR-2433348; the NSF under awards OAC-2311521, IIS-2505098, RI-2530143, and 2118310; a gift to the LinkedInâCornell Bowers Strategic Partnership; Apple Research, Gemini credits grants from Google; and NASA under award No. 20-OSTFL20-0053. NG and DG are supported by an Empire AI Postdoctoral Fellowship. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation or of NASA. We thank the members of PIsâ labs for helpful discussions. Author Contributions Below we list the contributions of the primary non-faculty authors in the project. All authors took part in project discussions, experiment planning, and paper revisions. Yair Feldman designed and implemented the core method; trained the models; implemented the STANDARD and LMLM-ASKER baselines; conducted PPL and loss evaluations; wrote the paper. Linxi Zhao designed and implemented the REL-LMLM baseline; conducted FactScore, TOFU, QA, and NLU evaluations; and wrote the paper. Nathan Godey helped design pre-training runs. 11 References Mohammad Kalim Akram, Saba Sturua, Nastia Havriushenko, Quentin Herreros, Michael GĂŒnther, Maximilian Werk, and Han Xiao. jina-embeddings-v5-text: Task-targeted embedding distillation, 2026. URL https://arxiv.org/abs/2602.15547. Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi. Self-RAG: Learning to retrieve, generate, and critique through self-reflection. In International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=hSyW5go0v8. Vincent-Pierre Berges, Barlas O Ì guz, Daniel Haziza, Wen-tau Yih, Luke Zettlemoyer, and Gargi Ghosh. Memory layers at scale. In International Conference on Learning Representations, 2025. URL https://arxiv.org/abs/2412.09764. Yonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao, and Yejin Choi. PIQA: Reasoning about physical commonsense in natural language. In AAAI Conference on Artificial Intelligence, 2020. URL https://arxiv.org/abs/1911.11641. Sebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai, Eliza Rutherford, Katie Mil- lican, George van den Driessche, Jean-Baptiste Lespiau, Bogdan Damoc, Aidan Clark, Diego de Las Casas, Aurelia Guy, Jacob Menick, Roman Ring, Tom Hennigan, Saffron Huang, Loren Maggiore, Chris Jones, Albin Cassirer, Andy Brock, Michela Paganini, Geoffrey Irving, Oriol Vinyals, Simon Osindero, Karen Simonyan, Jack W. Rae, Erich Elsen, and Laurent Sifre. Improv- ing language models by retrieving from trillions of tokens. In International Conference on Machine Learning, 2022. URL https://proceedings.mlr.press/v162/borgeaud22a.html. Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In International Conference on Machine Learning, 2020. URL https://proceedings.mlr.press/v119/chen20j.html. Xin Cheng, Wangding Zeng, Damai Dai, Qinyu Chen, Bingxuan Wang, Zhenda Xie, Kezhao Huang, Xingkai Yu, Zhewen Hao, Yukun Li, Han Zhang, Huishuai Zhang, Dongyan Zhao, and Wenfeng Liang. Conditional memory via scalable lookup: A new axis of sparsity for large language models, 2026. URL https://arxiv.org/abs/2601.07372. Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try ARC, the AI2 reasoning challenge, 2018. URL https://arxiv.org/abs/1803.05457. Damai Dai, Li Dong, Yaru Hao, Zhifang Sui, Baobao Chang, and Furu Wei. Knowledge neurons in pretrained transformers. In Annual Meeting of the Association for Computational Linguistics, 2022. URL https://aclanthology.org/2022.acl-long.581/. Matthijs Douze, Alexandr Guzhva, Chengqi Deng, Jeff Johnson, Gergely Szilvasy, Pierre-Emmanuel MazarĂ©, Maria Lomeli, Lucas Hosseini, and HervĂ© JĂ©gou. The Faiss library. IEEE Transactions on Big Data, 2025. URL https://arxiv.org/abs/2401.08281. Zhengxiao Du, Aohan Zeng, Yuxiao Dong, and Jie Tang. Understanding emergent abilities of language models from the loss perspective. In Advances in Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=35DAviqMFo. Nelson Elhage, Tristan Hume, Catherine Olsson, Nicholas Schiefer, Tom Henighan, Shauna Kravec, Zac Hatfield-Dodds, Robert Lasenby, Dawn Drain, Carol Chen, et al. Toy models of superposition. arXiv preprint arXiv:2209.10652, 2022. Gaurav R. Ghosal, Pratyush Maini, and Aditi Raghunathan. Memorization sinks: Isolating mem- orization during LLM training. In International Conference on Machine Learning, 2025. URL https://proceedings.mlr.press/v267/ghosal25a.html. Aaron Grattafiori et al. The Llama 3 herd of models, 2024. URLhttps://arxiv.org/abs/2407. 21783. 12 Dirk Groeneveld, Iz Beltagy, Pete Walsh, Akshita Bhagia, Rodney Kinney, Oyvind Tafjord, Ananya Harsh Jha, Hamish Ivison, Ian Magnusson, Yizhong Wang, Shane Arora, David Atkin- son, Russell Authur, Khyathi Raghavi Chandu, Arman Cohan, Jennifer Dumas, Yanai Elazar, Yuling Gu, Jack Hessel, Tushar Khot, William Merrill, Jacob Morrison, Niklas Muennighoff, Aakanksha Naik, Crystal Nam, Matthew E. Peters, Valentina Pyatkin, Abhilasha Ravichander, Dustin Schwenk, Saurabh Shah, Will Smith, Emma Strubell, Nishant Subramani, Mitchell Worts- man, Pradeep Dasigi, Nathan Lambert, Kyle Richardson, Luke Zettlemoyer, Jesse Dodge, Kyle Lo, Luca Soldaini, Noah A. Smith, and Hannaneh Hajishirzi. OLMo: Accelerating the science of language models. In Annual Meeting of the Association for Computational Linguistics, 2024. URL https://aclanthology.org/2024.acl-long.841/. Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. REALM: Retrieval- augmented language model pre-training. In International Conference on Machine Learning, 2020. URL https://proceedings.mlr.press/v119/guu20a.html. Lukas Haas, Gal Yona, Giovanni DâAntonio, Sasha Goldshtein, and Dipanjan Das. Simpleqa verified: A reliable factuality benchmark to measure parametric knowledge, 2026. URLhttps: //arxiv.org/abs/2509.07968. Kelly Hong, Anton Troynikov, and Jeff Huber. Context rot: How increasing input tokens impacts LLM performance, 2025. URL https://research.trychroma.com/context-rot. Lei Huang, Xiaocheng Feng, Weitao Ma, Liang Zhao, Yuchun Fan, Weihong Zhong, Dongliang Xu, Qing Yang, Hongtao Liu, and Bing Qin. Advancing large language model attribution through self-improving. In Conference on Empirical Methods in Natural Language Processing, 2024. URL https://aclanthology.org/2024.emnlp-main.223/. Gautier Izacard and Edouard Grave. Leveraging passage retrieval with generative models for open domain question answering. In Conference of the European Chapter of the Association for Computational Linguistics, 2021. URL https://aclanthology.org/2021.eacl-main.74/. Gautier Izacard, Patrick Lewis, Maria Lomeli, Lucas Hosseini, Fabio Petroni, Timo Schick, Jane Dwivedi-Yu, Armand Joulin, Sebastian Riedel, and Edouard Grave. Atlas: Few-shot learning with retrieval augmented language models. Journal of Machine Learning Research, 2023. URL https://arxiv.org/abs/2208.03299. Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Annual Meeting of the Association for Computational Linguistics, 2017. URL https://aclanthology.org/P17-1147/. Nikhil Kandpal, Haikang Deng, Adam Roberts, Eric Wallace, and Colin Raffel. Large language models struggle to learn long-tail knowledge. In International Conference on Machine Learning, 2023. URL https://proceedings.mlr.press/v202/kandpal23a.html. Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. Generalization through memorization: Nearest neighbor language models. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=HklBjCEKvH. Guillaume Lample, Alexandre Sablayrolles, MarcâAurelio Ranzato, Ludovic Denoyer, and HervĂ© JĂ©gou. Large memory layers with product keys. In Advances in Neural Information Process- ing Systems, 2019. URLhttps://proceedings.neurips.c/paper_files/paper/2019/ hash/9d8df73a3cfbf3c5b47bc9b50f214aff-Abstract.html. Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich KĂŒttler, Mike Lewis, Wen tau Yih, Tim RocktĂ€schel, Sebastian Riedel, and Douwe Kiela. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural Information Processing Systems, 2020. URLhttps://proceedings.neurips.c/paper/ 2020/hash/6b493230205f780e1bc26945df7481e5-Abstract.html. Pratyush Maini, Zhili Feng, Avi Schwarzschild, Zachary C. Lipton, and J. Zico Kolter. TOFU: A task of fictitious unlearning for LLMs. In Conference on Language Modeling, 2024. URL https://openreview.net/forum?id=B41hNBoWLo. 13 Alex Mallen, Akari Asai, Victor Zhong, Rajarshi Das, Daniel Khashabi, and Hannaneh Hajishirzi. When not to trust language models: Investigating effectiveness of parametric and non-parametric memories. In Annual Meeting of the Association for Computational Linguistics, 2023. URL https://aclanthology.org/2023.acl-long.546/. Sewon Min, Kalpesh Krishna, Xinxi Lyu, Mike Lewis, Wen tau Yih, Pang Wei Koh, Mohit Iyyer, Luke Zettlemoyer, and Hannaneh Hajishirzi. FActScore: Fine-grained atomic evaluation of factual precision in long form text generation. In Conference on Empirical Methods in Natural Language Processing, 2023. URL https://aclanthology.org/2023.emnlp-main.741/. Ali Modarressi, Abdullatif Köksal, Ayyoob Imani, Mohsen Fayyaz, and Hinrich SchĂŒtze. MemLLM: Finetuning LLMs to use an explicit read-write memory, 2024. URLhttps://arxiv.org/abs/ 2404.11672. Niklas Muennighoff, Hongjin Su, Liang Wang, Nan Yang, Furu Wei, Tao Yu, Amanpreet Singh, and Douwe Kiela. Generative representational instruction tuning. In International Conference on Learning Representations, 2025. URL https://arxiv.org/abs/2402.09906. Guilherme Penedo, Hynek KydlĂ Ë cek, Loubna Ben Allal, Anton Lozhkov, Margaret Mitchell, Colin Raffel, Leandro Von Werra, and Thomas Wolf.The FineWeb datasets: Decanting the web for the finest text data at scale.In Advances in Neural Information Processing Systems, 2024.URLhttps://proceedings.neurips.c/paper_files/paper/2024/ hash/370df50ccfdf8bde18f8f9c2d9151bda-Abstract-Datasets_and_Benchmarks_ Track.html. Guangyue Peng, Tao Ge, Si-Qing Chen, Furu Wei, and Houfeng Wang. Semiparametric language models are scalable continual learners, 2023. URL https://arxiv.org/abs/2303.01421. Fabio Petroni, Tim RocktĂ€schel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H. Miller, and Sebastian Riedel. Language models as knowledge bases? In Conference on Empirical Methods in Natural Language Processing, 2019. URL https://aclanthology.org/D19-1250/. Fabio Petroni, Aleksandra Piktus, Angela Fan, Patrick Lewis, Majid Yazdani, Nicola De Cao, James Thorne, Yacine Jernite, Vladimir Karpukhin, Jean Maillard, Vassilis Plachouras, Tim RocktĂ€schel, and Sebastian Riedel. KILT: a benchmark for knowledge intensive language tasks. In Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2021. URL https://aclanthology.org/2021.naacl-main.200/. Hadi Pouransari, David Grangier, C Thomas, Michael Kirchhof, and Oncel Tuzel. Pretraining with hierarchical memories: separating long-tail and common knowledge, 2026. URLhttps: //arxiv.org/abs/2510.02375. Qwen et al. Qwen2.5 technical report, 2024. URL https://arxiv.org/abs/2412.15115. Lance Ramshaw and Mitchell Marcus. Text chunking using transformation-based learning. In Workshop on Very Large Corpora, 1995. URL https://aclanthology.org/W95-0107/. Adam Roberts, Colin Raffel, and Noam Shazeer. How much knowledge can you pack into the parameters of a language model? In Conference on Empirical Methods in Natural Language Processing, 2020. URL https://aclanthology.org/2020.emnlp-main.437/. Maarten Sap, Hannah Rashkin, Derek Chen, Ronan LeBras, and Yejin Choi. SocialIQA: Com- monsense reasoning about social interactions. In Conference on Empirical Methods in Natural Language Processing, 2019. URL https://aclanthology.org/D19-1454/. Timo Schick, Jane Dwivedi-Yu, Roberto DessĂŹ, Roberta Raileanu, Maria Lomeli, Eric Hambro, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. Toolformer: Language models can teach themselves to use tools. In Advances in Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=Yacmpz84TH. Weihang Su, Yichen Tang, Qingyao Ai, Zhijing Wu, and Yiqun Liu.DRAGIN: Dynamic retrieval augmented generation based on the real-time information needs of large language models. In Annual Meeting of the Association for Computational Linguistics, 2024. URL https://aclanthology.org/2024.acl-long.702/. 14 Alicia Yi Sun, Karthik Padthe, Akari Asai, and Wen-tau Yih. Semi-parametric language model with selective memory, 2025. Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. CommonsenseQA: A question answering challenge targeting commonsense knowledge. In Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2019. URL https://aclanthology.org/N19-1421/. Albert Tseng and Christopher De Sa. L 3 : Large lookup layers, 2026. URLhttps://arxiv.org/ abs/2601.21461. Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding, 2018. URL https://arxiv.org/abs/1807.03748. Xi Wang, Taketomo Isazawa, Liana Mikaelyan, and James Hensman. KBLaM: Knowledge base augmented language model. In International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=aLsMzkTej9. Benjamin Warner, Antoine Chaffin, Benjamin ClaviĂ©, Orion Weller, Oskar Hallström, Said Taghadouini, Alexis Gallagher, Raja Biswas, Faisal Ladhak, Tom Aarsen, Griffin Thomas Adams, Jeremy Howard, and Iacopo Poli. Smarter, better, faster, longer: A modern bidirectional encoder for fast, memory efficient, and long context finetuning and inference. In Annual Meeting of the Association for Computational Linguistics, 2025. URLhttps://aclanthology.org/2025. acl-long.127/. Jason Wei, Nguyen Karina, Hyung Won Chung, Yunxin Joy Jiao, Spencer Papay, Amelia Glaese, John Schulman, and William Fedus. Measuring short-form factuality in large language models, 2024. URL https://arxiv.org/abs/2411.04368. Yuhuai Wu, Markus N. Rabe, DeLesley Hutchins, and Christian Szegedy. Memorizing transformers. In International Conference on Learning Representations, 2022. URLhttps://openreview. net/forum?id=TrjbxzRcnf-. Hongkang Yang, Zehao Lin, Wenjin Wang, Hao Wu, Zhiyu Li, Bo Tang, Wenqiang Wei, Jinbo Wang, Zeyun Tang, Shichao Song, et al. Memory 3 : Language modeling with explicit memory, 2024. URL https://arxiv.org/abs/2407.01178. Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. HellaSwag: Can a machine really finish your sentence? In Annual Meeting of the Association for Computational Linguistics, 2019. URL https://aclanthology.org/P19-1472/. Jintian Zhang, Cheng Peng, Mengshu Sun, Xiang Chen, Lei Liang, Zhiqiang Zhang, Jun Zhou, Huajun Chen, and Ningyu Zhang. OneGen: Efficient one-pass unified generation and retrieval for LLMs. In Findings of the Association for Computational Linguistics: EMNLP 2024, 2024a. URL https://aclanthology.org/2024.findings-emnlp.797/. Ruiqi Zhang, Licong Lin, Yu Bai, and Song Mei. Negative preference optimization: From catastrophic collapse to effective unlearning. In Conference on Language Modeling, 2024b. URLhttps: //openreview.net/forum?id=MXLBXjQkmb. Wenzheng Zhang, Xi Victoria Lin, Karl Stratos, Wen-tau Yih, and Mingda Chen. ImpRAG: Retrieval- augmented generation with implicit queries. In Findings of the Association for Computational Linguistics: EMNLP 2025, 2025. URL https://arxiv.org/abs/2506.02279. Linxi Zhao, Sofian Zalouk, Christian K Belardi, Justin Lovelace, Jin Peng Zhou, Ryan Thomas Noonan, Dongyoung Go, Kilian Q Weinberger, Yoav Artzi, and Jennifer J Sun. Pre-training limited memory language models with internal and external knowledge, 2026. URLhttps: //arxiv.org/abs/2505.15962. 15 A Experimental Setup A.1 Pre-training Hyperparameters We pretrain CO-LMLM from random weights following a Warmup-Stable-Decay (WSD) learning- rate schedule. Table 6 lists the hyperparameters used to train CO-LMLM. The STANDARD baseline language model and LMLM-ASKER are trained with the same hyperparameters, except for those that apply only to the contrastive loss (contrastive loss weight, contrastive temperature, and max question length). For the FineWeb-Edu run, the cooldown stage mixes the annotated Wikipedia and FineWeb-Edu datasets in a 1:1 ratio. Table 6: Pre-training hyperparameters for CO-LMLM. HyperparameterValue architectureSmolLM2 (random init) tokenizerSmolLM2 optimizerAdamW ÎČ 1 0.9 ÎČ 2 0.95 Δ1e-8 clip norm1 peak learning rate5e-4 final learning rate0 lr scheduler typeWSD warmup steps2,000 stable steps88,000 (148,000 for FineWeb-Edu) cooldown steps10,000 (20,000 for FineWeb-Edu) weight decay0.01 batch size128 max context length4,096 max question length128 contrastive temperature0.07 precisionbf16 (fp32 master weights) A.2 Annotator Training We use Gemini 3.1 Pro to annotate a seed set of60,000documents (15,000Wikipedia articles and 45,000FineWeb-Edu documents), and train the fact-span annotator and the question generator on this seed set. The fact-span annotator is a ModernBERT-large [Warner et al., 2025] encoder fine-tuned for BIO token classification (Table 7). The question generator is a Qwen2.5-1.5B-Instruct [Qwen et al., 2024] decoder fine-tuned with LoRA (Table 8). A.3 Compute For all experiments involving model training except TOFU, between 1 to 8 NVIDIA B200 GPUs were used, depending on availability. The number of gradient accumulation steps was set dynamically to maintain a consistent batch size throughout training. For the TOFU unlearning experiments, a single NVIDIA RTX A6000 GPU was used. A.4 Retrieval Indexes We use the Faiss library [Douze et al., 2025] for all our experiments involving building dense search indexes. To limit RAM usage, we use the following factory string for constructing our indices:OPQ<d/4>,IVF65536,PQ<d/4>, wheredis dimension of the embedder being used. For our REL-LMLM and LMLM-ASKER experiments, we use thejina-embeddings-v5-text-nano embedder [Akram et al., 2026], truncated to 512 dimensions. We did not extensively explore the retrieval errors that can be attributed to the lossy compression applied by the search indexes for either of the models presented in this paper. 16 Table 7: Hyperparameters for training the fact-span annotator. HyperparameterValue base modelModernBERT-large optimizerAdamW ÎČ 1 0.9 ÎČ 2 0.95 Δ1e-8 clip norm1 peak learning rate2e-4 final learning rate2e-5 lr scheduler typecosine warmup ratio0.05 weight decay1e-3 epochs4 batch size32 max sequence length4,096 precisionbf16 Table 8: Hyperparameters for training the question generator. HyperparameterValue base modelQwen2.5-1.5B-Instruct LoRA r64 LoRA α64 LoRA dropout0.05 LoRA target modulesall-linear optimizerAdamW ÎČ 1 0.9 ÎČ 2 0.95 Δ1e-8 clip norm1 peak learning rate2e-4 final learning rate2e-5 lr scheduler typecosine warmup ratio0.05 weight decay1e-3 epochs4 batch size4 max sequence length8,192 precisionbf16 A.5REL-LMLM Re-implementation For a controlled comparison against CO-LMLM, we reimplement the LMLM pretraining pipeline with several engineering improvements over the original recipe. These changes do not affect the conclusions of the original REL-LMLM work. They improve data efficiency and align the training setup with CO-LMLM, yielding a stronger REL-LMLM baseline and a more rigorous apples-to- apples comparison. The changes fall into two groups. Annotation quality and quantity. The largest gain is in the quantity of usable pretraining data (summarized in Table 9). The original pipeline truncates each document to 1024 tokens before annotation. Annotating full documents instead recovers a substantial fraction of the Wikipedia subset of the OLMo2dolmino-mix-1124corpus [Groeneveld et al., 2024] 7 (roughly 30% of documents and about half of the available pretraining tokens were previously discarded), raising the usable set from 2.8B to 6.1B tokens (including DB lookup tokens). 7 https://huggingface.co/datasets/allenai/dolmino-mix-1124 17 Table 9: Annotation configuration updates from the original REL-LMLM release to the re- built, stronger baseline used in this paper.Token counts are for the Wikipedia subset of dolmino-mix-1124. VersionSeed annotatorProduction annotatorInput trunc.DB formatEst. tokens OriginalGPT-4oLlama3-8B-Instruct (LoRA)1024 tok/doc [dblookup(â)->]2.8B RebuiltGPT-4oQwen3-4B (full FT)nonespecial tokens6.1B On the quality side, we emit the special-token database-call format directly during annotation rather than converting from the textual[dblookup(ââ)->]markup before pretraining, removing a conversion step and keeping annotations consistent end-to-end. We also improve prompting, enlarge the seed annotation set, and avoid overfitting (12,750 examples for 3 epochs versus the original 2k examples for 10 epochs), and replace the LoRA-tuned Llama3-8B-Instruct production annotator with a fully fine-tuned Qwen3-4B for better quality and efficiency. Identical backbone and training configuration.Throughout this paper, we report results for the rebuilt REL-LMLM. To isolate the effect of the method, we match the model backbone and all training hyperparameters (batch size, number of steps, learning-rate schedule, etc.) to CO-LMLM. With the data pipeline improved and the training setup held fixed, remaining differences between the two methods reflect the method itself rather than the experimental setup. This yields a substantially stronger REL-LMLM baseline than the original release. CO-LMLMâs improvements over this matched, well-tuned baseline therefore reflect the method itself, not an advantage in experimental setup. A.6 Evaluation Perplexity Zhao et al. [2026] introduced three perplexity variations for LMLM models: static (Oracle), normalized, and dynamic. The static and dynamic variants are described in Section 4.2, but are recited here for completeness. Static perplexity assumes perfect lookup behavior by supplying the correct retrieved spans as context, giving an optimistic estimate of language modeling quality. Dynamic perplexity performs actual lookups during decoding, so retrieval performance is reflected in the score. Normalized perplexity additionally scores the lookup-trigger tokens the model emits, and divides by the length of the original unannotated text. Normalized perplexity is informative for REL-LMLM, where the lookup tokens include a decoded query whose quality is being measured. For CO-LMLM, the only emitted lookup token is a single<FACT>delimiter, since the query is read from the hidden state rather than decoded as text, so normalized perplexity for CO-LMLM additionally measures only whether retrieval is triggered at the right position. We therefore treat dynamic and static perplexity as the primary metrics. Formally, letxbe an input document with factual spans bracketed by<FACT>and</FACT>, andT the set of token positions inx. LetM â Tbe the set of positions inxthat are strictly between<FACT> and</FACT>, inclusive of both the opening<FACT>and closing</FACT>. Finally, letM = T \ M. We define the static and dynamic perplexity as follows: PPL static/dynamic = exp ïŁ« ïŁ â 1 |M| X tâ M logp Ξ (x t | x <t ) ïŁ¶ ïŁž , where the only difference between the two is the source of the factual spans: static uses the oracle spans paraphrased by the annotator, and dynamic issues actual retrieval and inserts the retrieved fact into the span. The dynamic perplexity metric is the more realistic of the set, and follows conventional perplexity computation. However, the nuances of CO-LMLM introduces some complexities in its measurement, and make it somewhat optimistic. This is because it does not take into account the probability of the model correctly generating the<FACT>token at that precise position. An accurate and comparable perplexity measure is not trivial to compute since the fact-annotated text only defines one possible way to generate the original context tokens, and accounting for all possible retrieval paths is intractable. Furthermore, directly accounting for the<FACT>tokenâs loss will not be accurate as well since it will 18 135M360M360M-FW Model 0 5 10 15 Perplexity â 11.6 9.1 14.4 14.0 9.6 12.6 11.2 8.2 11.8 10.5 7.7 8.0 7.4 5.8 Standard Standard HF Ref. Co-LMLM-Dyn-Norm Co-LMLM-Dyn. Co-LMLM-Stat. Figure 6: Perplexity evaluation with the dynamic-normalized PPL variant. Validation perplexity comparison between STANDARD and CO-LMLM across three perplexity variants. The dashed gray line provides reports the size-respective SmolLM2 model standard PPL for context. Even when using the pessimistic dynamic-normalized perplexity measure, CO-LMLM achieves significantly lower perplexity than the corresponding SMOLLM2-360M model trained on an order of magnitude more tokens. introduce additional context tokens, presenting a mismatch between LMLM and standard LMs in the denominator|M|used in the perplexity calculation. It also changes the vocabulary by introducing a new, fairly common token. These factors may lead to an overly optimistic measure as well. We address this issue with an additional dynamic-normalized perplexity measure, which includes the <FACT>tokenâs loss in the enumerator but keeps it out of the denominator. This normalized measure is a worst case scenario, in practice allowing us to compute a range between itself and the optimistic dynamic measure. Formally, letM F be the set of positions inxthat contain the<FACT>token. We define the dynamic- normalized perplexity as follows: PPL dynamic-norm = exp ïŁ« ïŁ â 1 |M| X tâ MâȘM F logp Ξ (x t | x <t ) ïŁ¶ ïŁž . This provides us with a pessimistic estimation of the perplexity, ensuring that the actual, realistic perplexity lies betweenPPL dynamic andPPL dynamic-norm . Figure 6 provides results for all perplex- ity variants. Critically, this worst-case scenario does not change the ordering of models, or our conclusions. Long-Form Generation: FactScore We evaluate factual precision using FACTSCORE [Min et al., 2023], a benchmark for open-ended biography generation. Given a generated biography, FactScore decomposes it into atomic facts and measures the proportion that can be verified against a trusted knowledge source via retrieval-augmented ChatGPT. We use the labeled entities set from the benchmark, which includes 183 entities. All models use greedy decoding with a maximum content budget of 256 tokens and a repetition penalty of 1.2. For models with external lookup (e.g., LMLM-RETRIEVER and LMLM-STRUCTURED), this budget applies only to the final textual output and excludes any inserted lookup spans (e.g., <FACT>...</FACT>or<|db_*|>blocks). To provide a fair probe for models pretrained primarily on Wikipedia (and not instruction-tuned or exposed to more diverse corpora), we adopt a fixed Wikipedia-style prompt â<name> <name>â to elicit biography completions, applied uniformly across all samples. For evaluation, all lookup-related annotation tokens are stripped before scoring. We follow the official FactScore pipeline, using retrieval-augmented prompting with GEMINI-2.5- FLASH. 8 8 https://github.com/shmsw25/FActScore 19 We use greedy decoding for all factuality benchmarks, including FactScore, T-REx, PopQA, TriviaQA and SimpleQA. The retrieval similarity threshold is set to 0.7; when no match is found, the model falls back to standard decoding, allowing it to answer facts absent from the database. Annotation tokens from retrieval or structured lookup are removed before scoring. Short-Form Knowledge Completion: T-RExWe adopt T-REx from LAMA [Petroni et al., 2019] as a knowledge completion benchmark for autoregressive models. Following Schick et al. [2023], we retain only examples compatible with left-to-right generation, resulting in 11,615 instances where the masked entity appears at the end of the sentence. Each input is a partially observed factual statement, and the model is required to complete it with the correct object entity. We use greedy decoding with a maximum of 32 generated tokens. Performance is measured by Exact Match, which checks whether the reference answer appears within the first five generated content tokens after stripping annotation tokens. Short-Form Probing: PopQA, TriviaQA and SimpleQA We further evaluate factual recall on question-answering benchmarks, focusing on the long-tail subset of PopQA [Asai et al., 2024], which contains 1,399 queries about rare entities (fewer than 100 monthly Wikipedia page views), the full TriviaQA evaluation set (17,944 examples), and the full SimpleQA evaluation set (4,326 examples). These benchmarks probe knowledge recall under both sparse and broad coverage regimes. All models use greedy decoding with a maximum of 32 tokens. For PopQA and TriviaQA, evaluation is based on Exact Match, defined as whether any alias in the set of gold answers appears (case- insensitive) within the first 100 characters of the model output. For SimpleQA, we follow the official grading prompt and use GPT-4.1-2025-04-14 as the grader model. We report the overall correct metric. A.7 Machine Unlearning Setting TOFU unlearning. The TOFU unlearning benchmark [Maini et al., 2024] evaluates selective unlearning in a controlled question-answering setting. It contains 200 synthetic author profiles, each associated with 20 question-answer pairs, resulting in 4,000 QA examples in total. The benchmark partitions this synthetic knowledge into a Forget Set, containing the examples to be removed, and a Retain Set, containing the remaining synthetic author knowledge that should be preserved. In addition to synthetic biographies, TOFU evaluates whether unlearning preserves broader model behavior using two auxiliary sets: the Real Author Set, which contains factual questions about real authors, and the World Facts Set, which contains general factual knowledge. The target behavior is that the resulting Unlearned Model should forget the Forget Set while remaining statistically close to a Retain Model, which is trained only on the Retain Set, and should maintain utility on the Retain Set, Real Author Set, and World Facts Set. TOFU reports two main categories of metrics. Forget Quality measures whether the unlearned model behaves similarly to the retain model on the Forget Set, using a statistical test whosep-value indicates whether the two output distributions are distinguishable. A higherp-value indicates better forgetting, with values above 0.05 commonly interpreted as failing to reject the hypothesis that the unlearned model and retain model behave similarly. Model Utility measures whether useful behavior is preserved after unlearning. It aggregates three metrics: ROUGE, which measures the lexical overlap between generated and reference answers; Answer Probability, which measures the likelihood assigned to the correct answer; and Truth Ratio, which compares the likelihood assigned to correct answers against paraphrased or perturbed alternatives. These utility metrics are evaluated across the Retain Set, Real Author Set, and World Facts Set to capture both retained synthetic knowledge and general factual capability. We evaluate on the TOFU Forget 5% setting using the official evaluation pipeline from the TOFU repository 9 . For CO-LMLM, we augment the external Wikipedia knowledge base from pre-training with TOFUâs synthetic author biographies and fine-tune CO-LMLM-360M-FW on the annotated TOFU training set using the same hyperparameters as the baseline models in Table 10. To perform unlearning, we delete the database entries corresponding to the Forget Set, without any additional gradient updates. This directly tests whether externalizing factual knowledge enables training-free removal of targeted information. 9 https://github.com/locuslab/open-unlearning 20 NPO unlearning baseline.We compare against HF/SMOLLM2-360M fine-tuned with Negative Preference Optimization (NPO) [Zhang et al., 2024b], a strong gradient-based unlearning baseline. We run NPO unlearning fine-tuning with five random seeds and report the mean and variance in Figure 5b. For ROUGE evaluations, generated answers are post-processed to remove structured factual spans before computing scores. For likelihood-based metrics, including Answer Probability and Truth Ratio, we evaluate the model probabilities with answer masking. Table 10: TOFU fine-tuning configuration. SettingValue Base modelHF/SMOLLM2-360M / CO-LMLM (FINEWEB) Training setsTOFU full / retain95 Template Question: / Answer: Learning rate3Ă 10 â5 Epochs10 CheckpointsFull model and retain model Table 11: NPO training configuration on TOFU. SettingValue InitializationFull TOFU fine-tuned checkpoint Forget / retain split forget05 / retain95 ObjectiveNPO, ÎČ = 0.1 Learning rate6Ă 10 â5 Per-device batch size32 Gradient accumulation1 Epochs8 Seeds0, 42, 69, 420, 4497 A.8 Ablation Setting RAG Setting.We include a simple inference-time RAG baseline as a point of reference, following Lewis et al. [2020], adopting the global RAG setting of FlashRAG 10 . For each prompt, we use BM25 to retrieve the top-4 relevant 100-word passages from the 2018 English Wikipedia dump and prepend them to the original input using the prompt format:Answer the question or complete the prompt based on the given document. The following are given documents: [retrieved passages] [original prompt] The answer is. The retrieved passages are joined with newlines. We use the same generation setup as the corresponding non-RAG model. No KB Retrieval Ablation. To measure how much factual performance depends on access to the learned external memory, we evaluate a no-retrieval variant of our model. In this setting, we disable the modelâs ability to trigger KB retrieval during generation. Concretely, for continuous-query models, we apply a logit bias ofâ100to all factual special tokens that initiate or delimit retrieval spans. This prevents the model from emitting the markup required to invoke the retrieval loop, forcing it to generate plain text from its parameters alone. This ablation isolates the contribution of external memory access from the modelâs parametric knowledge. Enforced Lookup Ablation.We also evaluate an enforced-lookup setting to test whether additional retrieval improves factuality when the model does not choose to query on its own. In this setting, we force a lookup at the beginning of every prompt, before normal generation begins. For continuous- query retriever models, we prepend a<FACT>token, run a forward pass to obtain the hidden state at this position, project it into the retrieval space, and perform a FAISS search before the first generation step. If the query extraction fails under similarity threshold of 0.7, we remove the forced prefix and continue generation while temporarily forbidding another <FACT> token. 10 https://github.com/RUC-NLPIR/FlashRAG/blob/main/docs/original_docs/baseline_details.md# global-setting 21 B Additional Results B.1 NLU Evaluation Table 12: Evaluation on NLU benchmarks (5-shot). Performance remains comparable while improving factual capabilities. Values are mean±std over 3 few-shot exemplar seeds. ModelCSQAHellaSwagPIQASIQAARC EasyCoreAvg Random Chance20.025.050.033.325.030.7 REL-LMLM-135M29.9 ±0.7 29.6 ±0.2 57.3 ±0.3 40.6 ±0.7 41.0 ±0.5 39.7 ±0.1 STANDARD-135M27.1 ±0.2 28.7 ±0.1 55.9 ±0.3 40.6 ±0.3 39.8 ±0.1 38.4 ±0.1 CO-LMLM-135M26.7 ±0.2 29.2 ±0.2 56.0 ±0.6 40.2 ±0.2 40.1 ±0.3 38.5 ±0.2 REL-LMLM-360M31.7 ±0.7 32.9 ±0.1 59.7 ±0.6 41.3 ±0.8 45.0 ±0.9 42.1 ±0.5 STANDARD-360M32.0 ±0.1 31.6 ±0.2 59.5 ±0.7 41.4 ±0.1 44.6 ±0.2 41.8 ±0.1 CO-LMLM-360M29.4 ±0.1 31.9 ±0.1 57.1 ±0.4 40.5 ±0.6 44.3 ±0.4 40.6 ±0.2 STANDARD-360M-FW46.0 ±0.4 47.3 ±0.4 69.4 ±0.0 44.0 ±0.4 68.4 ±0.3 55.0 ±0.1 CO-LMLM-360M-FW48.3 ±0.8 46.9 ±0.1 68.9 ±0.2 45.2 ±0.3 66.1 ±0.0 55.1 ±0.3 HF/SMOLLM2-135M â 46.3 ±0.6 42.4 ±0.0 67.6 ±0.1 45.6 ±1.1 66.9 ±0.4 53.8 ±0.2 HF/SMOLLM2-360M â 57.8 ±0.4 55.9 ±0.2 72.6 ±0.1 48.2 ±0.5 72.7 ±0.4 61.4 ±0.0 HF/SMOLLM2-1.7B â 66.2 ±0.8 71.6 ±0.2 78.2 ±0.2 53.2 ±0.5 80.1 ±0.3 69.9 ±0.3 Following the REL-LMLM evaluation, we assess whether CO-LMLM preserves the general language understanding ability of the pretrained model. We evaluate on the same set of high-signal NLU benchmarks with few-shot prompting used in prior work: CommonsenseQA [Talmor et al., 2019], HellaSwag [Zellers et al., 2019], PIQA [Bisk et al., 2020], SIQA [Sap et al., 2019], and ARC Easy [Clark et al., 2018]. As in REL-LMLM, we exclude benchmarks where similarly sized models perform near the noise floor [Du et al., 2024]. All evaluations are run with lighteval 11 . Because STANDARD and CO-LMLM are pretrained only on Wikipedia, and CO-LMLM-360M-FW is pretrained with fewer than 100B tokens, these benchmarks are not meant for direct compari- son with off-the-shelf models trained on broader and much larger corpora (2T/4T/11T tokens for the 135M/360M/1.7B models). Rather, they provide a controlled check that externalizing factual knowledge does not harm general NLU performance. B.2 Inference Efficiency We analyze the inference overhead of LMLM-ASKER and CO-LMLM, focusing on the per-retrieval cost of forming a retrieval query: the work each model performs, beyond decoding the answer content, to issue a single lookup. The key algorithmic difference is how the retrieval query is formed. LMLM-ASKER explicitly decodes a textual lookup question and then encodes it with a sentence-transformer query encoder. In contrast, CO-LMLM retrieves directly from the model hidden state at a continuous query token. This token requires one additional forward step. As summarized in Table 13, CO-LMLM therefore avoids both textual query generation and sentence-transformer query encoding, reducing decoding cost byK Ì L q tokens per answer and the KV-cached context length byK( Ì L q + 1)tokens per answer. Measuring per-retrieval overhead. Measuring this overhead from free-form generation is con- founded: LMLM-ASKER and CO-LMLM trigger different numbers of retrievals, at different positions, and produce different amounts of content, so end-to-end latency entangles the cost of the retrieval mechanism with these behavioral differences and with a varying context length at each lookup. We therefore measure at fixed retrieval sites, using the gold-annotated documents of our dynamic-perplexity evaluation set (Section 4.2): at every gold<FACT>position each model forms a query from its own context prefix, yielding a controlled, per-retrieval comparison on identical sites and contexts. For each fact we first prefill the context prefix to warm the KV cache, so that the timing 11 https://github.com/huggingface/lighteval 22 Table 13: Theoretical efficiency comparison. Compared with LMLM-ASKER, CO-LMLM removes explicit textual query generation and sentence-transformer query encoding. ComponentLMLM-ASKERCO-LMLMDifference Decoding-time cost Content tokensCC0 Decoded query tokensK Ì L q 0âK Ì L q Query start tags2KâK Continuous query token (not cached)0K Prefilling cost Injected answer tokensK Ì L a K Ì L a 0 Retrieval end tagKK0 Retrieval-time cost Retrievals per answerKK0 Sentence-transformer query encoding K0âK encodes FAISS searchK at (d a ,M a )K at (d r ,M r )index-dependent Total context token lengthC + K( Ì L q + Ì L a + 3) C + K( Ì L a + 2) âK( Ì L q + 1) excludes prefilling, which is shared and independent of the retrieval mechanism. We then time only the query-formation step: for CO-LMLM, the single forward pass that produces the continuous query token from the hidden state; for LMLM-ASKER, decoding the textual question up to</QUESTION> followed by encoding it with thejina-embeddings-v5-text-nanoquery encoder. We exclude the FAISS search itself, which is common to both methods and dominated by index placement (GPU vs. CPU) rather than the model. The language-model steps (CO-LMLMâs query forward and LMLM-ASKERâs question decoding) are timed with vLLM inbfloat16at batch size 1 on the 360M FineWeb-Edu checkpoints, and the query encoder (jina-embeddings-v5-text-nano) in bfloat16with FlashAttention-2. Throughout we report the underlying forward/decode compute, subtracting the fixed per-invocation overhead consistently for both models: at batch size 1 a single .encode()call orgeneratestep is dominated by framework and hostâdevice-transfer cost rather than the forward. For instance the encoderâsâŒ46ms single-query wall time isâŒ45ms fixed overhead and onlyâŒ1ms forward, as isolated by batch-scaling (32 queries encode in the sameâŒ46ms wall as one). We report medians overâŒ1.5K facts. As shown in Table 4, CO-LMLM forms its query in a singleâŒ2.2ms<FACT>forward, whereas LMLM-ASKER spendsâŒ27ms decoding the textual question (âŒ13tokens) plusâŒ1ms for the encoder forward, about28ms in total, aâŒ13Ăhigher per-retrieval overhead. Notably, the encoder forward itself is cheap, so the gap comes almost entirely from decoding the query text, exactly the K Ì L q token saving of Table 13 that CO-LMLM realizes by querying from the hidden state. B.3 Additional Unlearning Results Beyond Figure 5b, Figure 7 shows that CO-LMLM better preserves Retain Set knowledge, whereas prior training-based methods like NPO might suffer severe ROUGE degradation and forget related knowledge due to parameter entanglement. B.4 Related Work: Memory-Augmented Language Models Prior work has explored explicit memory modules as a way to augment LLMs. KBLaM [Wang et al., 2025] stores knowledge as continuous key-value vectors and integrates them into pretrained LLMs via modified attention. Memory 3 [Yang et al., 2024] pretrains models to write and read sparse attention key-value memories, sharing our motivation of offloading factual knowledge from parameters. MemLLM [Modarressi et al., 2024] introduces an explicit read-write memory for extracting, storing, and recalling triplet knowledge. More recently, SPLM [Sun et al., 2025] stores atomic facts absent from a pretrained modelâs parametric memory in a compact external memory, and continue pretrains the model to retrieve from this external, non-parametric memory at inference time, using textual query. Unlike these memory-based methods, CO-LMLM uses continuous representations only to query memory, while storing knowledge as natural-language text. This keeps retrieval flexible and low-cost, but preserves the transparency of an explicit KB: retrieved knowledge remains human-readable, 23 02040 Unlearning Steps 0.40 0.45 0.50 0.55 0.60 0.65 Forget Answer ROUGE 02040 Unlearning Steps 0.40 0.45 0.50 0.55 0.60 Retain Answer ROUGE (-) Standard - Base Standard - Unlearn (NPO) Co-LMLM - Base Co-LMLM - Unlearn Figure 7: Machine unlearning on TOFU. CO-LMLM performs forgetting through direct KB operations, without additional training. CO-LMLM retains knowledge outside the forget set, unlike other methods that degrade retain-set performance because of the entanglement of knowledge storage. attributable, editable, and directly removable. Thus, CO-LMLM combines learned memory access with the inspectability and controllability of text-based external knowledge. 24 C Prompt Used for Seed Annotation with Gemini While experimenting with different annotation prompts, we noticed a shard degradation in annotation quality as the input document grew longer [Hong et al., 2025]. To mitigate this, annotate in a chat-based fashion: we set the annotation prompt as the system prompt, and pass the first chunk of the document (512 tokens in our setup). After receiving the annotated chunk, we pass on the next chunk in the same conversation, and so on until reaching the end of the document. We found that this simple process dramatically increased annotation quality, at the price of more token usage. We optimized the prompt using an iterative semi-automated process with Claude Code. The following prompt was provided to Gemini to annotate the seed documents: You are creating a "Golden Dataset" for limited memory language models (LMLM) that retrieve facts from a knowledge base rather than memorizing them. **TASK:** Identify and tag facts that **would be useful for answering questions in a search engine**. These are the specific details (dates, names, numbers, citations, definitions) that someone might search for and that could not be answered without this documentâs information. Tag them using < FACT q="..." a="...">...</FACT> format. - âqâ = A natural search query someone might type to find this fact (answerable without this document) - âaâ = A snippet-form paraphrase of the answer (see Paraphrase Rules below) - Tag content = The verbatim span from the input text (preserve EXACTLY as in input - no modifications) **Search-engine mindset:** Before tagging any fact, ask yourself: "Would someone plausibly type a search query to find this specific piece of information?" If the answer is yes, tag it. If the information is too obvious, too generic, or too context-specific for anyone to search for, skip it. --- ### SPAN BOUNDARY PRINCIPLE (READ FIRST) Selecting the right span boundaries is critical. Default to the **narrowest self-contained token or phrase** that fully answers the question. Widen only when the narrow span is genuinely ambiguous in isolation. Decision procedure: 1. Start with the bare factual token (a name, number, date). 2. Ask: "Shown alone, is this token ambiguous?" If NO, tag just that token. 3. If YES, include the minimal surrounding words that resolve the ambiguity. - If a bare number or noun is meaningful on its own (e.g., "1990", "Paris", " Einstein"), tag just that token. - If a bare number or noun requires its surrounding phrase to be interpretable (e.g., "25" in "25 medals in total" -- "25" alone is ambiguous), tag the full noun phrase that makes it self-contained: "25 medals in total". <example> Input: The team won 25 medals in total during the championship. WRONG: <FACT q="How many medals did the team win?" a="25 medals">25</FACT> (too narrow -- "25" alone is ambiguous) CORRECT: <FACT q="How many medals did the team win at the championship?" a="25 medals total">25 medals in total</FACT> </example> <example> Input: The ceremony was held in Paris. 25 CORRECT: <FACT q="Where was the ceremony held?" a="Paris">Paris</FACT> (single proper noun is self-contained) </example> --- ### QUESTION SELF-CONTAINMENT PRINCIPLE (READ SECOND) Every question must be written as if for a reader who has **never seen this document**. A question is self-contained when someone typing it into a search engine, without access to your document, would understand exactly what is being asked and would NOT be shown the answer by the question itself. Two opposing failure modes to avoid: **Failure mode A -- Under-specified questions.** Questions that rely on pronouns, demonstratives, or document-internal references ("the text", " this passage", "it", "he", "there"). Replace every pronoun with the actual entity name. Every question must name its subject. **Failure mode B -- Over-specified questions that leak the answer.** Questions that contain so many distinguishing details that the answer becomes almost deducible from the question alone, or that name upcoming entities that will themselves be annotation targets later. - If the question is "Which newspaper published an article about Narrabri in July 1913?" and "July 1913" only comes from a later sentence (and may itself be a future annotation), the question leaks both chronology AND a future answer. - If the question is "Who won the 2018 World Cup hosted by Russia?" and both "2018" and "Russia" are planned annotation targets later in the document, this question reveals both of them. **Self-containment test (apply to every question):** 1. Cover up the tagged span with your finger. Read the question alone. 2. Ask: could this question be typed into Google by someone who has NEVER read my document? Is it clear what they are asking? (If no: under-specified.) 3. Ask: does the question itself contain or strongly hint at information that appears LATER in this document, especially information that will become another annotation answer? (If yes: over-specified / leaking.) 4. A well-formed question names the subject (what/who/where) and includes just enough non-answer, non-future context to disambiguate -- nothing more. <example> Input: Mount Kenya is the second-highest peak in Africa. WRONG q="What is it the second-highest of?" (under-specified -- "it" has no referent outside this document) WRONG q="What is the second-highest peak in Africa, located on the equator in Kenya?" (over-specified with later details that leak location) CORRECT q="What is the second-highest peak in Africa?" a="Mount Kenya" </example> --- ### COVERAGE PRINCIPLE (READ THIRD) Salient facts often hide mid-sentence, not as subjects. Before moving past a sentence, sweep for these frequently-missed fact types and tag them if they pass the other rules: **Named entities embedded mid-sentence.** Any specific person, organization, place, product, or work of art that names a unique referent deserves 26 consideration even when it is in an oblique position (object of a preposition, apposition, embedded clause). Examples of easily-missed cases: - "...the search by Vyacheslav Slysh for Dyson spheres around Moscow..." -- tag "Vyacheslav Slysh". - "...the track was written with co-producer Yeimer Lopez..." -- tag "Yeimer Lopez". - A scientist, athlete, author, director, or company name buried in a subordinate clause is still a who-questionâs answer. **Short numeric and temporal modifiers.** Durations, counts, ages, distances, short date phrases. These are easy to overlook when they are not the sentenceâs headline number. Examples: - "...trained for six days before the event..." -- tag "six days" (how long). - "...scheduled for Easter Wednesday..." -- tag "Easter Wednesday" (when). - "...priced at around $4.50 per unit..." -- tag "$4.50" or "$4.50 per unit" as appropriate. **Concise action/process definitions for proper-noun subjects.** When the document describes what a named protocol, function, or system does in a short phrase, tag that phrase as the answer to "What does X do?". Example: - "SMTP transfers email to the email clientâs computer." -- tag "transfers email to the email clientâs computer" with q="What does SMTP do?". **Coverage heuristic:** For each sentence, list every plausible who / what / when / where / how-many question a search user might ask about the sentence âs content. For each such question, check whether the unique answer appears in the sentence. If yes, verify it passes Rule 1 (no forward references) and Rule 9 (salience) and tag it. This Coverage Principle does NOT override the salience bar: decorative color and roster enumeration items remain skippable. It is a reminder to not skip central facts just because they are grammatically embedded. --- ### THE 9 RULES **Rule 1: NO FORWARD REFERENCES (STRICT SENTENCE-BOUNDARY TEST)** Questions can only use info that appears BEFORE the answer in the text. **Verification procedure -- apply this for EVERY question you write:** 1. Identify the sentence containing the tagged span. 2. Collect all text from the beginning of the document up to and including that sentence. This is the "available context." 3. Every entity, date, descriptor, and detail mentioned in the question MUST appear in the available context. If any word or phrase in your question comes from a later sentence, the question is invalid. 4. **Cross-contamination check:** Re-read your question and confirm it does not reveal or strongly imply the answer to any OTHER fact that appears later in the document. If it does, rephrase to remove the leaking detail. 5. **Self-containment check:** Apply the Question Self-Containment test above. The question must work for a reader who has never seen the document. If two facts define each other, tag only ONE (the rarer fact). <example> Input: Cuyamaca Reservoir is located on Boulder Creek Good: Cuyamaca Reservoir is located on <FACT q="Where is Cuyamaca Reservoir located?" a="Boulder Creek">Boulder Creek</FACT> Cannot tag both - each would need the otherâs info. </example> 27 COMMON VIOLATION - referencing later info in the question: <example> Input: "an article by Sydney Evening News journalist about work at Narrabri in July 1913" WRONG: <FACT q="Which newspaper published an article about Narrabri in July 1913?" a="Sydney Evening News">Sydney Evening News</FACT> (The question mentions "July 1913" which appears AFTER "Sydney Evening News" in the text) CORRECT: <FACT q="Which newspaper published an article about the work at Narrabri?" a="Sydney Evening News">Sydney Evening News</FACT> </example> **Structured / tabular documents:** When a document has repeating sections (e.g ., race results, treaty timelines, year-by-year summaries), treat each section or paragraph as an independent unit. Do NOT let details from one section bleed into questions about an earlier section. Verify each question against only the text up to the spanâs position, not the entire document. If no single fact can stand alone, tag a larger phrase: <example> Beginning in 1991, Darcy Frey <FACT q="What did Darcy Frey start doing in 1991?" a="spent nine months with the Abraham Lincoln High School basketball team">spent nine months with the Abraham Lincoln High School basketball team</FACT>. </example> **Rule 2: COMPLETE DATA TUPLES** If a number appears before its description, tag the entire phrase: <example> In 2016, <FACT q="What was the linguistic breakdown of Albertans in 2016?" a ="76% </example> **Rule 3: STANDALONE QUESTIONS** Replace pronouns with entity names. Donât reference "the text" or "the passage". Frame questions as natural search queries someone would actually type. Refer to the Question Self-Containment Principle above. For lists of items (X and Y), keep them together rather than splitting with " another": <example> WRONG: <FACT q="Name a tributary" a="Disang">Disang</FACT> and <FACT q="Name another tributary" a="Dikhou">Dikhou</FACT> CORRECT: <FACT q="What were the tributaries?" a="the Disang and the Dikhou"> Disang and Dikhou</FACT> </example> **Rule 4: DEFINITIONS - Proper Nouns Only** Tag definitions of Proper Nouns. Do NOT tag common noun/dictionary definitions. When text provides examples of a category, annotate the entity name asking " What is an example of [category]?": <example> Input: NaCl is an example of an ionic substance. CORRECT: <FACT q="What is an example of an ionic substance?" a="NaCl">NaCl</ FACT> is an example of an ionic substance. </example> <example> Masuzawa Station is a <FACT q="What type of facility is Masuzawa Station?" a=" railway station">railway station</FACT>. <- TAG (proper noun) "A multi-tool is a device that combines tools." <- NO TAG (common noun) 28 </example> **Rule 5: SPLIT COMPOUND FACTS** If a span answers multiple questions (Who, When), split it unless it violates Rule 1: <example> The award was presented by <FACT q="Who presented the X award?" a="the Queen"> the Queen</FACT> in <FACT q="When was the X award presented?" a ="1990">1990</FACT>. </example> **Rule 6: NO DEDUCIBLE INFO -- INCLUDING COMMON KNOWLEDGE** Donât tag what can be inferred from common sense or is universally known. This includes: - Properties that follow from a category: "Made of silk, the fabric is soft." -> NO TAG - Logical deductions: "The market is busy in summer." -> NO TAG - Facts any educated adult would know without looking up (e.g., "digestion begins in the mouth", "the Earth orbits the Sun", "water boils at 100C at sea level") -> NO TAG - Facts that are self-evident from the documentâs title or topic statement -> NO TAG **Key test:** Would someone actually search for this fact? If not, do NOT tag it. <example> "The human digestive process begins in the mouth." -> NO TAG (no one would search for this) "Paris is the capital of France." -> NO TAG (no one needs to look this up) "The Battle of Gettysburg was fought in 1863." -> TAG (someone might search " when was the Battle of Gettysburg") </example> **Rule 7: NO GENERIC SCRIPTS** Donât tag actions implied by someoneâs role. Only tag specific details: - "The firefighter extinguished the blaze." -> NO TAG (expected job) - "Led Zeppelin performed songs." -> NO TAG (bands perform songs) - "Led Zeppelin performed <FACT q="Which song did Led Zeppelin play?" a=" Stairway to Heaven">Stairway to Heaven</FACT>." -> TAG (specific) **Rule 8: NO CONTEXT-SPECIFIC KNOWLEDGE** Donât tag knowledge only meaningful within this document (e.g., "formula_11"). **Rule 9: ANNOTATION IMPORTANCE THRESHOLD** Only tag facts that carry **high information density** -- facts that a reader would genuinely need to look up or that would be difficult to recall from memory. Do NOT tag: - Incidental or secondary details that merely elaborate on an already-tagged primary fact (e.g., if you tagged the venue name, do not also separately tag its general category like "circus" or "arena"). - Facts that are immediately obvious from the surrounding context or document title. - Minor descriptors or qualifiers that add little retrievable value. - Well-known facts that appear in the document merely as background context rather than as the documentâs informational contribution. **Calibration guide:** Aim for roughly the same density as a well-edited encyclopedia articleâs hyperlinks. If you find yourself generating significantly more annotations than there are sentences in a passage, re- examine whether each annotation truly passes the importance test. Conversely, if a fact would be hyperlinked in a Wikipedia article (named 29 entities, specific dates, specialized terms), it almost certainly deserves a tag. --- ### PARAPHRASE RULES FOR THE âaâ ATTRIBUTE The âaâ value must be a **snippet-form** paraphrase of the tagged span. It must NOT be a full sentence or clause that answers the question. **Core principle:** The paraphrase must be the kind of raw text that could appear inline in another document -- as a caption, list entry, table cell, headline fragment, or mid-sentence noun phrase. It must NOT be a subject+ verb clause framed as "X did Y", "the race was Y", "Y was at/on Z", etc. **Acceptance test:** Could this exact âaâ string appear verbatim as a caption, table cell, list entry, or mid-sentence noun phrase in an unrelated article ? If no, compress to the minimal noun phrase that carries the same factual content. Rules: 1. The âaâ value must contain the answer to the question in âqâ. 2. It must be snippet form -- a phrase, name, number, date, or short noun phrase. Not a complete sentence. 3. It should convey the fact without looking copy-pasted from the span, but must not inflate into a complete sentence. 4. Length may be slightly longer or shorter than the span. A single word may become a short phrase; a wordy span may be condensed. Length must stay in the snippet range. 5. Proper nouns, numbers, and dates must be preserved exactly in factual content. Only surface form can change (e.g. "21 May 1925" -> "May 21, 1925"). Additional information may be added but not removed. 6. Lists of items should be shuffled -- do not maintain the original ordering unless the order is inherently meaningful. 7. If there is no meaningful way to paraphrase the span, keeping âaâ identical to the span text is acceptable. Proper nouns and venue names in particular should usually be kept as-is. 8. Be diverse -- vary your paraphrasing strategies. Sometimes keep dates/names as-is; sometimes use a surface variant (e.g. "Sep" for "September"); sometimes swap the order of a dateâs components. Apply this variety across all fact types. --- ### COMPLETE EXAMPLES <example> Input: Stefan Gierowski Stefan Gierowski (21 May 1925 -- 14 August 2022) was a Polish painter and an avant garde artist of post-war Poland. Output: Stefan Gierowski Stefan Gierowski (<FACT q="When was Stefan Gierowski born?" a="May 21, 1925">21 May 1925</FACT> -- <FACT q="When did Stefan Gierowski die?" a="August 14, 2022">14 August 2022</FACT>) was a <FACT q="What was Stefan Gierowskiâs nationality?" a="Polish">Polish</FACT> <FACT q="What was Stefan Gierowskiâs profession?" a="painter">painter</FACT> and <FACT q="Stefan Gierowski is considered a representative of which artistic movement?" a="the avant-garde movement of post-war Poland">an avant garde artist of post-war Poland</ FACT>. 30 </example> <example> Input: Professionalism/The Over Prosecution of Kurt Mix On April 22, 2010 the BP-operated Deepwater Horizon oil rig exploded in the Gulf of Mexico. The explosion killed 11 men who worked on the rig. Kurt Mix, a BP engineer, was a first responder working on operation "Top Kill", a plan to stop the oil spillage. Output: Professionalism/The Over Prosecution of Kurt Mix On <FACT q="When did the Deepwater Horizon explosion occur?" a="April 22, 2010">April 22, 2010</FACT> the <FACT q="What event happened on April 22, 2010?" a="the BP-operated Deepwater Horizon oil rig exploded">BP-operated Deepwater Horizon oil rig exploded</FACT> in <FACT q="Where did the Deepwater Horizon explosion occur?" a="the Gulf of Mexico">the Gulf of Mexico</FACT>. The explosion killed <FACT q="How many people were killed in the Deepwater Horizon explosion?" a="11 men">11 men</FACT> who worked on the rig. Kurt Mix, a <FACT q="Who was Kurt Mixâs employer?" a="BP">BP</FACT> <FACT q=" What was Kurt Mixâs profession?" a="engineer">engineer</FACT>, was a <FACT q="What was Kurt Mixâs role in the Deepwater Horizon disaster?" a="first responder">first responder</FACT> working on <FACT q="What operation did Kurt Mix work on?" a="operation Top Kill">operation "Top Kill"</FACT>, a plan to <FACT q="What was the objective of operation Top Kill?" a="stop the oil spillage">stop the oil spillage</FACT>. </example> <example> Input: Linear Algebra/Vector Spaces A vector space is a way of generalizing... Further results may be applied to more general spaces which may have infinite dimension, such as in Functional Analysis. Output: Linear Algebra/Vector Spaces A vector space is a way of generalizing... Further results may be applied to more general spaces which may have infinite dimension, such as in <FACT q=" Which field involves spaces with infinite dimension?" a="Functional Analysis">Functional Analysis</FACT>. *(Note: Most content is common math knowledge - only tag specific proper nouns) * </example> --- ## Quality Focus When unsure about whether to tag: - Common knowledge -> donât tag - Question needs info from AFTER answer -> donât tag - Canât make question standalone -> donât tag - Named person/place/organization or short numeric/temporal modifier that IS the unique answer to a plausible search query -> tag, even if embedded mid- sentence Apply these rules uniformly across all document types -- formal articles, informal web text, lists, transcripts, and technical documents all contain extractable facts. Preserve original text exactly within FACT tags. 31 Output only the annotated text. 32