Abstract
Decision Tree (DT) Learning is a fundamental problem in Interpretable Machine Learning, yet it poses a formidable optimisation challenge. Despite numerous efforts dating back to the early 1990's, practical algorithms have only recently emerged, primarily leveraging Dynamic Programming (DP) and Branch & Bound (B&B) techniques. These methods fall into two categories: algorithms like DL8.5, MurTree and STreeD utilise an efficient DP strategy but lack effective bounds for pruning the search space; while algorithms like OSDT and GOSDT employ more efficient pruning bounds but at the expense of a less refined DP strategy. We introduce Branches, a new algorithm that combines the strengths of both approaches. Using DP and B&B with a novel analytical bound for efficient pruning, Branches offers both speed and sparsity optimisation. Unlike other methods, it also handles non-binary features. Theoretical analysis shows its lower complexity compared to existing methods, and empirical results confirm that Branches outperforms the state-of-the-art in speed, iterations, and optimality.
Introduction
Decision trees (DTs) are widely regarded as the gold standard for interpretable machine learning. However, their interpretability is often compromised as they grow in complexity. To maintain utility, researchers focus on the sparsity problem: finding a tree that maximizes accuracy while minimizing the number of splits. This optimization task is NP-complete, making it computationally intensive. Historically, greedy algorithms like CART or C4.5 were used for their speed, but they frequently produce suboptimal, overly complex trees.
Recent "optimal" solvers have turned to Dynamic Programming (DP) or Branch & Bound (B&B). However, these often rely on Depth-First Search (DFS), which requires pre-defined maximum depths, or Best-First Search (BFS) strategies that fail to fully exploit the problem's structure. Additionally, most existing optimal solvers require data to be binarized (one-hot encoded), which can exponentially increase the search space and degrade performance.
Methods
BRANCHES addresses these challenges by framing the search for an optimal tree as a pathfinding problem in an AND/OR graph. In this framework, an "OR" node represents a choice (e.g., which feature to split on), while an "AND" node represents the requirement to solve all resulting sub-branches of that split.
The algorithm leverages the AO* algorithm, a classic heuristic search method designed for AND/OR graphs, to focus on the most promising partial solution graphs. A key innovation is the Purification Bound, a mathematical heuristic that provides an upper bound on the potential accuracy of a branch. If this bound is lower than the current best solution, the algorithm prunes that section of the search space. Furthermore, BRANCHES natively supports multi-way splits for categorical features, avoiding the "binary tax"—the explosion of unnecessary branches introduced by one-hot encoding.
Results and Key Insights
The algorithm was evaluated on 11 datasets from the UCI repository, including the Monk’s Problems, Car Evaluation, and Mushroom datasets. The results demonstrate that BRANCHES consistently achieves state-of-the-art performance.
Performance and Efficiency
Despite being implemented in Python, BRANCHES often outperformed C++ competitors like GOSDT and STreeD. For example, on the monk1 dataset, it reached the optimum in 0.05s, compared to approximately 3s for GOSDT. On the mushroom dataset using ordinal encoding, BRANCHES converged in just 6 iterations, finding optimal solutions in 0.16 seconds where binary-only solvers often timed out.
Anytime Behavior and Complexity
As an informed BFS-style search, BRANCHES identifies high-quality solutions very early. If interrupted, the current solution is typically much closer to the true optimum than those from DFS-based methods. Theoretically, the paper establishes tighter complexity bounds for BRANCHES, which are numerically orders of magnitude smaller than previous bounds for algorithms like OSDT.
Conclusion
BRANCHES represents a significant advancement in optimal decision tree learning by combining the strengths of DP and B&B within an AND/OR graph framework. By supporting multi-way splits and utilizing the novel Purification Bound, it offers superior speed and interpretability. Future work will focus on a C++ implementation to further widen the performance gap and the incorporation of specialized depth-2 solvers to accelerate the search for small sub-trees.
Summary updated