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.
翻译:测试时增强(如检索增强生成(RAG)或工具使用)关键依赖于模型参数化知识与外部检索信息之间的相互作用。然而,这种关系的理论基础仍缺乏深入理解。具体而言,尚不清楚需要多少预训练知识才能通过少量增强步骤完成查询——这在实践中是理想特性。针对该问题,我们将多步推理表述为知识图上的$s$-$t$连通性问题。将模型的预训练参数化知识表示为可能存在噪声的部分子图,将增强视为向预言机查询真实边以扩展模型知识的过程。基于此,我们刻画了在给定部分先验知识条件下,模型生成准确答案所需的最小与充分增强步数。关键结果表明存在相变:若$n$个顶点上的先验知识图分裂为小连通分量,则通过增强寻找路径效率低下,需要$Ω(\sqrt{n})$次查询;相反,当正确知识密度超过阈值并形成巨连通分量时,可通过期望常数次查询完成路径发现。