Skip to main content
arXiv is now an independent nonprofit! Learn more
archive
Search Submit Donate Log in

Computer Science > Computation and Language

(cs)
[Submitted on 1 May 2025 (v1), last revised 10 Nov 2025 (this version, v3)]

Title:On the generalization of language models from in-context learning and finetuning: a controlled study

Authors:Andrew K. Lampinen, Arslan Chaudhry, Stephanie C.Y. Chan, Cody Wild, Diane Wan, Alex Ku, Jörg Bornschein, Razvan Pascanu, Murray Shanahan, James L. McClelland
View a PDF of the paper titled On the generalization of language models from in-context learning and finetuning: a controlled study, by Andrew K. Lampinen and 8 other authors
View PDF HTML (experimental)
Abstract:Large language models exhibit exciting capabilities, yet can show surprisingly narrow generalization from finetuning. E.g. they can fail to generalize to simple reversals of relations they are trained on, or fail to make simple logical deductions based on trained information. These failures to generalize factual information from fine-tuning can significantly hinder the reasoning capabilities of these models. On the other hand, language models' in-context learning (ICL) shows different inductive biases and deductive reasoning capabilities. Here, we explore these differences in generalization and deductive reasoning between in-context- and fine-tuning-based learning. To do so, we constructed several novel datasets to evaluate and improve models' abilities to make generalizations over factual information from novel data. These datasets are designed to create clean tests of generalization, by isolating the knowledge in the dataset from that in pretraining. We expose pretrained large models to controlled subsets of the information in these datasets -- either through ICL or fine-tuning -- and evaluate their performance on test sets that require various types of generalization. We find overall that in data-matched settings, ICL can generalize several types of inferences more flexibly than fine-tuning (though we also find some qualifications of prior findings, such as cases when fine-tuning can generalize to reversals embedded in a larger structure of knowledge). We build on these findings to propose a method to enable improved generalization from fine-tuning: adding in-context reasoning traces to finetuning data. We show that this method improves generalization across various splits of our datasets and other benchmarks. Our results have implications for understanding the generalization afforded by different modes of learning in language models, and practically improving their performance.
Comments: FoRLM workshop, NeurIPS 2025
Subjects: Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Machine Learning (cs.LG)
Cite as: arXiv:2505.00661 [cs.CL]
  (or arXiv:2505.00661v3 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2505.00661
arXiv-issued DOI via DataCite

Submission history

From: Andrew Lampinen [view email]
[v1] Thu, 1 May 2025 17:02:27 UTC (1,110 KB)
[v2] Tue, 6 May 2025 20:44:01 UTC (1,032 KB)
[v3] Mon, 10 Nov 2025 19:08:51 UTC (1,055 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled On the generalization of language models from in-context learning and finetuning: a controlled study, by Andrew K. Lampinen and 8 other authors
  • View PDF
  • HTML (experimental)
  • TeX Source
license icon view license

Current browse context:

cs.CL
< prev   |   next >
new | recent | 2025-05
Change to browse by:
cs
cs.AI
cs.LG

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar
Loading...

Bookmark

BibSonomy Reddit

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
We gratefully acknowledge support from our major funders, member institutions, , and all contributors.
About · Help · Contact · Subscribe · Copyright · Privacy · Accessibility · Operational Status (opens in new tab)
Major funding support from
Simons Foundation Simons Foundation International Schmidt Sciences