Source-linked AI summary

Graph Topology Meets Energy-Driven Pathfinding: Preserving Contextual Consistency in Retrieval-Augmented Generation

Yufeng Li, Zaijing Li, Fuchen Zhang, Zongzong Wu, Ming Zhao, Fengxiao Tang

arXiv:2610.29933v1cs.CLcs.AI

TL;DR

Multi-hop QA requires connecting scattered evidence, but graph-based RAG can lose textual context and mismatch LLMs’ sequence-based reasoning. ThreadRAG structures retrieved documents into a Semantic Topology Graph and linearizes relevant evidence into text paths. It reports improved performance across three multi-hop QA benchmarks, including gains over text-centric and graph-enhanced baselines.

  • Problem

    Multi-hop QA requires connecting scattered evidence across documents, while graph-RAG can lose contextual information and provide evidence in forms mismatched with LLM sequence-based reasoning.

    Source: §1 · p. 1
  • Method

    ThreadRAG uses context-preserving Semantic Nodes and narrative, semantic, and lexical graph edges, then selects query-relevant subgraphs and deterministically linearizes them into textual evidence paths.

    Source: §1 · p. 1, §3.1 · p. 4, §3.2 · p. 5
  • Results

    14.4% EM improvement over text-centric IRCoT on HotpotQA and 5.8% EM over KnowTrace on 2Wiki (GPT-4o mini), alongside consistent gains across three multi-hop QA benchmarks.

    Source: §1 · p. 2, §4.2 · p. 7
  • Takeaways & Limitations

    ThreadRAG’s reported results support context-preserving structuring and topological linearization as an approach that improves multi-hop QA performance across multiple benchmarks.

    Source: §1 · p. 2, §5 · p. 9

    Improvements may be limited when document links are extremely sparse or cross-document evidence chains are virtually absent, and some long-range dependencies may remain imperfectly linearized.

    Source: Limitations · p. 9

Abstract

from arXiv · show

Retrieval-augmented generation (RAG) frequently integrates knowledge graphs (KGs) for complex multi-hop question answering. However, their performance is increasingly bottlenecked by the knowledge structuring and reasoning processes. (i) Severe semantic loss: Distilling continuous texts into discrete symbols strips away contextual nuances and narrative coherence. (ii) Pronounced modality mismatch: Fragmented graph structures clash with the continuous texts LLMs are pre-trained on, while rewriting them into natural language introduces generative noise and omits information. To address these limitations, we propose ThreadRAG, a semantic-topology-based RAG framework for context-preserving knowledge structuring and modality-native evidence reasoning. ThreadRAG introduces a Semantic Topology Mapper (STM), which organizes retrieved documents into context-intact Semantic Nodes and constructs a Semantic Topology Graph (STG) through narrative, semantic, and lexical edges. It further incorporates Energy-Driven Pathfinding (EDP), which identifies query-relevant subgraphs via energy diffusion and deterministically linearizes them into coherent textual evidence paths. Experiments on three multi-hop QA benchmarks demonstrate that ThreadRAG consistently outperforms strong baselines. Notably, it achieves a 14.4% EM improvement over text-centric methods on HotpotQA and surpasses the best baseline by 5.8% EM on 2WikiMultihop, while reducing token cost to 23.3% of the strongest baseline.

1 Introduction

Multi-hop QA requires connecting scattered evidence across documents, but graph-RAG can lose context and mismatch the sequence-based reasoning of LLMs. ThreadRAG structures retrieved text as a Semantic Topology Graph and linearizes query-relevant evidence into coherent paths; it reports gains across three benchmarks.

1 Introduction

  • Multi-hop QA requires connecting scattered evidence across documents through latent relations, while graph-RAG can lose context and mismatch LLMs’ sequence-based reasoning.Triplet graphs discard contextual nuances, chunk graphs create semantic truncation and noisy boundaries, and verbalization can add redundancy or hallucinated transitions or omit evidence.Source: §1 · p. 1
  • ThreadRAG’s Semantic Topology Mapper organizes retrieved documents into context-preserving Semantic Nodes and connects them with narrative, semantic, and lexical edges.Narrative edges preserve text order; semantic and lexical edges capture cross-node associations beyond surface adjacency.Source: §1 · pp. 1–2
  • Energy-Driven Pathfinding selects query-relevant evidence subgraphs through energy propagation and dynamically prunes them, then deterministically linearizes nodes into continuous textual paths.The paths preserve graph structure and narrative context while presenting evidence in a form compatible with LLM pretraining.Source: §1 · pp. 1–2
  • 3.4% EM improvement over KnowTrace on HotpotQA; ThreadRAG also improves graph-enhanced RAG performance across all three evaluated multi-hop QA benchmarks.The reported representation evaluations also find a 12.6% EM improvement when replacing traditional global graphs with STG, and sequence-native STG-Paths peak at 0.588 EM on 2WikiMultihop.Source: §1 · p. 2

2 Related Work

Prior graph-RAG approaches face semantic loss from triplet extraction or chunk assembly, and modality mismatch from fragmented paths or rewritten subgraphs. ThreadRAG addresses these issues by structuring evidence as a topology and linearizing it into coherent text sequences.

2 Related Work

  • Triplet extraction can discard contextual nuances, while chunk assembly can truncate semantics or add structural noise, fragmenting the context needed for multi-hop reasoning.Earlier text-span approaches also used heterogeneous node designs for GNN aggregation rather than LLM prompt reconstruction, fragmenting logical sequence.Source: §2 · p. 3
  • ThreadRAG embeds structural guidance in native text sequences through a topological framework designed to preserve narrative integrity.The framework’s architecture uses STM to structure retrieved contexts into an STG, then EDP to extract and linearize query-relevant subgraphs.Source: §2 · p. 3, Figure 2 · p. 3
  • Graph-based reasoning methods provide fragmented symbolic paths, while generative rewriting risks token overhead and hallucinations and chunk concatenation misses cross-document coherence.ThreadRAG’s topological linearization restructures fragments into coherent sequences without generative rewriting overhead.Source: §2 · p. 3

3 ThreadRAG

ThreadRAG structures retrieved contexts as a Semantic Topology Graph, then selects and linearizes query-relevant evidence for an adaptive reasoning agent. Its components preserve textual context while connecting and processing evidence across documents.

3.1 Semantic Topology Mapper

  • STM partitions retrieved text at predicted semantic boundaries into Semantic Nodes and connects them through narrative, semantic, and lexical edges.The resulting STG combines the node set with the three complementary edge types.Source: §3.1 · pp. 3–4
  • Each Semantic Node retains its raw text span, document identifier, and exact character-level position, while segmentation avoids generative noise.The passage describes the segmentation mechanism as feed-forward and millisecond-level.Source: §3.1 · p. 4

3.2 Energy-Driven Pathfinding

  • EDP scores query-relevant anchor nodes using semantic relevance and entity matching, then initializes their energy with a provenance-weighted score.Locally retrieved nodes receive priority through the provenance weight.Source: §3.2 · pp. 4–5
  • EDP propagates energy over the STG, prunes low-energy nodes, retains nodes reachable from anchors, and linearizes the remaining evidence by document relevance and narrative order.The resulting continuous textual sequence is passed to the reasoning agent.Source: §3.2 · p. 5

3.3 Adaptive Reasoning Agent

  • The adaptive reasoning agent checks whether the current context suffices, retrieves targeted evidence when needed, and repeats for at most N iterations before answer synthesis.Insufficient context is converted into structured knowledge triples and then targeted retrieval entities; the resulting documents pass through segmentation, graph augmentation, and pathfinding.Source: §3.3 · p. 5

4 Experiments

ThreadRAG is evaluated on three multi-hop QA benchmarks, with comparisons covering inference performance, module ablations, token cost, hyperparameters, graph structures, and knowledge representations. Across these analyses, results favor context-preserving STG structures and sequence-native STG-Paths.

4.1 Experimental Setup

  • The evaluation uses three multi-hop QA benchmarks, reports EM and F1, and compares ThreadRAG with five categories of RAG baselines.ToG and PoG are adapted to use the same local KG as LightRAG.Source: §4.1 · p. 6

4.2 Inference Performance Comparison

  • ThreadRAG exceeds KnowTrace by up to 5.8% EM on 2Wiki and IRCoT by 14.4% EM on HotpotQA.The evaluation covers HotpotQA, 2WikiMultihopQA, and MuSiQue.Source: §4.2 · p. 7

4.3 Ablation Study

  • Removing STM drops MuSiQue EM by 9.2%, while replacing Semantic Nodes with fixed-length chunks drops HotpotQA EM by 3.4%.Without EDP linearization, performance decreases by 3.8% on MuSiQue.Source: §4.3 · p. 7, Table 2 · p. 7

4.4 More Analysis

  • ThreadRAG’s total token consumption is 23.3% to 26.3% of KnowTrace’s, measured across 100 sampled queries per dataset.The analysis uses tiktoken with GPT-4o-mini standard; Table 3 compares construction, inference, and total token costs.Source: §4.4 · p. 7, Table 3 · p. 7
  • On HotpotQA, ThreadRAG maintains EM above 0.512 across tested extreme hyperparameter settings and peaks at 0.574 with 3 anchors, 5 documents, 3 iterations, and a 0.01 threshold.Exceeding these settings yields marginal diminishing returns rather than sharp performance drops.Source: §4.4 · pp. 7–8, Figure 3 · p. 8
  • ThreadRAG* improves EM over GraphRAG* by 7.8% to 12.6% across benchmarks, including a 12.6% HotpotQA gain from 0.288 to 0.414.Retrieval indices and prompting templates are held identical in the comparison.Source: §4.4 · p. 8, Figure 4 · p. 8
  • Among KG-Triplets, KG-Paths, KG-Texts, and STG-Paths, STG-Paths achieves the highest performance, while KG-Texts can underperform KG-Triplets.The authors attribute KG-Texts’ occasional weaker performance to hallucinations and semantic distortions during rewriting.Source: §4.4 · p. 8, Figure 5 · p. 8

5 Conclusion

ThreadRAG combines STG-based knowledge structuring with energy-driven pathfinding that linearizes graph evidence into continuous natural-language sequences. The paper concludes that it performs well across multiple benchmarks with low computational overhead.

5 Conclusion

  • ThreadRAG combines a Semantic Topology Graph with modality-aligned reasoning through Energy-Driven Pathfinding.The framework linearizes discrete graphs into continuous natural-language sequences while preserving narrative context.Source: §5 · p. 9
  • The paper reports superior performance across multiple benchmarks against existing state-of-the-art baselines.Source: §5 · p. 9
  • The paper reports low computational overhead for ThreadRAG.Source: §5 · p. 9

Limitations

ThreadRAG’s gains may be limited when cross-document evidence links are sparse or absent, and its paths may not perfectly preserve long-range dependencies’ chronological or logical order.

Limitations

  • Improvements may be insignificant in tasks with extremely sparse document links or virtually no cross-document evidence chains, such as single-document standard QA.The authors identify these settings as cases where the structural priors may offer less benefit.Source: Limitations · p. 9
  • Dynamic segmentation and complex multi-hop paths can leave some long-range dependencies imperfectly ordered, causing minor narrative fragmentation and potentially affecting downstream reasoning accuracy.The limitation concerns exact chronological or logical ordering during prompt reconstruction.Source: Limitations · p. 9
  • Future work will explore optimizing topological path selection and more finely aligning narrative flows in prompts.Source: Limitations · p. 9

Ethics Statement

The study uses public benchmark datasets and pretrained models for academic research and evaluation, without collecting sensitive information or conducting human-subject studies.

Ethics Statement

  • The evaluation uses only publicly available benchmark datasets, including HotpotQA, 2WikiMultihopQA, and MuSiQue.Source: Ethics Statement · p. 9
  • The work involves no collection of personally identifiable or sensitive information, human-subject experiments, or user studies.Source: Ethics Statement · p. 9
  • Datasets and pretrained models are used solely for academic research and evaluation under their intended licenses and usage conditions.Source: Ethics Statement · p. 9

A Dataset Details

The evaluation covers three open-domain multi-hop QA benchmarks, compares five categories of RAG baselines, and illustrates ThreadRAG’s end-to-end process with a MuSiQue example.

A Dataset Details

  • HotpotQA contains approximately 113k English Wikipedia questions requiring information to be bridged across introductory paragraphs of distinct articles.Evaluation uses an open-domain setting without gold contexts, requiring retrieval and structuring amid noise and distractors.Source: A Dataset Details · p. 11
  • 2WikiMultihopQA emphasizes compositional and comparative two-hop reasoning, combining Wikidata knowledge with Wikipedia text.Source: A Dataset Details · p. 11
  • MuSiQue composes bottom-up single-hop queries into challenging two- to four-hop chains designed to prevent reasoning shortcuts.Source: A Dataset Details · p. 11

B Baseline Descriptions

  • Text-centric RAG relies on LLM reasoning over plain text, while KG-chunk methods use larger text chunks as graph nodes; baselines include RA-CoT, ReAct, IRCoT, Iter-RetGen, Self-Ask, HippoRAG, and LightRAG.These categories contrast reasoning over continuous text with graph connectivity that retains local context.Source: B Baseline Descriptions · p. 11
  • KG-rewriting methods translate retrieved subgraphs into natural-language narratives, whereas KG-path methods guide reasoning along discrete relational paths.The named baselines are CoTKR and EFSUM for rewriting, and ToG and PoG for paths; ToG and PoG use the same local KG as LightRAG for fair comparison.Source: B Baseline Descriptions · pp. 11–12
  • KG-triplet methods prompt with entity-relation triplets; the comparison includes ERA-CoT and KnowTrace.The passage notes that this representation can strip away original narrative context.Source: B Baseline Descriptions · p. 12

C Example

  • A MuSiQue example traces query analysis and retrieval, semantic-node construction, energy-driven evidence selection and topological linearization, and final answer synthesis.The example illustrates transformation of retrieved passages into a compact, context-preserving evidence sequence.Source: C Example · p. 12

D Implementation Details of the Semantic Segmentation Model

The semantic segmentation model predicts narrative boundaries from contextualized text representations, is trained with teacher-generated silver labels, and is included in additional controlled evaluations.

D Implementation Details of the Semantic Segmentation Model

  • The boundary predictor uses a RoBERTa-base encoder to process consecutive-sentence blocks under 512 tokens and predicts a breakpoint when boundary probability exceeds 0.65.The inputs are segmented into sentences, then dynamically packed to fit the encoder’s token limit.Source: D Implementation Details of the… · p. 12
  • Teacher models partitioned 100 complex Wikipedia documents into 1,553 semantic nodes, providing binary boundary pseudo-labels for training the lightweight predictor.The labels mark narrative boundaries versus continuous context.Source: D Implementation Details of the… · p. 12
  • The MLP prediction head is optimized with AdamW at a learning rate of 1 × 10^-5 using binary cross-entropy over evaluated sentence boundaries.The passage defines the labels as binary pseudo-labels and the predictions as boundary probabilities.Source: D Implementation Details of the… · p. 12
  • The encoder and MLP are trained once on distilled pseudo-labels, then frozen and shared across HotpotQA, 2WikiMultihopQA, and MuSiQue evaluations.The stated procedure uses zero-shot inference rather than dataset-specific retraining.Source: D Implementation Details of the… · p. 13
  • The exact teacher-model instruction template for generating silver labels is presented in Table 5.Source: D Implementation Details of the… · p. 13

E Additional Ablation and Intrinsic Evaluation

  • Additional controlled ablations and intrinsic evaluations examine graph-based evidence organization, Energy-Driven Pathfinding, and the semantic boundary predictor.These evaluations complement the main-text analyses.Source: E Additional Ablation and Intrinsic… · p. 13

E.1 Graph-Free Ablation

The ablations test graph-based evidence organization, EDP’s selection strategy, and semantic boundary prediction, while the prompt sections document entity extraction and information-sufficiency checks.

E.1 Graph-Free Ablation

  • Removing graph-based evidence organization decreases EM by 0.148 on HotpotQA, 0.114 on 2Wiki, and 0.118 on MuSiQue.The Graph-Free variant retains retrieval and iterative reasoning but removes STG construction and EDP.Source: §E.1 · p. 14, Table 6 · p. 14

E.2 Comparison of Subgraph Selection Strategies

  • BFS, DFS, and no-subgraph selection decrease EM by 0.030, 0.022, and 0.038, respectively, relative to EDP on MuSiQue.EDP propagates energy jointly from query-relevant anchors, enabling evidence from distant regions to contribute; this is useful for questions requiring 2–4 hops.Source: §E.2 · pp. 14–15, Table 7 · p. 14

E.3 Intrinsic Evaluation of Semantic Segmentation

  • On 50 held-out Wikipedia documents, the boundary predictor achieves precision 0.948, recall 0.861, and F1 score 0.902 against teacher-generated reference boundaries.The evaluation uses 719 reference boundaries; the authors describe it as complementary evidence that semantic units can be preserved without dataset-specific retraining.Source: §E.3 · p. 15, Table 8 · p. 15

F.1 Entity Extraction Prompt

  • The entity-extraction prompt turns multi-hop questions into concise entity anchors, instructing the LLM to include all entities needed for reasoning and return a JSON array.The examples include extracting “Google” and “Larry Page” from a question about the sport played by Google’s founder.Source: §F.1 · p. 15, F Prompt Templates · p. 15, Table 9

F.2 Information Sufficiency Discriminator Prompts

  • The Information Sufficiency Discriminator prompt asks the LLM to assess whether the context contains adequate factual information before final answer generation.Source: §F.2 · p. 15

G Qualitative Error Analysis

The error analysis examines 200 incorrect HotpotQA predictions and divides them into retrieval failures, LLM analysis errors, and pathfinding errors.

G Qualitative Error Analysis

  • Retrieval failure accounts for 74.5% of incorrect predictions (149 cases): the top-k pool lacks documents containing gold supporting evidence.Without that factual foundation, the constructed STG cannot support correct deduction.Source: G Qualitative Error Analysis · p. 16
  • The downstream baseline LLM can fail at the final step because of intrinsic logical deficiencies or hallucinations, failing to deduce the target answer despite access to pristine context.Source: G Qualitative Error Analysis · p. 16
  • Pathfinding error accounts for 4.5% of failures (9 cases), when energy decay or structural pruning removes critical evidence in exceptionally long-range or complex paths.The authors report that 95.5% of failures stem from retrieval or baseline-LLM reasoning bottlenecks rather than internal pathfinding and pruning.Source: G Qualitative Error Analysis · p. 16
Loading 2610.29933v1…