Lifted Algorithms for Symmetric Weighted First-Order Model Sampling

Read original: arXiv:2308.08828 - Published 6/17/2024 by Yuanhong Wang, Juhua Pu, Yuyi Wang, Ondv{r}ej Kuv{z}elka
Total Score

0

📈

Sign in to get full access

or

If you already have an account, we'll log you in

Overview

  • Weighted model counting (WMC) is the task of computing the weighted sum of all satisfying assignments (i.e., models) of a propositional formula.
  • Weighted model sampling (WMS) aims to randomly generate models with probability proportional to their respective weights.
  • Both WMC and WMS are computationally hard problems, but can be tractable if the propositional formula can be compactly represented and expressed in first-order logic.
  • This paper explores whether the tractability of WMC, known as domain-liftability, also extends to WMS.

Plain English Explanation

The paper looks at the problem of weighted model sampling, which is about randomly generating solutions to a logic-based problem in a way that gives more weight to certain solutions over others. This is a difficult problem in general, but the researchers found that it can become easier to solve if the problem is expressed in a certain way using first-order logic.

Specifically, the paper shows that for a particular type of first-order logic problem involving counting quantifiers (like "there exist at least 3 things that..."), an efficient sampling algorithm can be developed that runs quickly, even for large problem sizes. This extends previous work on the tractability of counting the number of solutions, showing that the same concept of "domain-liftability" also applies to randomly generating the solutions.

The researchers tested their approach on various first-order logic problems designed for generating combinatorial structures and sampling in statistical-relational models. The results demonstrate that their algorithm outperforms other state-of-the-art weighted sampling methods, confirming the theoretical benefits.

Technical Explanation

The paper proves the domain-liftability under sampling for the two-variables fragment of first-order logic with counting quantifiers. Specifically, the authors devise an efficient sampling algorithm for this fragment that runs in time polynomial in the domain size.

The key insight is that for this restricted fragment of first-order logic, the probability distribution over the models (i.e., satisfying assignments) can be compactly represented and efficiently sampled from. This extends previous work on the tractability of model counting for this fragment, showing that the same principles of "domain-liftability" apply to both counting and sampling.

The authors further show that their sampling algorithm continues to work efficiently even in the presence of cardinality constraints, which are additional constraints on the number of objects satisfying certain properties.

To evaluate their approach, the researchers conduct experiments over various first-order formulas designed for the uniform generation of combinatorial structures and sampling in statistical-relational models. The results demonstrate that their algorithm outperforms a state-of-the-art weighted model sampling (WMS) technique by a substantial margin, confirming the theoretical benefits of the domain-liftable approach.

Critical Analysis

The paper provides a strong theoretical foundation for the domain-liftability of weighted model sampling, extending previous results on the tractability of model counting. The authors carefully prove the sampling algorithm's efficiency for the two-variable fragment of first-order logic with counting quantifiers, and show that this result holds even in the presence of cardinality constraints.

One potential limitation is that the paper focuses on a relatively restricted fragment of first-order logic, and it is not immediately clear how the techniques would generalize to more expressive logics. Additionally, the experimental evaluation, while promising, is limited to synthetic formulas and may not fully reflect the performance on real-world applications.

Further research could explore the applicability of these domain-liftable sampling techniques to a broader class of problems, and investigate ways to integrate them with other sampling and inference methods to tackle more complex scenarios. Nonetheless, this work represents an important step forward in understanding the computational tractability of weighted model sampling, with potential implications for a wide range of fields, from statistical relational learning to combinatorial optimization.

Conclusion

This paper demonstrates that the concept of domain-liftability, which has been established for the tractability of model counting, can also be extended to the problem of weighted model sampling. By devising an efficient sampling algorithm for the two-variable fragment of first-order logic with counting quantifiers, the authors show that this restricted, yet expressive, class of problems can be solved in polynomial time, even when considering weighted distributions over the models.

The empirical results further confirm the theoretical benefits of this domain-liftable approach, outperforming state-of-the-art weighted sampling techniques. This work opens up new opportunities for the application of efficient sampling methods in areas like statistical relational learning, combinatorial optimization, and beyond, where the ability to generate weighted samples can lead to significant improvements in modeling and inference capabilities.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Follow @aimodelsfyi on 𝕏 →

Related Papers

📈

Total Score

0

Lifted Algorithms for Symmetric Weighted First-Order Model Sampling

Yuanhong Wang, Juhua Pu, Yuyi Wang, Ondv{r}ej Kuv{z}elka

Weighted model counting (WMC) is the task of computing the weighted sum of all satisfying assignments (i.e., models) of a propositional formula. Similarly, weighted model sampling (WMS) aims to randomly generate models with probability proportional to their respective weights. Both WMC and WMS are hard to solve exactly, falling under the $#mathsf{P}$-hard complexity class. However, it is known that the counting problem may sometimes be tractable, if the propositional formula can be compactly represented and expressed in first-order logic. In such cases, model counting problems can be solved in time polynomial in the domain size, and are known as domain-liftable. The following question then arises: Is it also the case for weighted model sampling? This paper addresses this question and answers it affirmatively. Specifically, we prove the domain-liftability under sampling for the two-variables fragment of first-order logic with counting quantifiers in this paper, by devising an efficient sampling algorithm for this fragment that runs in time polynomial in the domain size. We then further show that this result continues to hold even in the presence of cardinality constraints. To empirically verify our approach, we conduct experiments over various first-order formulas designed for the uniform generation of combinatorial structures and sampling in statistical-relational models. The results demonstrate that our algorithm outperforms a start-of-the-art WMS sampler by a substantial margin, confirming the theoretical results.

Read more

6/17/2024

📈

Total Score

0

Quantum Algorithms for Weighted Constrained Sampling and Weighted Model Counting

Fabrizio Riguzzi

We consider the problems of weighted constrained sampling and weighted model counting, where we are given a propositional formula and a weight for each world. The first problem consists of sampling worlds with a probability proportional to their weight given that the formula is satisfied. The latter is the problem of computing the sum of the weights of the models of the formula. Both have applications in many fields such as probabilistic reasoning, graphical models, statistical physics, statistics and hardware verification. In this article, we propose QWCS and QWMC, quantum algorithms for performing weighted constrained sampling and weighted model counting, respectively. Both are based on the quantum search/quantum model counting algorithms that are modified to take into account the weights. In the black box model of computation, where we can only query an oracle for evaluating the Boolean function given an assignment, QWCS requires $O(2^{frac{n}{2}}+1/sqrt{text{WMC}})$ oracle calls, where where $n$ is the number of Boolean variables and $text{WMC}$ is the normalized between 0 and 1 weighted model count of the formula, while a classical algorithm has a complexity of $Omega(1/text{WMC})$. QWMC takes $Theta(2^{frac{n}{2}})$ oracle calss, while classically the best complexity is $Theta(2^n)$, thus achieving a quadratic speedup.

Read more

7/19/2024

🤯

Total Score

0

Lifted Inference beyond First-Order Logic

Sagar Malhotra, Davide Bizzaro, Luciano Serafini

Weighted First Order Model Counting (WFOMC) is fundamental to probabilistic inference in statistical relational learning models. As WFOMC is known to be intractable in general ($#$P-complete), logical fragments that admit polynomial time WFOMC are of significant interest. Such fragments are called domain liftable. Recent works have shown that the two-variable fragment of first order logic extended with counting quantifiers ($mathrm{C^2}$) is domain-liftable. However, many properties of real-world data, like acyclicity in citation networks and connectivity in social networks, cannot be modeled in $mathrm{C^2}$, or first order logic in general. In this work, we expand the domain liftability of $mathrm{C^2}$ with multiple such properties. We show that any $mathrm{C^2}$ sentence remains domain liftable when one of its relations is restricted to represent a directed acyclic graph, a connected graph, a tree (resp. a directed tree) or a forest (resp. a directed forest). All our results rely on a novel and general methodology of counting by splitting. Besides their application to probabilistic inference, our results provide a general framework for counting combinatorial structures. We expand a vast array of previous results in discrete mathematics literature on directed acyclic graphs, phylogenetic networks, etc.

Read more

4/30/2024

Bridging Weighted First Order Model Counting and Graph Polynomials
Total Score

0

Bridging Weighted First Order Model Counting and Graph Polynomials

Qipeng Kuang, Ondv{r}ej Kuv{z}elka, Yuanhong Wang, Yuyi Wang

The Weighted First-Order Model Counting Problem (WFOMC) asks to compute the weighted sum of models of a given first-order logic sentence over a given domain. It can be solved in time polynomial in the domain size for sentences from the two-variable fragment with counting quantifiers, known as $C^2$. This polynomial-time complexity is also retained when extending $C^2$ by one of the following axioms: linear order axiom, tree axiom, forest axiom, directed acyclic graph axiom or connectedness axiom. An interesting question remains as to which other axioms can be added to the first-order sentences in this way. We provide a new perspective on this problem by associating WFOMC with graph polynomials. Using WFOMC, we define Weak Connectedness Polynomial and Strong Connectedness Polynomials for first-order logic sentences. It turns out that these polynomials have the following interesting properties. First, they can be computed in polynomial time in the domain size for sentences from $C^2$. Second, we can use them to solve WFOMC with all of the existing axioms known to be tractable as well as with new ones such as bipartiteness, strong connectedness, being a spanning subgraph, having $k$ connected components, etc. Third, the well-known Tutte polynomial can be recovered as a special case of the Weak Connectedness Polynomial, and the Strict and Non-Strict Directed Chromatic Polynomials can be recovered from the Strong Connectedness Polynomials, which allows us to show that these important graph polynomials can be computed in time polynomial in the number of vertices for any graph that can be encoded by a fixed $C^2$ sentence and a conjunction of an arbitrary number of ground unary literals.

Read more

7/17/2024