Abstract
In industrial AI applications, "digital twin" models often monitor complex systems. When a model's prediction deviates significantly from observed reality, identifying the root cause—anomaly attribution—is critical. This paper introduces Likelihood Compensation (LC), a framework that treats anomaly attribution as a statistical inverse problem. By identifying the minimal input "correction" required to align model predictions with observations, LC provides actionable explanations that traditional explainable AI (XAI) methods often miss.
Introduction
Industrial monitoring relies on black-box regression models to predict system behavior. An anomaly occurs when the observed value $y$ differs from the model's prediction $f(x)$. The central question is: which input sensors $x_i$ are responsible for this gap? Standard XAI tools like LIME or Shapley values explain the value of a prediction, but they are fundamentally ill-equipped to explain the deviation from an observed truth.
The Likelihood Compensation Framework
Likelihood Compensation (LC) redefines anomaly attribution. Instead of analyzing the forward flow of inputs to outputs, it asks: How much would each input variable need to change to reconcile the model with the observed truth?
The method introduces a correction vector $\delta$ added to the original input $x$. The objective is to find a $\delta$ that maximizes the likelihood of the observed output $y$ through a Maximum A Posteriori (MAP) formulation:
- Likelihood Term: Minimizes the distance between the corrected prediction $f(x+\delta)$ and the observation $y$.
- Regularization: An "elastic net" penalty (L1 and L2 norms) on $\delta$ ensures explanations are sparse (blaming few variables) and stable.
Since industrial models are often black boxes, LC employs a local sampling-based procedure to estimate gradients and local variance ($\sigma^2$), allowing for iterative optimization without internal model access.
Key Insights: Horizontal vs. Vertical Deviation
A critical distinction of LC is its focus on "horizontal" deviation. While standard methods like LIME measure "vertical" sensitivity—how the output changes with a nudge to the input—LC measures the distance the input must travel to reach a "normal" state on the model's surface.
Mathematically, the authors prove that LIME-based explanations are invariant to the actual observed value $y$. This means LIME provides the same explanation whether the model's error is negligible or massive, rendering it ineffective for true anomaly attribution. In contrast, LC's corrections are expressed in the same units as the input features, making them directly actionable (e.g., "The temperature sensor is likely reading 5 degrees too high").
Experimental Results
The authors validated LC across synthetic and real-world datasets.
Synthetic "Mexican Hat" Function
On a 2D non-monotonic function, LC was uniquely capable of distinguishing between over-prediction and under-prediction. As shown in the comparison below, traditional methods like Z-score and LIME+ often produce identical or ambiguous results across different anomaly scenarios, whereas LC correctly identifies the direction and magnitude of the necessary correction.
Real-World Building Energy Management
In a study of an office building's energy usage, LC successfully identified anomalies that other methods missed. On a specific day (October 19th), the model predicted high energy usage, but actual usage was low. While other methods showed generic patterns, LC specifically flagged "time of day" and "day type" variables. It was later confirmed that this day was a national holiday in India; the model, lacking a holiday calendar, failed to account for the empty building.
Conclusion
Likelihood Compensation offers a robust, model-agnostic approach to anomaly attribution. By shifting the focus from explaining predictions to explaining deviations, it provides industrial operators with the actionable insights needed to diagnose sensor failures or environmental shifts. Future work includes extending the framework to handle probabilistic models and reducing sensitivity to regularization hyperparameters.
Summary updated