Manuscript Offprint

arXiv:2608.20281

Inject, Align, Recover: Staged Post-Training for Retrieval-Free Document Knowledge Internalization

Qian Kou, Xiaofeng Shi, Xiaosong Qiu, Hua Zhou

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large language models often fail to answer questions about a bounded document collection when the source documents are not retrieved at inference time. We study this setting as document knowledge internalization: converting a fixed corpus into usable parametric knowledge for retrieval-free question answering. We propose IAR (Inject, Align, and Recover), a three-stage post-training framework that separates structured document knowledge injection, QA behavior alignment, and general ability recovery. Unlike conventional continued pretraining, Inject converts source documents into continuation, rewrite, and instruction-conditioned reconstruction objectives. Align then adapts the injected model with answer-only QA supervision, while Recover merges the domain-adapted model with the base instruction model to recover general capabilities. Across Common Corpus (CC) and CCI, and across Llama, Phi, Qwen, and SmolLM model families, IAR improves the domain-primary domain-general frontier for retrieval-free document internalization. In the main comparison, IAR improves over Vanilla SFT on all four reported metrics in 7 of 8 dataset-model settings, with average gains of 3.6 percentage points in domain QA accuracy and 12.1 percentage points in mean general performance across IFEval, MMLU, and MSBench. Extended CC baselines show that LoRA and FAPM can win individual general metrics, but among methods that also reach leading or near-leading domain internalization, IAR retains one of the strongest general profiles.

1Beijing Academy of Artificial Intelligence (BAAI)

Introduction

Retrieval-augmented generation is the standard engineering answer to document-grounded question answering: retrieve passages from a corpus, append them to the prompt, and ask a model to answer with that evidence (Lewis et al. 2020). This paper studies a different setting. In many deployments, retrieval may be unavailable, undesirable for latency or privacy reasons, or deliberately removed to test whether post-training has changed the model’s parametric knowledge. We call this setting document knowledge internalization. Given a bounded document collection and document-derived questions, the model must answer held-out questions without receiving the source documents at inference time. We evaluate this problem on Common Corpus (CC) (PleIAs 2024) and CCI (BAAI 2024), and use the abbreviations CC and CCI throughout the paper.

The simplest solution is supervised fine-tuning (SFT) on document-derived question-answer pairs. This approach gives the model the same input-output format that it will see at test time, but the learning signal is sparse: only the facts selected by the QA generator contribute to the loss. Continued pretraining (CPT) provides denser exposure to document text (Gururangan et al. 2020), but it does not directly teach the model how to answer questions. Both routes also face a general-capability trade-off: domain adaptation can improve target QA behavior while degrading instruction following or broad benchmark performance, a form of catastrophic forgetting (Kirkpatrick et al. 2017). Document internalization therefore requires both domain acquisition and controlled recovery.

We propose IAR, a three-stage framework that separates these functions. Unlike raw CPT, IAR does not merely continue language modeling on domain text. Inject converts documents into instruction-conditioned supervised reconstruction tasks; Align maps the injected knowledge to a QA interface; and Recover performs post-hoc model merging between the domain-adapted checkpoint and the original instruction model, producing candidate checkpoints that trade domain accuracy against general capability. Figure 1 summarizes the contrast with Vanilla SFT and CPT+SFT.

Figure

Figure 1: The overview of IAR. Vanilla SFT learns from generated QA pairs and covers only the facts selected by those questions. CPT+SFT models full document token streams before a separate QA alignment stage. IAR injects document knowledge through continuation, rewrite, and instruction-conditioned reconstruction objectives, aligns the injected model with answer-only QA supervision, and recovers general ability via post-hoc model merging. The final model is selected by balancing retrieval-free domain QA performance and general capability retention.

The central empirical claim is that IAR improves the operating-point frontier for retrieval-free document internalization. In multiple settings, IAR improves domain accuracy over Vanilla SFT while restoring general capability that is often damaged by domain adaptation. Against BudgetMatch QA-only SFT, both CCI settings are all-metric wins for IAR, with Qwen3-4B CCI showing the largest separation. More broadly, the experiments show that document exposure, answer alignment, data recipe, token budget, and recovery should be measured separately rather than collapsed into one fine-tuning comparison.

This paper makes four contributions:

  • We study retrieval-free QA over a fixed ingested corpus as a domain-general operating-point problem, measuring both domain accessibility and general capability.
  • We present IAR, a three-stage post-training framework that separates structured document exposure, answer-only QA alignment, and post-hoc general-capability recovery.
  • We evaluate across CC and CCI and multiple model families, with direct SFT, LoRA, SDFT, Replay, FAPM, conventional Base-initialized continued-pretraining baselines, and available Instruct-initialized CPT diagnostics.
  • We report both strong and boundary evidence: IAR improves the domain-general frontier in most settings, while boundary cases clarify when initialization strength, data recipe, or operating-point selection matters most.

References (14)

  • Transactions of the Association for Computational Linguistics 12, pp. 283–298
  • adapt language models to domains and tasks
  • L. Casas, L. A. Hendricks, J. Welbl, A. Clark, et al. Training compute-optimal large language models
  • Scaling Laws for Neural Language Models
  • Proceedings of the National Academy of Sciences 114 (13), pp. 3521–3526
  • building your customizable agent system with open-source large language models
  • External Links: Link Cited by: Parametric knowledge and retrieval
  • rethinking the knowledge memory for lifelong model editing of large language models
  • averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
  • resolving interference when merging models
  • absorbing abilities from homologous models as a free lunch (opens arXiv in a new tab)
  • instructing LLMs to effectively acquire new knowledge through self-teaching
  • mapping the boundaries of knowledge injection with finetuning
  • Instruction-Following Evaluation for Large Language Models