atlas

Research map / Architectures and efficiency / Attention and transformers

DAPE: Data-Adaptive Positional Encoding for Length Extrapolation

NeurIPS 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.

Proposes DAPE, a data-adaptive additive positional encoding that feeds attention logits and a fixed positional bias (Alibi, Kerple, FIRE) through a small two-layer MLP to produce input-dependent position biases, improving length extrapolation on Arxiv, Books3 and CHE.

Problem

Static positional encodings (APE, RPE, RoPE, Alibi, Kerple, FIRE) are fixed after training regardless of input, limiting adaptability and length generalization of transformers.

Approach

Adds a learned MLP f(QK^T, B) over the pre-softmax attention logits and the positional bias matrix B, so the positional bias becomes semantically dependent on input context; compatible with any additive RPE and implementable per head with a small hidden width (e.g., 32).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
adapt Kerple bias using DAPE context (attention and position)Kerple · Arxiv, train 512, eval 8192perplexity: 13.3524 -> 3.8642Helped
adapt Kerple bias using DAPE context (attention and position)Kerple · Books3, train 512, eval 8192perplexity: 39.31 -> 17.88Helped
adapt attention and positional bias jointly instead of using f(B) alone (ablation)DAPE bias ablation · Books, train 512, eval 8192perplexity: 23.49 -> 17.88Helped
add a learned bias correction f(B) (ablation)static bias QK^T+B · Books, train 512, eval 8192perplexity: 39.31 -> 23.49Helped
use concatenation rather than additive residual variant (ablation)DAPE-Kerple · train length 128, eval 8192perplexity: 5.17 -> 5.03Helped
use concatenation rather than additive residual variant (ablation)DAPE-Kerple · train length 512, eval 8192perplexity: 3.75 -> 3.69Helped
add residual connection to concatenation variant (ablation)DAPE-Kerple · train length 128, eval 8192perplexity: 5.03 -> 5.00No clear effect
add residual connection to concatenation variant (ablation)DAPE-Kerple · train length 512, eval 8192perplexity: 3.69 -> 3.70No clear effect
set DAPE hidden dimension to 4 (ablation)DAPE-Alibi · Arxiv, train 128, eval 128perplexity: 8.31 -> 8.25Helped
set DAPE hidden dimension to 4 (ablation)DAPE-Alibi · Arxiv, train 128, eval 8192perplexity: 5.85 -> 5.67Helped

Surprising findings

Limitations

Experimental setup

Datasets: Arxiv Books3 Chomsky Hierarchy Evaluation benchmark (CHE)

Benchmarks: Arxiv perplexity Books3 perplexity CHE

Metrics: perplexity accuracy statistical significance (p-value) time cost (ms)

Baselines: NoPE RoPE YaRN Randomized RoPE T5 bias Alibi Kerple FIRE

Builds on: Alibi Kerple FIRE RoPE randomized positional encoding

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