JANOS: An Integrated Predictive and Prescriptive Modeling Framework

David Bergman, Teng Huang, Philip Brooks, Andrea Lodi, Arvind U. RaghunathanInforms J. Comput 2022

Abstract

JANOS is a Python-based framework designed to bridge the gap between predictive modeling and prescriptive optimization. By allowing researchers to embed pre-trained machine learning (ML) models—such as neural networks and logistic regressions—directly into mathematical optimization problems, JANOS automates the complex task of reformulating non-linear ML models into solvable constraints. This integration enables "prescriptive analytics," where decision variables are optimized based on how they specifically influence predicted outcomes.

Introduction

In traditional data science workflows, a significant disconnect often exists between predictive modeling and prescriptive analysis. Typically, a machine learning model predicts an outcome (e.g., churn probability based on a fixed price), which is then passed as a static input to an optimization solver. However, in many real-world scenarios, these processes are interdependent: the decision variable (e.g., price) is a feature that directly alters the prediction.

Historically, integrating these components was difficult because ML models, particularly deep neural networks, are non-linear and computationally "messy" for traditional optimization solvers. JANOS addresses this by providing a unified framework that treats ML outputs as "predicted variables" within a standard optimization model, allowing for decision-dependent features.

The JANOS Framework

JANOS interfaces with the Gurobi optimization solver and scikit-learn to automate the transcription of ML models into Mixed-Integer Programming (MIP) formats. The framework handles several common model types:

  • Linear Regression: These are incorporated directly as linear constraints.
  • Logistic Regression: To handle the non-linear sigmoid function, JANOS employs a piecewise linear approximation. It partitions the log-odds into discrete intervals and uses the mean sigmoid value within those intervals to maintain mathematical tractability.
  • Neural Networks (NNs): JANOS supports NNs using Rectified Linear Unit (ReLU) activation functions. These are reformulated as network flow problems using "Big-M" constraints and binary variables to represent the activation state of each neuron.
Piecewise linear approximation of a logistic regression model in JANOS.

By partitioning variables into "regular" (operational decisions) and "predicted" (ML outputs), JANOS allows users to map decision variables directly to ML features without manual reformulation.

Case Study: Student Enrollment

The framework was evaluated using a Student Enrollment Problem. The training data consisted of 20,000 synthetic student records including SAT scores, GPA, and scholarship offers, with the target variable being matriculation (enrollment).

The optimization task was to allocate scholarship funds to maximize enrollment under a fixed budget. The performance of JANOS was tested against a standard greedy heuristic that sorts students by their sensitivity to financial aid.

Results and Performance

The experimental results highlight both the scalability and effectiveness of the JANOS framework:

  • Computational Efficiency: Linear regression models were solved in under a second. More complex models, including those with 1,000 logistic regression approximations or neural networks, typically solved within 10 to 100 seconds, demonstrating practical scalability for medium-sized decision problems.
  • Approximation Accuracy: The piecewise linear approach for logistic regression proved highly robust. Using as few as five intervals, the error in predicted enrollment probability remained below 2%.
  • Prescriptive Gains: In the scholarship allocation test, JANOS outperformed the greedy heuristic, resulting in an 8% to 12% reduction in student declinations. This demonstrates that mathematically integrating the prediction into the optimization loop yields superior real-world outcomes compared to disjointed workflows.

Conclusion and Future Directions

JANOS simplifies the "onerous task" of turning complex ML models into optimization constraints. While currently supporting linear, logistic, and ReLU-based neural networks, future iterations aim to include Support Vector Regression (SVR) and tree-based models. Additionally, the authors plan to integrate AutoML capabilities to automatically select the optimal predictive model for a given dataset. As neural networks grow in complexity, future research will focus on advanced algorithmic reformulations to maintain low solve times for deep learning architectures.

Summary updated

BibTeX
@article{bergman2022janos,
  author = {David Bergman and Teng Huang and Philip Brooks and Andrea Lodi and Arvind U. Raghunathan},
  title = {{JANOS: An Integrated Predictive and Prescriptive Modeling Framework}},
  journal = {Informs J. Comput},
  year = {2022},
  doi = {10.1287/ijoc.2020.1023},
}
Figure