TL;DR
Decoupled Knowledge Learning (DKL) introduces a lightweight method to inject new domain knowledge into instruction-tuned LLMs without degrading their chat capabilities or requiring expensive re-training. By training a knowledge adapter on the base LLM and merging it with the instruct LLM via task arithmetic, DKL achieves superior performance on retrieval failures while using significantly less synthetic data than prior methods.
What Problem Does This Paper Address?
Retrieval-Augmented Generation (RAG) is the standard approach for grounding LLMs in custom or domain-specific documents. However, RAG is highly sensitive to retrieval quality; if the retriever fails to find the right passage, the model is prone to hallucination.
While we can bake knowledge directly into a model's parameters via fine-tuning, current methods like RAFT or PA-RAG require generating massive amounts of synthetic Question-Answering (QA) pairs to cover the entire corpus. Alternatively, Extended Pre-Training (EPT) on raw text avoids synthetic data generation but causes "catastrophic forgetting" of the model's instruction-following skills. Fixing this typically requires re-running expensive Instruction Fine-Tuning (IFT)—which is often impossible if the original proprietary training dataset is unavailable.
Methods
The authors introduce DKL (Decoupled Knowledge Learning), which leverages task arithmetic (treating fine-tuning updates as vectors in parameter space) to combine knowledge and instruction-following capabilities.
Instead of updating the Instruct LLM directly, DKL performs EPT on the corresponding Base LLM to create a specialized "knowledge vector." This vector is then linearly merged with the Instruct LLM's weights.
To make this cross-model merge work seamlessly, DKL introduces two key innovations:
- Token Embedding Swapping: Base models are blind to chat-specific tokens (like Mistral's
[INST]). DKL replaces the base model's token embeddings with the instruct model's embeddings during the base model's training phase, resolving vocabulary mismatch early. - Minimal Synthetic QA: DKL mixes in a small amount of synthetic QA data (requiring a total word count of only 50% of the corpus size) to improve knowledge recall without needing full corpus coverage.
Datasets
- Technical RedBooks: Two highly technical IBM manuals used to evaluate domain-specific question answering and RAG performance.
- QuALITY: A dataset of long-form open-domain articles used to test non-technical comprehension and robustness against data bias.
Key Insights and Ideas
- Decoupling Skills: Knowledge acquisition and instruction-following are orthogonal skills learned at different stages. DKL proves they can be developed independently on separate base/instruct models and cleanly merged later in parameter space.
- Vocabulary Alignment is Crucial: Simply adding a base-trained adapter to an instruct model fails due to representation mismatch. Swapping embeddings during training bridges this gap and significantly improves adapter adaptability.
- Mitigating Synthetic Bias: Relying solely on synthetic QA data (like RAFT) can introduce severe data imbalances and skewed priors (e.g., over-representing short-term risks over long-term risks), causing models to ignore correct context during RAG. EPT ensures unbiased, full-corpus coverage.
Key Results
- Robustness to Retrieval Failure: On the RedBook 1 dataset, when the RAG retriever completely fails, DKL improves accuracy from 54.17% (baseline Instruct) to 79.26%, outperforming RAFT (68.89%) and PA-RAG (74.07%).
- Data Efficiency: DKL achieves optimal performance with a fraction of the synthetic data required by other methods, showing a much smoother saturation curve as data scales.
- General Task Preservation: Unlike RAFT and PA-RAG, which degrade performance on general benchmarks (like MMLU-Pro and GPQA), DKL maintains competitive general reasoning capabilities.
Limitations and Future Work
- Base Model Dependency: DKL strictly requires access to the exact un-finetuned base model corresponding to the instruct LLM, which limits its applicability for proprietary or closed-source models where only the final instruct checkpoint is released.
- Hyperparameter Tuning: The merging process relies on finding an optimal scaling hyperparameter ($\alpha$) via manual sweep, lacking an automated or principled theoretical framework for selection.
Summary updated