atlas

Research map / Large language models / Language, safety and interpretability

Exploring Context Window of Large Language Models via Decomposed Positional Vectors

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: Pruning and circuits in LLMs · 11 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.

Decomposes LLM hidden states into semantic and mean-based positional vectors to analyze how positional information forms and drives context window extension, then proposes two training-free extension methods (positional vector replacement and attention window extension).

Problem

LLMs degrade in performance beyond their context window, and existing length extrapolation and context window extension methods lack an in-depth interpretation of their underlying mechanisms in hidden states.

Approach

Mean-based decomposition separates positional vectors from hidden states; analysis shows initial tokens act as anchors forming positional information, OOD positional vectors cause degradation beyond the window, and context window extension works by interpolating positional vectors via attention logit scaling. This yields two training-free extension methods that interpolate positional vectors.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
extend the attention window and scale attention logitsTL-Window · PG-19 8KPPL: 660.51 -> 29.30Helped
replace positional vectors with interpolated vectorsTL-NoPE · PG-19 8KPPL: $>10^3$ -> 73.79Helped
apply Dynamic NTKTL-RoPE · PG-19 8KPPL: $>10^3$ -> 28.58Helped
use attention window extension rather than attention scalingTL-Window and TL-NoPE · PG-19 8KPPL: 46.59 -> 29.30Helped
increase positional-vector replacement interpolation from r=2, α=1.1 to r=5, α=1.3TL-NoPE · PG-19 4KPPL: 15.58 -> 47.65Hurt
remove the positional vector from initial tokens 1–4 (ablation)TL-NoPE · RedPajamaPPL: 7.56 -> >1000Hurt
remove the positional basis from initial tokens 1–4 (ablation)TL-NoPE · RedPajamaPPL: 7.56 -> >1000Hurt
remove the semantic vector from initial tokens 1–4 (ablation)TL-NoPE · RedPajamaPPL: 7.56 -> 8.20No clear effect
remove the positional basis from initial tokens 1–4 (ablation)TL-RoPE · RedPajamaPPL: 6.06 -> >1000Hurt
remove the positional basis from initial tokens 0–4 (ablation)Llama-3-8B · RedPajamaPPL: 6.74 -> >1000Hurt

Surprising findings

Limitations

Experimental setup

Datasets: RedPajama PG-19

Benchmarks: PG-19

Metrics: perplexity (PPL) cosine similarity of positional vectors

Baselines: Dynamic NTK Attention Scaling TL-RoPE TL-NoPE

Builds on: RoPE ALiBi NoPE Dynamic NTK attention scaling

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