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