iSAGE: An Incremental Version of SAGE for Online Explanation on Data Streams

Maximilian Muschalik, Fabian Fumagalli, Barbara Hammer, Eyke Hüllermeier · DOI

Introduction

In modern machine learning applications—ranging from credit scoring and network intrusion detection to real-time sensor monitoring—data is rarely static. Instead, it arrives in continuous streams, often subject to concept drift, where the underlying statistical properties of the data change over time. While models in these environments are frequently updated incrementally, our ability to explain their behavior has lagged behind. Traditional Explainable AI (XAI) tools, such as SAGE (Shapley Additive Global Importance), are designed for batch processing. Applying them to streams is computationally prohibitive and often results in "stale" explanations that fail to capture rapid shifts in model logic.

To bridge this gap, this paper introduces iSAGE, an incremental version of the SAGE algorithm designed specifically for online explanation on data streams. iSAGE provides a mathematically rigorous, time-efficient, and memory-efficient way to monitor feature importance in real-time.

The Problem: Static Explanations in a Dynamic World

In a batch setting, feature importance is typically calculated once on a fixed dataset. However, in a streaming context, a model's behavior is a moving target. If an explainer is too slow, it acts like a long-exposure camera trying to capture a high-speed event: the resulting explanation is a "blurry" average of past and present states. Re-running batch explainers periodically is a common workaround, but it is often too slow to react to sudden changes and requires significant computational overhead.

The iSAGE Method

iSAGE addresses these challenges by replacing batch calculations with a recursive update rule. The algorithm is built on three core pillars:

1. Exponential Smoothing

Instead of recalculating importance from scratch for every new data point, iSAGE updates current scores using a weighted average of the incoming sample and the previous estimate. This approach allows the algorithm to "forget" outdated information and prioritize the most recent model behavior, making it highly reactive to concept drift.

2. Interventional vs. Observational Explanations

Calculating Shapley values requires "removing" features to observe the model's reaction. iSAGE provides two distinct methods for this in a streaming context:

  • Interventional iSAGE: This method breaks dependencies between features to isolate the model's internal logic. It utilizes a geometric reservoir to sample recent data points efficiently.
  • Observational iSAGE: This method respects the natural correlations between features. It employs Hoeffding Adaptive Trees (HATs)—specialized streaming decision trees—to estimate the likely values of "missing" features based on the current data distribution.

3. Theoretical Convergence

The authors provide a theoretical foundation for iSAGE, proving that in a stable environment (where no drift occurs), the incremental estimates eventually converge to the same values as the original batch SAGE algorithm.

Experimental Evaluation

The researchers evaluated iSAGE using a combination of real-world and synthetic benchmarks:

  • Real-world Streams: Datasets included elec2 (electricity pricing), adult (census income), bank (marketing), california (housing), and bike (rental counts).
  • Synthetic Streams: agrawal and stagger datasets were used to simulate controlled instances of concept drift.
  • Fault Detection: A simulated water sensor network (L-Town) demonstrated iSAGE's utility as a diagnostic tool for identifying malfunctioning hardware in real-time.

Key Insights and Results

Superior Accuracy and Reactivity

In synthetic tests featuring frequent concept drift, iSAGE achieved a significantly lower Mean Squared Error (MSE) compared to traditional "Sliding Window" baselines. Remarkably, iSAGE outperformed these baselines even when the sliding window was granted 20 times more computational power, proving that incremental updates are fundamentally more efficient for tracking change.

Real-time Feature Tracking

On the elec2 dataset, iSAGE successfully identified the emergence of the vicprice feature as a key predictor. This feature only becomes relevant after 20,000 samples; while static or slow-moving methods would have averaged this importance away, iSAGE tracked its rise in real-time.

XAI as a Diagnostic Monitor

The paper demonstrates that iSAGE is more than just an explanation tool—it is a monitoring system. In the L-Town sensor experiment, a sudden spike in a specific feature's importance score served as an immediate signal of a sensor fault, allowing for faster intervention than traditional error-based monitoring.

Limitations and Future Work

While iSAGE represents a significant step forward for streaming XAI, several challenges remain:

  • Feature Interactions: The current implementation focuses on individual feature importance and does not yet explicitly decompose complex interactions between features in a stream.
  • High-Dimensional Scaling: Although efficient, calculating Shapley values remains computationally intensive. Scaling iSAGE to datasets with thousands of features is an ongoing area of research.
  • Human Factors: Further study is needed to understand how human operators interpret and act upon "moving" explanations in high-stakes, real-time environments.

Conclusion

iSAGE provides a robust framework for bringing global feature importance to the world of data streams. By combining exponential smoothing with efficient streaming data structures, it offers a way to keep explanations as dynamic as the models they describe, ensuring that XAI remains relevant in fast-paced, real-world production environments.

Summary updated

BibTeX
@inproceedings{muschalik2023isage,
  author = {Maximilian Muschalik and Fabian Fumagalli and Barbara Hammer and Eyke Hüllermeier},
  title = {{iSAGE: An Incremental Version of SAGE for Online Explanation on Data Streams}},
  booktitle = {ECML/PKDD},
  year = {2023},
  url = {https://openreview.net/forum?id=YIN_e0C7OwP},
}
Figure