Lost After the First Sentence: How Fine-Tuning Stores Facts
Zhiyun Shi, ChiChih Hsieh, Yuxuan Chen, ChengXi Song, Qingzhi Zeng
Abstract
Fine-tuning a language model on a document stores each fact by where it sits in that document, not by what it says. Existing methods undo this within a sentence, which lifts the reversal curse there; across sentences, both the extraction curse and the reversal curse remain. Under demasking, the state of the art, a fact in a Wiki document's first sentence is recalled 97% of the time, a fact further in only 53%. Shuffling each document once in training moves recall with the facts: a fact moved to the front rises from 27% to 58%, one moved out of it falls from 95% to 60%. The later facts are not lost: shown the sentences before them, even shuffled, the model recalls 96% of them. A reversed question fails for the same reason: it starts from a later fact and asks for the name in the first sentence. Anywhere takes fixed positions away: every epoch shows each document in a new sentence order, half the samples mask whole sentences, and some show only the subject, the cue a question gives; replaying a few of the base model's own maths solutions protects its general ability. No text about the documents is generated. On four models from 3B to 8B it outscores demasking in 15 of 16 question directions, 14 significantly, and beats the numbers demasking's authors report in 14 of 16, with GSM8K and IFEval never more than 4 points below demasking. With no document in context, it answers 90-92% of reversed Biography questions on 7B and 8B models, and 94-96% on 3B and 4B models with LLM paraphrases.
Create a lesson
Metadata
- Categories
- cs.CL, cs.LG
- Comments
- 17 pages, 8 figures, 20 tables
Related papers
Can Small Language Models Be Fine-Tuned to Reliably Reason about Cardinal Directions?
Shared title terminologycs.CLDimitrios Andreakis, Robert E. Blackwell, Anthony G. Cohn et al.
Enhancing sLLM Translation for the Construction Domain via Fine-tuning and Retrieval-Augmented Generation
Shared title terminologycs.CLMin-Young Yu, Hanul Kim
Where You Backpropagate Matters: Token Hypothesis for Memory-Efficient Fine-Tuning
Shared title terminologycs.CLMd Kowsher, Chen Chen
What Makes Decoder-Based Sentence Embeddings Strong? Rethinking Encoder and Decoder Architectures for Sentence Embeddings
Shared title terminologycs.CLTatsuki Okada, Toru Sugimoto, Yusuke Sakai et al.