atlas

Research map / Architectures and efficiency / Pruning and efficient tuning

Trainable Transformer in Transformer

ICML 2024 · Architectures and efficiency › Pruning and efficient tuning · approach: Efficient ViT adaptation · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Transformer in Transformer (TinT), a parameter-efficient transformer construction that simulates and fine-tunes a 125M auxiliary transformer (e.g., OPT-125M) within a single forward pass, using prefix-embedding weight storage, stacking/sharding, and approximate (first-order, stop-gradient) backpropagation.

Problem

Prior constructions showing in-context learning as implicit gradient descent require enormous simulator size and only handle tiny auxiliary models (linear or small MLP), so simulating fine-tuning of a realistic pre-trained transformer within a forward pass is intractable.

Approach

Store auxiliary weights in prefix embeddings, stack and shard weights across many attention heads to parallelize linear layers, and use first-order approximations for layer norm and stop-gradients through attention scores and Q/K to make the simulated backward pass cheap, updating only value parameters.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use TinT instead of the untuned auxiliary modelGPT-2 · WikiText-103, 30% trainingperplexity: 25.6 -> 25.1Helped
Use TinT instead of the untuned auxiliary modelGPT-2 · WikiText-103, 50% trainingperplexity: 24.9 -> 24.3Helped
Use TinT instead of the untuned auxiliary modelGPT-2 · WikiText-103, 70% trainingperplexity: 24.5 -> 23.8Helped
Use TinT instead of the untuned auxiliary modelGPT-2 · WikiText-103, 90% trainingperplexity: 23.3 -> 22.6Helped
Use TinT instead of the untuned auxiliary modelOPT-125M · WikiText-103, 30% trainingperplexity: 29.6 -> 29.3Helped
Use TinT instead of the untuned auxiliary modelOPT-125M · WikiText-103, 50% trainingperplexity: 28.8 -> 28.4Helped
Use TinT instead of the untuned auxiliary modelOPT-125M · WikiText-103, 70% trainingperplexity: 28.0 -> 27.5Helped
Use TinT instead of the untuned auxiliary modelOPT-125M · WikiText-103, 90% trainingperplexity: 28.0 -> 27.4Helped
Use TinT instead of the untuned auxiliary modelOPT-125M · 7 classification tasks, zero-shot averageaccuracy: 68.6 -> 72.0Helped
Use TinT instead of the untuned auxiliary modelOPT-125M · 7 classification tasks, 32-shot averageaccuracy: 50.5 -> 76.4Helped
Use TinT rather than explicit fine-tuningOPT-125M · 7 classification tasks, zero-shot averageaccuracy: 73.2 -> 72.0Hurt
Use TinT rather than explicit fine-tuningOPT-125M · 7 classification tasks, 32-shot averageaccuracy: 74.6 -> 76.4Helped

Surprising findings

Limitations

Experimental setup

Datasets: WikiText-103 SST-2 MR CR MPQA Amazon Polarity AGNews Subj

Benchmarks: WikiText-103 SST-2 MR CR MPQA Amazon Polarity AGNews Subj

Metrics: perplexity classification accuracy

Baselines: OPT-125M (auxiliary model) explicit fine-tuning of OPT-125M OPT-1.3B dynamic evaluation

Builds on: in-context learning as gradient descent constructions GeLU multiplication trick LoRA dynamic evaluation

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy