Mixture of In-Context Experts Enhance LLMs' Long Context Awareness
Not on the map. Why?
Abstract (arXiv)
Many studies have revealed that large language models (LLMs) exhibit uneven awareness of different contextual positions. Their limited context awareness can lead to overlooking critical information and subsequent task failures. While several approaches have been proposed to enhance LLMs' context awareness, achieving both effectiveness and efficiency remains challenging. In this paper, for LLMs utilizing RoPE as position embeddings, we introduce a novel method called "Mixture of In-Context Experts" (MoICE) to address this challenge. MoICE comprises two key components: a router integrated into each attention head within LLMs and a lightweight router-only training optimization strategy: (1) MoICE views each RoPE angle as an `in-context' expert, demonstrated to be capable of directing the attention of a head to specific contextual positions. Consequently, each attention head flexibly processes tokens using multiple RoPE angles dynamically selected by the router to attend to the needed positions. This approach mitigates the risk of overlooking essential contextual information. (2) The router-only training strategy entails freezing LLM parameters and exclusively updating routers for only a few steps. When applied to open-source LLMs including Llama and Mistral, MoICE surpasses prior methods across multiple tasks on long context understanding and generation, all while maintaining commendable inference efficiency.
Key facts. Cited by 17 papers in the map (data through 7 Oct 2026). Builds on 36 of its 47 references that are in the map. First posted on arXiv 28 Jun 2024.
Builds on
36 of 47 references.
References · 36
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,413
- 2023Qwen Technical Reportcited by 3,273
- 2023Mistral 7Bcited by 3,065
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,014
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2024Mixtral of Expertscited by 1,785
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
24 more
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2022In-context Learning and Induction Headscited by 930
- 2024DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Modelscited by 834
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2019Latent Retrieval for Weakly Supervised Open Domain Question Answeringcited by 691
- 2023Benchmarking Large Language Models in Retrieval-Augmented Generationcited by 307
- 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Modelscited by 232
- 2021QuALITY: Question Answering with Long Input Texts, Yes!cited by 204
- 2022A Length-Extrapolatable Transformercited by 123
- 2023Lift Yourself Up: Retrieval-augmented Text Generation with Self Memorycited by 103
- 2024LongAlign: A Recipe for Long Context Alignment of Large Language Modelscited by 102
- 2023Attention Sorting Combats Recency Bias In Long Context Language Modelscited by 89
- 2023Tell Your Model Where to Attend: Post-hoc Attention Steering for LLMscited by 82
- 2024A Survey on Retrieval-Augmented Text Generation for Large Language Modelscited by 77
- 2024Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encodingcited by 72
- 2023Graph Mixture of Experts: Learning on Large-Scale Graphs with Explicit Diversity Modelingcited by 63
- 2024Interpreting Key Mechanisms of Factual Recall in Transformer-Based Language Modelscited by 30
- 2023Fortify the Shortest Stave in Attention: Enhancing Context Awareness of Large Language Models for Effective Tool Usecited by 27
- 2017Supervised and Unsupervised Transfer Learning for Question Answeringcited by 24
- 2023An Analysis and Mitigation of the Reversal Cursecited by 22
- 2024Batch-ICL: Effective, Efficient, and Order-Agnostic In-Context Learningcited by 20
- 2024Enhancing Large Language Model Performance To Answer Questions and Extract Information More Accuratelycited by 20
- 2024StreamingDialogue: Prolonged Dialogue Learning via Long Context Compression with Minimal Lossescited by 9
Built on by
Citing papers per year: 2024: 6; 2025: 8; 2026: 3.
17 papers.
Sort:
By area:
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 60
- 2024Fourier Position Embedding: Enhancing Attention's Periodic Extension for Length Generalizationcited by 37
- 2025MoQAE: Mixed-Precision Quantization for Long-Context LLM Inference via Mixture of Quantization-Aware Expertscited by 12
- 2025Coupling Experts and Routers in Mixture-of-Experts via an Auxiliary Losscited by 11
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolationcited by 10
- 2024More Expressive Attention with Negative Weightscited by 9
- 2025Position Bias Mitigates Position Bias:Mitigate Position Bias Through Inter-Position Knowledge Distillationcited by 8
- 2025Kairos: Toward Adaptive and Parameter-Efficient Time Series Foundation Modelscited by 8
- 2025Autonomy-of-Experts Modelscited by 7
- 2024Language Models "Grok" to Copycited by 5
- 2026Stable-RAG: Mitigating Retrieval-Permutation-Induced Hallucinations in Retrieval-Augmented Generationcited by 5
- 2025CodeSSM: Towards State Space Models for Code Understandingcited by 3
5 more
- 2025Dynamic Chunking and Selection for Reading Comprehension of Ultra-Long Context in Large Language Modelscited by 3
- 2026Looking Is Not Picking: An Attention-Segment Account of Tool-Selection Failures in LLM Agentscited by 3
- 2024PEAR: Position-Embedding-Agnostic Attention Re-weighting Enhances Retrieval-Augmented Generation with Zero Inference Overheadcited by 1
- 2025Beyond Isolated Capabilities: Bridging Long CoT Reasoning and Long-Context Understandingcited by 1
- 2026Mitigating Position Bias in Transformers via Layer-Specific Positional Embedding Scalingcited by 0
- 2026Mitigating Position Bias in Transformers via Layer-Specific Positional Embedding Scaling26 Jun 2026
- 2026Looking Is Not Picking: An Attention-Segment Account of Tool-Selection Failures in LLM Agents15 Jun 2026
- 2026Stable-RAG: Mitigating Retrieval-Permutation-Induced Hallucinations in Retrieval-Augmented Generation6 Jan 2026
- 2025Coupling Experts and Routers in Mixture-of-Experts via an Auxiliary Loss29 Dec 2025
- 2025Kairos: Toward Adaptive and Parameter-Efficient Time Series Foundation Models30 Sep 2025
- 2025Position Bias Mitigates Position Bias:Mitigate Position Bias Through Inter-Position Knowledge Distillation21 Aug 2025
- 2025Beyond Isolated Capabilities: Bridging Long CoT Reasoning and Long-Context Understanding20 Jul 2025
- 2025MoQAE: Mixed-Precision Quantization for Long-Context LLM Inference via Mixture of Quantization-Aware Experts9 Jun 2025
- 2025Dynamic Chunking and Selection for Reading Comprehension of Ultra-Long Context in Large Language Models1 Jun 2025
- 2025CodeSSM: Towards State Space Models for Code Understanding2 May 2025
- 2025Autonomy-of-Experts Models22 Jan 2025
- 2024Fourier Position Embedding: Enhancing Attention's Periodic Extension for Length Generalization23 Dec 2024
5 more
- 2024More Expressive Attention with Negative Weights11 Nov 2024
- 2024Why Does the Effective Context Length of LLMs Fall Short?24 Oct 2024
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolation7 Oct 2024
- 2024PEAR: Position-Embedding-Agnostic Attention Re-weighting Enhances Retrieval-Augmented Generation with Zero Inference Overhead29 Sep 2024
- 2024Language Models "Grok" to Copy14 Sep 2024
- 2026Stable-RAG: Mitigating Retrieval-Permutation-Induced Hallucinations in Retrieval-Augmented Generation6 Jan 2026
- 2024PEAR: Position-Embedding-Agnostic Attention Re-weighting Enhances Retrieval-Augmented Generation with Zero Inference Overhead29 Sep 2024
- 2024Language Models "Grok" to Copy14 Sep 2024
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 60
- 2024Fourier Position Embedding: Enhancing Attention's Periodic Extension for Length Generalizationcited by 37
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolationcited by 10
- 2024More Expressive Attention with Negative Weightscited by 9
- 2025Position Bias Mitigates Position Bias:Mitigate Position Bias Through Inter-Position Knowledge Distillationcited by 8
- 2025Kairos: Toward Adaptive and Parameter-Efficient Time Series Foundation Modelscited by 8
- 2025CodeSSM: Towards State Space Models for Code Understandingcited by 3
- 2025Dynamic Chunking and Selection for Reading Comprehension of Ultra-Long Context in Large Language Modelscited by 3
- 2026Mitigating Position Bias in Transformers via Layer-Specific Positional Embedding Scalingcited by 0
- 2026Mitigating Position Bias in Transformers via Layer-Specific Positional Embedding Scaling26 Jun 2026
- 2025Kairos: Toward Adaptive and Parameter-Efficient Time Series Foundation Models30 Sep 2025
- 2025Position Bias Mitigates Position Bias:Mitigate Position Bias Through Inter-Position Knowledge Distillation21 Aug 2025
- 2025Dynamic Chunking and Selection for Reading Comprehension of Ultra-Long Context in Large Language Models1 Jun 2025
- 2025CodeSSM: Towards State Space Models for Code Understanding2 May 2025
- 2024Fourier Position Embedding: Enhancing Attention's Periodic Extension for Length Generalization23 Dec 2024
- 2024More Expressive Attention with Negative Weights11 Nov 2024
- 2024Why Does the Effective Context Length of LLMs Fall Short?24 Oct 2024
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolation7 Oct 2024