SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.01965 · 2026

Breaking the Static Graph: Context-Aware Traversal for Robust Retrieval-Augmented Generation

Xiaofang Zhou, Fangyuan Zhang, Ruiyuan Zhang, Qintian Guo, Yingli Zhou, Kwun Lau, Boyu Ruan

arXiv · PDF · Open in the Atlas

Code that ran

2 of 2 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2602.01965.json · badge: /api/ran/2602.01965.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
kwunhang/CatRAG canonical (classifier label)
classifier basis: plan_row
2 ran · 0 no recorded run
FunctionStatusWhere it lives
make_cache_embed Ran
ran; our contract draft was wrong, not the code
kwunhang/CatRAG/src/catrag/embedding_model/base.py
code served (permissive licence) · get_code("24b1b1fe74f82908")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
import tempfile
import os

torch.manual_seed(0)

# Create a simple encode function that returns embeddings
def simple_encode_func(**kwargs):
    prompts = kwargs.get('prompts', [])
    # Return a list of numpy arrays (embeddings)
    embeddings = [np.random.randn(4).astype(np.float32) for _ in prompts]
    return embeddings

# Create a temporary cache file
temp_dir = tempfile.gettempdir()
cache_file = os.path.join(temp_dir, "test_cache_embed.db")

# Clean up if it exists
if os.path.exists(cache_file):
    os.remove(cache_file)
if os.path.exists(cache_file + '.lock'):
    os.remove(cache_file + '.lock')

ARGS = {
    'encode_func': simple_encode_func,
    'cache_file_name': cache_file,
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
filelock, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mean_pooling Ran
ran; our contract draft was wrong, not the code
kwunhang/CatRAG/src/catrag/embedding_model/Contriever.py
pointer only (licence: MIT); the stored copy get_code serves, from chenyiqun/MMOA-RAG, is pointer only (licence: NONE) · get_code("fe0e2df4d9cb5edd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from chenyiqun/MMOA-RAG, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

Of 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
mean_pooling 15 other papers
13 dated earlier, 2 later
2304.11406 (2023-04)
LaMP: When Large Language Models Meet Personalization
2305.18395 (2023-05)
Knowledge-Augmented Reasoning Distillation for Small Language Models in Knowledge-Intensive Tasks
2308.04275 (2023-08)
In-Context Alignment: Chat with Vanilla Language Models Before Fine-Tuning
and 12 more not named here
make_cache_embed 1 other paper
1 later
2606.00610 (2026-06)
MemGraphRAG: Memory-based Multi-Agent System for Graph Retrieval-Augmented Generation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recent advances in Retrieval-Augmented Generation (RAG) have shifted from simple vector similarity to structure-aware approaches like HippoRAG, which leverage Knowledge Graphs (KGs) and Personalized PageRank (PPR) to capture multi-hop dependencies. However, these methods suffer from a "Static Graph Fallacy": they rely on fixed transition probabilities determined during indexing. This rigidity ignores the query-dependent nature of edge relevance, causing semantic drift where random walks are diverted into high-degree "hub" nodes before reaching critical downstream evidence. Consequently, models often achieve high partial recall but fail to retrieve the complete evidence chain required for multi-hop queries. To address this, we propose CatRAG, Context-Aware Traversal for robust RAG, a framework that builds on the HippoRAG 2 architecture and transforms the static KG into a query-adaptive navigation structure. We introduce a multi-faceted framework to steer the random walk: (1) Symbolic Anchoring, which injects weak entity constraints to regularize the random walk; (2) Query-Aware Dynamic Edge Weighting, which dynamically modulates graph structure, to prune irrelevant paths while amplifying those aligned with the query's intent; and (3) Key-Fact Passage Weight Enhancement, cost-efficient bias that structurally anchors the random walk to likely evidence. Experiments across four multi-hop benchmarks demonstrate that CatRAG consistently outperforms state-of-the-art baselines. Our analysis reveals that while standard Recall metrics show modest gains, CatRAG achieves substantial improvements in reasoning completeness-the capacity to recover entire evidence path without gaps. These results reveal that our approach effectively bridges the gap between retrieving partial context and enabling fully grounded reasoning. Resources are available at https://github.com/kwunhang/CatRAG.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2602.01965")
get_code_for_paper("2602.01965")
have("2602.01965")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2602.01965.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2602.01965.svg)](https://syntology.ai/paper/2602.01965)

Connect an agent — have() is free.