Query-Aware Subgraph Packing: A Knapsack Optimization Paradigm for Graph Retrieval-Augmented Generation

Chenjie Qiu, yongqi luo, Bingfeng chen, Boyan Xu, Ruichu Cai, Zhifeng HaoOpenReview 2025 · Submission to NeurIPS 2025 · Rejected

Abstract

Graph Retrieval‑Augmented Generation (GraphRAG) has recently emerged as a task paradigm for injecting graph‑structured knowledge into large language models (LLMs), yet most existing approaches still rely on flat, similarity‑based retrieval that ignores topology and uses static encoders, producing redundant or structurally incoherent evidence. In this paper, we propose GraphPack, a query‑aware GraphRAG framework that overcomes these limitations by casting subgraph selection as a 0–1 knapsack optimization. For every natural language query, GraphPack packs the most informative subgraph under a size budget by jointly maximizing semantic relevance and minimizing structural redundancy. The selected subgraph is then encoded by a query‑aware graph encoder whose parameters are conditioned on the query, allowing node representations to adapt dynamically to user intent. Extensive experiments on multiple knowledge-intensive graph benchmarks demonstrate that GraphPack achieves state-of-the-art performance, showcasing its strong capability in addressing structural and contextual challenges under supervised learning, cross-domain settings, and zero-shot scenarios.
BibTeX
@misc{qiu2025query,
  author = {Chenjie Qiu and yongqi luo and Bingfeng chen and Boyan Xu and Ruichu Cai and Zhifeng Hao},
  title = {{Query-Aware Subgraph Packing: A Knapsack Optimization Paradigm for Graph Retrieval-Augmented Generation}},
  year = {2025},
  url = {https://openreview.net/forum?id=7fZNTLuStL},
  howpublished = {OpenReview},
  note = {Submitted to NeurIPS 2025},
}

Loading related content...

Figure