Reproduce “Toward Understanding In-context vs. In-weight Learning” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Bryan Chan, Xinyi Chen, András György, Dale Schuurmans

Researchers at Google DeepMind and the University of Alberta developed a theoretical framework to explain the emergence and transience of in-context learning (ICL) in large language models, modeling it as a competition between in-weight and in-context predictors. Their work confirms that data properties, such as abundance and noise, govern a model's reliance on contextual examples versus memorized knowledge, observed in both stylized models and a fine-tuned Gemini Nano 1 LLM.

Key insights

  • ICL emerges when the in-weight learner's error is high due to insufficient training data for specific input regions, prompting the model to favor contextual information.
  • ICL exhibits transience, diminishing as the in-weight learner accumulates more data and reduces its error, eventually surpassing or matching ICL's predictive accuracy for specific inputs.
  • The dynamic selection between ICL and IWL is primarily driven by the 'learnability' of data, which encompasses factors such as data abundance, class frequency, and input noise.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.