Blossom: an Anytime Algorithm for Computing Optimal Decision Trees

Emir Demirovic, Emmanuel Hebrard, Louis Jean

Decision trees are the gold standard for interpretable machine learning, but practitioners historically face a stark computational trade-off when building them. Greedy heuristics like CART or C4.5 are lightning-fast but often sacrifice accuracy by making sub-optimal splits. Conversely, "exact" methods (using dynamic programming or SAT solvers) guarantee the mathematically optimal tree for a given depth but scale poorly, consume massive amounts of memory, and lack "anytime" capabilities—meaning if they are stopped early, they often yield no solution at all.

To resolve this, researchers introduce Blossom, a novel "anytime" algorithm that bridges the gap between fast-but-greedy heuristics and slow-but-perfect exact methods. Blossom delivers a high-quality tree almost instantly and continuously refines it toward mathematical optimality as long as computation time allows.

Methodology: Bridging Heuristics and Exact Methods

Blossom functions as an iterative, anytime version of state-of-the-art dynamic programming (DP). It introduces several key innovations to achieve its speed and scalability:

  • Bud Expansion: Traditional DP usually optimizes a left subtree completely before evaluating the right. Blossom instead rapidly expands "buds" (non-terminal branches) to form a complete, albeit non-optimal, initial tree as quickly as possible.
  • Heuristic Guidance: By utilizing Gini impurity (the metric behind CART) to prioritize feature splits, Blossom ensures its very first tree is already comparable in quality to standard heuristic outputs.
  • Memoryless Design: Unlike prior exact methods (e.g., DL8.5) that rely on massive caches to store sub-problems, Blossom is highly memory-efficient. This prevents the algorithm from crashing on large datasets.
  • Lower Bounding: A clever lower-bound technique allows Blossom to "fail early." If the combined error of already-optimized sibling branches exceeds the current best total error, it prunes that search path immediately.
  • Preprocessing: Dataset reduction (merging duplicate points) and feature reduction (removing redundant or "informationless" features) shrink the search space prior to execution.

Empirical Evaluation

The authors evaluated Blossom on a massive benchmark of 58 datasets, comprising 50 standard datasets commonly used in decision tree research (e.g., Iris, Monk’s problems, Titanic) and 8 large-scale datasets from Kaggle and UCI (e.g., MNIST, Adult, Taiwan Binarized, Weather-AUS) to rigorously test scalability.

Key Results and Insights

Blossom demonstrates that it is possible to achieve the best of both worlds—speed and optimality—without prohibitive computational overhead.

  • Speed and Anytime Utility: In real-world engineering, a 95% optimal solution available immediately is often more valuable than a perfect solution hours later. Blossom finds its first full tree in linear time $\Theta(nk)$ relative to the number of data points and depth.
  • Accuracy and the Overfitting Trap: For shallow trees (depth $\le 6$), Blossom consistently produces more accurate models than CART. For deeper trees, the authors note that mathematically "optimal" training accuracy can lead to overfitting noise. Blossom addresses this by supporting post-pruning, which significantly boosts test accuracy.
  • State-of-the-Art Performance: Blossom systematically outperforms Murtree (the previous state-of-the-art) in anytime training accuracy, particularly as tree depth and feature spaces grow.
  • Scalability: While older exact methods like DL8.5 or binOCT frequently crashed under 50GB memory limits on large datasets, Blossom remained stable and iteratively improved its solutions.

Limitations and Future Work

While Blossom represents a significant leap forward, the authors note a few limitations. Because Blossom employs a "memoryless" design to handle large data, it can be slower than Murtree at proving optimality for very shallow trees, where caching sub-problems is highly efficient. Additionally, on datasets representing parity functions, search is inherently limited because tree depth must equal the number of features to capture the pattern.

Currently, Blossom optimizes for accuracy under a fixed depth. Future iterations of the algorithm may explore optimizing for a linear combination of accuracy and tree complexity (number of leaves) more directly, further enhancing its utility for interpretable machine learning.

Summary updated

BibTeX
@inproceedings{demirovic2023blossom,
  author = {Emir Demirovic and Emmanuel Hebrard and Louis Jean},
  title = {{Blossom: an Anytime Algorithm for Computing Optimal Decision Trees}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=0rO3nlTlbG},
}
Figure