[Paper Review] The Inductive Bias of In-Context Learning: Rethinking Pretraining Example Design
This paper identifies an inductive bias in in-context learning where neural language models (NLMs) learn stronger dependencies between sentences presented together in the same pretraining example than between those from different examples. By formalizing this bias via separation rank analysis, the authors propose kNN-Pretraining—integrating semantically related, non-adjacent sentences into single training examples—which improves sentence representations and zero-shot performance on open-domain question answering and GLUE benchmarks.
Pretraining Neural Language Models (NLMs) over a large corpus involves chunking the text into training examples, which are contiguous text segments of sizes processable by the neural architecture. We highlight a bias introduced by this common practice: we prove that the pretrained NLM can model much stronger dependencies between text segments that appeared in the same training example, than it can between text segments that appeared in different training examples. This intuitive result has a twofold role. First, it formalizes the motivation behind a broad line of recent successful NLM training heuristics, proposed for the pretraining and fine-tuning stages, which do not necessarily appear related at first glance. Second, our result clearly indicates further improvements to be made in NLM pretraining for the benefit of Natural Language Understanding tasks. As an example, we propose "kNN-Pretraining": we show that including semantically related non-neighboring sentences in the same pretraining example yields improved sentence representations and open domain question answering abilities. This theoretically motivated degree of freedom for pretraining example design indicates new training schemes for self-improving representations.
Motivation & Objective
- To formalize the inductive bias introduced by pretraining data segmentation into contiguous training examples.
- To quantify the expressivity deficit in modeling dependencies between sentences that were never co-occurring in the same input.
- To demonstrate that this bias underpins various successful NLP training heuristics and limits cross-example information integration.
- To propose and evaluate kNN-Pretraining as a method to mitigate this bias by including semantically related, non-neighboring sentences in the same training example.
- To show empirically that kNN-Pretraining enhances zero-shot performance on open-domain question answering and GLUE benchmarks.
Proposed method
- Introduce the concept of 'in-context bias'—a formalized expressivity bias favoring dependencies between sentences seen together in training examples.
- Define the ε-separation rank as a measure of effective dependency modeling capacity under finite precision, adapted for sequential, multi-example settings.
- Upper bound the log separation rank for two sentences in the same input as Õ(dxL), where dx is model width and L is depth, proving it is tight.
- Upper bound the log separation rank for two sentences never co-occurring as Õ(dx[L − 0.5 log₃(η⁻¹)]), revealing a depth deficit due to small learning rates.
- Propose kNN-Pretraining: reformatting pretraining data to include semantically similar, non-adjacent sentences in the same input example.
- Train RoBERTa and GPT-2 models using kNN-Pretraining on Wikipedia data, with mixed data streams and standard LM objectives, and evaluate on Natural Questions and GLUE benchmarks.
Experimental results
Research questions
- RQ1How does the segmentation of pretraining corpora into contiguous training examples affect the model’s ability to learn cross-example dependencies?
- RQ2What is the theoretical expressivity cost of modeling dependencies between sentences that were never seen together in the same input?
- RQ3Can integrating semantically related, non-adjacent sentences into the same training example improve downstream NLU performance?
- RQ4To what extent does kNN-Pretraining enhance zero-shot capabilities on open-domain question answering and generalization tasks?
- RQ5How does the depth deficit in dependency modeling scale with learning rate and model size?
Key findings
- The model’s ability to model dependencies between sentences from different training examples is theoretically limited by a depth deficit of approximately 6 layers due to small learning rates (η ∈ [10⁻⁶, 10⁻⁴]).
- kNN-Pretraining significantly improves zero-shot performance on the Natural Questions benchmark, with a 345M parameter model achieving a 1.4×10⁻² F1 score after 400K regular steps plus 10K kNN-Pretraining steps.
- On GLUE tasks, kNN-Pretraining increases zero-shot accuracy from a baseline average of 35.1 to 35.5 on MNLI, 52.0 to 53.0 on RTE, and 51.1 to 56.3 on WNLI.
- The improvement from kNN-Pretraining is most pronounced when applied for only 10% of the total pretraining time, suggesting high sample efficiency.
- The depth deficit estimate may be more severe than theoretical bounds suggest, potentially scaling as a fraction of L, indicating a stronger practical impact.
- Empirical results show that kNN-Pretraining enhances model capabilities even in zero-shot settings, suggesting improved internal representation learning through structured in-context exposure.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.