Abstract
This work introduces the Supervised Expectation-Maximization Framework (SEMF), a versatile and model-agnostic approach for generating prediction intervals with any ML model. SEMF extends the Expectation-Maximization algorithm, traditionally used in unsupervised learning, to a supervised context, leveraging latent variable modeling for uncertainty estimation. Through extensive empirical evaluation of diverse simulated distributions and 11 real-world tabular datasets, SEMF consistently produces narrower prediction intervals while maintaining the desired coverage probability, outperforming traditional quantile regression methods. Furthermore, without using the quantile (pinball) loss, SEMF allows point predictors, including gradient-boosted trees and neural networks, to be calibrated with conformal quantile regression. The results indicate that SEMF enhances uncertainty quantification under diverse data distributions and is particularly effective for models that otherwise struggle with inherent uncertainty representation.
1. Introduction
Most machine learning models are designed for point estimation: they provide a single predicted value but lack a measure of confidence. In high-stakes fields like healthcare or autonomous systems, knowing the range of possible outcomes—the prediction interval—is as critical as the prediction itself.
Existing methods, such as Quantile Regression, rely on the "pinball loss" to estimate specific bounds. However, these methods can struggle with complex data distributions or models that do not naturally represent uncertainty, such as Gradient Boosted Trees. The Supervised Expectation-Maximization Framework (SEMF) addresses this gap by providing a versatile framework that transforms any point predictor into a robust interval predictor without sacrificing accuracy or reliability.
2. Methodology
2.1 Latent Variable Modeling and Architecture
SEMF treats the relationship between inputs ($x$) and outputs ($y$) as a latent variable problem. It assumes a hidden "latent" state ($z$) captures the underlying structure of the data. The framework employs an encoder-decoder architecture where an encoder model maps inputs to this latent space, and a decoder model maps the latent space to the final output.
As shown in Figure 1, the process involves encoding multiple inputs $x_k$, sampling from the resulting latent distributions, and fusing these samples before decoding them into prediction intervals and point estimates. Unlike Variational Auto-Encoders (VAEs) that optimize an Evidence Lower Bound (ELBO), SEMF uses the EM algorithm to maximize the likelihood directly. It utilizes Monte Carlo (MC) sampling in the "E-step" to estimate the distribution of latent variables and an "M-step" to update model parameters.
2.2 Inference and Calibration
The inference process for a single test example is detailed in Algorithm 2. It involves simulating multiple samples from the encoders to build a representative latent distribution, which is then used for both point and interval prediction.
To ensure the intervals are mathematically valid (e.g., a 95% interval actually contains the ground truth 95% of the time), the framework is wrapped in Conformal Quantile Regression (CQR). This calibration step ensures reliability across different model types, including MultiXGBs (XGBoost), MultiETs (Extremely Randomized Trees), and MultiMLPs (Neural Networks).
3. Experimental Evaluation
The authors evaluated SEMF using both synthetic and real-world benchmarks:
- Synthetic Data: 1,000 observations with two predictors using cosine and quadratic functions. Four distinct noise types (Normal, Uniform, Log-normal, and Gumbel) were tested to evaluate handling of various uncertainty shapes.
- Real-World Benchmarks: 11 tabular datasets from the OpenML-CTR23 suite, including
california_housing,cpu_activity, andnaval_propulsion_plant.
4. Key Results and Insights
- Superior Precision: Across 11 real-world datasets, SEMF variants (particularly MultiXGBs) produced significantly narrower intervals than standard quantile regression baselines while maintaining target coverage.
- Efficiency Gains: Using the Coverage-Width Ratio (CWR) to measure the trade-off between reliability and precision, SEMF showed massive improvements. For instance, on the
naval_propulsion_plantdataset, SEMF improved the CWR by 163% over the XGBoost baseline. - Robustness to Heteroscedasticity: In simulations, SEMF outperformed baselines across all noise distributions, proving particularly effective when noise levels change depending on the input.
- Empowering Tree-Based Models: Tree-based models like XGBoost are typically brittle regarding uncertainty. SEMF provides a structured way to introduce latent representations, leading to substantial improvements in interval quality for these models.
5. Conclusion and Future Work
SEMF demonstrates that adapting the EM algorithm for supervised tasks is a powerful way to model hidden noise and uncertainty. By avoiding variational approximations, it avoids the "approximation gap" often found in VAEs, leading to sharper, more reliable intervals.
Future work will address current limitations, such as the assumption of normality for latent variables and the computational cost associated with iterative EM steps and MC sampling. Additionally, while this study focused on tabular data, the framework's architecture is naturally suited for multi-modal applications (e.g., combining images and text), which remains an open area for exploration.
Summary updated