Introduction
As machine learning (ML) transitions from controlled research environments to critical real-world applications—such as criminal sentencing, autonomous driving, and healthcare—the risk of algorithmic "misbehavior" increases significantly. Standard ML algorithms are typically optimized for a single objective, such as accuracy, often at the expense of safety or fairness. This paper introduces a novel framework for "Seldonian" optimization, enabling the design of algorithms with built-in, high-probability guarantees against undesirable behaviors.
The Problem with Standard Constraints
Currently, preventing an algorithm from exhibiting bias or making dangerous errors requires users to manually implement "soft constraints" (penalties) or "hard constraints" (limits). This approach is flawed for several reasons:
- Expertise Gap: Most users lack the statistical expertise to balance fairness penalties against accuracy.
- Data Sensitivity: Constraints often depend on unknown underlying data distributions.
- False Sense of Security: Removing sensitive features (e.g., gender) does not prevent discrimination if other features are correlated with them.
The authors propose shifting the burden of safety from the end-user to the algorithm designer. In this new paradigm, the user defines what is undesirable, and the algorithm guarantees it will not occur with high probability.
The Seldonian Framework
The core contribution is the Seldonian Optimization Problem (SOP). Unlike standard optimization that seeks optimal parameters, an SOP searches for the best algorithm that satisfies probabilistic constraints: $\text{Pr}(g(a(D)) \leq 0) \geq 1 - \delta$, where $g$ represents undesirable behavior and $\delta$ is the allowed failure rate.
Key components include:
- Safety Test: The algorithm partitions data to find a candidate solution and then runs a rigorous safety test on the remaining data.
- No Solution Found (NSF): If the algorithm cannot guarantee safety with the available data, it returns "NSF" rather than a risky prediction. This "honesty" is a fundamental shift from traditional ML.
As shown in Figure 5, the Seldonian approach maintains a near-zero probability of safety violations (Panel A) even with limited data. As the amount of data increases, the probability of the algorithm returning a valid solution (Panel B) rises, and its performance (Panels C, D) converges toward the optimal.
Experimental Results
The framework was validated across three domains: synthetic regression, Brazilian university GPA prediction, and a diabetes metabolic simulator.
Fairness in Education
Using a dataset of over 43,000 students, the authors tasked models with predicting GPAs while ensuring no systematic under-prediction for female students. Standard models like Neural Networks and Random Forests exhibited significant bias. In contrast, the Seldonian regression (QNDLR) successfully bounded this bias within user-defined limits.
Figure 1 illustrates how standard approaches (LR, ANN, RF) produce large disparities in prediction error between genders, whereas the new Seldonian approach (QNDLR) keeps errors within the specified $\pm \epsilon/2$ bounds.
Safe Medical Treatment
In a Type 1 diabetes simulator, standard reinforcement learning often proposed aggressive insulin policies that increased the risk of life-threatening hypoglycemia. The Seldonian RL algorithm never returned a policy that increased this risk, safely improving treatment outcomes with just a few months of simulated data.
Conclusion and Future Work
The Seldonian framework demonstrates that safety and fairness can be treated as primary features rather than afterthoughts. While these models can be data-hungry and computationally expensive, they provide a necessary path forward for deploying AI in high-stakes environments. Future research will focus on improving data efficiency and expanding the framework to online learning scenarios.
Summary updated