atlas

Research map / Architectures and efficiency / Attention and transformers

What Rotary Position Embedding Can Tell Us: Identifying Query and Key Weights Corresponding to Basic Syntactic or High-level Semantic Information

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

Analyzes RoPE query/key weight-vector pairs via their angles to show non-orthogonal pairs relate to syntax and orthogonal pairs to semantics, then proposes Angle-based Weight Masking (AWM) that freezes non-orthogonal pairs during LoRA fine-tuning.

Problem

How LLMs using rotary position embedding utilize positional information across heads and layers, and how to reduce trainable parameters during fine-tuning of query and key weights.

Approach

The angle between the two weight vectors forming a RoPE pair determines how input-sensitive the pair's rotated direction is: non-orthogonal pairs (large |cos α|) attend to fixed relative positions and capture basic syntax, while near-orthogonal pairs capture high-level semantics and are the ones changed by fine-tuning. AWM freezes pairs with |cos α| above a threshold and fine-tunes only the rest,

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add AWM with τ=0.001 to LoRA(r=8) (ablation)Llama-2-7b · TruthfulQAmc1: 33.41 -> 35.00Helped
add AWM with τ=0.001 to LoRA(r=8) (ablation)Llama-2-7b · TruthfulQAmc2: 49.48 -> 50.97Helped
add AWM with τ=0.005 to LoRA(r=8) (ablation)Llama-2-7b · GSM8Kaccuracy: 10.92 -> 11.90Helped
add AWM with τ=0.001 to LoRA(r=8) (ablation)Llama-2-7b · HellaSwagaccuracy: 58.81 -> 58.91Helped
add AWM with τ=0.001 to LoRA(r=8) (ablation)Llama-2-13b · TruthfulQAmc1: 30.72 -> 32.07Helped
add AWM with τ=0.001 to LoRA(r=8) (ablation)Llama-2-13b · TruthfulQAmc2: 44.74 -> 45.88Helped
add AWM with τ=0.001 to LoRA(r=8) (ablation)Llama-2-13b · GSM8Kaccuracy: 18.42 -> 19.48Helped
add AWM with τ=0.01 to LoRA(r=8) (ablation)Llama-2-13b · HellaSwagaccuracy: 61.31 -> 61.45Helped
add AWM with τ=0.01 (ablation)Llama-2-7b + LoftQ · WikiText-2perplexity: 5.518 -> 5.485Helped
add AWM with τ=0.01 (ablation)Llama-2-7b + LoftQ · GSM8Kaccuracy: 39.20 -> 40.86Helped
add AWM with τ=0.001 (ablation)Llama-2-7b + LoftQ · WikiText-2perplexity: 5.518 -> 5.480Helped
add AWM with τ=0.005 (ablation)Llama-2-7b + LoftQ · GSM8Kaccuracy: 39.20 -> 38.44Hurt

Surprising findings

Limitations

Experimental setup

Datasets: Alpaca WikiText-2 GSM8K

Benchmarks: TruthfulQA GSM8K HellaSwag WikiText-2

Metrics: mc1 mc2 accuracy perplexity

Baselines: LoRA LoftQ

Builds on: RoPE LoRA LoftQ

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