# When Does Fine-Tuning Extract Stored Knowledge? A Relation-Covering Theory for One-Layer Transformers

*Ruichen Xu, Kexin Chen*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/151493) · [OpenReview](https://openreview.net/forum?id=aFLMTsDeTk) · [alphaXiv](https://www.alphaxiv.org/abs/2508.00901) · [Open on the map](../papers.html#p151493)

Category: [LLM Reasoning, Memory & RAG](../pcat/19.md) › [Knowledge Representation and Reasoning in Transformers](../pgroup/247.md) · Type: theory · Keywords: knowledge extraction, fine-tuning theory, relation-covering, transformer analysis, hallucination mechanism

Areas: [LLM Reasoning](../areas/reasoning.md) › Reasoning Mechanisms › Chain-of-Thought Reasoning

## Summary
The paper provides a relation-covering theory that explains when fine-tuning can extract stored knowledge in one-layer transformers, showing extraction depends on covering enough latent relation-template directions.

## Explained to a 5-year-old
Big computers learn lots of facts while they are being taught. Later, when we try to teach them new things, they sometimes forget how to use the old facts. This paper figures out when they can still use the old facts after learning new things. It shows that if we teach them enough about the connections between facts, they can remember the old ones. If we don't teach enough, they might make up answers that sound right but are wrong.

## Explained to a 5-year-old, longer
When computers learn to talk, they see many words and facts. They store these facts inside them like hidden treasures. After they learn, we sometimes ask them new questions to make them better at a specific job. While learning the new job, they might accidentally hide the old treasures. Sometimes they can still find the old treasures, but other times they cannot. This paper looks at why this happens. It uses a simple computer model that has only one layer to study the problem. The model first learns to predict the next word, then later learns to answer questions. The researchers prove that if the model learns enough about the relationships between facts, it can later use those facts even if it never saw them again. They also show that when the model does not learn enough about these relationships, it can get stuck and make up answers that seem correct but are actually wrong. The theory explains this behavior with a new idea called relation-covering, which measures how well the new learning covers the old connections. The paper also runs experiments on made-up data and a known question-answering dataset to check that the theory matches what happens in practice. These experiments confirm that the more the model learns about the old connections, the better it can remember the old facts after being fine-tuned.

## For a technical reader
The work studies why fine-tuning sometimes erases stored knowledge in transformers. Using a one-layer self-attention + MLP model, the authors prove that under certain regularity conditions the model can achieve optimal pre-training loss while learning structured attention patterns. They show that fine-tuning can act as a trigger for pre-trained relation features, allowing extraction of facts not revisited during fine-tuning. The key insight is a relation-covering characterization: extraction succeeds when fine-tuning covers enough latent relation-template directions. Theoretical bounds indicate extraction improves with pre-training multiplicity and fine-tuning coverage but becomes harder as the relation-template space grows. Experiments on synthetic data and PopQA-based GPT-2/Llama models support these predictions.

## Problem
Large language models may store factual knowledge during pre-training but often cannot reliably retrieve it after fine-tuning. Understanding the conditions under which fine-tuning can extract this stored knowledge remains an open problem.

## Method
The authors analyze a simplified one-layer transformer, prove that under certain regularity conditions it achieves near-optimal pre-training loss while learning structured attention, and characterize how fine-tuning can trigger pre-trained relation features. They provide a relation-covering characterization, proving extraction improves with pre-training multiplicity and fine-tuning coverage, and becomes harder as the relation-template space grows.

## Results
The analysis shows that extraction success rises with more pre-training multiplicity and greater fine-tuning coverage, while larger relation-template spaces reduce extraction, and insufficient coverage leads to a failure regime. Experiments on synthetic data and PopQA-based models confirm these trends.

## Contributions
The paper introduces a relation-covering characterization that explains when fine-tuning can extract stored facts without revisiting them, and proves how coverage and pre-training multiplicity affect extraction. It also demonstrates a theoretical mechanism for hallucination due to insufficient coverage.

## Limitations and assumptions
The analysis relies on regularity conditions and a simplified one-layer transformer, which may limit direct applicability to deeper models. Empirical validation is limited to synthetic data and PopQA-based models.

## Research questions this paper is counted under

- [How does fine-tuning impact the retention of pre-trained knowledge in large language models?](../q/598.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/151493)
