Certifying Top-Down Decision-DNNF Compilers

Florent Capelli, Jean-Marie Lagniez, Pierre MarquisAAAI 2021

Abstract

Knowledge compilation into Decision-DNNF circuits is a critical step for complex reasoning tasks such as model counting (#SAT) and explainable AI. However, the complexity of these compilers makes them prone to errors, and verifying the logical equivalence of the output circuit to the input formula is typically coNP-complete. This paper introduces a certification framework that augments Decision-DNNF circuits with lightweight annotations, allowing for polynomial-time verification. We present CD4, a certified version of the D4 compiler, and demonstrate that certification is practical, with manageable overhead in circuit size and compilation time across a broad range of benchmarks.

Introduction

In automated reasoning, the reliability of solvers is paramount. While SAT solvers have long utilized certificates to verify their outputs, more complex tasks like model counting and knowledge compilation have lacked a standard verification format. Knowledge compilation involves transforming a Boolean formula (CNF) into a structured circuit, specifically a Decision-DNNF, to facilitate efficient querying. Given the difficulty of this compilation process, ensuring that the resulting circuit is logically equivalent to the original formula is both essential and computationally challenging.

Methodology

The proposed framework introduces certifiable Decision-DNNF circuits. These circuits are standard Decision-DNNFs augmented with two key components: a list of learnt clauses (derived from Conflict-Driven Clause Learning) and canonical arcs. These arcs record the specific execution path of the compiler, effectively providing a trace of the solver's internal state.

Figure 1: A diagram illustrating the structure of a certifiable Decision-DNNF circuit, where nodes represent variables and logical gates, and edges are annotated with literals.

By including these annotations, the problem of logical equivalence is reduced to a check of syntactic equivalence, which can be performed in polynomial time. The authors implemented this approach in CD4, a modified version of the state-of-the-art D4 compiler. A standalone checker tool was developed to verify the consistency of the cache and sinks, ensuring the correctness of the compiled circuit against the original CNF.

Experimental Evaluation

The framework was evaluated using 703 CNF instances from diverse domains, including Bayesian networks (BN), bounded model checking (BMC), digital circuit verification, and automated planning. These benchmarks, sourced from repositories like SATLIB, provide a rigorous test of the compiler's robustness and scalability.

Results and Discussion

The experimental results demonstrate that certification is highly practical for real-world applications. The CD4 compiler maintained high robustness, solving over 99% of the instances handled by the original D4 compiler.

Figure 2: Scatter plot comparing the size of standard Decision-DNNF circuits versus their certifiable counterparts, showing a near-linear relationship with manageable overhead.

Key performance metrics include:

  • Size Overhead: The median size of a certifiable circuit was found to be only 1.94x larger than a standard one, as shown in the size comparison analysis.
  • Temporal Overhead: For the majority of instances, the combined time for generation and verification was less than double the original compilation time.
  • Scalability: The system successfully processed industrial-scale problems, including a Bayesian network instance with over 119,000 variables.

While theoretical "cliffs" exist where certificates could grow exponentially larger than the original circuit, these cases were rare in practice. The primary insight is that by requiring the compiler to "show its work" through canonical arcs and DRAT-style proofs for learnt clauses, the complexity gap in verification can be effectively bridged.

Conclusion

This work provides a viable path toward trustworthy knowledge compilation. Future efforts will focus on certifying the preprocessing steps (such as those performed by pmc) and working toward a standardized certification format for the broader automated reasoning community.

Summary updated

BibTeX
@inproceedings{capelli2021certifying,
  author = {Florent Capelli and Jean-Marie Lagniez and Pierre Marquis},
  title = {{Certifying Top-Down Decision-DNNF Compilers}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i7.16776},
}
Figure