Manuscript Offprint
arXiv:2610.34747Query-Driven Learning for Lifted Reasoning
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 over a domain of size yields ground implications, and rules over variables can induce 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 from the given knowledge base and an additional, learned -valid knowledge base (i.e., it fails at most an fraction of models under the data distribution), as long as
-
there is a proof of from the given knowledge and an additional 1-valid knowledge base, and
-
the observation process has bounded concealment with respect to the potentially learnable clauses
thus certifying that is -valid.
• We prove that under bounded concealment, our algorithm constructs treelike lifted resolution proofs with sample complexity in
and running time in
where N is the number of distinct atoms 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), bounds the failure probability, and 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.
• a countably infinite set of variables ,
• predicates such as , and
• a countably infinite domain of rigid designators or names, which serves as the universe of discourse for quantification.
Here all predicates are Boolean-valued. An atom is an expression of the form , where is a predicate symbol of arity , and each is either a variable or a name. We refer to such atoms as lifted atoms when they contain variables. In contrast, a ground atom is an atom in which all terms are names. The set of all ground atoms is denoted by ATOMS. Literals take the form or , where is an atom.
Syntax. Like in standard FOL, reasoning over the full fragment of L is undecidable. In particular, we will be interested in learning and reasoning with universally quantified clauses, which form both the knowledge base and the lines in our resolution proofs.
A universally quantified clause (or -clause) in our setting is a formula of the form: where each is a literal over a subset of the universally quantified variables . Throughout the paper, we will omit the quantifier and simply write such clauses as or (if there is a single variable) when the quantification over free variables is unambiguous from context.
We will refer to elements of ATOMS as propositions, and to ground formulas as propositional formulas. We use , , , to denote ground formulas.
They can be either lifted or ground.
Hence one can think of a knowledge base as a CNF.
This is different from the definition of -clause in Belle and Juba (2019) as they allow equality formulas to restrict the domain.
Semantics. A L-model M is a -assignment to the elements of ATOMS. Using to denote satisfaction, the semantics of a formula is defined inductively, with the following convention:
• Quantification is substitutional over all names in N: Let denote the (ordered) tuple of free variables in . iff for all , where .
Definition 1 (Validity of -clause). Let the set of all models be denoted by M. We say a -clause is valid if it is satisfied by every model in M.
2.1 Resolution
We use (first-order) resolution as our underlying proof system. Resolution is a classical proof system that operates over disjunctions of literals via the cut rule:
optionally augmented with the weakening rule, which allows arbitrary literals to be added to clauses:
These rules form the deductive backbone of our system. In our setting, resolution operates over universally quantified clauses—formulas of the form , or equivalently, . This lifted formulation allows reasoning to proceed symbolically, without grounding clauses to all possible instantiations. It supports generalization across individuals in an infinite domain and is central to the efficiency and interpretability of our method.
In a general resolution derivation, each derived clause may be used as a premise in multiple later inferences. Consequently, the dependency structure induced by “which earlier lines are used to derive which later lines” forms a directed acyclic graph (DAG). A treelike resolution proof is the special case in which no derived clause is reused: each derived line is used as a premise at most once. Equivalently, the underlying dependency DAG is a tree (rooted at the final contradiction).
Following the structure of the classical DPLL procedure Davis and Putnam (1960); Davis, Logemann, and Loveland (1962), which constructs treelike refutations via variable splits, our method performs clause-level case analysis to build lifted proofs. This analogy extends further: DPLL with bounded memory corresponds to space-bounded treelike proofs, where only s clauses can be held at once, and forgotten clauses must be re-derived Kullmann (1999); Esteban and Torán (2001). Our lifted algorithm follows this model, combining case splits with clause reuse under a space constraint.
Importantly, all DPLL-like algorithms (including ours) produce normal resolution proofs:
Definition 2 (Normal). We will say that a resolution proof is normal if in its corresponding DAG:
• All outgoing edges from Cut nodes are directed to Cut nodes.
• The clauses labeling any path to the sink from a Cut node contain literals using every variable along the path.
• A given variable is used in at most one cut step and at most one weakening step along every path from a source to a Cut node.
Let N denote the number of atoms. Let s be the space of a treelike resolution proof, which corresponds to the rank or Horton–Strahler number of its proof tree (Ansótegui, Levy, and Manya, 2008). A key structural fact, due to Ehrenfeucht and Haussler (1989), bounds the size and number of such proofs in terms of s and N.
Lemma 1 (Ehrenfeucht and Haussler, 1989). Let k be the number of nodes in a normal space-s treelike resolution proof over N atoms, with . Let e denote the base of . Then:
-
The proof size k is bounded by .
-
The number of distinct normal space-s treelike proofs that do not use weakening is at most .
Note that Lemma 1 implies the space parameter is logarithmic in the proof size. Consequently, the sample complexity and running time bounds we obtain, with , are quasipolynomial in N. These combinatorial bounds also play a central role in our sample complexity analysis. They quantify the expressive capacity of bounded-space proofs and guide how much data is needed to safely validate axioms.
3 PAC-semantics
We now turn to the learning component of our task. The key difficulty is that induction from data does not support classical, worst-case guarantees: from finitely many samples, we generally cannot certify that a nontrivial first-order statement holds in all interpretations of the language. As a result, conclusions supported by learning must be interpreted probabilistically.
More specifically, we cannot expect learned statements to be valid in the classical (Tarskian) sense, since PAC learning does not guarantee that a formula holds under every possible model. Instead, it guarantees generalization: with high probability over the sampled data, a learned formula will agree with fresh, unseen examples drawn from the same underlying distribution. This viewpoint is formalized by the PAC semantics of Valiant (2000), which provides a principled, distribution-dependent notion of approximate satisfaction that is weaker than classical truth.
In the classical propositional setting, one typically works with a finite language over propositional symbols, so models correspond to truth assignments in . Our setting, by contrast, involves first-order relational structure and an unbounded collection of ground atoms, so the corresponding space of interpretations is inherently infinitary. Following Belle and Juba (2019), we adopt PAC semantics in a way that evaluates formulas relative to a data-generating distribution and a partial observation process:
• We define a -algebra over the set of all models , representing measurable collections of (possibly infinitary) events.
• We introduce a probability measure , defining a distribution over models.
This allows us to define a notion of -validity, capturing the idea that a formula holds in most models drawn from the distribution.
Definition 3 (PAC Validity of a Formula). Let denote the set of models satisfying a closed formula :
Given a probability distribution P over M, we say that is -valid with respect to P if
If , we say that is perfectly valid.
Example 1. Let assert that all squirrels in a forest are grey. Suppose this generally holds—e.g., due to genetic inheritance—but rare mutations occasionally produce yellow squirrels. So across all possible worlds, most worlds contain no yellow squirrels at all; but a small fraction may include one or more. In this case, is not classically valid, but can be -valid for :
In classical logic, validity is most often used to establish entailment—i.e., whether a knowledge base entails a given query. PAC validity captures that holds in most models under , enabling probabilistic reasoning under uncertainty. In this PAC setting, one may naturally ask: how does this notion of inference translate when formulas are only approximately valid? As observed by Juba (2013) in the propositional setting, the union bound provides a natural analogue of classical reasoning under PAC semantics. That is, if a set of formulas are each individually -valid with respect to , and their conjunction classically entails a ground formula , then the query is also PAC-valid with controlled error.
The result also holds for lifted queries such as -clause since PAC validity of a -clause requires satisfaction under all groundings, and classical entailment preserves validity under substitution.
Proposition 1. Let be -clauses such that each is -valid under a common distribution , for some . Suppose that , where is either a ground formula or a -clause. Then is -valid under , where .
4 Observability and Learnability
We first recall the idealized setting of Khardon and Roth (1997), in which examples are fully observed. That is, each sample specifies a complete truth assignment to all ground atoms in the language, so empirical frequencies can be used to estimate the probability of violations. In this case, falsity of a universal clause admits finite witnesses, and sample complexity follows from a simple concentration argument.
Observation 1 (Full Observability). Let be a fixed universally quantified clause evaluated on complete examples drawn i.i.d. from a distribution P. If
and no violation is observed in m examples, then is -valid with probability at least .
Proof. Let be the probability that a random model drawn from violates the clause . We aim to show that if , the probability of observing no violations in independent examples is at most .
Since the examples are drawn i.i.d., the probability that is satisfied by all m examples is given by:
Assuming the clause is not -valid (i.e., ), we can upper-bound this probability:
Using the standard inequality for , we obtain:
To ensure the probability of failing to observe a violation is bounded by our confidence parameter , we require:
Taking the natural logarithm of both sides and solving for m, we obtain that if and no violation is observed, is -valid with probability at least .
4.1 Observation Model
The fully observed setting above is a simple starting point, but it is rarely realistic. In our formalization, a complete example specifies a truth value for every ground atom, whereas real data typically reveals only a small, task-dependent subset of predicates and ground instances. Many facts of interest are latent, costly to measure, or not directly observable at all. This incompleteness is precisely what makes both induction from data and deduction from background knowledge necessary. Handling corrupted or adversarially perturbed observations is also important, but we defer that extension to future work.
Hence, let us treat partial observability as an explicit part of the model: the learner observes only a masked view of an underlying (unobserved) L-model.
Definition 4 (Partial Model). A partial model is a function , where 1 and 0 indicate truth and falsity, respectively, and denotes an unobserved (masked) value.
We say that a partial model is consistent with a full -model if, for all , whenever , it holds that . Let denote the set of all partial models.
Definition 5 (Masking). A mask is a function that maps full models to partial models. It must satisfy the property that for all , the resulting partial model is consistent with , and only finitely many atoms are mapped to ; all others are masked as *.
A masking process is a mask-valued random variable—i.e., a distribution over masking functions. Applying to a distribution over full models induces a distribution over partial models.
4.2 Necessary Condition
A central difficulty is that, under unrestricted masking, violations of a universally quantified clause may be systematically concealed. In the extreme, the observation process can make truth and falsity observationally indistinguishable, so that even refutation is impossible from data alone.
Observation 2 (Zero Observability). Fix a universally quantified clause (e.g., ). Suppose the masking process has the following property: for every full model ,
i.e., whenever is false in , the induced partial model never reveals a detectable violation of . Then samples from cannot be used to upper-bound the violation probability of under : for any there exist distributions such that
yet and are identical. In particular, no algorithm observing only can distinguish whether is always true or frequently false.
Observation 2 motivates a minimal restriction on the masking process: false formulas must be detectable with non-negligible probability. This definition extends the finite version from Michael (2010), which essentially only considered the special case of supervised learning, corresponding to formulas of the form for some (simple) formula , where and are propositional. Here, we extend it to more general formulas in a first-order relational language.
Definition 6 (Bounded Concealment). Let C be a set of (lifted) formulas and P a distribution over L-models. A masking process is said to be at most -concealing with respect to C and P if
That is, when a formula is false in a full model , there is at least probability that its falsity is detectable from the corresponding partial model .
Example 2 (Bounded Concealment Over a Clause Set). Let C be a set of universally quantified clauses describing regularities in a forest domain:
These formulas are mostly true in the underlying distribution P due to genetic inheritance, but may be occasionally violated due to mutation.
Now suppose an fraction of the population, chosen uniformly at random, has all predicates observed. Then is -concealing w.r.t. if, whenever a clause is violated in a full model , there is at least probability that the violation is visible in the partial model .
Thus, even under limited observability, clause violations can be detected with bounded probability.
The bounded concealment assumption justifies lifted reasoning: we are allowed to assign high confidence to universally quantified formulas when no counterexamples are observed. The following “discounting” theorem of Michael (2010) makes this precise; although Michael’s theorem was stated and proved for the special case of supervised learning with propositional variables as described above, the proof carries over.
Theorem 1. (Michael, 2010, Theorem 2.2) For any distribution P over models, masking process , and class C of formulas, if is at most -concealing with respect to C and P, and is not -valid, then
Conversely, if is not at most -concealing with respect to and , then there exists such that
where, note, is -valid.
Therefore, a bounded concealment condition is necessary for learning universal clauses. In particular, we note that it almost immediately gives a lower bound on the number of examples required for the more basic task of certifying -validity (ignoring running time) for varying values of the concealment parameter :
Corollary 1. Suppose that some function A, given any formula in the class of formulas C and partial examples from any distribution on masked examples for an at most concealing with probability :
• If is perfectly valid with respect to , outputs “accept”.
• If is not -valid with respect to , outputs “reject”.
Suppose that for some distribution and -concealing masking process , is not at most -concealing with respect to and for any . Then for all , , and such that ,
Proof. We first observe that for any , there is a distribution and masking process such that
• is perfectly valid on and
- is the same distribution on partial examples as conditioned on the partial example satisfying .
Now, by the first correctness condition, for any and , when is given examples from , since is perfectly valid on , it must accept with probability .
Now, let be given and be a -valid formula for and satisfying the second condition of Theorem 1, where is -concealing but not at most -concealing. Observe that in each example, the probability that is at least , and hence, the probability that independent examples all satisfy is at least . In this case, these are examples drawn from conditioned on , which is identical to by construction. So by a union bound, the probability that does not output accept on the examples from is at most
But, by our choice of which is not -valid with respect to , where is -concealing, the second correctness condition for requires that this probability is at least . Since for , and for we have
Note that without loss of generality, is monotonically decreasing with respect to . Since was arbitrary, letting yields the claimed bound.
Indeed, as , , recovering Observation 2. More generally, if a method purports to certify validity with confidence from examples, then solving for in the bound, the method implicitly assumes that the masking is at most -concealing for the corresponding value. We remark that our method will asymptotically match this inherent dependence on , , and in the number of examples required (and hence also running time). We remark that we are solving a slightly richer task than assumed in our statement here, which requires us to output a proof of a query from a given knowledge base and some -valid formulas, which will indeed require some additional dependence on the complexity of those formulas in the number of examples used. But this is indeed a strictly richer formulation: in the special case where the knowledge base is empty, we can construct an algorithm that just outputs “accept” when a proof is found, solving the above task formulation. It is therefore bound by the same requirements.
5 Query-Driven Algorithm
We now present an algorithm for lifted query-driven reasoning under partial observability. Given a universally quantified clause , a symbolic knowledge base K, and a set of partial models (i.e., masked observations) as data, the algorithm either returns a lifted resolution proof of or soundly rejects it. The proof, if found, may use both symbolic axioms from K and new clauses validated statistically from the data.
The algorithm performs a space-bounded proof search, constructing lifted resolution trees with bounded memory. It leverages the bounded concealment assumption to learn new axioms from data and interleaves them with symbolic reasoning to justify universal claims efficiently.
The search proceeds in three phases:
• Validation: If no observed partial model falsifies any grounding of , we accept as PAC-valid and return a proof asserting it.
• Weakening: If is subsumed by a clause in K via variable renaming, we derive it using weakening.
• Recursive Resolution: Otherwise, we branch on pivot literals drawn from K to recursively construct a lifted proof of , bounded by a space parameter s.
To make this procedure precise, we now define two core concepts used in the resolution step: subsumptive weakening and pivot literals.
Definition 7 (Subsumptive Weakening). Let be a lifted clause in , and let be the lifted clause query. We say subsumes by weakening if there exists a (not necessarily injective) renaming
such that for each literal L of , the renamed literal
appears among the disjuncts of .
Example 3. Let and let . Then subsumes by weakening via . This illustrates how non-injective substitutions allow us to derive special cases from more general rules in the knowledge base, enabling clause reuse even when variable bindings collapse.
Definition 8 (Pivot Literals for ). Let be the query with universally quantified variables. For any literal containing universally quantified variables occurring in , each literal of the form for some renaming is called a pivot literal over .
Example 4. Suppose K contains the clause , and the query is . Then both and are considered pivot literals for , corresponding to renamings and , respectively. Even though they originate from the same clause in K, they are treated as distinct literals because x and y are different variables in the scope of .
We now demonstrate that using subsumptive weakening and pivot literals is sufficient to derive a sound and complete algorithm for query validation. We formalize this procedure in the LIFTEDLEARN+SEARCH algorithm.
Theorem 2. Let be a -clause query, and K be a knowledge base consisting of a finite set of -clauses. N is
Algorithm 1: LIFTEDLEARN+SEARCH
Input: Knowledge base K, space bound , query clause ,
Partial models
Output: Lifted resolution proof of or None
if then return proof asserting from statistical validation
foreach clause do if there exists substitution s.t. then return weakening derivation of from
if then foreach pivot or ground literal relevant to from K do if and then LIFTEDLEARN+SEARCH(K, , , ) if then EDLEARN+SEARCH(K, , , ) if then return resolution proof combining and on pivot end end end end
return None
the number of different atoms appeared in the knowledge base. Let be a distribution over models, and let be a -concealing masking process with respect to CNFs up to size for the distribution . Then on a sample of size , and with running time the algorithm with fixed parameter satisfies:
• (soundness) If is not -valid, with probability , Algorithm 1 returns None.
• (completeness) If there exists some perfectly valid CNF for which there is a space-s treelike resolution proof of from , then Algorithm 1 returns a proof of from for some CNF of size that is -valid with respect to with probability .
Proof. (1) Soundness. By definition, Algorithm 1 produces a space-s normal treelike resolution proof. Let be the CNF formed by the conjunction of all such leaf clauses in the proof. By Lemma 1 (Part 1), this CNF contains at most clauses, hence bounded concealment applies. Therefore, Theorem 1 guarantees that will falsify this CNF with probability at least if the CNF is not valid.
We have m draws of partial models in total. Using the inequality for , we obtain:
Now choose
Then:
Hence is consistent with all samples] .
Since weakening is not used in the clauses that are being asserted during learning, we do not need to bound the total number of distinct proofs. Applying a union bound over all such CNFs, the probability that any non- -valid CNF is consistent with the entire sample is at most . Hence, with probability at least , the proof it returns has all the leaves at least valid. But if the query is itself less than valid, then such proof cannot exist and the algorithm returns None, establishing the soundness claim.
(2) Completeness. It remains to show that Algorithm 1 will indeed find a proof when a 1-valid space-s treelike proof exists. Consider the (potentially exponential-size) formula consisting of all clauses that are consistent with the obscured scenes . Note that weakening is not necessary for clauses from , as any clause derivable by weakening is already explicitly present in .
Algorithm 1 performs a systematic search for a normal space-s treelike resolution proof, branching on literals that appear in K. We claim that for any original 1-valid proof, there exists an equivalent one (possibly with new asserted clauses) that applies cuts only to pivot literals drawn from ground instances of K.
If such a literal enables both branches of a resolution step to be verified using the data, then the resolved clause can itself be verified directly, without the need to branch on that literal. On the other hand, if at least one of the branches cannot be verified (i.e., requires weakening), then introducing a literal not in K is not helpful, because the resulting clause would not be derivable from and would not be verified by the data.
Moreover, we do not need to introduce new variables when branching on clauses from K. Although such clauses may contain universally quantified variables, renaming them to match variables already in the query's scope merely produces a special case of the original clause. Since universally quantified statements are closed under substitution, this specialization remains entailed by the knowledge base and does not require augmenting the query with fresh variables.
Therefore, even if the original 1-valid proof uses literals outside the hypothesis, the algorithm can always find an

Figure 1: Lifted resolution proof of using both knowledge base and data.
equivalent proof that uses only literals from K. This justifies restricting branching literals to those in the knowledge base, without loss of completeness in the class of verifiable proofs.
Furthermore, the standard analysis of space-bounded tree-like resolution (e.g., Kullmann (1999)) guarantees that the algorithm runs in time on a sample of size . When a 1-valid space-s treelike proof exists, it is consistent with all samples with probability 1.
Thus, whenever Algorithm 1 terminates early, it returns a proof that is consistent with the examples, and by soundness, the proof is -valid. Moreover, if the algorithm explores the literals used in the known 1-valid proof (though it may succeed even earlier), it is guaranteed to find a valid derivation. Hence, the algorithm is complete for the class of 1-valid space-s treelike proofs.
Example 5. Consider the query:
and the knowledge base:
which states that all squirrels live in trees and eat nuts.
Suppose we observe partial scenes where all tree-dwellers are grey. This validates:
from data, but falsifies .
When the algorithm selects TreeDweller(x) as a pivot literal, resolution succeeds using one clause from K and one statistically validated clause, constructing a lifted proof of , as illustrated in Figure 1.
5.1 Choosing the Space Bound
Our algorithm requires the proof’s space bound s as input, which controls the tradeoff between the expressiveness of the proof system and the computational resources required for proof search. Larger values of s permit deeper and more complex derivations, potentially increasing completeness, but also lead to exponential growth in the number of candidate proofs (see Lemma 1). We note that space-bounded treelike resolution has another interpretation as an extension of the well-known unit-propagation inference rule (where s = 2) with a rule known as failed-literal (Ansótegui, Levy, and Manya, 2008): we temporarily assert a literal as a hypothesis, and if the formula can be refuted, we infer . Then s corresponds to a bound on the number of literals that may be simultaneously asserted while invoking the failed-literal rule; algorithms for automating space-bounded treelike resolution essentially follow the strategy implicitly described by this characterization, searching for literals on which to invoke the failed-literal rule.
In practice, s should be chosen based on available memory and computational budget, as well as the anticipated complexity of the domain. Ansótegui, Levy, and Manya (2008) also examined the value of s in many industrial instances of propositional satisfiability, and found that it is significantly smaller than for random instances in the hard regime at the phase transition, suggesting that it may capture what makes real-world instances easy.
Moreover, our algorithm is anytime: if no proof is found for a given s, the parameter can be incrementally increased, enabling flexible exploration of the proof space.
6 Related Work
Our work targets an integration of symbolic reasoning with statistical learning—two paradigms that have largely developed in parallel. The closest line to ours begins with De Raedt and Bruynooghe (1993), who introduced a theory of clausal discovery divorced from any underlying data distribution. Soon afterwards, Khardon and Roth (1997) formalized the “learning to reason” framework, establishing a principled synthesis of learning and proof, but under a strong restriction: the learner reasons in a fully observed setting. Subsequently, Valiant (2000) proposed PAC-Semantics, relaxing classical validity to accommodate imperfect rules as long as they hold with high probability under the data distribution. Building on these foundations, Juba (2013) introduced implicit learning to reason, which concentrates computational effort on what is needed for a particular query, yielding large savings in time and space. Later work extended this perspective toward limited forms of first-order reasoning (Belle and Juba, 2019), as discussed in the Introduction. More recently, Juba (2019) developed query-driven learning to reason, strengthening the implicit approach by explicitly identifying the supporting proof structure for a given query. This explicit proof output is especially important in settings that require interpretability, human oversight, or supervised refinement. Nevertheless, this work was primarily developed in the propositional setting, and does not address our challenge in lifted proofs for universally quantified queries under partial observability.
Outside the “learning to reason” line, several other research programs are conceptually related but do not focus on efficiency and soundness or completeness guarantees as we do. We give an overall review as follows:
Statistical Relational Learning (SRL). SRL frameworks build probabilistic models over relational domains in order to support uncertainty-aware inference. Representative formalisms include Bayesian Logic Programs (Kersting and De Raedt, 2007), Markov Logic Networks (Richardson and Domingos, 2006), and probabilistic logic programming (De Raedt, Kimmig, and Toivonen, 2007), which traditionally compiled to or were parameterized by graphical models, and more recent approaches have used a Weighted First-Order Model Counting (WFOMC) formulation for inference (Braz, Amir, and Roth, 2005; Van Den Broeck et al., 2011; Gogate and Domingos, 2016). While lifted probabilistic inference (Poole, 2003; Kersting, 2012; Van den Broeck et al., 2021) exploits symmetries to improve scalability at inference time, two core challenges remain during learning in particular. First, structure learning is computationally difficult: for expressive SRL formalisms, it is typically combinatorial and intractable (Chickering, 1996), with practical methods relying on restrictive hypothesis classes and heuristic search (Kok and Domingos, 2005). Second, handling missing data is commonly approached via maximum-likelihood or MAP objectives with latent variables, for which expectation-maximization (EM) (Meert, Struyf, and Blockeel, 2008) and related iterative procedures are standard. But these methods generally offer only weak guarantees: they need not find a global optimum, and even convergence to a stationary point can be slow or sensitive to initialization (Koller and Friedman, 2009, Section 19.4). As a result, the end-to-end pipeline is hard to scale efficiently, and its outputs are not accompanied by proof-style certificates or optimality guarantees.
Inductive Logic Programming (ILP). ILP systems (Muggleton and De Raedt, 1994) aim to induce logical rules from examples consistent with background knowledge, without explicitly modeling uncertainty. While classical systems like Aleph (Srinivasan, 2001) and Progol (Muggleton, 1995) are effective at rule generalization, they are not designed for validation or query answering with a distribution in mind. The most closely related ILP work is that of De Raedt and Džeroski (1994), which learns small first-order clauses with PAC learning guarantees relative to a finite model, rather than the infinite model we consider, where such guarantees are possible only under bounded-concealment assumptions. Additionally, extensions to probabilistic ILP (De Raedt and Kersting, 2008) inherit the limitations of SRL, including the challenges with structure learning and handling incomplete observations.
Neuro-symbolic approaches. Neuro-symbolic (N-S.) methods combine neural architectures with symbolic logic, often by embedding predicates into continuous representations or approximating inference steps. Notable examples include DeepStochLog (Winters et al., 2022), Lifted Relational Neural Networks (Sourek et al., 2018), and Neural Logic Machines (Dong et al., 2019). Unlike our approach, these systems enable learning from weak supervision but do not produce interpretable proofs or offer formal correctness guarantees. They also do not address the verification of universally quantified queries or model partial observability with principled assumptions.
7 Conclusion and Future Work
In this work, we introduce the first query-driven learning to reason framework that provides simultaneous efficiency and correctness guarantees at the lifted level. Our approach bridges symbolic reasoning and statistical learning by enabling universally quantified clauses to be validated from partial observations.
Several directions remain open. First, we restrict attention to Boolean domains, which aligns naturally with resolution but leaves open extensions to richer lifted settings, such as lifted real linear arithmetic (Kersting, Mladenov, and Tokmakov, 2017) (or quadratic (Mladenov, Kleinhans, and Kersting, 2017)) or probabilistic relational logics (Ge, Juba, and Nilsson, 2025), where the expressions involve lifted families of real-valued variables. In a closely related vein, our work only considers a simple kind of masking where attributes are simply present or missing. If we consider the extension to real-valued expressions, then we may correspondingly consider other forms of uncertainty in our partial examples, such as intervals, along the lines of Rader et al. (2021) who considered implicit learning in the propositional setting. It would be interesting to extend query-driven explicit learning to handle such partial information models.
Second, we only guarantee completeness when there is a perfectly valid knowledge base that entails the query – even one counterexample rules out a prospective clause from inclusion in our learned knowledge – which raises the question of how we can handle noisy or imperfect data. While one can relax our algorithm by allowing a small fraction of falsifying examples before rejecting clauses, in general this only yields a bound on the soundness of the query that scales with the number of learned clauses (using Proposition 1); can we obtain a tighter guarantee?
Finally, it would be fruitful to develop practical applications. Promising application domains include knowledge extraction from structured or semi-structured sources, as well as planning tasks where lifted reasoning about actions and goals can benefit from integrating learned rules and partial observations.
References
Ansótegui, C.; Levy, J.; and Manya, F. 2008. Measuring the hardness of sat instances. In Proceedings of the Twenty-Third AAAI Conference on Artificial Intelligence, 222–228.
Belle, V., and Juba, B. 2019. Implicitly learning to reason in first-order logic. Advances in neural information processing systems 32.
Belle, V. 2017. Open-universe weighted model counting. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 31.
Braz, R.; Amir, E.; and Roth, D. 2005. Lifted first-order probabilistic inference. In Proceedings of the Nineteenth International Joint Conference on Artificial Intelligence, 1319–1325. Morgan Kaufmann San Francisco.
Chickering, D. M. 1996. Learning bayesian networks is np-complete. In Learning from data: Artificial intelligence and statistics V. Springer. 121–130.
Davis, M., and Putnam, H. 1960. A computing procedure for quantification theory. Journal of the ACM (JACM) 7(3):201–215.
Davis, M.; Logemann, G.; and Loveland, D. 1962. A machine program for theorem-proving. Communications of the ACM 5(7):394–397.
De Raedt, L., and Bruynooghe, M. 1993. A theory of clausal discovery. In Proceedings of the 13th international joint conference on artificial intelligence, 1058–1063. Morgan Kaufmann.
De Raedt, L., and Džeroski, S. 1994. First-order jk-clausal theories are pac-learnable. Artificial Intelligence 70(1):375–392.
De Raedt, L., and Kersting, K. 2008. Probabilistic inductive logic programming. In Probabilistic inductive logic programming: theory and applications. Springer. 1–27.
De Raedt, L.; Kimmig, A.; and Toivonen, H. 2007. Problog: A probabilistic prolog and its application in link discovery. In IJCAI 2007, Proceedings of the 20th International Joint Conference on Artificial Intelligence, 2462–2467.
Dong, H.; Mao, J.; Lin, T.; Wang, C.; Li, L.; and Zhou, D. 2019. Neural logic machines. In International Conference on Learning Representations.
Ehrenfeucht, A., and Haussler, D. 1989. Learning decision trees from random examples. Information and Computation 82(3):231–246.
Esteban, J. L., and Torán, J. 2001. Space bounds for resolution. Information and Computation 171(1):84–97.
Ge, L.; Juba, B.; and Nilsson, K. 2025. Polynomial-time relational probabilistic inference in open universes. In Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, 9058–9067.
Gogate, V., and Domingos, P. 2016. Probabilistic theorem proving. Communications of the ACM 59(7):107–115.
Juba, B. 2013. Implicit learning of common sense for reasoning. In Rossi, F., ed., Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence, IJCAI-13, 939–946. AAAI Press / International Joint Conferences on Artificial Intelligence.
Juba, B. 2019. Query-driven pac-learning for reasoning. arXiv preprint arXiv:1906.10118.
Kersting, K., and De Raedt, L. 2007. Bayesian logic programming: theory and tool. Statistical Relational Learning 291.
Kersting, K.; Mladenov, M.; and Tokmakov, P. 2017. Relational linear programming. Artificial Intelligence 244:188–216.
Kersting, K. 2012. Lifted probabilistic inference. In ECAI 2012. IOS Press. 33–38.
Khardon, R., and Roth, D. 1997. Learning to reason. J. ACM 44(5):697–725.
Kok, S., and Domingos, P. 2005. Learning the structure of markov logic networks. In Proceedings of the 22nd international conference on Machine learning, 441–448.
Koller, D., and Friedman, N. 2009. Probabilistic graphical models: principles and techniques. MIT press.
Kullmann, O. 1999. Investigating a general hierarchy of polynomially decidable classes of cnf's based on short tree-like resolution proofs. Technical Report TR99-041, Electronic Colloquium on Computational Complexity (ECCC).
Levesque, H. J. 1998. A completeness result for reasoning with incomplete first-order knowledge bases. In Proceedings of the Sixth International Conference on Principles of Knowledge Representation and Reasoning (KR), 14–23.
Meert, W.; Struyf, J.; and Blockeel, H. 2008. Learning ground cp-logic theories by leveraging bayesian network learning techniques. Fundamenta Informaticae 89(1):131–160.
Michael, L. 2010. Partial observability and learnability. Artificial Intelligence 174(11):639–669.
Mladenov, M.; Kleinhans, L.; and Kersting, K. 2017. Lifted inference for convex quadratic programs. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 31.
Muggleton, S., and De Raedt, L. 1994. Inductive logic programming: Theory and methods. The Journal of Logic Programming 19:629–679.
Muggleton, S. 1995. Inverse entailment and progol. New generation computing 13(3):245–286.
Poole, D. 2003. First-order probabilistic inference. In Proceedings of the 18th International Joint Conference on Artificial Intelligence, volume 3, 985–991.
Rader, A. P.; Mocanu, I. G.; Belle, V.; and Juba, B. 2021. Learning implicitly with noisy data in linear arithmetic. In Proceedings of the 30th International Joint Conference on Artificial Intelligence, 1410–1417.
Richardson, M., and Domingos, P. 2006. Markov logic networks. Machine learning 62:107–136.
Sourek, G.; Aschenbrenner, V.; Zelezny, F.; Schockaert, S.; and Kuzelka, O. 2018. Lifted relational neural networks: Efficient learning of latent relational structures. Journal of Artificial Intelligence Research 62:69–100.
Srinivasan, A. 2001. The aleph manual.
Valiant, L. G. 2000. Robust logics. Artificial Intelligence 117:231–253.
Van Den Broeck, G.; Taghipour, N.; Meert, W.; Davis, J.; and De Raedt, L. 2011. Lifted probabilistic inference by first-order knowledge compilation. In Proceedings of the Twenty-Second international joint conference on Artificial Intelligence-Volume Volume Three, 2178–2185.
Van den Broeck, G.; Kersting, K.; Natarajan, S.; and Poole, D. 2021. An introduction to lifted probabilistic inference. MIT Press.
Winters, T.; Marra, G.; Manhaeve, R.; and De Raedt, L. 2022. Deepstochlog: Neural stochastic logic programming. In Proceedings of the 36th AAAI Conference on Artificial Intelligence, volume 9, 10090–10100.