Optimal Decision Trees for Separable Objectives: Pushing the Limits of Dynamic Programming

Jacobus G. M. van der Linden, Mathijs Michiel de Weerdt, Emir DemirovicarXiv 2023

Abstract

Global optimization of decision trees has shown to be promising in terms of accuracy, size, and consequently human comprehensibility. However, many of the methods used rely on general-purpose solvers for which scalability remains an issue. Dynamic programming methods have been shown to scale much better because they exploit the tree structure by solving subtrees as independent subproblems. However, this only works when an objective can be optimized separately for subtrees. We explore this relationship in detail and show the necessary and sufficient conditions for such separability and generalize previous dynamic programming approaches into a framework that can optimize any combination of separable objectives and constraints. Experiments on five application domains show the general applicability of this framework, while outperforming the scalability of general-purpose solvers by a large margin.

Introduction

Decision trees are widely regarded as the "gold standard" for high-stakes machine learning applications, such as medical diagnosis or judicial decisions, due to their inherent interpretability. However, finding a globally optimal tree for a given dataset is an NP-Hard problem. Traditionally, practitioners have relied on greedy heuristics like CART or C4.5, which are fast but often produce sub-optimal, overly complex trees.

To address this, researchers have turned to optimal solvers using Mixed-Integer Programming (MIP) or SAT. While these find the best possible tree, they struggle to scale beyond small datasets or shallow depths. Dynamic Programming (DP) offers a promising middle ground by decomposing the tree into independent sub-problems. However, standard DP approaches have historically been limited to "separable" objectives—typically simple additive metrics like misclassification counts. This paper introduces STreeD (Separable Trees with Dynamic programming), a framework that generalizes DP to handle complex, non-linear objectives and constraints, such as group fairness and F1-scores, which previously required slower general-purpose solvers.

The STreeD Framework

The core of STreeD is a generalized DP formulation that identifies the necessary and sufficient conditions for an objective to be optimized recursively.

Conditions for Separability

For an objective to be compatible with DP, it must satisfy three key properties:

  1. Markovian Property: The cost and transition functions must depend only on the current state (the subset of data) and the immediate decision, independent of the path taken to reach that state.
  2. Order Preservation: This is a crucial generalization beyond simple additivity. It requires that if a subtree A is superior to subtree B, then any larger tree containing A must also be superior to (or equal to) the same tree containing B. This allows for the optimization of ratios and non-linear metrics like the F1-score.
  3. Anti-monotonicity: For constraints, any violation in a subtree must persist in any larger tree containing it, allowing for early pruning.
Figure 1: Recursive decomposition of a decision tree into independent subproblems.

Algorithmic Optimizations

STreeD employs a Pareto front approach to manage multiple objectives or constraints simultaneously. Instead of a single optimal value, each recursive step returns a set of non-dominated solutions. To maintain efficiency, the framework incorporates:

  • Caching: Storing sub-problem results to eliminate redundant computations.
  • Branch-and-Bound: Utilizing upper and lower bounds to prune search paths that cannot yield an optimal solution.
  • Specialized Depth-Two Solver: A highly optimized routine for base cases to accelerate the recursion.

Experimental Evaluation

The authors evaluated STreeD across five distinct application domains:

  • Cost-Sensitive Classification: 15 UCI datasets (e.g., Heart, Diabetes).
  • Prescriptive Policy Generation: The Warfarin medical dosing dataset and synthetic benchmarks.
  • Nonlinear Metrics: 25 binary classification datasets optimized for F1-score and Matthews Correlation Coefficient.
  • Group Fairness: 12 datasets (e.g., Adult, COMPAS) tested for demographic parity and equality of opportunity.
  • Standard Accuracy: Comparisons against state-of-the-art DP solvers like DL8.5 and MurTree.

Key Results and Insights

STreeD demonstrates significant improvements in both scalability and flexibility:

  • Scalability: STreeD is often orders of magnitude faster than general-purpose MIP solvers. In prescriptive policy tasks, it found optimal solutions in seconds, whereas MIP models frequently timed out at 300 seconds.
  • Efficiency vs. Specialized Solvers: Compared to specialized DP solvers like MurTree (hard-coded for specific metrics), STreeD was 7x faster on average for F1-score optimization, thanks to its superior bounding techniques.
  • Fairness Integration: The framework demonstrates that group fairness, often viewed as a global property, can be decomposed into separable threshold constraints. This allows STreeD to find fair trees much faster than existing MIP-based "fair" decision tree algorithms.

Conclusion and Future Work

STreeD pushes the boundaries of optimal decision tree induction by formalizing the conditions for separability. While highly effective, the framework currently relies on pre-binarized features and is limited to binary splits. Future work will explore handling continuous features directly within the DP search and extending the framework to multi-way branching. Additionally, managing the potential explosion of the Pareto front for highly complex objectives remains an area for further optimization.

Summary updated

BibTeX
@misc{linden2023optimal,
  author = {Jacobus G. M. van der Linden and Mathijs Michiel de Weerdt and Emir Demirovic},
  title = {{Optimal Decision Trees for Separable Objectives: Pushing the Limits of Dynamic Programming}},
  year = {2023},
  eprint = {2305.19706},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.19706},
}
Figure