Hierarchical Context Merging: Better Long Context Understanding for Pre-trained LLMs
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have shown remarkable performance in various natural language processing tasks. However, a primary constraint they face is the context limit, i.e., the maximum number of tokens they can process. Previous works have explored architectural changes and modifications in positional encoding to relax the constraint, but they often require expensive training or do not address the computational demands of self-attention. In this paper, we present Hierarchical cOntext MERging (HOMER), a new training-free scheme designed to overcome the limitations. HOMER uses a divide-and-conquer algorithm, dividing long inputs into manageable chunks. Each chunk is then processed collectively, employing a hierarchical strategy that merges adjacent chunks at progressive transformer layers. A token reduction technique precedes each merging, ensuring memory usage efficiency. We also propose an optimized computational order reducing the memory requirement to logarithmically scale with respect to input length, making it especially favorable for environments with tight memory restrictions. Our experiments demonstrate the proposed method's superior performance and memory efficiency, enabling the broader use of LLMs in contexts requiring extended context. Code is available at https://github.com/alinlab/HOMER.
Key facts. Cited by 30 papers in the map (data through 7 Oct 2026). Builds on 30 of its 37 references that are in the map. First posted on arXiv 16 Apr 2024.
Builds on
30 of 37 references.
References · 30
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2023GPT-4 Technical Reportcited by 18,132
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Reformer: The Efficient Transformercited by 1,658
- 2020Rethinking Attention with Performerscited by 1,584
18 more
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,203
- 2022Token Merging: Your ViT But Fastercited by 995
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
- 2022Not All Patches are What You Need: Expediting Vision Transformers via Token Reorganizationscited by 359
- 2022Memorizing Transformerscited by 219
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
- 2021QuALITY: Question Answering with Long Input Texts, Yes!cited by 204
- 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 175
- 2019Blockwise Self-Attention for Long Document Understandingcited by 158
- 2023Unlimiformer: Long-Range Transformers with Unlimited Length Inputcited by 127
- 2022Scaling Laws vs Model Architectures: How does Inductive Bias Influence Scaling?cited by 103
- 2022Efficient Long-Text Understanding with Short-Text Modelscited by 71
- 2023Which Tokens to Use? Investigating Token Reduction in Vision Transformerscited by 59
Built on by
Citing papers per year: 2024: 8; 2025: 12; 2026: 10.
30 papers.
Sort:
By area:
- 2024In-Context Learning with Long-Context Models: An In-Depth Explorationcited by 126
- 2024Make Your LLM Fully Utilize the Contextcited by 118
- 2025AVCD: Mitigating Hallucinations in Audio-Visual Large Language Models through Contrastive Decodingcited by 26
- 2024HMT: Hierarchical Memory Transformer for Efficient Long Context Language Processingcited by 20
- 2024SCOPE: Optimizing Key-Value Cache Compression in Long-context Generationcited by 20
- 2024Order Matters: Exploring Order Sensitivity in Multimodal Large Language Modelscited by 19
- 2024Leveraging Visual Tokens for Extended Text Contexts in Multi-Modal Learningcited by 17
- 2024In-Context Former: Lightning-fast Compressing Context for Large Language Modelcited by 12
- 2025Context-Aware Hierarchical Merging for Long Document Summarizationcited by 9
- 2025A Simple yet Effective Layout Token in Large Language Models for Document Understandingcited by 9
- 2025EVICPRESS: Joint KV-Cache Compression and Eviction for Efficient LLM Servingcited by 9
- 2025Fork-Merge Decoding: Enhancing Multimodal Understanding in Audio-Visual Large Language Modelscited by 7
18 more
- 2026Gated Differentiable Working Memory for Long-Context Language Modelingcited by 6
- 2026FastAV: Efficient Token Pruning for Audio-Visual Large Language Model Inferencecited by 5
- 2026Large Language Model as Token Compressor and Decompressorcited by 4
- 2025Evaluating LLaMA 3.2 for Software Vulnerability Detectioncited by 3
- 2025Dynamic Chunking and Selection for Reading Comprehension of Ultra-Long Context in Large Language Modelscited by 3
- 2025Compress, Gather, and Recompute: REFORMing Long-Context Processing in Transformerscited by 3
- 2024Boosting Long-Context Management via Query-Guided Activation Refillingcited by 1
- 2025StatsMerging: Statistics-Guided Model Merging via Task-Specific Teacher Distillationcited by 1
- 2025A novel language model for predicting serious adverse event results in clinical trials from their prospective registrationscited by 1
- 2025Mary, the Cheeseburger-Eating Vegetarian: Do LLMs Recognize Incoherence in Narratives?cited by 1
- 2026Aligning Forest and Trees in Images & Long Captions for Visually Grounded Understandingcited by 1
- 2026Structured-Sparse Attention for Entity Tracking with Subquadratic Sequence Complexitycited by 1
- 2025Sparsified State-Space Models are Efficient Highway Networkscited by 0
- 2026Zonkey: A Hierarchical Diffusion Language Model with Differentiable Tokenization and Probabilistic Attentioncited by 0
- 2026Make Your LVLM KV Cache More Lightweightcited by 0
- 2026Benchmarking KV-Cache Optimizations across Task Quality and System Performance for Long-Context Servingcited by 0
- 2026Contextualized Early Detection of Online Firestorms: A Sequential LLM-Based Approachcited by 0
- 2026RH-RAG: Trustworthy Long-Form Generation for Privacy-Constrained Settingscited by 0
- 2026RH-RAG: Trustworthy Long-Form Generation for Privacy-Constrained Settings2 Aug 2026
- 2026Contextualized Early Detection of Online Firestorms: A Sequential LLM-Based Approach16 Jul 2026
- 2026Structured-Sparse Attention for Entity Tracking with Subquadratic Sequence Complexity21 May 2026
- 2026Benchmarking KV-Cache Optimizations across Task Quality and System Performance for Long-Context Serving3 May 2026
- 2026Make Your LVLM KV Cache More Lightweight1 May 2026
- 2026Large Language Model as Token Compressor and Decompressor26 Mar 2026
- 2026Aligning Forest and Trees in Images & Long Captions for Visually Grounded Understanding3 Feb 2026
- 2026Zonkey: A Hierarchical Diffusion Language Model with Differentiable Tokenization and Probabilistic Attention29 Jan 2026
- 2026FastAV: Efficient Token Pruning for Audio-Visual Large Language Model Inference19 Jan 2026
- 2026Gated Differentiable Working Memory for Long-Context Language Modeling19 Jan 2026
- 2025EVICPRESS: Joint KV-Cache Compression and Eviction for Efficient LLM Serving16 Dec 2025
- 2025Mary, the Cheeseburger-Eating Vegetarian: Do LLMs Recognize Incoherence in Narratives?8 Dec 2025
18 more
- 2025A novel language model for predicting serious adverse event results in clinical trials from their prospective registrations21 Jul 2025
- 2025StatsMerging: Statistics-Guided Model Merging via Task-Specific Teacher Distillation5 Jun 2025
- 2025Compress, Gather, and Recompute: REFORMing Long-Context Processing in Transformers1 Jun 2025
- 2025Dynamic Chunking and Selection for Reading Comprehension of Ultra-Long Context in Large Language Models1 Jun 2025
- 2025Fork-Merge Decoding: Enhancing Multimodal Understanding in Audio-Visual Large Language Models27 May 2025
- 2025AVCD: Mitigating Hallucinations in Audio-Visual Large Language Models through Contrastive Decoding27 May 2025
- 2025Sparsified State-Space Models are Efficient Highway Networks27 May 2025
- 2025A Simple yet Effective Layout Token in Large Language Models for Document Understanding24 Mar 2025
- 2025Evaluating LLaMA 3.2 for Software Vulnerability Detection10 Mar 2025
- 2025Context-Aware Hierarchical Merging for Long Document Summarization3 Feb 2025
- 2024SCOPE: Optimizing Key-Value Cache Compression in Long-context Generation18 Dec 2024
- 2024Boosting Long-Context Management via Query-Guided Activation Refilling17 Dec 2024
- 2024Order Matters: Exploring Order Sensitivity in Multimodal Large Language Models22 Oct 2024
- 2024In-Context Former: Lightning-fast Compressing Context for Large Language Model19 Jun 2024
- 2024Leveraging Visual Tokens for Extended Text Contexts in Multi-Modal Learning4 Jun 2024
- 2024HMT: Hierarchical Memory Transformer for Efficient Long Context Language Processing9 May 2024
- 2024In-Context Learning with Long-Context Models: An In-Depth Exploration30 Apr 2024
- 2024Make Your LLM Fully Utilize the Context25 Apr 2024
- 2024SCOPE: Optimizing Key-Value Cache Compression in Long-context Generationcited by 20
- 2025EVICPRESS: Joint KV-Cache Compression and Eviction for Efficient LLM Servingcited by 9
- 2026FastAV: Efficient Token Pruning for Audio-Visual Large Language Model Inferencecited by 5
- 2025Compress, Gather, and Recompute: REFORMing Long-Context Processing in Transformerscited by 3
- 2025Sparsified State-Space Models are Efficient Highway Networkscited by 0
- 2026Benchmarking KV-Cache Optimizations across Task Quality and System Performance for Long-Context Servingcited by 0
- 2026Benchmarking KV-Cache Optimizations across Task Quality and System Performance for Long-Context Serving3 May 2026
- 2026FastAV: Efficient Token Pruning for Audio-Visual Large Language Model Inference19 Jan 2026
- 2025EVICPRESS: Joint KV-Cache Compression and Eviction for Efficient LLM Serving16 Dec 2025
- 2025Compress, Gather, and Recompute: REFORMing Long-Context Processing in Transformers1 Jun 2025
- 2025Sparsified State-Space Models are Efficient Highway Networks27 May 2025
- 2024SCOPE: Optimizing Key-Value Cache Compression in Long-context Generation18 Dec 2024
- 2025AVCD: Mitigating Hallucinations in Audio-Visual Large Language Models through Contrastive Decodingcited by 26
- 2024Order Matters: Exploring Order Sensitivity in Multimodal Large Language Modelscited by 19
- 2026Aligning Forest and Trees in Images & Long Captions for Visually Grounded Understandingcited by 1
- 2026Make Your LVLM KV Cache More Lightweightcited by 0
- 2026Make Your LVLM KV Cache More Lightweight1 May 2026
- 2026Aligning Forest and Trees in Images & Long Captions for Visually Grounded Understanding3 Feb 2026
- 2025AVCD: Mitigating Hallucinations in Audio-Visual Large Language Models through Contrastive Decoding27 May 2025
- 2024Order Matters: Exploring Order Sensitivity in Multimodal Large Language Models22 Oct 2024
- 2024In-Context Learning with Long-Context Models: An In-Depth Explorationcited by 126
- 2024Make Your LLM Fully Utilize the Contextcited by 118
- 2024HMT: Hierarchical Memory Transformer for Efficient Long Context Language Processingcited by 20
- 2024Leveraging Visual Tokens for Extended Text Contexts in Multi-Modal Learningcited by 17
- 2024In-Context Former: Lightning-fast Compressing Context for Large Language Modelcited by 12
- 2025Context-Aware Hierarchical Merging for Long Document Summarizationcited by 9
- 2025A Simple yet Effective Layout Token in Large Language Models for Document Understandingcited by 9
- 2025Fork-Merge Decoding: Enhancing Multimodal Understanding in Audio-Visual Large Language Modelscited by 7
- 2026Gated Differentiable Working Memory for Long-Context Language Modelingcited by 6
- 2026Large Language Model as Token Compressor and Decompressorcited by 4
- 2025Evaluating LLaMA 3.2 for Software Vulnerability Detectioncited by 3
- 2025Dynamic Chunking and Selection for Reading Comprehension of Ultra-Long Context in Large Language Modelscited by 3
12 most cited of 19 All 19 (JSON)
- 2026RH-RAG: Trustworthy Long-Form Generation for Privacy-Constrained Settings2 Aug 2026
- 2026Contextualized Early Detection of Online Firestorms: A Sequential LLM-Based Approach16 Jul 2026
- 2026Structured-Sparse Attention for Entity Tracking with Subquadratic Sequence Complexity21 May 2026
- 2026Large Language Model as Token Compressor and Decompressor26 Mar 2026
- 2026Gated Differentiable Working Memory for Long-Context Language Modeling19 Jan 2026
- 2025Mary, the Cheeseburger-Eating Vegetarian: Do LLMs Recognize Incoherence in Narratives?8 Dec 2025
- 2025A novel language model for predicting serious adverse event results in clinical trials from their prospective registrations21 Jul 2025
- 2025StatsMerging: Statistics-Guided Model Merging via Task-Specific Teacher Distillation5 Jun 2025
- 2025Dynamic Chunking and Selection for Reading Comprehension of Ultra-Long Context in Large Language Models1 Jun 2025
- 2025Fork-Merge Decoding: Enhancing Multimodal Understanding in Audio-Visual Large Language Models27 May 2025
- 2025A Simple yet Effective Layout Token in Large Language Models for Document Understanding24 Mar 2025
- 2025Evaluating LLaMA 3.2 for Software Vulnerability Detection10 Mar 2025
12 newest of 19 All 19 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2024Beyond the Limits: A Survey of Techniques to Extend the Context Length in Large Language Models
- 2025A Survey on Transformer Context Extension: Approaches and Evaluation
- 2024A Little Goes a Long Way: Efficient Long Context Training and Inference with Partial Contexts
- 2025From 128K to 4M: Efficient Training of Ultra-Long Context Large Language Models
- 2025Long-Short Alignment for Effective Long-Context Modeling in LLMs
- 2025Every Token Counts: Generalizing 16M Ultra-Long Context in Large Language Models
- 2024FocusLLM: Precise Understanding of Long Context by Dynamic Condensing
- 2024A Training-free Sub-quadratic Cost Transformer Model Serving Framework With Hierarchically Pruned Attention