Optimal Decision Trees For Interpretable Clustering with Constraints

Pouya Shati, Eldan Cohen, Sheila A. McIlraith

Abstract

This paper presents a novel SAT-based framework for interpretable and constrained clustering using optimal decision trees. By encoding clustering objectives and pairwise constraints into a Boolean satisfiability (SAT) problem, the proposed method generates clustering solutions that are provably near-optimal while providing a clear, branching rationale for data assignments. The approach effectively balances mathematical grounding, interpretability, and the integration of domain-specific constraints.

Introduction

Clustering is a foundational unsupervised learning task. In practical applications, domain knowledge often provides "side information" in the form of pairwise constraints: must-link (points that must be in the same cluster) and cannot-link (points that must be separated). Existing methods for constrained clustering typically face a trade-off between optimality and interpretability. Black-box optimization techniques like Integer Programming offer optimality but lack transparency, whereas standard decision tree heuristics provide interpretability but often fail to support constraints or guarantee solution quality. This work bridges this gap by introducing a system that is simultaneously optimal, interpretable, and constraint-aware.

Methods

The framework utilizes a novel SAT-based encoding to transform the clustering problem into logical clauses. Key components include:

  • ε-Optimal Tree Clustering: Continuous pairwise distances are discretized into "Distance Classes" of size ε, allowing the SAT solver to find solutions within a known bound of the global optimum.
  • Dual Objectives: The model supports Minimum Diameter (MD), which minimizes intra-cluster distance, and Maximum Split (MS), which maximizes inter-cluster distance.
  • Smart Pairs Pruning: To handle the $O(N^2)$ complexity of pairwise constraints, a graph-based algorithm identifies and prunes redundant constraints, significantly reducing the clause count. For the Spam dataset, this technique reduced the clause count from approximately 69 million to just 3.8 million, making the problem tractable.
  • Pareto Optimality: The framework can optimize for a balance between MD and MS objectives simultaneously.

Results and Discussion

The approach was evaluated on 11 real-world and synthetic datasets. A significant finding was the "regularization" effect of decision trees: tree-based clustering often achieved higher Adjusted Rand Index (ARI) scores than standard optimal constrained clustering. This suggests that the tree structure prevents overfitting to noisy constraints.

Figure 2: ARI and Feasibility vs. κ showing the trade-offs in tree-based clustering.

As shown in the experimental results, the proposed method consistently outperformed standard Constrained Clustering (CC) baselines. However, a trade-off exists between tree depth (interpretability) and feasibility. In high-dimensional datasets, shallow trees may struggle to satisfy all constraints, highlighting the inherent cost of simplicity.

Figure 1: Comprehensive performance metrics (ARI, Feasibility, Time) across various datasets and parameters.

The "Smart Pairs" technique made the problem tractable for modern solvers, allowing the SAT-based model to find feasible solutions where previous state-of-the-art models timed out or failed to scale.

Conclusion and Future Work

While the SAT-based approach offers superior accuracy and theoretical guarantees, it faces challenges with hard constraints in highly complex datasets and computational limits for very deep trees. Future work includes exploring soft constraints to handle infeasibility and automating the selection of optimal tree depth to balance interpretability and performance.

Summary updated

BibTeX
@inproceedings{shati2023optimal,
  author = {Pouya Shati and Eldan Cohen and Sheila A. McIlraith},
  title = {{Optimal Decision Trees For Interpretable Clustering with Constraints}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.24963/ijcai.2023/225},
}
Figure