Caching Hyperedges: KV-Cache Reuse for Hypergraph RAG
Abstract
Hypergraph-based retrieval captures the n-ary relational facts that binary-graph methods fragment, but answering a query is slow: the model must read the text of many retrieved units before it can answer. We present Cachy, which removes this reading cost by precomputing a key-value (KV) cache for each retrieval unit and reusing it whenever a query retrieves that unit. Because retrieval is hyperedge-grounded, each cached unit is a short, self-contained passage, so caches fuse at query time without fine-tuning and with no detectable loss in generation quality. To keep storage tractable, Cachy caches only the units that queries actually reach (demand caching) and compresses each cache by up to 8× with INT8/INT4 quantization and 50% K-norm token pruning. Together these cut storage from 1.9~TB to 109~GB on our workload. On UltraDomain across five domains, Cachy matches the uncached hypergraph pipeline on generation quality while cutting mean query time from 21.61~s to 8.52~s, matching the latency of lightweight RAG. Code and resources are publicly available. https://github.com/PRAISELab-PicusLab/Cachy-Hypergraphrag.