atlas

Research map / Architectures and efficiency / Attention and transformers

Functional Interpolation for Relative Positions improves Long Context Transformers

ICLR 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 FIRE, a learnable functional relative position encoding that normalizes query-key distances by a learnable-threshold progressive interpolation, enabling zero-shot length generalization for decoder-only Transformers.

Problem

Transformer language models degrade on inputs longer than their training context; existing relative position encodings either saturate, are biased toward locality, are slow on accelerators, or require knowing the target length in advance (interpolation methods).

Approach

Learn the relative position bias with a tiny MLP applied to the query-key distance normalized by the (log-transformed, thresholded) query position, so the MLP input stays in [0,1] for any sequence length; the paper proves this can represent T5 RPE, Alibi, Kerple and Sandwich biases.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use FIRE instead of Kerple125M language model · C4 validation, sequence length 8192perplexity: 21.24 v.s. 23.52 perplexityHelped
use FIRE instead of Kerplebase model · SCROLLSAverage: 24.11 -> 25.64Helped
use FIRE instead of RoPE-PIlarge model · SCROLLSAverage: 26.04 -> 27.05Helped
add the log transform to relative distances (ablation)FIRE · C4 validation, sequence length 8192log perplexity: 3.334 -> 3.085Helped
add thresholding to the normalizer (ablation)log-transformed FIRE · C4 validation, sequence length 8192log perplexity: 3.085 -> 3.056Helped
add thresholding to the normalizer (ablation)log-transformed FIRE · GLUE/SuperGLUEAverage accuracy: 70.42 -> 71.14Helped
use a two-hidden-layer MLP instead of a linear layer (ablation)FIRE · C4 validation, sequence length 8192log perplexity: 3.32 -> 3.06Helped
increase the function approximator from one to two hidden layers (ablation)FIRE · C4 validation, sequence length 8192log perplexity: 3.08 -> 3.06Helped
use GeLU instead of ReLU activation (ablation)FIRE · C4 validation, sequence length 8192log perplexity: 3.06 -> 3.06No clear effect
add an activation to the final MLP output (ablation)FIRE · C4 validation, sequence length 8192log perplexity: 3.08 -> 3.19Hurt
share the position encoding function across layers (ablation)FIRE · C4 validation, sequence length 8192log perplexity: 3.06 -> 3.10Hurt
share the position encoding function across layers (ablation)FIRE · GLUE/SuperGLUEAverage accuracy: 71.14 -> 71.04Hurt

Surprising findings

Limitations

Experimental setup

Datasets: C4 arXiv GitHub SCROLLS NarrativeQA GLUE SuperGLUE

Benchmarks: C4 arXiv GitHub SCROLLS NarrativeQA GLUE SuperGLUE

Metrics: log perplexity F1 EM Rgm average accuracy

Baselines: NoPE RoPE RoPE-PI Alibi Kerple T5's RPE YaRN Sandwich

Builds on: T5 relative position bias ALiBi Kerple RoPE position interpolation YaRN

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