TL;DR
LEX (Lightweight Runtime EXplainability) is a new post-hoc framework that provides input-specific confidence intervals for machine learning models used in system resource management. By clustering input embeddings with a Gaussian Mixture Model, LEX identifies when a model is likely to encounter out-of-distribution (OOD) data, delivering ~17% tighter error bounds and a 94% containment rate compared to traditional global baselines.
What Problem Does This Paper Address?
Machine learning (ML) has become a powerhouse for system-level resource management (RM), helping processors decide when to scale frequency (DVFS) or how to forecast workload behavior. However, these models face a "silent failure" problem: when they encounter out-of-distribution (OOD) data—workload phases they didn't see during training—their predictions can become catastrophically inaccurate.
Current solutions typically rely on a single "global" error margin (like the 90th percentile error across the whole training set). This approach is flawed. It’s often too pessimistic for "easy" inputs (wasting performance) and too optimistic for "hard" OOD inputs, failing to signal when a prediction shouldn't be trusted. As shown in the paper's motivational example, global thresholds frequently fail to capture the wide spread of errors across different applications.
Methods
The authors propose LEX, a post-hoc framework, meaning it can be added to existing pre-trained models without needing to retrain them. LEX works in two main phases:
- Design-Time:
- Embedding Extraction: LEX uses an encoder (often the internal layers of the target model itself) to map high-dimensional performance counters (PMCs) into a lower-dimensional "embedding space."
- Clustering: It fits a Gaussian Mixture Model (GMM) to these embeddings. This groups similar execution phases together.
- Error Profiling: For each cluster, LEX calculates a specific error bound (e.g., the 90th percentile MAPE) based on how the model performed on training data within that cluster.
- Runtime:
- When a new input arrives, LEX encodes it and finds its most probable GMM cluster.
- It retrieves the pre-calculated error bound for that specific cluster.
- It outputs a confidence interval ($\hat{y} \pm \text{margin}$). If the margin is too high, the system can trigger a safe fallback policy instead of relying on a potentially "catastrophic" ML prediction.
Datasets
The researchers evaluated LEX using a state-of-the-art LSTM-based IPS (Instructions Per Second) forecasting model on an Intel Alder Lake processor (a hybrid architecture with Performance and Efficiency cores).
- Training/Initial Evaluation: 34 benchmark applications from the PARSEC and SPLASH-2 suites.
- Generalization Testing: The SPEC CPU2006 benchmark suite was used as an entirely unseen "OOD" workload to test how well LEX performs on applications it never encountered during design.
Key Insights and Ideas
- Model failure is not random: By analyzing Kernel Density Estimates (KDE), the authors found that OOD failures occur on structurally distinct subsets of inputs. You can't just look at one feature to find them; you need to look at the joint representation of all features.
- Embeddings capture hardware context: The learned embeddings naturally cluster by core type (P-core vs. E-core). This proves the model is internally "aware" of the microarchitectural differences, which LEX leverages to provide better confidence signals.
- Behavioral Entropy as a Proxy: Applications with high "behavioral entropy"—those that cycle rapidly through many different execution phases—are inherently harder to predict. LEX uses cluster membership to quantify this difficulty dynamically.
Key Results
- High Reliability: LEX achieved a ~94% containment rate, meaning the actual value fell within the predicted confidence interval 94% of the time, even on unseen workloads.
- Tighter Bounds: Compared to a "global max" baseline (the most common way to ensure safety), LEX provided confidence intervals that were ~17% tighter on average. In some cases, the bounds were up to 10x tighter for confident predictions.
- Low Overhead: Because it uses a lightweight GMM lookup, LEX adds negligible runtime overhead, making it practical for real-time system management.
- Cross-Suite Generalization: When trained on PARSEC/SPLASH-2 and tested on SPEC CPU2006, LEX maintained a 93-95% containment rate, proving its robustness.
Limitations and Future Work
The authors note that "diffuse" applications—those that don't stay within well-defined clusters (like canneal or namd)—remain a challenge. Because these applications spread across many clusters with low occupancy, the model struggles to find a "confident" anchor, leading to wider error bounds.
Future work could involve exploring more complex clustering techniques or integrating LEX directly into the training loop (rather than post-hoc) to see if the model can learn to be "uncertainty-aware" from the start. Not discussed in the paper is how LEX might handle rapid hardware state changes (like thermal throttling) that aren't captured in the initial training distribution.
Summary updated