Injecting New Knowledge into Large Language Models via Supervised Fine-Tuning

Nick Mecklenburg, Yiyou Lin, Xiaoxiao Li, Daniel Holstein, Leonardo O. Nunes, Sara Malvar, Bruno Silva, Ranveer Chandra, Vijay Aski, Pavan Kumar Reddy Yannam, Tolga Aktas, Todd HendryarXiv 2024 · DOI

Executive Summary

This research investigates methodologies for updating Large Language Models (LLMs) with information that emerges after their initial training cutoff. While Retrieval-Augmented Generation (RAG) is the standard industry solution, it acts as an external patch rather than an internal update. This study explores Supervised Fine-Tuning (SFT) as a mechanism to bake new knowledge directly into a model's weights. The findings suggest that the strategy used to generate training data—specifically moving from token-based to fact-based scaling—is critical for ensuring uniform knowledge ingestion.

The Challenge: Knowledge Cutoffs and Internalization

LLMs are inherently static, possessing knowledge only up to their training cutoff. When new events occur, such as the 2023 PGA Championship or the 2023 Superbowl, models typically fail to provide accurate answers without external assistance. While RAG provides this context at inference time, it does not modify the model's internal parameters. This paper asks whether SFT can effectively internalize this new data and how the structure of the fine-tuning dataset influences the model's "memory."

Methodology

The researchers utilized GPT-4 (v0613) as a base model and applied LoRA (Low-Rank Adaptation) for parameter-efficient fine-tuning. They compared two primary dataset generation strategies:

  1. Token-based Scaling: Training questions are generated in proportion to the document's token count. This is the standard industry approach.
  2. Fact-based Scaling: Documents are first distilled into "atomic facts" (standalone statements), and a fixed number of Q&A pairs are generated for every individual fact.

The study tested these methods across six Wikipedia articles regarding major sporting events, including five post-cutoff events (e.g., 2023 Cricket World Cup) and one pre-cutoff control (2018 FIFA World Cup).

The "Blind Spot" of Standard Scaling

A key discovery was the non-uniformity of standard token-based scaling. Even when the number of training examples was increased tenfold (10x scaling), the LLM generators tended to focus on "interesting" facts while ignoring others.

Figure 3: Fact coverage across different datasets, showing that a significant portion of information remains uncovered even at 10x token scaling.

As shown in the figure above, roughly 20% of facts in a document remained completely uncovered by training questions in the token-based approach. Fact-based scaling solves this by ensuring every atomic fact is represented in the training set, leading to more robust and consistent performance.

Performance and Results

SFT demonstrated a remarkable ability to improve model accuracy on new knowledge. For instance, the base model's accuracy on the 2023 Superbowl was a mere 6%, which jumped to 74% (token-based) and 72% (fact-based) after fine-tuning.

Figure 2: Accuracy improvements across six datasets comparing the original model, various SFT scaling factors, and RAG.

While RAG still maintains a performance lead (often exceeding 90% accuracy), SFT was able to close the gap significantly, often coming within 16% of RAG's performance. Furthermore, the researchers found that "varied repetition"—asking about the same fact in multiple ways—was more effective for internalization than simple data repetition, which can lead to overfitting.

Conclusion and Future Directions

The study proves that SFT is a viable path for internalizing domain-specific knowledge, provided the training data is structured to ensure complete factual coverage. Future work is required to determine if these results hold in more subjective or nuanced domains beyond the fact-dense world of sports, and to investigate the potential for "catastrophic forgetting" where new knowledge might displace original pre-training data.

Summary updated

BibTeX
@misc{mecklenburg2024injecting,
  author = {Nick Mecklenburg and Yiyou Lin and Xiaoxiao Li and Daniel Holstein and Leonardo O. Nunes and Sara Malvar and Bruno Silva and Ranveer Chandra and Vijay Aski and Pavan Kumar Reddy Yannam and Tolga Aktas and Todd Hendry},
  title = {{Injecting New Knowledge into Large Language Models via Supervised Fine-Tuning}},
  year = {2024},
  eprint = {2404.00213},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.00213},
}
Figure