Prior Makes It Possible: From Sublinear Graph Algorithms to LLM Test-Time Methods
Avrim Blum, Daniel Hsu, Cyrus Rashtchian, Donya Saless
TL;DR
The paper addresses how much pretraining knowledge is needed for test-time augmentation to solve multi-hop reasoning tasks on knowledge graphs. It models pretraining as a partial graph $G$ of the true graph $G^*$ and analyzes retrieval-based augmentation via oracle queries to recover $s$-$t$ connectivity, uncovering a density-driven phase transition: sparse priors can require $\Omega(\sqrt{n})$ queries, while sufficiently dense priors admit constant expected queries. Central contributions include the notions of Retrieval Friendliness and $\gamma$-admissibility that enable efficient query strategies (e.g., BiRAG), lower bounds on retrieval complexity in various graph regimes, and upper-bound algorithms for Steiner-tree extensions and robustness settings. The framework generalizes to multiple query models, including connected-component oracles and verifier-based verification, offering theoretical guarantees that density and structure of prior knowledge crucially govern test-time retrieval efficiency with implications for retrieval-augmented generation and tool-use in LLMs.
Abstract
Test-time augmentation, such as Retrieval-Augmented Generation (RAG) or tool use, critically depends on an interplay between a model's parametric knowledge and externally retrieved information. However, the theoretical underpinnings of this relationship remain poorly understood. Specifically, it is not clear how much pre-training knowledge is required to answer queries with a small number of augmentation steps, which is a desirable property in practice. To address this question, we formulate multi-step reasoning as an $s$-$t$ connectivity problem on a knowledge graph. We represent a model's pre-training parametric knowledge as a partial, potentially noisy subgraph. We view augmentation as querying an oracle for true edges that augment the model's knowledge. Then, we characterize the necessary and sufficient number of augmentation steps for the model to generate an accurate answer given partial prior knowledge. One key result shows a phase transition: if the prior knowledge graph over $n$ vertices is disconnected into small components, then finding a path via augmentation is inefficient and requires $Ω(\sqrt{n})$ queries. On the other hand, once the density of correct knowledge surpasses a threshold, forming a giant component, we can find paths with an expected constant number of queries.
