On the Role of Canonicity in Bottom-up Knowledge Compilation

Guy Van den Broeck, Adnan DarwichearXiv 2014

Introduction

Knowledge compilation transforms propositional logic formulas into target languages, such as circuits, to enable efficient querying. Sentential Decision Diagrams (SDDs) have emerged as a powerful language for this purpose. A critical operation in building these circuits is the Apply function, which combines smaller logic pieces into larger ones. Conventional wisdom suggests that for a language to be effective for bottom-up compilation, Apply must run in polynomial time relative to input sizes.

An example of an SDD and its corresponding vtree structure, which governs the decomposition of the logic circuit.

While unreduced SDDs possess a polynomial-time Apply guarantee, the status of reduced SDDs—which are canonical—remained an open question. This paper investigates whether the benefits of canonicity (where every Boolean function has a unique representation) come at the cost of theoretical efficiency.

Theoretical Complexity vs. Practical Performance

The authors prove that the Apply function for reduced SDDs is not polynomial-time in the worst case. By constructing a specific class of Boolean functions and vtrees, they demonstrate that while an uncompressed SDD remains small, its reduced counterpart can explode exponentially. They also identify a "safe zone" of bounded vtrees where the number of variables in any left subtree is limited; for this subset, the Apply function remains polynomial even under reduction.

However, the paper reveals a "Canonicity Paradox": despite the theoretical hurdle of non-polynomial worst-case complexity, reduced SDDs significantly outperform unreduced ones in practice. The secret lies in caching. In a canonical language, equivalent sub-problems share the same memory structure, leading to near-perfect cache hit rates. Conversely, unreduced languages represent the same logic in multiple ways, causing cache misses and redundant computations.

Empirical Results

The researchers benchmarked their findings using the LGSynth89 dataset, a standard set of circuits for logic synthesis. The results were stark: unreduced SDDs were often orders of magnitude larger than reduced ones. For instance, in the decod benchmark, the reduced SDD contained approximately 800 nodes, whereas the unreduced version exceeded 1.2 million nodes.

Distribution of the relative size of reduced SDDs compared to unreduced counterparts across benchmarks, showing that reduced forms are typically much smaller.

As shown in the figure above, the relative size of reduced SDDs is typically a small fraction of their unreduced counterparts. Many benchmarks that were manageable for reduced SDDs caused unreduced versions to exceed memory limits (4GB) due to their inability to merge redundant logic. While transformations like conditioning can lead to exponential size increases in reduced SDDs due to re-canonicalization, the overall practical benefits of reduction remain dominant.

Conclusion

This work demonstrates that theoretical polynomial-time guarantees are not always the primary driver of practical efficiency in knowledge compilation. Canonicity, by enabling efficient sub-problem identification and caching, provides a more significant performance boost than the theoretical safety of unreduced representations. Future research may explore "semi-canonical" forms that balance these trade-offs.

Summary updated

BibTeX
@misc{broeck2014role,
  author = {Guy Van den Broeck and Adnan Darwiche},
  title = {{On the Role of Canonicity in Bottom-up Knowledge Compilation}},
  year = {2014},
  eprint = {1404.4089},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1404.4089},
}
Figure