Prior Knowledge Makes It Possible: From Sublinear Graph Algorithms to LLM Test-Time Methods
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. From a technical point of view, we are the first to study graph query complexity when given partial prior knowledge. Then, we characterize the necessary and sufficient number of augmentation steps for the model to generate an accurate answer. 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 $\Omega(\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. We also extend our analysis to verifier-based approaches, quantifying how the cost of test-time verification scales with the unreliability of the pre-trained knowledge.
Submission Number: 100
Loading