MurTree: Optimal Classification Trees via Dynamic Programming and Search

Emir Demirovic, Anna Lukina, Emmanuel Hebrard, Jeffrey Chan, James Bailey, Christopher Leckie, Kotagiri Ramamohanarao, Peter J. StuckeyarXiv 2020

Abstract

Finding optimal decision trees is a fundamental challenge in interpretable machine learning. While heuristic methods like CART are efficient, they do not guarantee global optimality. MurTree introduces a new algorithmic framework based on dynamic programming and search that makes optimal classification trees computationally practical for large-scale datasets. By integrating a specialized depth-two solver, similarity-based lower bounding, and advanced caching strategies, MurTree achieves orders-of-magnitude speedups over previous state-of-the-art solvers. Our results on 85 benchmark datasets demonstrate that MurTree can process tens of thousands of instances in seconds, providing a scalable solution for building accurate and interpretable models.

Introduction

Decision trees are widely regarded as the gold standard for interpretable machine learning due to their intuitive, rule-based structure. A simple decision tree allows users to trace the logic behind a prediction through a series of binary splits, making the model's decision process transparent to humans.

An example of a simple, interpretable decision tree.

Despite their popularity, most common implementations, such as CART or C4.5, rely on "greedy" algorithms. These methods make locally optimal splits at each node without considering the global impact on the final tree structure. While computationally efficient, greedy heuristics often result in sub-optimal trees in terms of both accuracy and size. Finding a globally optimal tree—one that minimizes misclassification for a fixed depth or number of nodes—is an NP-hard problem. Previous attempts to solve this using general-purpose optimization frameworks like Mixed-Integer Programming (MIP) or Boolean Satisfiability (SAT) have struggled to scale, often failing on datasets with more than a few thousand instances. MurTree addresses this "scalability wall," bringing optimal decision trees into the realm of practical data science.

Methodology

MurTree reframes the optimal decision tree problem as a search task optimized through dynamic programming. Its efficiency stems from several key architectural innovations:

  • The Depth-Two Backbone: Rather than recursing to individual leaves, MurTree utilizes a highly optimized solver specifically designed for trees of depth two. This solver uses frequency counting to avoid redundant data scans, significantly reducing the computational bottleneck at the lower levels of the search tree.
  • Similarity-Based Lower Bounding: To prune the search space, MurTree implements a novel lower-bounding technique. If the algorithm encounters a subset of data similar to one it has already solved, it derives a lower bound on the misclassification score. If this bound exceeds the current best solution, the entire branch is pruned.
  • Advanced Memoization: MurTree employs dual caching strategies. It stores results based on both the "branch" (the sequence of features leading to a node) and the "dataset" (the specific instances present at a node), ensuring that subproblems are never solved twice.
  • Dynamic Node Selection: The algorithm dynamically prioritizes subtrees that are more likely to yield pruning opportunities, further accelerating the search process.

Experimental Setup

The performance of MurTree was evaluated using 85 classification datasets from the UCI and CP4IM repositories. These benchmarks range from small categorical sets to large-scale instances like 'Default Credit' and 'Magic04' with over 40,000 instances. Since MurTree operates on binary features, continuous and categorical data were pre-processed using Multi-Interval Discretization (MDLP) to generate binary predicates.

Results and Discussion

The experimental results highlight three major advantages of the MurTree approach:

Speed and Scalability: MurTree is consistently orders of magnitude faster than DL8.5, the previous state-of-the-art in optimal tree induction. In many benchmarks, MurTree finds the optimal solution in under 0.5 seconds, whereas previous methods required nearly a minute. It successfully scales to datasets with tens of thousands of instances, a significant milestone for optimal solvers.

The Depth Constraint: The study confirms that the primary computational challenge for optimal trees is depth rather than the number of instances. While MurTree scales linearly with the number of rows, the complexity increases exponentially with tree depth. Currently, depths of 4 and 5 are highly practical, but deeper trees remain a frontier for future research.

Optimality as Regularization: Contrary to the intuition that global optimization might lead to overfitting, the results suggest that finding the best possible tree within a strict size constraint acts as a form of regularization. MurTree frequently outperformed tuned CART models in out-of-sample test accuracy, demonstrating that global optimization pays off in real-world predictive performance.

Conclusion

MurTree represents a significant leap forward in the field of interpretable machine learning. By moving beyond generic solvers and leveraging the specific geometry of decision trees, it makes optimal induction a viable alternative to greedy heuristics. Future work will focus on integrating threshold search directly into the solver, handling non-linear metrics like F1-score, and extending the framework to ensembles of optimal trees.

Summary updated

BibTeX
@misc{demirovic2020murtree,
  author = {Emir Demirovic and Anna Lukina and Emmanuel Hebrard and Jeffrey Chan and James Bailey and Christopher Leckie and Kotagiri Ramamohanarao and Peter J. Stuckey},
  title = {{MurTree: Optimal Classification Trees via Dynamic Programming and Search}},
  year = {2020},
  eprint = {2007.12652},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.12652},
}
Figure