Abstract
This paper explores the fundamental operation of conditioning within the framework of First-Order Knowledge Compilation. We establish a theoretical boundary for efficient belief updating: while conditioning on propositions and unary relations is polynomial, conditioning on binary or higher-arity relations is #P-hard. We introduce a "compile once, query many" approach for unary evidence, demonstrating significant speedups in lifted probabilistic inference across standard benchmarks.
Introduction
In artificial intelligence, representing knowledge through logic and performing probabilistic inference is crucial for handling uncertainty. Knowledge compilation transforms complex logical theories into circuits, such as First-Order Deterministic Decomposable Negation Normal Form (FO d-DNNF), to accelerate query answering. A critical operation in this process is conditioning—updating the model based on observed facts (evidence). While straightforward in propositional logic, the complexity of conditioning in First-Order Logic (FOL), which involves objects and relations, remained a significant challenge for "lifted" inference (reasoning about groups of objects at once).
The Complexity of Conditioning: The Arity Gap
A central contribution of this work is identifying the "Arity Gap"—a sharp divide in the computational complexity of conditioning based on the number of arguments in a relation.
As shown in the table above, conditioning on propositions (arity 0) and unary relations (arity 1, representing properties of individuals) is tractable. However, conditioning on binary or higher-arity relations (arity ≥ 2, representing relationships between individuals) is #P-hard. This hardness arises because binary relations can represent arbitrary graphs, breaking the symmetries that lifted inference exploits. Unary relations, by contrast, merely partition individuals into groups, preserving sufficient symmetry for efficient processing.
Methods: Efficient Unary Conditioning
To address tractable cases, we propose a method to pre-process first-order theories into FO d-DNNF circuits that support efficient conditioning. We introduce a technique to split clauses based on subdomains: one where a unary predicate is true, one where it is false, and one where it is unknown. This "pre-splitting" allows the circuit to handle specific evidence about individuals without losing the efficiency of lifted reasoning for the rest of the domain. This enables a "compile once, query many" strategy for Weighted Model Counting (WMC), where the initial compilation cost is amortized over many subsequent queries.
Experimental Results
We evaluated the conditioning approach against two baselines: a "Naive" approach (re-compiling for every evidence set) and a "Ground" approach (propositionalizing the theory). Testing was conducted on standard benchmarks: Competing Workshops and Friends and Smokers.
The empirical results demonstrate that the conditioning approach is consistently one to three orders of magnitude faster than re-compilation. As domain sizes increase, the runtime for conditioning remains relatively flat, whereas baseline methods scale poorly. Furthermore, the conditioning approach maintains its performance advantage even under high evidence density (e.g., 50% or more observed literals), where ground compilation often fails due to memory constraints.
Conclusion
This research establishes clear theoretical limits and practical algorithms for conditioning in first-order logic. By proving the tractability of unary conditioning and the #P-hardness of higher-arity cases, we provide a roadmap for future work in lifted inference. Our results suggest that while exact inference is highly efficient for unary evidence, complex relational evidence will likely necessitate approximate lifted inference methods.
Summary updated