atlas

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

3D-RPE: Enhancing Long-Context Modeling Through 3D Rotary Position Encoding

AAAI 2025 · Large language models › Language, safety and interpretability · approach: Pruning and circuits in LLMs · 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 3D-RPE, a rotary position encoding on a 3D (Bloch) sphere with separate within-chunk and across-chunk angles, to improve long-context modeling of LLaMA models under position interpolation.

Problem

RoPE suffers from long-term decay and loses positional resolution when position interpolation is used to extend LLM context windows beyond pretraining length.

Approach

Extends 2D RoPE to a 3D rotation inspired by the Bloch sphere: the chunk-internal angle theta encodes within-chunk relative position and the angle phi encodes across-chunk position, giving controllable long-term decay and better resolution under linear interpolation.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace standard RoPE with 3D-RPELLaMA-2-7B-chat · LongBench Multi-Doc QAscore: 22.60 -> 60.10Helped
Replace standard RoPE with 3D-RPELLaMA-2-7B-chat · LongBench Summarizationscore: 24.70 -> 28.99Hurt
Use 3D-RPE instead of the original positional encodingLLaMA-2-7B-chat · LEval CodeUEM: 1.11 -> 2.22Hurt
Use 3D-RPE instead of the original positional encodingLLaMA-3-8B-Instruct · LEval CodeUEM: 4.44 -> 4.44No clear effect
Use 3D-RPE instead of the original positional encodingLLaMA-3-8B-Instruct · LEval TOEFLEM: 82.89 -> 82.89No clear effect
Use 3D-RPE instead of the original positional encodingLLaMA-3-8B-Instruct · LEval QuALiTYEM: 64.34 -> 61.38Hurt
Use 3D-RPE instead of the original positional encodingLLaMA-3-8B-Instruct · LEval GSMEM: 76.00 -> 80.00Helped
Use 3D-RPE instead of the original positional encoding (ablation)LLaMA-2-7B-Base · PG19 validation, 32kperplexity: 15.11 -> 9.34Helped
Combine 3D-RPE with linear position interpolation (ablation)LLaMA-2-7B-Base · PG19 validation, 16kperplexity: 15.11 -> 7.71Helped
Combine 3D-RPE with linear position interpolation (ablation)LLaMA-2-7B-Base · PG19 validation, 32kperplexity: >10^2 -> 9.34Helped
Replace standard RoPE with 3D-RPELLaMA2-7B-Base · PG19 test, 32kperplexity: 7.04 -> 8.09Hurt
Replace standard RoPE with 3D-RPELLaMA2-7B-Base · Proof-Pile test, 32kperplexity: 2.50 -> 2.89Hurt

Surprising findings

Limitations

Experimental setup

Datasets: LongAlpaca-12k LongAlpaca-16k RedPajama-Data PG19 Arxiv Math Proof-pile

Benchmarks: LongBench LEval PG19 Arxiv Math Proof-pile

Metrics: F1 Rouge exact match perplexity accuracy

Baselines: LongAlpaca-16k LongChat-32k LongLLaMA ChatGLM3-6B-32k StreamingLLM ChunkLLaMA-16k LongLoRA Activation Beacon PI NTK YaRN

Builds on: RoPE Position Interpolation LongLoRA PoSE LongChat

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