atlas

Research map / Architectures and efficiency / Attention and transformers

Compositional Capabilities of Autoregressive Transformers: A Study on Synthetic, Interpretable Tasks

ICML 2024 · Architectures and efficiency › Attention and transformers · approach: Transformer expressivity and learnability · 1 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.

Trains small nanoGPT Transformers on synthetic compositions of bijection/permutation functions marked by task tokens, showing they generalize to exponentially/combinatorially many unseen compositions with step-by-step outputs and identifying attention-selects/MLP-executes mechanism.

Problem

Whether autoregressive Transformers trained on compositional data can learn to compose their atomic capabilities and generalize to exponentially or combinatorially many unseen function compositions, and what factors drive this.

Approach

Uses a minimal synthetic setup with task tokens specifying function compositions over data tokens, comparing in-order vs out-of-order training data, step-by-step vs direct prompt formats, and probing mechanisms via linear probes, attention maps, and a theoretical construction.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Generate intermediate outputs step by step instead of predicting only the final compositionAutoregressive Transformer · Unseen in-order compositions of five bijectionsaccuracy: 100 compositions -> all 3125 possible in-order compositionsHelped
Train with atomic functions only, rather than including compositions (ablation)Autoregressive Transformer · Compositional generalizationaccuracyHurt
Include in-order compositions in the training data (ablation)Autoregressive Transformer · Unseen in-order compositionsaccuracy: 10Helped
Include out-of-order compositions in the training data (ablation)Autoregressive Transformer · Unseen out-of-order compositionsaccuracy: 100Helped
Use direct prompting instead of step-by-step prompting (ablation)Autoregressive Transformer · Unseen in-order compositions of five bijectionsaccuracy: 2000 of the 3125 possible in-order compositionsHurt
Train on 250 observed combinations of a permutation and a bijection (ablation)Autoregressive Transformer with direct prompting · Two-function compositions of permutations and bijectionsaccuracy: 250 -> all 625 possible compositionsHelped
Use direct prompting for compositions of two bijections (ablation)Autoregressive Transformer · Unseen in-order compositions of two bijectionsaccuracy: 500 of 625 compositionsHurt
Replace the Transformer with an LSTMAutoregressive model · Unseen compositions in direct and step-by-step formatsaccuracyHurt
Increase Transformer depth in the step-by-step setup (ablation)Autoregressive Transformer · Unseen in-order compositions of five bijectionsaccuracyHurt
Increase embedding dimension (ablation)Autoregressive Transformer · Unseen in-order compositions of five bijectionsaccuracyHelped
Vary the number of attention heads in a 1-layer Transformer (ablation)Autoregressive Transformer · Compositional generalizationaccuracyNo clear effect
Train on random compositions rather than only atomic functions (ablation)Autoregressive Transformer · Compositions with few versus many non-identity functionsaccuracy: 25; 50Mixed

Surprising findings

Limitations

Experimental setup

Datasets: synthetic compositions of bijections and permutations over 6 data tokens (vocabulary size 10)

Benchmarks: held-out in-order and out-of-order compositions of synthetic functions

Metrics: accuracy over last six tokens accuracy over 1000 data token inputs

Baselines: LSTM BASE training subset RANDOM training subset

Builds on: nanoGPT chain-of-thought induction heads

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