On the Role of Canonicity in Knowledge Compilation

Guy Van den Broeck, Adnan Darwiche

Abstract

Knowledge compilation (KC) transforms propositional logic into tractable representations to enable efficient reasoning. A central question in KC is whether the fundamental Apply operation, used in bottom-up compilation, remains polynomial-time for canonical (compressed and unique) Sentential Decision Diagrams (SDDs). This paper demonstrates a theoretical paradox: while canonical SDDs can suffer from exponential blow-up compared to their uncompressed counterparts, they are significantly more efficient in practice. We show that canonicity enables superior caching and eliminates redundancy, allowing compressed SDDs to outperform uncompressed versions by orders of magnitude in both time and space.

Introduction

In the field of Knowledge Compilation, researchers aim to represent complex Boolean formulas in forms that allow for polynomial-time queries like model counting or clausal entailment. Sentential Decision Diagrams (SDDs) have emerged as a state-of-the-art representation, offering greater succinctness than Ordered Binary Decision Diagrams (OBDDs).

An example of an SDD and its corresponding vtree structure.

Bottom-up compilation typically relies on an Apply function to combine simple variables into complex formulas. While uncompressed SDDs were known to possess a polynomial-time Apply operation, the status of canonical SDDs remained an open question. Common wisdom suggested that without a polytime Apply, efficient bottom-up compilation would be impossible.

Theoretical Findings

The authors settle the theoretical debate by proving that a polynomial-time Apply function does not exist for canonical SDDs in the general case. By constructing a specific class of Boolean functions ($f_m$) and a corresponding variable tree (vtree), they demonstrate that while an uncompressed SDD grows quadratically ($O(m^2)$), the unique, canonical version grows exponentially ($\Omega(2^m)$). This formalizes the risk of exponential blow-up when enforcing canonicity through compression.

Empirical Evaluation and the Caching Paradox

To investigate whether this theoretical weakness manifests in real-world applications, the authors modified the UCLA SDD package to compare compressed and uncompressed SDDs across standard logic synthesis (LGSynth89) and sequential circuit (ISCAS89) benchmarks.

The results reveal a fascinating paradox: the "theoretically slower" canonical form is vastly superior in practice. The primary driver for this performance is the effectiveness of caching. In a canonical representation, logically equivalent formulas share the same memory address, allowing the Apply function to identify and reuse previously solved sub-problems instantly.

Histograms comparing the relative size of compressed vs. uncompressed SDDs, illustrating the practical efficiency of canonicity.

Without canonicity, the compiler suffers from a "redundancy explosion." For instance, in the cm138a benchmark, the uncompressed SDD reached over 9 million nodes, while the compressed version required only 463 nodes. On average, the ratio of the output size of an Apply operation to the product of its input sizes was 0.027 for compressed SDDs, compared to 0.101 for uncompressed ones.

Conclusion

This work challenges the long-held belief that a polynomial-time Apply is the most critical requirement for efficient knowledge compilation. Instead, it highlights that canonicity—and the powerful caching it facilitates—is often more important for practical performance. While theoretical blow-ups are possible for fixed vtrees, the combination of compression and dynamic vtree search ensures that SDDs remain a highly effective tool for logic synthesis and automated reasoning.

Summary updated

BibTeX
@inproceedings{broeck2015role,
  author = {Guy Van den Broeck and Adnan Darwiche},
  title = {{On the Role of Canonicity in Knowledge Compilation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2015},
  doi = {10.1609/aaai.v29i1.9423},
}
Figure