Authors: Patrick Vossler, Sina Aghaei, Nathan Justin, Nathanael Jo, Andrés Gómez, and Phebe Vayanos
Affiliation: University of Southern California, Center for AI in Society
Introduction
Decision trees are widely regarded as the "gold standard" for interpretability in machine learning. However, traditional implementations like CART rely on greedy heuristics that make locally optimal splits, often failing to find the globally optimal tree structure. In high-stakes domains such as healthcare and criminal justice, suboptimality can lead to significant real-world consequences. ODTlearn is an open-source Python package designed to address these limitations by leveraging Mixed-Integer Optimization (MIO) to train provably optimal decision trees.
The ODTlearn Framework
ODTlearn implements state-of-the-art frameworks, specifically FlowOCT for classification and FlowOPT for prescriptive tasks. These methods reformulate tree construction as a network flow problem, allowing the use of powerful optimization solvers to find the best possible tree structure for a given objective.
The package is built on the Python MIP library, making it solver-agnostic and compatible with both commercial solvers (e.g., Gurobi) and open-source alternatives (e.g., COIN-OR). Its modular design follows SOLID principles, enabling researchers to easily extend the library with new constraints or tree types.
Key Capabilities
ODTlearn goes beyond standard classification by integrating critical real-world requirements directly into the optimization process:
- Fairness: Users can enforce constraints like statistical parity or equalized odds to ensure predictions do not discriminate against protected groups. The
FairOCTimplementation has been shown to outperform popular heuristic-based fair decision tree algorithms. - Robustness: The package supports training trees that maintain performance even when data shifts occur between training and deployment.
- Prescription: Through FlowOPT, the package moves from predicting outcomes to recommending optimal actions (e.g., medical treatments), accounting for confounding factors in observational data and respecting real-world limits like treatment budgets.
Performance and Results
Benchmarking demonstrates that the flow-based formulations in ODTlearn provide significant advantages over previous MIO-based methods:
- Efficiency: FlowOCT achieved up to a 29x speedup compared to earlier MIO formulations for balanced trees by providing tighter linear programming relaxations.
- Accuracy: The package improved out-of-sample accuracy by 7% to 21% over existing optimal classification tree (OCT) implementations.
- Prescriptive Power: FlowOPT outperformed other prescriptive MIO formulations (such as K-PT and B-PT) in correctly assigning treatments across various experimental designs.
Conclusion and Future Work
ODTlearn bridges the gap between the theoretical benefits of optimal decision trees and practical, user-friendly software. While more computationally intensive than greedy heuristics, it is an essential tool for high-stakes applications where interpretability, fairness, and global optimality are paramount. Future development plans include extending the package to support new problem classes and more advanced reformulation strategies to further improve efficiency.
Source Code: https://github.com/D3M-Research-Group/odtlearn
Documentation: https://d3m-research-group.github.io/odtlearn/
Summary updated