ODTlearn: A Package for Learning Optimal Decision Trees for Prediction and Prescription

summary

Video file (mp4)

The gist

Summary ODTLearn is an open-source Python package that provides methods for learning optimal decision trees for high-stakes predictive and prescriptive tasks based on the mixed-integer optimization

In short

The episode details 'ODTlearn,' an open-source Python package for building decision trees that are mathematically provably optimal. The tool handles classification, fair classification, robust prediction, and prescriptive decision-making. Hosts discuss how it improves upon older methods by being faster, more accurate, and allowing complex constraints to be built directly into the model.

Key concepts

Optimal Decision Trees
Unlike standard tools that use greedy heuristics (making locally best splits), these trees are mathematically solved for globally. This means the resulting tree is provably optimal, not just 'good enough,' making it reliable for high-stakes decisions.
Prediction and Prescription
Prediction involves classifying data points to assign a label. Prescription goes further by determining what specific action should be taken—such as recommending a particular treatment or resource allocation—based on the model's findings.
Mixed-Integer Optimization (MIO)
This is the underlying mathematical technique used by the package. It allows decision-makers to encode complex real-world constraints, such as budget limits or fairness requirements, directly into the optimization problem itself.

Terminology used across episodes

This episode discusses

The paper

ODTlearn: A Package for Learning Optimal Decision Trees for Prediction and Prescription · Read on arXiv

Patrick Vossler, Nathan Justin, Sina Aghaei, Nathanael Jo, Andrés Gómez, Phebe Vayanos

University of Southern California

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: Next we'll be talking about the paper "ODTlearn: A Package for Learning Optimal Decision Trees for Prediction and Prescription".

Jane: The paper was written by Patrick Vossler, Nathan Justin, Sina Aghaei, Nathanael Jo, Andrés Gómez et al. from University of Southern California.

Tom: Stay tuned as we take you through the paper and discuss its implications.

Title: Tom: Welcome back to the show, everyone. Today we’re looking at a paper that’s got me genuinely excited — it’s called “ODTlearn: A Package for Learning Optimal Decision Trees for Prediction and Prescription.” Jane, when you first saw that title, what jumped out at you?

Jane: Oh, Tom, the word “optimal” is the big one for me. Most decision trees you’ve seen in tools like scikit-learn are built with greedy heuristics — they make the best split at each step without looking ahead. This package actually solves for the best tree, globally, using math. That’s a huge difference.

Tom: Right, and the second part of the title — “prediction and prescription” — that’s the part that got me curious. We’re not just classifying things anymore. We’re actually deciding what action to take, like which treatment to give a patient.

Jane: Exactly. And the authors here are a team from USC — Patrick Vossler, Sina Aghaei, Nathan Justin, Nathanael Jo, Andrés Gómez, and Phebe Vayanos. They’ve been publishing on this mixed-integer optimization approach for a few years now, and this paper is them packaging it all up into a clean, open-source Python library.

Tom: So it’s not just a theoretical idea. They’ve actually built the tool and put it on PyPI. That’s the kind of thing that moves research from a PDF into the real world.

Jane: And that’s what I love about it. The title says “for prediction and prescription,” but really it’s about giving decision-makers — doctors, social workers, loan officers — a tree they can actually trust. Because the tree is provably optimal, not just “good enough.”

Tom: So if I’m a hospital administrator and I want to decide who gets a scarce resource, this package can give me a tree that’s not only interpretable but also mathematically guaranteed to be the best under the constraints I set?

Jane: That’s the promise, yes. And it can handle fairness constraints, budget constraints, even robustness to data shifts. That’s a big deal for high-stakes decisions.

Tom: I’m already sold on the concept. But I want to know — how does it actually work under the hood? That’s what we’re going to dig into next.

Summary: Tom: So we’re back, and we’ve got Lu and Meng with us now. We’re still on “ODTlearn: A Package for Learning Optimal Decision Trees for Prediction and Prescription.” Jane, you set the stage — can you give us the quick summary of what the paper actually does?

Jane: Sure. The paper presents a Python package that implements four main types of optimal decision trees. First, there’s the basic optimal classification tree, which they call FlowOCT. Then there’s a fair version, FairOCT, that can enforce things like statistical parity or equalized odds. There’s a robust version, RobustOCT, for when your training data might not match your deployment data. And finally, there’s FlowOPT, which is for prescriptive trees — deciding what action to take, not just what label to predict.

Lu: And the key technical contribution is the formulation itself. The FlowOCT model uses a network flow structure in the mixed-integer program. That gives it a much stronger linear relaxation, which means the solver can prune the search tree much faster. In their experiments, they found FlowOCT was about twenty-nine times faster than older MIO formulations like BinOCT or the original OCT.

Meng: That speed difference is what makes this practical. I mean, I’ve worked with MIO models before, and they can be painfully slow. If you’re solving a real problem with thousands of data points, a twenty-nine times speedup is the difference between waiting an hour and waiting two minutes.

Tom: And that speed comes from the formulation, not from a faster computer. That’s elegant.

Jane: It is. And they also show better out-of-sample accuracy — up to seven percent better than BinOCT and twenty-one percent better than the older OCT model. So it’s not just faster; it generalizes better too.

Lu: The prescriptive part is also worth highlighting. FlowOPT is compared against two earlier MIO approaches from Kallus and from Bertsimas and colleagues. FlowOPT wins on out-of-sample probability of correct treatment assignment across several experimental setups. So it’s not just a classification tool — it’s a decision tool.

Meng: And from an engineering standpoint, I really appreciate that they built it on the Python MIP library. That means it supports both the open-source CBC solver and commercial solvers like Gurobi. So someone without a paid license can still use it, just maybe on smaller problems.

Tom: So it’s fast, it’s accurate, it’s flexible, and it’s accessible. That’s a strong combination. But what does this mean for someone who’s not a mathematician? How does this change what they can do?

Jane: That’s exactly what we’re going to talk about next — the improvements this package brings to real-world practice.

Improvements: Tom: We’re back, still on “ODTlearn: A Package for Learning Optimal Decision Trees for Prediction and Prescription.” So we’ve covered what it does. Now let’s talk about what it improves compared to what was already out there. Jane, you mentioned the speed and accuracy gains — but what’s the bigger picture?

Jane: The bigger picture is flexibility. With heuristic trees, if you want to add a constraint — like “the tree must be fair” or “we can only treat one hundred patients” — you’re stuck. You have to hack the algorithm or post-process the results. With an MIO formulation, you just add a constraint to the optimization problem. It’s built into the math.

Lu: And that’s the real contribution here. The paper shows that you can encode fairness as a linear constraint. For example, you can require that the false positive rate is roughly equal across demographic groups. That’s something you simply cannot do with a greedy tree builder.

Meng: From my side, the improvement I care about is the solver support. A lot of academic code is written for one specific solver and it’s a nightmare to port. This package uses Python MIP, which abstracts away the solver. So I can prototype with CBC and then switch to Gurobi when I need more horsepower. That’s a real engineering win.

Tom: So it’s not just a research tool — it’s actually designed to be used in production?

Meng: That’s the impression I get. The fit-predict interface is familiar to anyone who’s used scikit-learn. And they even have a built-in function to plot the tree. So the learning curve is shallow.

Jane: And there’s another improvement worth mentioning — the robustness part. The RobustOCT formulation handles distribution shifts. That means if your training data is from two thousand twenty but you’re deploying in two thousand twenty-five the tree is designed to still perform well under adversarial changes. That’s a huge deal for real-world deployment.

Lu: I’d add that the prescriptive trees also improve on prior work by being more interpretable. A treatment policy in the form of a tree is something a doctor can actually read and explain to a patient. You can’t do that with a black-box neural network.

Tom: So the improvements are: speed, accuracy, flexibility, robustness, and interpretability. That’s a lot of boxes checked.

Jane: And it’s all open source, under GPL-three point zero. So anyone can download it, inspect the code, and build on it.

Meng: The one caveat is scale. MIO is still not going to handle millions of rows like XGBoost can. But for high-stakes, smaller datasets — like clinical trials or policy decisions — this is the right tool.

Tom: So where does this leave us? What’s the impact on the world? Let’s bring in Lalam for that.

Conclusion: Tom: Alright, we’re wrapping up our discussion on “ODTlearn: A Package for Learning Optimal Decision Trees for Prediction and Prescription.” Jane, can you give us the final summary?

Jane: Sure. This paper gives us a well-engineered, open-source package for learning decision trees that are provably optimal. It covers classification, fair classification, robust classification, and prescriptive trees. It’s faster and more accurate than previous MIO approaches, and it supports both free and commercial solvers.

Lu: And the deeper implication is that we can now put interpretability and optimality together. In high-stakes domains, you don’t have to choose between a model you can explain and a model that’s actually the best. That’s a genuine shift.

Meng: Practically, this means a hospital can use a tree to decide who gets a ventilator, and they can prove that the tree is optimal under their fairness and budget constraints. That’s audit-ready. That’s defensible.

Tom: And Lalam, you’ve been listening — what’s your take on the cultural impact?

Lalam: I think the cultural impact is about trust. When decisions are made by opaque systems, people lose faith. But a tree that’s optimal, fair, and explainable — that’s something a community can actually review and debate. It turns algorithmic decision-making into a public conversation rather than a private mystery. That’s a healthier relationship between technology and society.

Jane: That’s a beautiful way to put it. And with that, we’re going to say goodbye to this paper. It’s been a great one — solid math, practical software, and a clear path to real-world use.

Tom: Thanks to everyone who joined us — Lu, Meng, Lalam — and to our listeners. Next up, we’ve got a paper on federated learning for medical imaging. We’ll see you then.

Jane: Take care, everyone.

More episodes

← Home