Learning to (Learn at Test Time)

Yu Sun, Xinhao Li, Karan Dalal, Chloe Hsu, Sanmi Koyejo +4 more
10/20/2023
cs.LG

Official code: test-time-training/mttt (93 stars, Apache-2.0, last commit 2023-11-16). 2 more implementations below.

Abstract

We reformulate the problem of supervised learning as learning to learn with two nested loops (i.e. learning problems). The inner loop learns on each individual instance with self-supervision before final prediction. The outer loop learns the self-supervised task used by the inner loop, such that its final prediction improves. Our inner loop turns out to be equivalent to linear attention when the inner-loop learner is only a linear model, and to self-attention when it is a kernel estimator. For practical comparison with linear or self-attention layers, we replace each of them in a transformer with an inner loop, so our outer loop is equivalent to training the architecture. When each inner-loop learner is a neural network, our approach vastly outperforms transformers with linear attention on ImageNet from 224 x 224 raw pixels in both accuracy and FLOPs, while (regular) transformers cannot run.

View on arXivView PDF

Code Implementations(3)

Apache-2.0

Official JAX implementation of Learning to (Learn at Test Time)

937PythonOct 14, 20232 years agoApache-2.0
MIT

Official PyTorch implementation of Learning to (Learn at Test Time): RNNs with Expressive Hidden States

1,39881PythonJun 28, 20242 years agoMIT

Official JAX implementation of Learning to (Learn at Test Time): RNNs with Expressive Hidden States

46337Shell, PythonJul 3, 202411 months ago

Similar Papers

Cite this paper

@article{sun2023learning,
  title  = {Learning to (Learn at Test Time)},
  author = {Yu Sun and Xinhao Li and Karan Dalal and Chloe Hsu and Sanmi Koyejo and Carlos Guestrin and Xiaolong Wang and Tatsunori Hashimoto and Xinlei Chen},
  year   = {2023},
  eprint = {2310.13807},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.13807v2}
}

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

Discussion