atlas

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

Mixture of In-Context Experts Enhance LLMs' Long Context Awareness

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: LLM unlearning and benchmarks · 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 MoICE, a plug-in router in each attention head that dynamically mixes multiple RoPE angles (treated as in-context experts) to improve LLM long-context awareness, trained router-only on frozen LLMs.

Problem

LLMs have uneven awareness of contextual positions under RoPE, so critical information in certain positions (e.g., the middle of long contexts) is overlooked, hurting long-context understanding, generation and RAG.

Approach

Treat each RoPE angle (base) as an in-context expert and attach a learned top-K router to every attention head that selects and weights K RoPE angles per token, aggregating their attention distributions; only the routers are trained with the LLM frozen.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add MoICE routers with router-only trainingLlama2-7B-Chat · L-Evalaverage: 47.52 -> 50.72Helped
Add MoICE routers with router-only trainingMistral-7B-Instruct-8k · L-Evalaverage: 53.27 -> 55.38Helped
Add MoICE routers with router-only trainingQwen1.5-7B-Chat · L-Evalaverage: 67.76 -> 68.54Helped
Add MoICE routers with router-only trainingLlama2-7B-Chat · MDQAaverage: 65.05 -> 65.48Helped
Add MoICE routers with router-only trainingMistral-7B-Instruct-8k · MDQAaverage: 50.65 -> 53.30Helped
Add MoICE routers with router-only trainingLlama2-7B-Chat · LongBenchaverage: 24.62 -> 27.53Helped
Add MoICE routers with router-only trainingMistral-7B-Instruct-8k · LongBenchaverage: 25.76 -> 28.91Helped
Add MoICE routers with router-only trainingQwen1.5-7B-Chat · LongBenchaverage: 37.41 -> 38.93Helped
Use 9 experts instead of 7 (ablation)MoICE on Llama2-7B-Chat · L-Evalaverage: 50.72 -> 50.70No clear effect
Select only 1 expert per token instead of 7 (ablation)MoICE on Llama2-7B-Chat · L-Evalaverage: 50.72 -> 47.22Hurt
Select 3 experts per token instead of 7 (ablation)MoICE on Llama2-7B-Chat · L-Evalaverage: 50.72 -> 50.60No clear effect
Replace router-selected weights with random weights (ablation)MoICE on Llama2-7B-Chat · L-Evalaverage: 50.72 -> 18.65Hurt

Surprising findings

Limitations

Experimental setup

Datasets: OpenHermes-2.5 (1k longest subset) Airoboros Long-Alpaca LongAlign OpenWebText NaturalQuestions-Open (MDQA)

Benchmarks: L-Eval (Coursera, QuALITY, TOEFL, SFiction, open-ended) LongBench MDQA (multi-document QA) Key-Value Retrieval

Metrics: exact match accuracy win-rate average score accuracy gap across positions inference time GPU memory

Baselines: Positional Interpolation Dynamic NTK Ms-PoE Attention Buckets Sliding window attention Fine-tuning

Builds on: Attention Buckets Ms-PoE RoPE Mixture of Experts L-Eval

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