Abstract: This paper presents Optimal Sparse Regression Trees (OSRT), a novel algorithm for producing provably optimal, sparse regression trees with constant leaf predictions. By introducing a tight lower bound based on 1D k-Means clustering, OSRT overcomes the computational challenges of continuous loss functions like Mean Squared Error (MSE). Experimental results across various datasets demonstrate that OSRT achieves superior accuracy and sparsity compared to traditional greedy methods like CART and heuristic-based evolutionary algorithms, while maintaining scalability to large datasets.
Introduction
Decision trees are widely used in machine learning due to their inherent interpretability. A simple tree can be easily understood and applied manually. However, standard regression tree algorithms, such as CART, rely on greedy induction—making locally optimal splits at each node without considering the global tree structure. This often leads to sub-optimal trees that are unnecessarily large, harder to interpret, and less accurate.
While optimal classification trees have seen significant progress, optimal regression has remained challenging. The discrete nature of classification loss (0-1 loss) facilitates pruning the search space. In contrast, regression typically uses Mean Squared Error (MSE), a continuous and real-valued metric, making the search for an optimal tree computationally intensive.
Methods: The k-Means Lower Bound
OSRT addresses this by using a dynamic programming framework with a novel k-Means Lower Bound. The algorithm minimizes a joint objective function: $MSE + \lambda \times (\text{number of leaves})$, where $\lambda$ is a regularization parameter.
The core innovation lies in the lower bound calculation:
- Intuition: For a given set of samples and a budget of $C$ remaining leaves, the absolute minimum MSE achievable is equivalent to a 1D k-Means clustering of the target values ($y$) into $C$ clusters. No feature-based split can outperform this theoretical optimum.
- Equivalent Points: The bound is further tightened by recognizing that samples with identical feature vectors must reside in the same leaf.
- Efficiency: The authors utilize an $O(kN)$ weighted 1D k-Means algorithm to compute these bounds rapidly, enabling efficient pruning of the search space.
Experimental Evaluation
The authors evaluated OSRT on 12 diverse datasets, ranging from small benchmarks like Servo to large-scale datasets like Household (2 million samples).
Key findings include:
- The Efficient Frontier: OSRT consistently maps the "efficient frontier"—the lowest possible MSE for any given number of leaves. As shown in the performance plots, OSRT (represented by blue triangles) typically achieves lower training and testing loss for a given tree size compared to greedy methods like CART or evolutionary methods like
evtree. - Generalization: Optimal trees often generalize better to unseen data. While greedy trees may overfit and require post-hoc pruning, OSRT's global optimization leads to more robust structures.
- Scalability and Speed: The k-Means bound significantly accelerates convergence. On the
airfoildataset, OSRT converged four times faster than previous state-of-the-art bounding techniques. Unlike evolutionary methods, OSRT scales effectively to millions of samples.
Conclusion
OSRT represents a significant step forward in interpretable machine learning, providing the first publicly available code for provably optimal sparse regression trees. It demonstrates that one does not need to sacrifice performance for interpretability. Future work includes extending the framework to support non-binary features directly and exploring trees with linear models in the leaves.
Summary updated