Manuscript Offprint
arXiv:2608.30811TopoCompress: Long Context Compression via Graph-Wired Semantic Trajectories
Abstract
Long-context compression is essential for reducing the cost and latency of large language model inference. However, existing methods can fragment important evidence, require additional training or alignment, and often depend on the target model for effective compression. We introduce TopoCompress, a training-free and model-agnostic framework that compresses long contexts by selecting coherent semantic spans. TopoCompress first scores each span using dense and lexical query relevance together with semantic acceleration. It then constructs a hybrid graph that connects spans based on semantic similarity and sequential adjacency, and propagates the query-guided relevance scores over the graph. Across five long-context tasks—HotpotQA, 2WikiMQA, MuSiQue, Qasper, and MultiFieldQA—TopoCompress consistently outperforms strong compression baselines. Notably, TopoCompress achieves performance comparable to the strongest baseline while using a smaller compression budget, and provides a smaller compression time over the fastest baseline.
1 Introduction
Large language models (LLMs) have demonstrated strong capabilities when supplied with sufficiently rich context (Lewis et al., 2020). Many complex natural language tasks require models to reason over heterogeneous sources of information, such as instructions, demonstrations, retrieved documents, conversation history, and task-specific evidence. However, existing LLMs remain constrained by finite context windows. Although substantial effort has been devoted to extending these windows, longer contexts introduce two major challenges. First, they increase inference cost and latency because the target LLM must process a larger number of input tokens (Dao et al., 2022; Keles et al., 2023). Second, simply providing a model with more context does not necessarily improve its performance. As the input grows longer, models may struggle to effectively use relevant evidence, especially when it appears in the middle of the context (Liu and Lapata, 2019).
Long-context compression has therefore emerged as an important approach for reducing inference cost and helping models focus on the most relevant information in long inputs. Most existing context compression methods (Li et al., 2023; Jiang et al., 2023, 2024) formulate compression as a token-level pruning problem. Thus, given a long context and a compression budget, their goal is to remove tokens estimated to be less important while retaining those required to answer the question. A representative example is LLMLingua (Jiang et al., 2023), which introduces a coarse-to-fine compression framework that uses a smaller auxiliary language model to estimate the perplexity of tokens in a long context. Tokens with lower perplexity are treated as contributing less information and are removed through an iterative procedure. This approach does not consider the relevance of tokens to the question before dropping them. LongLLMLingua (Jiang et al., 2024) extends this formulation by making context compression question-aware. In particular, LongLLMLingua uses contrastive perplexity to measure how token importance changes when the context is conditioned on the question, thereby encouraging the compressor to retain question-relevant information.
While these methods demonstrate the usefulness of context compression, their token-level perplexity-based formulation introduces several operational limitations. First, token-level pruning can fragment the context (Figure 1). Since compression decisions are made over individual tokens, the resulting compressed context may break word boundaries, phrases, named entities, or syntactic units.
Corresponding author. Email: jerryyangli@gmail.com.
This can distort the information seen by the target model and may require post-hoc recovery (Jiang et al., 2024), which adds extra computation. A more principled compression method should avoid creating such fragmentation in the first place.
Second, these methods are not model-agnostic. The compressor decides which information should be removed, and the target model then uses the resulting compressed context during inference to answer the query. must learn to imitate what would consider informative in order to make reliable compression decisions. Existing context compression methods (Jiang et al., 2023, 2024) attempt to reduce this mismatch through instruction-tuning, where is adapted using responses generated by . However, this alignment introduces additional computation and ties the compressor to a specific target model, limiting its generality across different LLMs.
Third, perplexity-based importance scores do not account for how pieces of evidence relate to one another. Existing compression methods (Li et al., 2023; Jiang et al., 2023, 2024) use perplexity to estimate how predictable each token is under a small language model . Yet even when made question-aware, this formulation scores tokens individually rather than modeling how one piece of evidence supports or connects to another. Many multi-document and multi-hop tasks require the model to connect evidence across documents and follow causal or temporal relations before the query can be answered (Figure 4). A token may therefore be easy to predict from its local context, and thus receive low perplexity and be dropped, while still carrying intermediate information needed to preserve the evidence chain. This makes perplexity an insufficient signal for determining which information is truly important for a downstream task.
These limitations suggest that long-context compression should move beyond treating tokens as independent units whose importance can be determined solely by a compressor model . Instead, compression should preserve coherent evidence, identify information that is relevant to the task, and account for relationships among different pieces of evidence. This naturally calls for a graph-based formulation, where the context is represented as a set of connected semantic units. Such a representation allows compression decisions to consider not only how relevant a piece of evidence is to the query, but also how it supports, connects, or provides intermediate information that links other evidence. Graph-based representations have been successfully used to capture relationships among textual units in applications such as summarization (Bugueño et al., 2025; Leite et al., 2007), conversational analysis (Montero and Araki, 2007), and information retrieval (Witschel, 2007). For the first time, we formulate long-context compression as graph-based relevance propagation.
Based on this formulation, we introduce TopoCompress, a training-free and model-agnostic framework for context compression. TopoCompress first segments the context into coherent semantic spans and scores them based on query relevance. It further incorporates semantic acceleration to highlight query-relevant spans that occur at informative transitions in the context. The spans are then connected through a hybrid graph based on semantic similarity and sequential adjacency. Rather than selecting evidence solely from its direct relevance to the query, TopoCompress propagates relevance over this graph, allowing intermediate, supporting spans to gain importance through their connections to other evidence. This is useful for complex reasoning tasks, where some necessary information may not directly match the query but is essential for completing the evidence chain (Appendix A).
We evaluate TopoCompress on five long-context question answering tasks—HotpotQA, 2WikiMQA, MuSiQue, Qasper, and MultiFieldQA—across several target models. The results show that TopoCompress achieves a strong balance between answer quality and compression efficiency, consistently outperforming all evaluated compression baselines across different compression budgets and target models. It also keeps the compression process lightweight and fast.
Our contributions are summarized as follows:
• We formulate long-context compression as relevance propagation over a hybrid graph. To the best of our knowledge, this graph-relevance formulation is the first of its kind for long-context compression.
• We introduce TopoCompress, a training-free and model-agnostic compression framework that selects compact, coherent, and non-redundant evidence by propagating query relevance over a hybrid graph, allowing evidence that may not directly match the query to be identified through its connections.

Figure 1: Example of entity fragmentation under token-level prompt compression. LLMLingua removes and corrupts the answer-bearing phrase, while LongLLMLingua preserves only a fragmented form. TopoCompress preserves the complete evidence.
• We show on several long-context tasks that TopoCompress provides competitive compression quality while being substantially faster.
Graph-Based Modeling of Text. Graph representations have a long history in NLP as a means of capturing relationships among textual units (Nastase et al., 2015). TextRank (Mihalcea and Tarau, 2004) represents words and sentences as nodes in a graph and applies graph-based ranking to identify keywords and sentences for tasks such as keyword extraction and extractive summarization. Similarly, LexRank (Erkan and Radev, 2004) constructs a sentence-similarity graph and uses graph centrality to identify sentences for multi-document summarization. More recently, GraphLSS (Bugueño et al., 2025) builds a heterogeneous graph that combines structural and semantic relations to identify salient sentences for long-document summarization.
Our work brings this graph-based perspective to long-context compression by representing context as connected semantic spans to preserve intermediate, supporting information. By doing so, it avoids reliance on a separate compressor language model or target-model-specific distillation, resulting in a training-free and model-agnostic framework for structured evidence selection.
3 TopoCompress
In this section, we introduce TopoCompress, a training-free and model-agnostic framework for long-context compression. TopoCompress represents the context as connected semantic spans, scores each span using query relevance and semantic acceleration, propagates relevance through the hybrid graph, and selects a compact, non-redundant evidence set (Figure 2). Algorithm 1 summarizes the overall procedure.
3.1 Problem Formulation
Given a query and a context consisting of documents, , the objective is to select a compact evidence set that contains sufficient information to answer while satisfying a global token budget : .
3.2 Semantic Span Construction
Token-level pruning can fragment words, entities, phrases, or relations, potentially distorting important evidence and leading the target model to incorrect conclusions. We therefore segment each

Figure 2: TopoCompress compresses long contexts in four main steps: (i) the context is segmented into coherent semantic spans; (ii) each span is scored using dense and lexical query relevance together with semantic acceleration; (iii) a hybrid graph is constructed using semantic similarity and sequential adjacency, and relevance is propagated over the graph; and (iv) a diverse set of high-relevance spans is selected under the compression budget and passed to the target model.
document into contiguous semantic units, such as sentences or short paragraphs. Let the resulting sequence of spans be .
3.3 Dense and Lexical Query Relevance
Let denote a frozen text encoder. We instantiate the frozen encoder with bge-m3 (Chen et al., 2024), which is well suited for our setting because it provides both dense semantic embeddings and lexical token-weight values. For each span , we compute a dense vector representation , and the dense query representation .
We first measure how semantically relevant each span is to the query. We refer to this as dense relevance, since it is computed from the dense vector representations of the span and the query. Specifically, the dense relevance score of span is given by their cosine similarity:
where . We normalize the dense relevance scores across the candidate spans to obtain .
While dense relevance captures semantic similarity to the query, it may overlook exact lexical signals such as named entities, dates, or relation terms that may be important for answering the question. We therefore complement it with lexical relevance. Let denote the lexical weight assigned by bge-m3 to token in the query, and let denote its lexical weight in span . We define the lexical relevance score as
The lexical scores are also normalized across the candidate spans to obtain . Finally, we combine dense and lexical relevance into a query-alignment score:
where controls the balance between semantic relevance and exact lexical evidence.
3.4 Semantic Acceleration
The query relevance information in Equation (3) identifies spans that directly match the question, but some important spans may be useful because they occur near semantic transitions in the context. These spans may connect different pieces of evidence or mark shifts between related facts. To capture this, TopoCompress computes a second-order semantic acceleration score over the original span sequence.
For an interior span within the same document, we compute , and define its acceleration magnitude as
The score measures how sharply the semantic trajectory changes around span . We normalize the acceleration scores across spans to obtain .
Algorithm 1 TopoCompress
Input: Context documents D, query q, budget K, frozen encoder
Output: Compressed context
1: Segment documents into semantic spans
2: Compute span embeddings and query embedding
3: Compute the dense relevance score using Equation (1) and the lexical relevance score using Equation (2).
4: Compute query alignment
5: Compute the semantic acceleration score over the original span sequence using Equation (4).
6: Compute the initial scores
7: Build span graph
8: Normalize to obtain
9: Propagate relevance with
10: Greedily select non-redundant spans under budget K
11: Restore selected spans to original order
12: return
Semantic acceleration should not make a query-irrelevant span important. We therefore gate acceleration with query alignment:
where controls the contribution of acceleration. This formulation boosts spans that are both query-aligned and located near strong semantic transitions, while preventing unrelated transitions from dominating the selection process.
3.5 Span Topology and Relevance Propagation
Some evidence needed for complex reasoning tasks may not appear highly relevant to the query in isolation. A span can instead be important because it supports, connects, or disambiguates other evidence. To capture these relationships, we build a topology over the spans and propagate the initial query-gated score vector (Equation (5)) across it.
Specifically, we construct a weighted graph , where each node corresponds to a span . The graph combines semantic and sequential edges. For each span , let denote the set of its nearest neighbors based on dense embedding similarity. We add semantic edges from to the spans in , with edge weights defined as
The sequential edges connect adjacent spans within the same document. Let denote the document containing span . We define the sequential edge weight between spans and as
We combine the two adjacency matrices as , where control the relative contributions of semantic and sequential connectivity. We then compute the degree matrix with diagonal entries , where for . We row-normalize to obtain the transition matrix . The entry represents the proportion of relevance passed from span to span during propagation.
To allow each span to gain importance from connected evidence rather than relying solely on its direct relevance to the query, we perform personalized relevance propagation:
where is the damping factor and is the query-gated score defined in Equation (5). The restart term keeps the propagated scores anchored to the original query-gated signal. The update is repeated until convergence, producing the propagated score vector . This allows intermediate, supporting spans that may not directly match the query to gain importance through their connections to other relevant evidence.
3.6 Redundancy-Aware Evidence Selection
After propagation, spans with related meanings may receive similar scores. Selecting spans purely by can therefore introduce redundant evidence. To reduce this redundancy, TopoCompress selects spans greedily by penalizing candidates that are too similar to evidence already selected.
Let A denote the set of selected spans and let R denote the remaining candidate spans. At each selection step, the next span is chosen as
where controls the strength of the redundancy penalty. The first term favors spans with high propagated relevance, while the second discourages selecting a span whose semantic content is already covered by the selected evidence. After selecting , we add it to A and remove it from R. The selection process continues until the global budget K is reached. Finally, selected spans are restored to their original order, preserving readability and discourse coherence for the target model.
4 Experiments
4.1 Models and Datasets
Models. We evaluate context compression using closed-source target model, GPT-5-mini (Singh et al., 2025), and open-weight target models, Llama-3.1-8B (Grattafiori et al., 2024) and Qwen3-8B (Yang et al., 2025). These models differ in architecture, training pipeline, and tokenization.
Datasets. We evaluate TopoCompress on long-context question answering tasks from LongBench (Bai et al., 2024). LongBench is a bilingual benchmark for long-context understanding that includes tasks from single-document and multi-document settings. In this work, we focus on five QA tasks: HotpotQA, 2WikiMQA, MuSiQue, Qasper, and MultiFieldQA-en. We select these tasks because they require models to identify and reason over evidence distributed across long contexts, directly testing the ability of TopoCompress to preserve intermediate, supporting information under compression. HotpotQA, 2WikiMQA, and MuSiQue are multi-document QA tasks that require the model to reason over evidence distributed across multiple documents. Qasper is a scientific document QA task based on NLP papers, while MultiFieldQA-en evaluates question answering over long articles from diverse domains. These datasets have average input lengths of 9,151 words for HotpotQA, 4,887 words for 2WikiMQA, 11,214 words for MuSiQue, 3,619 words for Qasper, and 4,559 words for MultiFieldQA-en.
4.2 Results and Discussion
In this section, we evaluate the effectiveness and efficiency of TopoCompress against three strong long-context compression baselines: LLMLingua (Jiang et al., 2023), LongLLMLingua (Jiang et al., 2024), and LLMLingua-2 (Pan et al., 2024). Together, these baselines cover perplexity-based, query-aware, and token-classification approaches to context compression.
Performance. Following the evaluation setting used in LongBench, we report F1 for all five tasks. We also report the sample-weighted average F1 across the five tasks. Each compression method is evaluated under three context budgets, . The context budget specifies the maximum number of tokens allowed in the compressed context. The setting is the most aggressive compression regime, requiring each method to retain only limited evidence while preserving enough information for the target model to answer the query correctly.
Figure 3 presents the overall comparison of the compression methods across GPT-5-mini, Llama-3.1-8B, and Qwen3-8B. TopoCompress consistently achieves the best performance across different context budgets. At the most aggressive budget, , it outperforms the strongest baseline, LongLLMLingua, by 8.15 points on GPT-5-mini, 8.44 points on Llama-3.1-8B, and 7.21 points on Qwen3-8B. Notably, the performance of TopoCompress at is comparable to that of LongLLMLingua at (e.g., 51.37 vs. 51.44 on GPT-5-mini). This shows that TopoCompress can achieve similar performance to the strongest baseline while using a compression budget that is up to smaller.
Tables 4, 5, and 6 in Appendix B provide detailed task-level results for GPT-5-mini, Llama-3.1-8B, and Qwen3-8B, respectively. Under aggressive compression, TopoCompress achieves strong gains on multi-document QA tasks such as HotpotQA, 2WikiMQA, and MuSiQue, where answering a query often requires combining evidence distributed across multiple documents. These results highlight the importance of preserving connected evidence for multi-hop reasoning and show that the query-gated, graph-guided selection in TopoCompress effectively retains such evidence even under tight compression budgets.
Compression Time. In Table 1, we report the compression time for all compression methods at K = 1000. TopoCompress is the fastest method, completing compression across all five LongBench tasks in less than 7 minutes. Compared with LLMLingua2, the fastest baseline, TopoCompress achieves a speedup. The difference is substantially larger compared with LLMLingua and LongLLMLingua, which require approximately
LLMLingua LongLLMLingua LLMLingua2 TopoCompress ----- Original

Figure 3: Average F1 comparison on long context tasks across compression budgets and target models. Bars show compressed-context performance for LLMLingua, LongLLMLingua, LLMLingua-2, and TopoCompress at . Dashed horizontal lines indicate the corresponding full-context Original performance for each target model.
44 and 52 minutes, respectively. These results demonstrate that TopoCompress not only preserves higher-quality evidence for the target model but also significantly reduces compression time, making it easier to integrate into long-context pipelines such as RAG systems, where compression may be required to improve inference efficiency.
4.3 Controller for Adaptive Reasoning
Yun and Kim (2026) showed that LLMs can serve as missing-information identifiers: given a question and partial evidence, an LLM can determine whether the evidence is sufficient and, if not, formulate a focused query for the information still needed. This can be useful in complex settings where the original question may not explicitly reveal every intermediate clue. Motivated by this idea, we evaluate TopoCompress with an LLM-based controller in the loop.
After half of the evidence budget (i.e., 0.5K) has been accumulated, the controller determines whether the selected evidence is sufficient to answer the original question. If it returns answerable, selection stops early and the accumulated evidence is used as the compressed context. If it returns unanswerable, the controller generates a focused follow-up question to retrieve additional evidence that may not be directly captured by the original question. TopoCompress then re-scores the remaining spans using this question while keeping document-side quantities, including span embeddings and semantic acceleration fixed. To limit API overhead, the controller is invoked at most twice per sample.
4.3.1 Controller Analysis
The controller variant provides a useful comparison for understanding the strength of the TopoCompress selector. We analyze its effect from two perspectives: the amount of context retained after compression and the downstream QA performance. For this experiment, we use GPT-5-mini as the controller to generate intermediate reasoning queries that guide additional evidence selection during compression.
Impact on Context Length. We report the average compressed context length for TopoCompress with and without the controller at in Table 2. Avg. Context is the average token length of the compressed evidence context given to the target model, excluding the task instruction and question. It directly measures how much source context remains after compression. In the standard TopoCompress setting, the method typically fills close to the budgeted context length. With the controller enabled, the average context tokens across all tasks reduces from 1000 tokens to roughly 681–857 tokens depending on the task.
Impact on Performance. As shown in Table 7, the controller variant slightly improves performance over the controller-free TopoCompress setting. This suggests that the original question may not always surface all the evidence needed to answer complex problems, and that constructing intermediate reasoning queries can help recover additional supporting evidence. However, the gains are modest, indicating that TopoCompress already captures much of this benefit through its query-
| Method | HotpotQA | 2WikiMQA | MuSiQue | Qasper | MultiFieldQA-en | Overall | Speedup |
|---|---|---|---|---|---|---|---|
| LLMLingua | 11:52 | 7:16 | 14:02 | 5:33 | 5:16 | 43:59 | 0.22× |
| LongLLMLingua | 11:02 | 7:30 | 12:41 | 11:39 | 8:58 | 51:50 | 0.19× |
| LLMLingua2 | 2:42 | 1:29 | 3:13 | 1:10 | 1:09 | 9:43 | 1.00× |
| TopoCompress | 1:59 | 1:04 | 2:03 | 0:53 | 0:56 | 6:54 | 1.41× |
Table 1: Compression time at for long-context compression methods. Times are reported in minutes:seconds. Speedup is computed relative to LLMLingua-2 overall runtime, the fastest baseline.
| Task | Avg. Ctx. | Avg. Ctx. + Ctrl. |
|---|---|---|
| HotpotQA | 1000.0 | 729.2 |
| 2WikiMQA | 999.0 | 803.3 |
| MuSiQue | 1001.0 | 857.1 |
| Qasper | 998.1 | 734.5 |
| MultiFieldQA-en | 999.2 | 680.9 |
Table 2: Average compressed context (Ctx) length at with and without the controller (Ctrl).
guided and graph-based selection mechanism. In other words, TopoCompress can trace and recover much of the relevant intermediate evidence without requiring an LLM in the compression loop.
4.4 Ablation Study
We conduct an ablation study to assess the contribution of the scoring components in TopoCompress. We evaluate the ablations at two compression budgets, and .
TopoCompress without graph propagation (w/o Graph). Graph propagation diffuses query relevance through the hybrid span topology, allowing TopoCompress to identify evidence that may not be selected by direct query matching but is connected to relevant evidence through semantic similarity or sequential adjacency. To assess the full contribution of graph propagation, we focus this ablation on multi-hop and multi-document tasks, where answering questions depends on preserving connected evidence chains.
As shown in Table 8 (Appendix D), removing graph propagation consistently reduces performance on HotpotQA, 2WikiMQA, and MuSiQue across different target models and compression budgets. The relative drops reach on MuSiQue, on HotpotQA, and on 2WikiMQA. These results indicate that graph-based relevance propagation helps preserve connected evidence under compression, particularly for tasks that require reasoning over multiple supporting spans.
Additional ablations. We further evaluate two component removals in TopoCompress: without query relevance (w/o Query Rel.), which removes the dense–lexical query relevance signal, and without semantic acceleration (w/o Accel.), which removes the semantic acceleration term. We conduct these ablations using GPT-5-mini as the target model (Table 9 in Appendix D).
The results show that removing query relevance causes the largest performance drop. This shows that the dense–lexical query gate is essential for identifying spans that are directly relevant to answering the question. However, multi-hop tasks may also require intermediate evidence that does not directly match the query (Appendix A). Our topology-aware refinement propagates query relevance through the graph to account for such connections. The semantic acceleration component has a comparatively smaller impact. Removing acceleration changes the average F1 modestly.
5 Conclusion
We introduced TopoCompress, a training-free and model-agnostic framework that formulates long-context compression as graph-structured evidence selection over coherent semantic spans. Our method combines dense–lexical query relevance, semantic acceleration, and graph-based propagation over semantic and sequential span connections to select compact, non-redundant evidence for the target model. Our findings show that TopoCompress consistently outperforms strong context compression baselines across both closed-source and open-weight target models. In addition to these performance gains, TopoCompress is faster than existing baselines, making it practical for long-context pipelines. These results establish graph-based evidence selection as a more effective and practical paradigm for long-context compression, moving beyond token-level pruning and target-model-dependent designs.
References
Yushi Bai, Xin Lv, Jiajie Zhang, Hongchang Lyu, Jiankai Tang, Zhidian Huang, Zhengxiao Du, Xiao Liu, Aohan Zeng, Lei Hou, Yuxiao Dong, Jie Tang, and Juanzi Li. 2024. LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding. In Annual Meeting of the Association for Computational Linguistics (ACL).
Margarita Bugueño, Hazem Abou Hamdan, and Gerard De Melo. 2025. GraphLSS: Integrating Lexical, Structural, and Semantic Features for Long Document Extractive Summarization. In Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics (NAACL).
Jianlyu Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. 2024. M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation. In Findings of the Association for Computational Linguistics: ACL 2024.
Tri Dao, Daniel Y Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. 2022. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness. Advances in Neural Information Processing Systems (NeurIPS).
Günes Erkan and Dragomir R Radev. 2004. LexRank: Graph-based Lexical Centrality as Salience in Text Summarization. Journal of Artificial Intelligence Research (JAIR), 22:457–479.
Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, Amy Yang, Angela Fan, Anirudh Goyal, Anthony Hartshorn, Aobo Yang, Archi Mitra, Archie Sravankumar, Artem Korenev, Arthur Hinsvark, and 542 others. 2024. The Llama 3 Herd of Models. arXiv preprint arXiv:2407.21783.
Huiqiang Jiang, Qianhui Wu, Chin-Yew Lin, Yuqing Yang, and Lili Qiu. 2023. LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models. In Conference on Empirical Methods in Natural Language Processing (EMNLP).
Huiqiang Jiang, Qianhui Wu, Xufang Luo, Dongsheng Li, Chin-Yew Lin, Yuqing Yang, and Lili Qiu. 2024. LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression. In Annual Meeting of the Association for Computational Linguistics (ACL).
Feyza Duman Keles, Pruthuvi Mahesakya Wijewardena, and Chinmay Hegde. 2023. On the Computational Complexity of Self-Attention. In International Conference on Algorithmic Learning Theory (ALT).
Daniel S. Leite, Lucia H. M. Rino, Thiago A. S. Pardo, and Maria das Graças V. Nunes. 2007. Extractive Automatic Summarization: Does more Linguistic Knowledge Make a Difference? In Proceedings of
the Second Workshop on TextGraphs: Graph-Based Algorithms for Natural Language Processing. Association for Computational Linguistics (ACL).
Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2020. Retrieval-Augmented Generation for Knowledge-intensive Nlp Tasks. Advances in Neural Information Processing Systems (NeurIPS).
Yucheng Li, Bo Dong, Frank Guerin, and Chenghua Lin. 2023. Compressing Context to Enhance Inference Efficiency of Large Language Models. In Conference on Empirical Methods in Natural Language Processing (EMNLP).
Yang Liu and Mirella Lapata. 2019. Text Summarization with Pretrained Encoders. In Conference on Empirical Methods in Natural Language Processing and the 9th international Joint Conference on Natural Language Processing (EMNLP-IJCNLP).
Rada Mihalcea and Paul Tarau. 2004. TextRank: Bringing Order into Text. In Conference on Empirical Methods in Natural Language Processing (EMNLP).
Calkin S. Montero and Kenji Araki. 2007. Semi-Supervised Algorithm for Human-Computer Dialogue Mining. In Proceedings of the Second Workshop on TextGraphs: Graph-Based Algorithms for Natural Language Processing. Association for Computational Linguistics (ACL).
Vivi Nastase, Rada Mihalcea, and Dragomir R Radev. 2015. A Survey of Graphs in Natural Language Processing. Natural Language Engineering, 21(5):665–698.
Zhuoshi Pan, Qianhui Wu, Huiqiang Jiang, Menglin Xia, Xufang Luo, Jue Zhang, Qingwei Lin, Victor Rühle, Yuqing Yang, Chin-Yew Lin, H. Vicky Zhao, Lili Qiu, and Dongmei Zhang. 2024. LLMLingua-2: Data distillation for Efficient and Faithful Task-Agnostic Prompt Compression. In Findings of the Association for Computational Linguistics: ACL 2024.
Claude E Shannon. 1951. Prediction and Entropy of Printed English. Bell System Technical Journal, 30(1):50–64.
Aaditya Singh, Adam Fry, Adam Perelman, Adam Tart, Adi Ganesh, Ahmed El-Kishky, Aidan McLaughlin, Aiden Low, AJ Ostrow, Akhila Ananthram, Akshay Nathan, Alan Luo, Alec Helyar, Aleksander Madry, Aleksandr Efremov, Aleksandra Spyra, Alex Baker-Whitcomb, Alex Beutel, Alex Karpenko, and 467 others. 2025. OpenAI GPT-5 System Card. arXiv preprint arXiv:2601.03267.
Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, and Ashish Sabharwal. 2022. MuSiQue: Multi-hop Questions via Single-hop Question Composition. Transactions of the Association for Computational Linguistics (TACL), 10:539–554.
Hans Friedrich Witschel. 2007. Multi-level Association Graphs - A New Graph-Based Model for Information Retrieval. In Proceedings of the Second Workshop on TextGraphs: Graph-Based Algorithms for Natural Language Processing. Association for Computational Linguistics (ACL).
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, Chujie Zheng, Dayiheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao Ge, Haoran Wei, Huan Lin, Jialong Tang, and 41 others. 2025. Qwen3 Technical Report. arXiv preprint arXiv:2505.09388.
JungMin Yun and Youngbin Kim. 2026. IterCOMP: Reasoning-aware Adaptive Prompt Compression for Multi-hop Question Answering. In Annual Meeting of the Association for Computational Linguistics (ACL).
A Graph-Based Evidence Recovery
Multi-hop questions often require connecting evidence across several documents rather than selecting a single directly matched span. However, an answer-bearing document may only become identifiable through intermediate evidence. Figure 4 illustrates this setting, where the question requires following a chain from one piece of evidence to another. In such situations, using query relevance alone may be insufficient to retrieve the answer-bearing evidence.
We illustrate how graph propagation can recover evidence that is missed by direct query relevance. We conduct this analysis using an example from the MuSiQue dataset (Trivedi et al., 2022). MuSiQue provides gold annotations for the supporting paragraphs required to answer each question, which allows us to inspect whether the ranked spans correspond to the true evidence chain. We denote each span as p_i: span_j, where p_i indicates the i-th paragraph in the input context and span_j indicates the j-th span produced after segmenting that paragraph.
As shown in Table 3, query relevance alone can assign high scores to spans that are not part of the gold evidence chain, causing them to appear near the top of the ranking. For example, a non-supporting span is ranked 3rd by query relevance, while graph propagation move it to rank 11. More importantly, the answer-bearing span p_19: span_3 is ranked only 14th by query relevance and would therefore be excluded under a tight budget. After graph propagation, this span is promoted to rank 7, allowing the compressed context to retain the evidence needed to answer the question. This illustrates the role of graph propagation beyond direct query matching: it helps recover connected supporting evidence that may be weakly matched to the question itself but is topologically linked to other relevant evidence.
B Additional Results for TopoCompress
Additional results for TopoCompress and the evaluated baselines are shown in Table 4 for GPT-5-mini, Table 5 for Llama-3.1-8B, and Table 6 for Qwen3-8B.
C Controller-Guided TopoCompress
In this section, we provide results for the controller-guided variant of TopoCompress (Section 4.3). The controller generates intermediate reasoning queries during compression to guide additional evidence selection when the current compressed context appears insufficient. The results are shown in Table 7.
D Ablation Study Results
The ablation results are shown in Tables 8 and 9.
Question: Who is the president of the newly declared independent country that is part of the commission of truth and friendship with the country that eats Kemplang?
Doc A: Food clue
Kemplang is a traditional
...found in ..., Indonesia.
Doc B: Commission clue
The Indonesia--Timor Leste
Commission ... Indonesia and East
Timor.
Doc C: Answer clue
East Timor ...President:
Francisco Guterres.
Figure 4: Evidence-chain illustration of multi-hop reasoning. Answering the question requires following intermediate links from Kemplang to Indonesia, from Indonesia to East Timor, and from East Timor to its president.
| Passage / Span | Span Text | Query Rank | Graph Rank |
|---|---|---|---|
| p_0:span_0 | Kemplang is a traditional savory fish cracker commonly found in southern parts of Sumatra, Indonesia. | 1 | 9 |
| p_9:span_1 | He was that country's last governor before independence, from 1968 to 1975, and first president after it gained independence from the Netherlands. | 3 | 11 |
| p_3:span_2 | After holding private hearings and document reviews, the commission handed in the final report to the presidents of both nations and was endorsed by Indonesian President Susilo Bambang Yudhoyono. | 4 | 2 |
| p_3:span_1 | The commission was officially created to investigate acts of violence that occurred around the independence referendum held in East Timor in 1999. | 9 | 5 |
| p_3:span_0 | The Indonesia-Timor Leste Commission on Truth and Friendship was established jointly by the governments of Indonesia and East Timor in August 2005. | 11 | 10 |
| p_19:span_3 | Government: unitary semi-presidential constitutional republic. President: Francisco Guterres. Prime Minister: Mari Alkatiri. | 14 | 7 |
Table 3: Qualitative analysis of multi-hop evidence recovery on the MuSiQue dataset using graph propagation. MuSiQue provides gold annotations for the documents or paragraphs that contain the clues needed to answer each question. Rows shaded in gray indicate spans derived from these gold supporting paragraphs.
| Method | K | HotpotQA | 2WikiMQA | MuSiQue | Qasper | MultiFieldQA-en | Avg. F1 |
|---|---|---|---|---|---|---|---|
| Original | - | 71.64 | 80.74 | 63.37 | 45.61 | 49.97 | 62.92 |
| LLMLingua | 2000 | 48.45 | 46.14 | 32.42 | 24.15 | 24.16 | 35.64 |
| LongLLMLingua | 2000 | 67.30 | 71.88 | 46.75 | 32.36 | 34.76 | 51.44 |
| LLMLingua2 | 2000 | 58.89 | 70.04 | 42.93 | 42.91 | 38.13 | 51.24 |
| TopoCompress | 2000 | 68.71 | 78.23 | 54.72 | 44.08 | 50.37 | 59.69 |
| LLMLingua | 1000 | 48.24 | 45.13 | 33.08 | 21.00 | 18.28 | 33.93 |
| LongLLMLingua | 1000 | 67.03 | 65.43 | 44.06 | 25.45 | 31.49 | 47.49 |
| LLMLingua2 | 1000 | 50.89 | 53.67 | 38.03 | 36.87 | 31.57 | 42.77 |
| TopoCompress | 1000 | 66.73 | 70.03 | 49.06 | 42.67 | 50.82 | 56.13 |
| LLMLingua | 500 | 49.01 | 44.84 | 28.14 | 18.15 | 20.00 | 32.66 |
| LongLLMLingua | 500 | 62.89 | 58.24 | 40.42 | 19.88 | 31.85 | 43.22 |
| LLMLingua2 | 500 | 50.63 | 48.11 | 32.32 | 35.87 | 26.08 | 39.26 |
| TopoCompress | 500 | 63.14 | 63.25 | 44.96 | 38.04 | 46.17 | 51.37 |
Table 4: F1 results of different long-context compression methods with GPT-5-mini as the target model. K denotes the maximum number of tokens in the compressed context. Avg. F1 is computed as a sample-weighted average across tasks. Bold indicates the best compressed method by Avg. F1 at each budget, while underline indicates the second-best.
| Method | HotpotQA | 2WikiMQA | MuSiQue | Qasper | MultiFieldQA-en | Avg. F1 | |
|---|---|---|---|---|---|---|---|
| Original | - | 44.17 | 34.37 | 31.90 | 29.15 | 49.96 | 37.28 |
| LLMLingua | 2000 | 28.85 | 24.55 | 14.35 | 17.38 | 22.70 | 21.51 |
| LongLLMLingua | 2000 | 48.09 | 38.74 | 28.97 | 21.65 | 32.67 | 34.10 |
| LLMLingua2 | 2000 | 35.41 | 30.14 | 21.84 | 23.08 | 37.27 | 29.14 |
| TopoCompress | 2000 | 52.01 | 37.70 | 32.50 | 27.07 | 47.24 | 38.89 |
| LLMLingua | 1000 | 29.95 | 25.84 | 11.10 | 16.85 | 16.40 | 20.22 |
| LongLLMLingua | 1000 | 46.46 | 30.04 | 23.26 | 20.20 | 30.18 | 30.02 |
| LLMLingua2 | 1000 | 35.99 | 24.08 | 19.55 | 20.87 | 31.47 | 26.12 |
| TopoCompress | 1000 | 52.68 | 37.07 | 31.60 | 28.14 | 47.37 | 38.95 |
| LLMLingua | 500 | 29.63 | 22.90 | 12.17 | 15.29 | 12.93 | 18.88 |
| LongLLMLingua | 500 | 44.60 | 28.50 | 21.38 | 17.76 | 28.09 | 28.06 |
| LLMLingua2 | 500 | 28.12 | 26.38 | 15.44 | 20.19 | 27.34 | 23.29 |
| TopoCompress | 500 | 51.69 | 37.74 | 25.08 | 25.23 | 44.83 | 36.50 |
Table 5: F1 results of different long-context compression methods with Llama 3.1-8B as the target model.
| Method | HotpotQA | 2WikiMQA | MuSiQue | Qasper | MultiFieldQA-en | Avg. F1 | |
|---|---|---|---|---|---|---|---|
| Original | - | 49.16 | 33.34 | 19.17 | 41.80 | 48.53 | 37.78 |
| LLMLingua | 2000 | 20.67 | 21.35 | 5.65 | 18.58 | 25.71 | 18.01 |
| LongLLMLingua | 2000 | 45.31 | 35.95 | 20.72 | 26.98 | 38.12 | 33.17 |
| LLMLingua2 | 2000 | 32.00 | 23.81 | 8.10 | 37.29 | 34.70 | 26.78 |
| TopoCompress | 2000 | 45.29 | 29.76 | 16.59 | 41.07 | 47.47 | 35.44 |
| LLMLingua | 1000 | 18.18 | 24.14 | 5.06 | 13.28 | 21.86 | 16.22 |
| LongLLMLingua | 1000 | 38.50 | 32.60 | 16.48 | 21.07 | 34.62 | 28.34 |
| LLMLingua2 | 1000 | 21.03 | 18.61 | 7.75 | 28.91 | 29.64 | 20.74 |
| TopoCompress | 1000 | 39.36 | 27.93 | 13.59 | 39.00 | 46.40 | 32.56 |
| LLMLingua | 500 | 18.12 | 22.82 | 4.45 | 12.31 | 20.53 | 15.39 |
| LongLLMLingua | 500 | 33.18 | 26.58 | 15.15 | 16.99 | 33.49 | 24.63 |
| LLMLingua2 | 500 | 17.21 | 15.88 | 5.85 | 22.99 | 27.42 | 17.36 |
| TopoCompress | 500 | 37.98 | 28.32 | 13.59 | 37.07 | 45.72 | 31.84 |
Table 6: F1 results of different long-context compression methods with Qwen3-8B as the target model.
| Target Model | Method | HotpotQA | 2WikiMQA | MuSiQue | Qasper | MultiFieldQA-en | Avg. F1 | |
|---|---|---|---|---|---|---|---|---|
| GPT-5-mini | TopoCompress | 2000 | 68.71 | 78.23 | 54.72 | 44.08 | 50.37 | 59.69 |
| TopoCompress + Controller | 2000 | 69.60 | 76.80 | 57.68 | 43.75 | 48.77 | 59.88 | |
| TopoCompress | 1000 | 66.73 | 70.03 | 49.06 | 42.67 | 50.82 | 56.13 | |
| TopoCompress + Controller | 1000 | 67.29 | 75.04 | 56.96 | 43.40 | 48.60 | 58.77 | |
| TopoCompress | 500 | 63.14 | 63.25 | 44.96 | 38.04 | 46.17 | 51.37 | |
| TopoCompress + Controller | 500 | 65.42 | 64.67 | 49.78 | 41.91 | 49.86 | 54.56 | |
| Llama 3.1-8B | TopoCompress | 2000 | 52.01 | 37.70 | 32.50 | 27.07 | 47.24 | 38.89 |
| TopoCompress + Controller | 2000 | 55.45 | 42.39 | 34.46 | 28.87 | 46.72 | 41.31 | |
| TopoCompress | 1000 | 52.68 | 37.07 | 31.60 | 28.14 | 47.37 | 38.95 | |
| TopoCompress + Controller | 1000 | 52.03 | 46.64 | 35.10 | 27.64 | 43.41 | 40.83 | |
| TopoCompress | 500 | 51.69 | 37.74 | 25.08 | 25.23 | 44.83 | 36.50 | |
| TopoCompress + Controller | 500 | 51.41 | 38.52 | 29.94 | 27.21 | 44.07 | 37.92 | |
| Qwen3-8B | TopoCompress | 2000 | 45.29 | 29.76 | 16.59 | 41.07 | 47.47 | 35.44 |
| TopoCompress + Controller | 2000 | 41.21 | 29.59 | 18.44 | 39.78 | 46.06 | 34.43 | |
| TopoCompress | 1000 | 39.36 | 27.93 | 13.59 | 39.00 | 46.40 | 32.56 | |
| TopoCompress + Controller | 1000 | 41.13 | 31.45 | 19.28 | 38.57 | 46.11 | 34.74 | |
| TopoCompress | 500 | 37.98 | 28.32 | 13.59 | 37.07 | 45.72 | 31.84 | |
| TopoCompress + Controller | 500 | 34.89 | 32.66 | 16.78 | 37.93 | 45.37 | 32.90 |
Table 7: Experiment comparing TopoCompress with and without the controller on several tasks across GPT-5-mini, Llama 3.1-8B, and Qwen3-8B. denotes the compressed context budget. Bold indicates the better Avg. F1 within each target model and budget.
| Target Model | Method | HotpotQA | 2WikiMQA | MuSiQue | |
| Llama3.1-8B | TopoCompress w/o Graph | 2000 | 52.01 | 37.70 | 32.50 |
| 2000 | 50.34 (-3.2%) | 35.46 (-5.9%) | 30.97 (-4.7%) | ||
| TopoCompress w/o Graph | 500 | 51.69 | 37.74 | 25.08 | |
| 500 | 47.85 (-7.4%) | 35.94 (-4.8%) | 24.82 (-1.0%) | ||
| Qwen3-8B | TopoCompress w/o Graph | 2000 | 45.29 | 29.76 | 16.59 |
| 2000 | 44.91 (-0.8%) | 29.35 (-1.4%) | 15.16 (-8.6%) | ||
| TopoCompress w/o Graph | 500 | 37.98 | 28.32 | 13.59 | |
| 500 | 36.56 (-3.7%) | 26.64 (-5.9%) | 11.68 (-14.1%) | ||
| GPT-5 mini | TopoCompress w/o Graph | 2000 | 68.71 | 78.23 | 54.72 |
| 2000 | 68.18 (-0.8%) | 77.74 (-0.6%) | 53.38 (-2.4%) | ||
| TopoCompress w/o Graph | 500 | 63.14 | 63.25 | 44.96 | |
| 500 | 61.89 (-2.0%) | 60.72 (-4.0%) | 43.98 (-2.2%) |
Table 8: Graph propagation ablation on multi-hop long context tasks. Values in parentheses indicate the relative F1 drop after removing graph propagation.
| Method | HotpotQA | 2WikiMQA | MuSiQue | Qasper | MultiFieldQA-en | Avg. F1 | |
|---|---|---|---|---|---|---|---|
| TopoCompress | 2000 | 68.71 | 78.23 | 54.72 | 44.08 | 50.37 | 59.69 |
| w/o Query Rel. | 2000 | 61.36 | 60.59 | 43.09 | 40.99 | 37.21 | 49.25 |
| w/o Accel. | 2000 | 69.81 | 77.08 | 53.98 | 43.68 | 49.95 | 59.37 |
| TopoCompress | 500 | 63.14 | 63.25 | 44.96 | 38.04 | 46.17 | 51.37 |
| w/o Query Rel. | 500 | 57.65 | 44.17 | 35.83 | 27.83 | 23.73 | 38.58 |
| w/o Accel. | 500 | 61.75 | 63.45 | 42.79 | 37.99 | 48.31 | 50.99 |
Table 9: Ablation results for TopoCompress on long context tasks using GPT-5-mini as the target model.