atlas

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

Long-Short Alignment for Effective Long-Context Modeling in LLMs

ICML 2025 · Large language models › Language, safety and interpretability · approach: LLM unlearning and benchmarks · 0 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 long-short misalignment, a symmetric cross-entropy metric between output distributions on suffixes of different lengths, and uses it as a regularizer to improve length generalization when fine-tuning Llama2-7B with CLEX, LongQLoRA, and EABF.

Problem

Length generalization in LLMs is poor: models trained on short contexts degrade on longer test inputs, and prior work focuses on positional encodings and mechanisms rather than the consistency of output distributions across lengths.

Approach

Shift focus from input features to output-space consistency: penalize divergence (symmetric cross-entropy) between model predictions on suffixes of different lengths of the same sequence, and add this long-short misalignment as a regularization term during training, implemented efficiently by reusing overlapping positions of one longer sequence.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add long-short misalignment loss with α=0.1Llama2-7B with CLEX · RedPajama-Book, 4k fine-tuning, 200 stepsLongBench-E: 24.7 -> 26.6Helped
Add long-short misalignment loss with α=0.1Llama2-7B with CLEX · PG19, 4k fine-tuning, 200 stepsLongBench-E: 22.5 -> 25.3Helped
Add long-short misalignment loss with α=0.1Llama2-7B · RedPajama-Book, 8k fine-tuning, LongQLora, 200 stepsLongBench-E: 23.4 -> 25.8Helped
Add long-short misalignment loss with α=0.1Llama2-7B · RedPajama-Book, 8k fine-tuning, EABF, 200 stepsLongBench-E: 23.6 -> 24.8Helped
Increase regularization coefficient from α=0.1 to α=0.3 (ablation)Llama2-7B with CLEX · RedPajama-Book, 4k fine-tuning, 200 stepsLongBench-E: 26.6 -> 27.1Helped
Increase regularization coefficient to α=0.5 (ablation)Llama2-7B with CLEX · RedPajama-Book, 4k fine-tuning, 200 stepsLongBench-E: 27.1 -> 24.7Hurt
Increase regularization coefficient to α=1.0 (ablation)Llama2-7B with CLEX · RedPajama-Book, 4k fine-tuning, 200 stepsLongBench-E: 24.7 -> 19.9Hurt
Broaden l_extra sampling range from [1, l_train/2] to [1, l_train] (ablation)Llama2-7B with LongQLora · RedPajama-Book, 8k fine-tuning, 200 stepsLongBench-E: 25.8 -> 19.1Hurt
Narrow l_extra sampling range to [1, l_train/4] (ablation)Llama2-7B with LongQLora · RedPajama-Book, 8k fine-tuning, 200 stepsLongBench-E: 25.8 -> 25.7No clear effect
Sample l_extra from [l_train/4, l_train/2] instead of [1, l_train/2] (ablation)Llama2-7B with LongQLora · RedPajama-Book, 8k fine-tuning, 200 stepsLongBench-E: 25.8 -> 24.5Hurt

Surprising findings

Limitations

Experimental setup

Datasets: RedPajama-Book PG19 LongBench-E BABILong

Benchmarks: LongBench-E BABILong perplexity on 8k/16k validation sets

Metrics: LongBench-E score perplexity BABILong accuracy correlation coefficient with long-context performance

Baselines: CLEX baseline (cross-entropy only) LongQLoRA baseline EABF baseline RandomPos Yarn-Llama-2-7B-8k Qwen-7B-8k

Builds on: CLEX LongQLoRA EABF LongLoRA Position Interpolation

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