Reproduce “Rethinking Invariance in In-context 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

Lizhe Fang, Yifei Wang, Khashayar Gatmiry, Lei Fang, Yisen Wang

A novel framework called InvICL achieves permutation-invariant in-context learning through a two-stage approach combining leave-one-out bag-of-examples encoding with parallel implementation, demonstrating superior performance on both synthetic and real-world tasks while maintaining fast inference speeds comparable to standard autoregressive methods.

Key insights

  • Attention mask must follow bag-of-examples form to achieve both invariance and non-leakage
  • Leave-one-out encoding allows examples to be processed in context of all other samples
  • Theoretical connection between InvICL and gradient descent under same parameterization

Summary by alphaXiv.

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