Prior Forgetting and In-Context Overfitting

Sungyoon Lee
1/1/2025
transformer-attention

No confident code implementation found for this paper.

Abstract

In-context learning (ICL) is one of the key capabilities contributing to the great success of LLMs. At test time, ICL is known to operate in the two modes: task recognition and task learning.

Show full abstract

In this paper, we investigate the emergence and dynamics of the two modes of ICL during pretraining. To provide an analytical understanding of the learning dynamics of the ICL abilities, we investigate the in-context random linear regression problem with a simple linear-attention-based transformer, and define and disentangle the strengths of the task recognition and task learning abilities stored in the transformer model’s parameters. We show that, during the pretraining phase, the model first learns the task learning and the task recognition abilities together in the beginning, but it (a) gradually forgets the task recognition ability to recall the priorly learned tasks and (b) relies more on the given context in the later phase, which we call (a) prior forgetting and (b) in-context overfitting , respectively.

DOISemantic Scholar

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{lee2025prior,
  title  = {Prior Forgetting and In-Context Overfitting},
  author = {Sungyoon Lee},
  year   = {2025},
  doi    = {10.52202/085713-1523},
  url    = {https://doi.org/10.52202/085713-1523},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/ee52e7f34ad1ceeb0ca26b91f444c3231454c1c7.svg)](https://codeofpaper.com/paper/ee52e7f34ad1ceeb0ca26b91f444c3231454c1c7)

Discussion