atlas

Research map / Architectures and efficiency / Attention and transformers

Exploring Transformer Extrapolation

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

Derives a sufficient condition for RPE-based length extrapolation (convergence of the series of exp(RPE)), proposes a training-free Theoretical Receptive Field estimate, and validates with small decoder transformers trained from scratch on four corpora.

Problem

Length extrapolation in transformers with relative positional encodings: which RPEs allow models tested on sequences longer than training length to keep stable perplexity, and how to estimate receptive fields without training.

Approach

Shows that an RPE yields length extrapolation whenever the series of exp(RPE) converges (a sliding-window-like hypothesis), derives a training-free Theoretical Receptive Field (TRF) from the RPE formula alone, and builds two new RPEs (1/n^2 and exp(-ln^2 n)) that satisfy the condition.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace sinusoidal positional encoding with Type1 RPETransformer language model · Wikitext-103, inference length 512 to 9216PPL: 24.73 -> 21.90Helped
Replace sinusoidal positional encoding with Type1 RPETransformer language model · Books, inference length 512 to 9216PPL: 7.49 -> 6.99Helped
Replace sinusoidal positional encoding with Type1 RPETransformer language model · Github, inference length 512 to 9216PPL: 2.29 -> 2.02Helped
Replace sinusoidal positional encoding with Type1 RPETransformer language model · WikiBook, inference length 512 to 9216PPL: 17.98 -> 16.28Helped
Use nonconvergent 1/n RPETransformer language model · Wikitext-103, inference length 512 to 9216PPL: 24.67 -> 58.46Hurt
Use nonconvergent 1/(n ln n) RPETransformer language model · Wikitext-103, inference length 512 to 9216PPL: 24.64 -> 27.63Hurt
Use nonconvergent 1/n RPETransformer language model · Books, inference length 512 to 9216PPL: 7.40 -> 26.34Hurt
Use nonconvergent 1/(n ln n) RPETransformer language model · Books, inference length 512 to 9216PPL: 7.35 -> 10.65Hurt
Use nonconvergent 1/n RPETransformer language model · Github, inference length 512 to 9216PPL: 2.28 -> 76.78Hurt
Use nonconvergent 1/(n ln n) RPETransformer language model · Github, inference length 512 to 9216PPL: 2.27 -> 16.35Hurt
Use nonconvergent 1/n RPETransformer language model · WikiBook, inference length 512 to 9216PPL: 17.91 -> 204.10Hurt
Use nonconvergent 1/(n ln n) RPETransformer language model · WikiBook, inference length 512 to 9216PPL: 17.90 -> 133.36Hurt

Surprising findings

Limitations

Experimental setup

Datasets: Wikitext-103 Books Github WikiBook

Benchmarks: Wikitext-103 Books Github WikiBook

Metrics: perplexity effective receptive field

Baselines: Sinusoidal ALiBi Kerple-Log Kerple-Power Sandwich

Builds on: ALiBi Kerple Sandwich

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