A Fast Model Counting Algorithm for Two-Variable Logic with Counting and Modulo Counting Quantifiers

📅 2026-05-05
📈 Citations: 0
Influential: 0
📄 PDF

career value

197K/year
🤖 AI Summary
This work addresses the inefficiency and poor scalability of existing approaches to weighted first-order model counting (WFOMC) in two-variable first-order logic (C²) extended with counting and modular counting quantifiers, which suffer from costly multi-stage reductions. The paper introduces IncrementalWFOMC3, the first algorithm to perform lifted inference incrementally directly on Scott normal forms that preserve counting quantifiers, thereby avoiding the overhead of traditional reductions. By natively handling both counting and modular counting quantifiers, the method establishes—for the first time—the domain-liftability of the C²_mod fragment and reduces the data complexity of WFOMC from quadratic to linear in the counting parameters. Experimental results demonstrate speedups of several orders of magnitude over state-of-the-art WFOMC algorithms and leading propositional model counters, substantially improving scalability.
📝 Abstract
Weighted first-order model counting (WFOMC) is a central task in lifted probabilistic inference: It asks for the weighted sum of all models of a first-order sentence over a finite domain. A long line of work has identified domain-liftable fragments of first-order logic, that is, syntactic classes for which WFOMC can be solved in time polynomial in the domain size. Among them, the two-variable fragment with counting quantifiers, $\mathbf{C}^2$, is one of the most expressive known liftable fragments. Existing algorithms for $\mathbf{C}^2$, however, establish tractability through multi-stage reductions that eliminate counting quantifiers via cardinality constraints, which introduces substantial practical overhead as the domain size grows. In this paper, we introduce IncrementalWFOMC3, a lifted algorithm for WFOMC on $\mathbf{C}^2$ and its modulo counting extension, $\mathbf{C}^2_{\text{mod}}$. Instead of relying on reduction techniques, IncrementalWFOMC3 operates directly on a Scott normal form that retains counting quantifiers throughout inference. This direct treatment yields two main results. First, we derive a tighter data-complexity bound for WFOMC in $\mathbf{C}^2$, reducing the degree of the polynomial from quadratic to linear in the counting parameters. Second, we prove that $\mathbf{C}^2_{\text{mod}}$ is domain-liftable, extending tractability from $\mathbf{C}^2$ to a richer fragment with native modulo counting support. Finally, our empirical evaluation shows that IncrementalWFOMC3 delivers orders-of-magnitude runtime improvements and better scalability than both existing WFOMC algorithms and state-of-the-art propositional model counters.
Problem

Research questions and friction points this paper is trying to address.

weighted first-order model counting
two-variable logic
counting quantifiers
modulo counting
domain-liftability
Innovation

Methods, ideas, or system contributions that make the work stand out.

IncrementalWFOMC3
domain-liftability
two-variable logic
counting quantifiers
modulo counting
🔎 Similar Papers
No similar papers found.