arXiv:2610.34747cs.AIOct 2026

Manuscript Offprint

arXiv:2610.34747

Query-Driven Learning for Lifted Reasoning

Luise Ge, Brendan Juba

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Learning and reasoning are both essential to intelligent agents, but have traditionally been treated as two separate stages: first learning a knowledge base from data (or taking one as given), and then verifying queries as if the knowledge base were complete. This separation has been shown to be inefficient when the downstream goal is to verify only a small set of queries. Moreover, it neglects the possibility that data and a knowledge base contain partial yet complementary information, requiring an agent to combine both sources to justify or refute a query. Motivated by the need to integrate learning and reasoning more tightly, we study the problem of query-driven learning for reasoning. More specifically, we extend prior work to the first-order setting, which is critical for practical applications as the number of ground atoms typically grows rapidly. We begin by asking when validating or refuting a universal query given partial data and knowledge base is even possible, and identify a necessary and sufficient condition called bounded concealment. We then propose a quasi-polynomial-time algorithm that solves the task at the lifted level. Finally, we establish soundness and completeness guarantees relative to space-bounded lifted proofs, along with quasipolynomial sample and runtime bounds, demonstrating that lifted query-driven reasoning can be efficient even when unrestricted knowledge-base learning is not.

1 Introduction

Classical proof systems have achieved remarkable success in settings where complete knowledge can be axiomatized in advance, from mathematical theorem proving to hardware and software verification. Their transparency and rigor, demonstrated in independently checkable proofs, are especially valuable in high-stakes applications. However, their applicability in real-world domains is limited by a strong prerequisite: that all relevant axioms are known a priori.

What could an agent do when this prerequisite fails? A natural approach is to first construct an expanded knowledge base from as much data as possible and then reason over it. Yet this “learn everything first” strategy can be computationally prohibitive and often unnecessary: for any particular downstream question, only a small fraction of the learned facts and rules are actually relevant. This motivates a more direct, query-driven alternative: given a specific query, can the agent identify and validate only the additional knowledge needed to justify or refute it?

Concretely, we build on the “learning to reason” framework of Khardon and Roth (1997), in particular the extension to partial information with query-driven explicit learning by Juba (2019). Their approach takes a background knowledge base and examples from a distribution as input, and attempts to answer a given query by returning an explicit justification when one exists (or rejecting otherwise).

Their results are established at the propositional level. In relational domains with many objects, however, reasoning at the ground level quickly becomes infeasible: both memory and computation scale with the number of ground instances. For instance, the rule ∀x.(Bird(x)  ⟹  Flies(x))\forall x.(\text{Bird}(x) \implies \text{Flies}(x)) over a domain of size nn yields nn ground implications, and rules over kk variables can induce Θ(nk)\Theta(n^k) ground ones. This motivates lifted reasoning, where one reasons directly with first-order structure. In this work, we ask whether a query-driven learning to reason approach can be carried out at the lifted level: given a lifted knowledge base and possibly partial data, can we efficiently verify a universally quantified query by producing a lifted proof or reject otherwise?

Notably, the implicit learning to reason framework has made progress toward this goal. In particular, the approach of Belle and Juba (2019) handles universally quantified queries in a limited but effective way: assuming that the relevant counterexamples or supporting evidence are directly “witnessed” in the sampled partial models, it estimates the probability that a query clause is valid, but does not produce a rigorous proof. Using the Belle–Levesque grounding trick (Levesque, 1998; Belle, 2017), once a small, critical set of ground instances is observed, the system treats the corresponding universally quantified clause as learned and adds it to the knowledge base. Subsequent universally quantified queries can then be reduced to a propositional unsatisfiability check over a finite grounded fragment.

Our objective is to go beyond this statistical estimation. We aim to prove universally quantified clausal queries, i.e., to certify that the clause holds over the entire domain. This is fundamentally more demanding: unlike falsity, truth of a universal statement typically admits no finite set of witnesses. Consequently, proof requires genuinely lifted reasoning—first-order proof search that accounts for all relevant groundings induced by the background theory and the data—rather than relying on a grounding shortcut that is tailored to finding counterexamples.

At the same time, both the data and the knowledge base may be incomplete. Even setting aside the possibility for having contaminated data, limited observability can make the task impossible: if violations of a clause can be systematically hidden, no procedure can reliably certify universal truth. Therefore, we first characterize when proof is information-theoretically possible under partial observation. We identify a necessary and sufficient condition named bounded concealment, extending the formulation of Michael (2010) from learning over finite domains, which requires that if a universally quantified clause is false, then with non-negligible probability the partial observations reveal at least one grounding that witnesses this falsity. Then, under bounded concealment, we show how to reason soundly in a credulous manner: we treat clauses as tentatively valid until we observe explicit counterexamples, with the guarantee that persistent falsity will be exposed with sufficient probability.

Building on this principle, our approach reasons completely at the lifted level. Rather than evaluating ground instances one by one, we apply clause-level proof procedures directly to quantified formulas, enabling generalization across objects and avoiding blow-ups from grounding. This allows us to positively establish universally quantified queries—an ability not provided by the original skeptical, refutation-oriented framework of Belle and Juba (2019).

Our contribution We propose the first query-driven framework that learns in service of lifted reasoning, providing simultaneous efficiency and correctness guarantees.

• We broaden Michael (2010)'s bounded concealment condition from finite to infinite domains, and show that our generalized version is a necessary and sufficient condition for query-driven learning to lifted reasoning with incomplete information.

• We introduce a lifted algorithm that produces formal resolution proofs of the universally quantified clausal query φ\varphi from the given knowledge base and an additional, learned (1−ϵ)(1 - \epsilon)-valid knowledge base (i.e., it fails at most an ϵ\epsilon fraction of models under the data distribution), as long as

  1. there is a proof of φ\varphi from the given knowledge and an additional 1-valid knowledge base, and

  2. the observation process has bounded concealment with respect to the potentially learnable clauses

thus certifying that φ\varphi is (1−ϵ)(1 - \epsilon)-valid.

• We prove that under bounded concealment, our algorithm constructs treelike lifted resolution proofs with sample complexity in

O(Ns−1log⁡N+log⁡(1/δ)ηϵ)O\left(\frac{N^{s-1}\log N+\log(1/\delta)}{\eta\epsilon}\right)

and running time in

O(N2(s−1)∣φ∣(log⁡N+log⁡(1/δ))ηϵ)O\left(\frac{N^{2(s-1)}|\varphi|(\log N+\log(1/\delta))}{\eta\epsilon}\right)

where N is the number of distinct atoms 1^{1} in the knowledge base, s is the space bound (i.e., the maximum number of clauses to be kept at a time when deriving the corresponding treelike resolution proof), δ\delta bounds the failure probability, and ∣φ∣|\varphi| is the length of the binary encoding of the query formula.

This is the first approach with simultaneous soundness, completeness, and sample and computational efficiency (quasipolynomial in the number of ground relations for lifted query-driven reasoning), enabling scalable and formally checkable inference in complex first-order domains.

References (37)