Generalization to New Sequential Decision Making Tasks with In-Context Learning

S. Raparthy, Eric Hambro, Robert Kirk, Mikael Henaff, R. Raileanu
2/12/2026

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Training autonomous agents that can learn new tasks from only a handful of demonstrations is a long-standing problem in machine learning. Recently, transformers have been shown to learn new language or vision tasks without any weight updates from only a few examples, also referred to as in-context learning. However, the sequential decision making setting poses additional challenges having a lower tolerance for errors since the environment's stochasticity or the agent's actions can lead to unseen, and sometimes unrecoverable, states. In this paper, we use an illustrative example to show that naively applying transformers to sequential decision making problems does not enable in-context learning of new tasks. We then demonstrate how training on sequences of trajectories with certain distributional properties leads to in-context learning of new sequential decision making tasks. We investigate different design choices and find that larger model and dataset sizes, as well as more task diversity, environment stochasticity, and trajectory burstiness, all result in better in-context learning of new out-of-distribution tasks. By training on large diverse offline datasets, our model is able to learn new MiniHack and Procgen tasks without any weight updates from just a handful of demonstrations.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — 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{raparthy2026generalization,
  title  = {Generalization to New Sequential Decision Making Tasks with In-Context Learning},
  author = {S. Raparthy and Eric Hambro and Robert Kirk and Mikael Henaff and R. Raileanu},
  year   = {2026},
  eprint = {2312.03801},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2312.03801},
  journal = {ICML 2023 2023}
}

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/2312.03801.svg)](https://codeofpaper.com/paper/2312.03801)

Discussion