Revamp project page
Browse files- docs/index.html +70 -48
docs/index.html
CHANGED
|
@@ -344,100 +344,122 @@
|
|
| 344 |
<div class="btn-group">
|
| 345 |
<a class="btn btn-primary" href="https://openreview.net/pdf?id=n28wnc2QTc"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 2l5 5h-5V4zM6 20V4h5v7h7v9H6z"/></svg> Paper</a>
|
| 346 |
<a class="btn btn-outline" href="https://github.com/Tarzanagh/QAFD-RAG"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.385-1.335-1.755-1.335-1.755-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.605-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 21.795 24 17.295 24 12 24 5.37 18.63 0 12 0z"/></svg> Code</a>
|
| 347 |
-
<a class="btn btn-outline" href="https://huggingface.co/tarzanagh/QAFD-RAG"><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 95 88" fill="none"><path fill="#FFD21E" d="M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"/><path fill="#FF9D0B" d="M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"/><path fill="#3A3B45" d="M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"/><path fill="#FF323D" d="M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"/><path fill="#3A3B45" fill-rule="evenodd" d="M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z" clip-rule="evenodd"/><path fill="#FF9D0B" d="M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"/><path fill="#FFD21E" d="M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"/><path fill="#FF9D0B" d="M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"/><path fill="#FFD21E" d="M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"/></svg>
|
| 348 |
</div>
|
| 349 |
</div>
|
| 350 |
</header>
|
| 351 |
|
|
|
|
| 352 |
<section>
|
| 353 |
<div class="container">
|
| 354 |
<h2 style="font-size:1.55rem;font-weight:700;color:var(--slate-800);margin-bottom:16px;">Query-Aware Flow Diffusion for Graph-Based<br/>Retrieval-Augmented Generation</h2>
|
| 355 |
-
<p class="about-text"><strong style="color:var(--blue-600);">QAFD-RAG</strong>
|
| 356 |
-
<div class="duo-grid">
|
| 357 |
-
<div class="card"><h3>The Problem</h3><p>Existing graph-based RAG methods rely on <strong>static retrieval</strong>—community detection (GraphRAG) or one-hop entity lookup (LightRAG)—that ignore query context and miss relevant multi-hop connections.</p></div>
|
| 358 |
-
<div class="card"><h3>Our Solution</h3><p>QAFD-RAG <strong>dynamically re-weights</strong> graph edges based on query relevance and <strong>propagates flow</strong> through the knowledge graph to discover multi-hop context, assembling a query-specific subgraph for the LLM.</p></div>
|
| 359 |
-
</div>
|
| 360 |
</div>
|
| 361 |
</section>
|
| 362 |
|
|
|
|
| 363 |
<section class="alt">
|
| 364 |
<div class="container">
|
| 365 |
-
<h2>
|
| 366 |
-
<
|
| 367 |
-
|
| 368 |
-
<div class="
|
| 369 |
-
<div class="
|
| 370 |
-
<div class="figure-card"><img src="figs/QAFD-RAG.png" alt="QAFD-RAG"/><div class="caption">QAFD-RAG (Ours)<br/><small>Query-Aware Flow Diffusion</small></div></div>
|
| 371 |
</div>
|
| 372 |
-
<p style="margin-top:24px;font-size:0.92rem;color:var(--slate-500);line-height:1.75;max-width:860px;margin-left:auto;margin-right:auto;">Comparison on Wikipedia pages (Apple fruit, Apple Inc., Amazon River, Amazon.com). Query: <em>"Introduce Steve Jobs's products in Apple."</em> <strong style="color:var(--slate-700);">GraphRAG</strong> retrieves entire communities, mixing relevant nodes with irrelevant ones. <strong style="color:var(--slate-700);">LightRAG</strong> focuses on 1-hop neighborhoods. <strong style="color:var(--slate-700);">QAFD-RAG</strong> reweights edges by query meaning, suppressing irrelevant neighborhoods.</p>
|
| 373 |
</div>
|
| 374 |
</section>
|
| 375 |
|
|
|
|
| 376 |
<section>
|
| 377 |
<div class="container">
|
| 378 |
-
<h2>
|
| 379 |
-
<p class="section-sub">
|
| 380 |
-
<div class="
|
| 381 |
-
<div class="card"><
|
| 382 |
-
<div class="card"><
|
|
|
|
| 383 |
</div>
|
|
|
|
| 384 |
</div>
|
| 385 |
</section>
|
| 386 |
|
|
|
|
| 387 |
<section class="alt">
|
| 388 |
<div class="container">
|
| 389 |
-
<h2>
|
| 390 |
-
<p class="section-sub">
|
| 391 |
-
<div class="
|
| 392 |
-
<div class="
|
| 393 |
-
<div class="
|
| 394 |
-
<div class="bench-item"><div class="task">Text-to-SQL</div><div class="dataset">Spider2-lite (Pagila, etc.)</div><div class="metrics">Schema Retrieval Accuracy</div></div>
|
| 395 |
-
<div class="bench-item"><div class="task">Summarization</div><div class="dataset">SQuALITY</div><div class="metrics">BLEU · ROUGE · METEOR</div></div>
|
| 396 |
</div>
|
| 397 |
</div>
|
| 398 |
</section>
|
| 399 |
|
|
|
|
| 400 |
<section>
|
| 401 |
<div class="container">
|
| 402 |
-
<h2>
|
| 403 |
-
<p class="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
</div>
|
| 405 |
</section>
|
| 406 |
|
|
|
|
| 407 |
<section class="alt">
|
| 408 |
<div class="container">
|
| 409 |
<h2>Quick Start</h2>
|
| 410 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 411 |
pip install -r requirements.txt
|
| 412 |
-
<span class="comment"># 2. Set your OpenAI API key</span>
|
| 413 |
export OPENAI_API_KEY=<span class="string">"sk-..."</span>
|
| 414 |
-
|
| 415 |
-
./run.sh ultradomain --build --max-documents 100
|
| 416 |
-
<span class="comment"># 4. Run a benchmark</span>
|
| 417 |
-
./run.sh ultradomain --questions 10</code></pre>
|
| 418 |
-
<h3>Python API</h3>
|
| 419 |
-
<pre><code><span class="keyword">from</span> src <span class="keyword">import</span> QAFD_RAG, QueryParam
|
| 420 |
-
rag = QAFD_RAG(
|
| 421 |
-
working_dir=<span class="string">"./my_kg"</span>,
|
| 422 |
-
llm_model_name=<span class="string">"gpt-4o-mini"</span>,
|
| 423 |
-
embedding_model_key=<span class="string">"jina-v3"</span>,
|
| 424 |
-
)
|
| 425 |
-
<span class="comment"># Index documents</span>
|
| 426 |
-
rag.insert([<span class="string">"Document text 1..."</span>, <span class="string">"Document text 2..."</span>])
|
| 427 |
-
<span class="comment"># Query</span>
|
| 428 |
-
answer = rag.query(<span class="string">"What is X?"</span>, param=QueryParam(mode=<span class="string">"hybrid"</span>))
|
| 429 |
-
print(answer)</code></pre>
|
| 430 |
</div>
|
| 431 |
</section>
|
| 432 |
|
|
|
|
| 433 |
<section>
|
| 434 |
<div class="container">
|
| 435 |
<h2>Citation</h2>
|
| 436 |
<pre><code>@inproceedings{zhou2026qafd,
|
| 437 |
title={Query-Aware Flow Diffusion for Graph-Based RAG with Retrieval Guarantees},
|
| 438 |
-
author={
|
| 439 |
-
and
|
| 440 |
-
and
|
| 441 |
booktitle={International Conference on Learning Representations (ICLR)},
|
| 442 |
year={2026}
|
| 443 |
}</code></pre>
|
|
|
|
| 344 |
<div class="btn-group">
|
| 345 |
<a class="btn btn-primary" href="https://openreview.net/pdf?id=n28wnc2QTc"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 2l5 5h-5V4zM6 20V4h5v7h7v9H6z"/></svg> Paper</a>
|
| 346 |
<a class="btn btn-outline" href="https://github.com/Tarzanagh/QAFD-RAG"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.385-1.335-1.755-1.335-1.755-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.605-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 21.795 24 17.295 24 12 24 5.37 18.63 0 12 0z"/></svg> Code</a>
|
| 347 |
+
<a class="btn btn-outline" href="https://huggingface.co/tarzanagh/QAFD-RAG"><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 95 88" fill="none"><path fill="#FFD21E" d="M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"/><path fill="#FF9D0B" d="M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"/><path fill="#3A3B45" d="M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"/><path fill="#FF323D" d="M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"/><path fill="#3A3B45" fill-rule="evenodd" d="M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z" clip-rule="evenodd"/><path fill="#FF9D0B" d="M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"/><path fill="#FFD21E" d="M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"/><path fill="#FF9D0B" d="M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"/><path fill="#FFD21E" d="M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"/></svg> Code + Knowledge Graphs</a>
|
| 348 |
</div>
|
| 349 |
</div>
|
| 350 |
</header>
|
| 351 |
|
| 352 |
+
<!-- ============ ABSTRACT ============ -->
|
| 353 |
<section>
|
| 354 |
<div class="container">
|
| 355 |
<h2 style="font-size:1.55rem;font-weight:700;color:var(--slate-800);margin-bottom:16px;">Query-Aware Flow Diffusion for Graph-Based<br/>Retrieval-Augmented Generation</h2>
|
| 356 |
+
<p class="about-text" style="text-align:justify;">Graph-based RAG systems leverage interconnected knowledge structures to capture complex relationships, enabling multi-hop reasoning. Yet most existing methods suffer from (i) heuristic designs lacking theoretical guarantees and (ii) static exploration strategies that ignore the query’s holistic meaning. We propose <strong style="color:var(--blue-600);">QAFD-RAG</strong>, a training-free framework that dynamically adapts graph traversal to each query’s semantics. The central innovation is <em>query-aware traversal</em>: edges are dynamically weighted by how well their endpoints align with the query embedding, guiding flow along semantically relevant paths while suppressing irrelevant regions. This enables the <strong>first statistical guarantees</strong> for query-aware graph retrieval, with <strong>exponential convergence</strong> and complexity scaling with the retrieved subgraph rather than the full graph.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 357 |
</div>
|
| 358 |
</section>
|
| 359 |
|
| 360 |
+
<!-- ============ KEY CONTRIBUTIONS ============ -->
|
| 361 |
<section class="alt">
|
| 362 |
<div class="container">
|
| 363 |
+
<h2>Key Contributions</h2>
|
| 364 |
+
<div class="duo-grid" style="grid-template-columns:1fr 1fr 1fr;gap:16px;">
|
| 365 |
+
<div class="card"><h3>Query-Aware Framework</h3><p>First principled flow diffusion method for graph-based RAG that incorporates query semantics via alignment-based edge weighting. Adapts flow probabilities <strong>online</strong>, guiding traversal toward semantically relevant regions.</p></div>
|
| 366 |
+
<div class="card"><h3>Provable Guarantees</h3><p><strong>Exponential convergence</strong> to a query-dependent stationary distribution. <strong>Recovery guarantees</strong> ensuring relevant subgraphs are retrieved with high probability under mild signal-to-noise conditions.</p></div>
|
| 367 |
+
<div class="card"><h3>State-of-the-Art Results</h3><p>Leads in <strong>96%</strong> of UltraDomain comparisons. Best F1/EM on HotpotQA (<strong>73.4/58.1</strong>) and MuSiQue (<strong>48.0/33.5</strong>). Outperforms GraphRAG, LightRAG, and RAPTOR across all benchmarks.</p></div>
|
|
|
|
| 368 |
</div>
|
|
|
|
| 369 |
</div>
|
| 370 |
</section>
|
| 371 |
|
| 372 |
+
<!-- ============ APPROACH COMPARISON ============ -->
|
| 373 |
<section>
|
| 374 |
<div class="container">
|
| 375 |
+
<h2>Approach Comparison</h2>
|
| 376 |
+
<p class="section-sub">Query: <em>“Introduce Steve Jobs’s products in Apple.”</em></p>
|
| 377 |
+
<div class="figure-row">
|
| 378 |
+
<div class="figure-card"><img src="figs/GraphRAG.png" alt="GraphRAG"/><div class="caption">GraphRAG<br/><small>Community Detection</small></div></div>
|
| 379 |
+
<div class="figure-card"><img src="figs/LightRAG.png" alt="LightRAG"/><div class="caption">LightRAG<br/><small>One-Hop Entity-Centric</small></div></div>
|
| 380 |
+
<div class="figure-card"><img src="figs/QAFD-RAG.png" alt="QAFD-RAG"/><div class="caption">QAFD-RAG (Ours)<br/><small>Query-Aware Flow Diffusion</small></div></div>
|
| 381 |
</div>
|
| 382 |
+
<p style="margin-top:24px;font-size:0.92rem;color:var(--slate-500);line-height:1.75;max-width:860px;margin-left:auto;margin-right:auto;"><strong style="color:var(--slate-700);">GraphRAG</strong> retrieves entire communities, mixing relevant and irrelevant nodes. <strong style="color:var(--slate-700);">LightRAG</strong> extracts 1-hop neighborhoods without semantic alignment. <strong style="color:var(--slate-700);">QAFD-RAG</strong> reweights edges by query meaning, suppressing irrelevant clusters (Amazon River, Apple fruit) and reinforcing reasoning paths (Apple → Mac → macOS). Edge thickness reflects weight; node color indicates importance.</p>
|
| 383 |
</div>
|
| 384 |
</section>
|
| 385 |
|
| 386 |
+
<!-- ============ HOW IT WORKS ============ -->
|
| 387 |
<section class="alt">
|
| 388 |
<div class="container">
|
| 389 |
+
<h2>How It Works</h2>
|
| 390 |
+
<p class="section-sub">A two-stage pipeline from raw documents to grounded answers</p>
|
| 391 |
+
<div class="duo-grid">
|
| 392 |
+
<div class="card"><h3>Stage 1 — Knowledge Graph Construction</h3><ol><li><strong>Document Chunking</strong> — Split into context-preserving chunks.</li><li><strong>Entity & Relationship Extraction</strong> — LLM builds a structured KG with entities as nodes and relationships as edges.</li><li><strong>Embedding</strong> — All nodes embedded into vector space for similarity matching.</li></ol></div>
|
| 393 |
+
<div class="card"><h3>Stage 2 — Query-Aware Retrieval</h3><ol><li><strong>Seed Selection</strong> — Query matched to KG entities via embedding similarity; LLM reranker filters top seeds.</li><li><strong>Flow Diffusion</strong> — Mass injected at seeds and propagated via push-relabel with <em>query-aware edge weights</em>.</li><li><strong>Response Generation</strong> — Top-ranked subgraph assembled into context for LLM answer generation.</li></ol></div>
|
|
|
|
|
|
|
| 394 |
</div>
|
| 395 |
</div>
|
| 396 |
</section>
|
| 397 |
|
| 398 |
+
<!-- ============ RESULTS ============ -->
|
| 399 |
<section>
|
| 400 |
<div class="container">
|
| 401 |
+
<h2>Results</h2>
|
| 402 |
+
<p class="section-sub">Evaluated across four benchmark categories</p>
|
| 403 |
+
<div class="duo-grid">
|
| 404 |
+
<div class="card">
|
| 405 |
+
<h3>Multi-hop QA (F1 / EM)</h3>
|
| 406 |
+
<table style="width:100%;font-size:0.88rem;border-collapse:collapse;margin-top:8px;">
|
| 407 |
+
<tr style="border-bottom:2px solid var(--slate-200);"><th style="text-align:left;padding:6px 4px;">Method</th><th style="text-align:center;padding:6px 4px;">HotpotQA</th><th style="text-align:center;padding:6px 4px;">MuSiQue</th><th style="text-align:center;padding:6px 4px;">2Wiki</th></tr>
|
| 408 |
+
<tr style="border-bottom:1px solid var(--slate-100);"><td style="padding:6px 4px;color:var(--slate-500);">GraphRAG</td><td style="text-align:center;padding:6px 4px;">68.6</td><td style="text-align:center;padding:6px 4px;">38.5</td><td style="text-align:center;padding:6px 4px;">58.6</td></tr>
|
| 409 |
+
<tr style="border-bottom:1px solid var(--slate-100);"><td style="padding:6px 4px;color:var(--slate-500);">LightRAG</td><td style="text-align:center;padding:6px 4px;">2.4</td><td style="text-align:center;padding:6px 4px;">1.6</td><td style="text-align:center;padding:6px 4px;">11.6</td></tr>
|
| 410 |
+
<tr style="border-bottom:1px solid var(--slate-100);"><td style="padding:6px 4px;color:var(--slate-500);">RAPTOR</td><td style="text-align:center;padding:6px 4px;">69.5</td><td style="text-align:center;padding:6px 4px;">28.9</td><td style="text-align:center;padding:6px 4px;">52.1</td></tr>
|
| 411 |
+
<tr style="background:var(--blue-50);font-weight:600;"><td style="padding:6px 4px;color:var(--blue-600);">QAFD-RAG</td><td style="text-align:center;padding:6px 4px;"><strong>73.4</strong></td><td style="text-align:center;padding:6px 4px;"><strong>48.0</strong></td><td style="text-align:center;padding:6px 4px;">69.4</td></tr>
|
| 412 |
+
</table>
|
| 413 |
+
</div>
|
| 414 |
+
<div class="card">
|
| 415 |
+
<h3>Text-to-SQL (Execution Accuracy %)</h3>
|
| 416 |
+
<table style="width:100%;font-size:0.88rem;border-collapse:collapse;margin-top:8px;">
|
| 417 |
+
<tr style="border-bottom:2px solid var(--slate-200);"><th style="text-align:left;padding:6px 4px;">Method</th><th style="text-align:center;padding:6px 4px;">SQLite</th><th style="text-align:center;padding:6px 4px;">Snowflake</th></tr>
|
| 418 |
+
<tr style="border-bottom:1px solid var(--slate-100);"><td style="padding:6px 4px;color:var(--slate-500);">Spider-Agent</td><td style="text-align:center;padding:6px 4px;">21.5</td><td style="text-align:center;padding:6px 4px;">16.3</td></tr>
|
| 419 |
+
<tr style="background:var(--blue-50);font-weight:600;"><td style="padding:6px 4px;color:var(--blue-600);">QAFD-RAG</td><td style="text-align:center;padding:6px 4px;"><strong>26.7</strong></td><td style="text-align:center;padding:6px 4px;"><strong>23.7</strong></td></tr>
|
| 420 |
+
</table>
|
| 421 |
+
<p style="margin-top:12px;font-size:0.85rem;color:var(--slate-400);">Also reduces LLM API calls by 31.9–54.5%.</p>
|
| 422 |
+
</div>
|
| 423 |
+
</div>
|
| 424 |
+
<div class="bench-grid" style="margin-top:20px;">
|
| 425 |
+
<div class="bench-item"><div class="task">UltraDomain QA</div><div class="dataset">11 domains · 5 quality metrics</div><div class="metrics">Leads in <strong>96%</strong> of comparisons (48/50)</div></div>
|
| 426 |
+
<div class="bench-item"><div class="task">Multi-hop QA</div><div class="dataset">MuSiQue · HotpotQA · 2WikiMultiHopQA</div><div class="metrics">Best F1/EM on 2 of 3 datasets</div></div>
|
| 427 |
+
<div class="bench-item"><div class="task">Text-to-SQL</div><div class="dataset">Spider2-lite (SQLite · Snowflake)</div><div class="metrics">+5.2pp SQLite · +7.4pp Snowflake</div></div>
|
| 428 |
+
<div class="bench-item"><div class="task">Summarization</div><div class="dataset">SQuALITY</div><div class="metrics">BLEU · ROUGE · METEOR</div></div>
|
| 429 |
+
</div>
|
| 430 |
</div>
|
| 431 |
</section>
|
| 432 |
|
| 433 |
+
<!-- ============ QUICK START ============ -->
|
| 434 |
<section class="alt">
|
| 435 |
<div class="container">
|
| 436 |
<h2>Quick Start</h2>
|
| 437 |
+
<p class="section-sub">Get running in minutes with pre-built knowledge graphs</p>
|
| 438 |
+
<pre><code><span class="comment"># Option 1: Clone from HuggingFace (code + pre-built KGs)</span>
|
| 439 |
+
git clone https://huggingface.co/tarzanagh/QAFD-RAG
|
| 440 |
+
<span class="keyword">cd</span> QAFD-RAG
|
| 441 |
+
|
| 442 |
+
<span class="comment"># Option 2: Clone from GitHub (code only) + download KGs</span>
|
| 443 |
+
git clone https://github.com/Tarzanagh/QAFD-RAG.git
|
| 444 |
+
<span class="keyword">cd</span> QAFD-RAG
|
| 445 |
+
huggingface-cli download tarzanagh/QAFD-RAG --include <span class="string">"kg/multihop/*"</span> --local-dir .
|
| 446 |
+
|
| 447 |
+
<span class="comment"># Install and run</span>
|
| 448 |
pip install -r requirements.txt
|
|
|
|
| 449 |
export OPENAI_API_KEY=<span class="string">"sk-..."</span>
|
| 450 |
+
python benchmarks/run.py --task multihop --dataset musique --questions 10</code></pre>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 451 |
</div>
|
| 452 |
</section>
|
| 453 |
|
| 454 |
+
<!-- ============ CITATION ============ -->
|
| 455 |
<section>
|
| 456 |
<div class="container">
|
| 457 |
<h2>Citation</h2>
|
| 458 |
<pre><code>@inproceedings{zhou2026qafd,
|
| 459 |
title={Query-Aware Flow Diffusion for Graph-Based RAG with Retrieval Guarantees},
|
| 460 |
+
author={Zhou, Zhuoping and Ataee Tarzanagh, Davoud and Didari, Sima and Hu, Wenjun
|
| 461 |
+
and Gutow, Baruch and Verkholyak, Oxana and Faraki, Masoud and Hao, Heng
|
| 462 |
+
and Moon, Hankyu and Min, Seungjai},
|
| 463 |
booktitle={International Conference on Learning Representations (ICLR)},
|
| 464 |
year={2026}
|
| 465 |
}</code></pre>
|