Papers
Topics
Authors
Recent
Search
2000 character limit reached

Certified Knowledge Compilation with Application to Formally Verified Model Counting

Published 22 Jan 2025 in cs.LO | (2501.12906v1)

Abstract: Computing many useful properties of Boolean formulas, such as their weighted or unweighted model count, is intractable on general representations. It can become tractable when formulas are expressed in a special form, such as the decision decomposable negation normal form (decision-DNNF). Knowledge compilation is the process of converting a formula into such a form. Unfortunately existing knowledge compilers provide no guarantee that their output correctly represents the original formula, and therefore they cannot validate a model count, or any other computed value. We present Partitioned-Operation Graphs (POGs), a form that can encode all of the representations used by existing knowledge compilers. We have designed CPOG, a framework that can express proofs of equivalence between a POG and a Boolean formula in conjunctive normal form (CNF). We have developed a program that generates POG representations from the decision-DNNF graphs produced by the state-of-the-art knowledge compiler D4, as well as checkable CPOG proofs certifying that the output POGs are equivalent to the input CNF formulas. Our toolchain for generating and verifying POGs scales to all but the largest graphs produced by D4 for formulas from a recent model counting competition. Additionally, we have developed a formally verified CPOG checker and model counter for POGs in the Lean 4 proof assistant. In doing so, we proved the soundness of our proof framework. These programs comprise the first formally verified toolchain for weighted and unweighted model counting.

Summary

  • The paper introduces the CPOG framework to certify that partitioned-operation graphs correctly represent original Boolean formulas.
  • It utilizes Lean 4 formal verification to ensure sound equivalence in transformations from d-DNNF to POG format.
  • Experimental results validate the method's scalability and reliability in model counting across benchmark models.

Certified Knowledge Compilation with Application to Formally Verified Model Counting

The paper "Certified Knowledge Compilation with Application to Formally Verified Model Counting" by Bryant et al. presents a method for generating and verifying partitioned-operation graphs (POGs), a class of representations for Boolean formulas capable of efficient model counting. The authors address a significant gap in the current knowledge compilation landscape: ensuring that compiled representations of Boolean formulas are correct and can be trusted by their users.

Overview

Boolean satisfiability (SAT) solvers are widely used to determine the satisfiability of Boolean formulas. However, for many applications, such as AI, security, and statistical models, counting the number of satisfying assignments (model counting) is crucial. These problems are generally more computationally intense than SAT solving, as model counting is #P-complete while SAT is NP-complete.

Knowledge compilation approaches this challenge by transforming a Boolean formula into a form that makes certain queries, like model counting, tractable. In particular, if formulas are expressed in deterministic decomposable negation normal form (d-DNNF), model counting can be efficiently performed. However, existing knowledge compilation techniques lack a validation mechanism for the equivalence of the compiled and original formulas, making the correctness of the derived counts unassured.

Contributions

The paper introduces several key contributions to knowledge compilation and formal verification:

  1. Partitioned-Operation Graphs (POGs): The authors define POGs, which can encode the various formats used by knowledge compilers, such as d-DNNF. POGs are evaluated in terms of computation over commutative rings, which simplifies model counting to algebraically combining weights over assignments.
  2. CPOG Framework: To certify equivalence between a Boolean formula in conjunctive normal form (CNF) and its POG representation, they introduce the CPOG framework. This framework constructs a series of proof steps for adding and deleting clauses, maintaining equivalence over input variables at every step.
  3. Toolchain for POG Transformations: The authors developed a toolchain for transforming d-DNNF generated by the state-of-the-art compiler D4 into POGs and generating checkable proofs of equivalence. This toolchain shifts trust from the complex compilation process to the simpler, formally verified checker.
  4. Formal Verification: The toolchain leverages the Lean 4 proof assistant to formally verify the soundness of their framework. They provide Lean-certified model counters and proof checkers that guarantee correctness, exposing conditions that were not known previously to be necessary.
  5. Experimental Evaluation: Their experiments demonstrate the ability to certify knowledge compilations on models from competitive benchmarking platforms, reflecting practical scalability.

Implications and Future Directions

The implications of this research are substantial for the domains relying on model counting where any incorrect count could lead to significant errors. The guarantee of correctness provided by certified POGs fosters trust and can also improve the reliability of SAT solvers through debugging by output verification.

Future developments could expand this approach to handle broader classes of queries by leveraging semiring theoretic extensions and accommodate outputs from more knowledge compilation tools beyond D4. Enhancements in efficiency and scaling could be explored by combining the strengths of different proof strategies, including monolithic and structural proof generation.

In conclusion, the work by Bryant et al. advances knowledge compilation by adding a layer of verification to the pipeline, alleviating concerns about correctness and empowering users with robust, certified tools for model counting. The formal verification contributes significantly to the trustworthiness and broader applicability of knowledge compilation methods, setting a precedent for future work at the intersection of SAT solving and formal verification.

Paper to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We found no open problems mentioned in this paper.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 2 tweets with 30 likes about this paper.