SARAD: Spatial Association-Aware Anomaly Detection and Diagnosis for Multivariate Time Series

Zhihao Dai, Ligang He, Shuanghua Yang, Matthew Leeke

TL;DR

SARAD (Spatial Association-Aware Anomaly Detection) shifts the focus of multivariate time series analysis from temporal sequences to the "spatial" relationships between sensors. By detecting the sudden dissolution of inter-feature associations—a phenomenon the authors call Spatial Association Reduction (SAR)—SARAD achieves state-of-the-art performance in both detecting and diagnosing anomalies in complex industrial systems.

The Problem: Temporal vs. Spatial Focus

In the world of industrial control systems (like power plants or water treatment facilities) and server monitoring, operators deal with multivariate time series: hundreds of sensors and actuators recording data simultaneously.

Traditionally, anomaly detection has been a "temporal" game. Models look at a sequence of data and ask, "Does this value follow what happened a second ago?" However, this temporal-heavy focus ignores a crucial piece of the puzzle: spatial associations. In a healthy system, sensors are physically or logically linked. For example, a valve opening should naturally correlate with a flow meter rising.

When an anomaly occurs—whether it's a mechanical failure or a cyber-attack—these relationships often break. Current temporal-centric models often "dilute" this spatial information, making it harder to pinpoint exactly which sensor is failing (diagnosis) or even to detect the start of a subtle attack.

The SARAD Approach

The authors propose SARAD, which uses a bespoke Transformer architecture to model these inter-feature relationships directly.

  1. Spatial Transformer: Unlike standard Transformers that treat time steps as the sequence, SARAD transposes the data. It treats the features (sensors) as the sequence. The Multi-Head Self-Attention (MHSA) mechanism naturally learns an "association mapping"—essentially a matrix showing how much each sensor relates to every other sensor.
  2. Subseries Division: To see how these relationships change over time without needing massive memory, SARAD splits a time window into two halves. It calculates the associations for the first half and the second half independently.
  3. Dual Autoencoding: SARAD trains two modules simultaneously:
  4. A Data Module (the Transformer) that tries to reconstruct the raw sensor values.
  5. A Progression Module (a 2-layer MLP) that reconstructs the change (progression) in associations between the two subseries.
  6. Joint Criterion: An anomaly score is calculated by combining the reconstruction errors from both the raw data and the association space. This makes the model sensitive to both "weird values" and "broken relationships."

Key Insights: The "SAR" Phenomenon

The most important insight of the paper is that anomalies are inherently disruptive to the structure of a system. A sensor might still be reporting values within a "normal" range, but if it stops correlating with its neighbors, something is wrong.

The authors observed that during anomalies, the association values for the affected features drop significantly—they detach from the rest of the system. They term this Spatial Association Reduction (SAR).

Visualizing Spatial Association Reduction (SAR) during an anomaly.

As shown above, the attention matrix (which maps feature associations) visibly fades and loses structure during the anomalous window. Furthermore, the authors found that this association reduction is most prominent "column-wise" in the attention matrix, representing a specific feature "dropping out" of its role in helping reconstruct other features.

Because the model uses subseries division to capture progression within a single window, it doesn't rely on the strict global ordering of windows. This allows for order-free (shuffled) training, which prevents the model from overfitting to specific temporal cycles and improves generalization.

Key Results

The model was evaluated on four prominent real-world benchmarks: SMD (Server Machine Dataset), PSM (Pooled Server Metrics), SWaT (Secure Water Treatment), and HAI (Hardware-In-the-Loop Augmented ICS).

SARAD demonstrated significant improvements over "temporal-first" baselines like TranAD and Anomaly Transformer:

  • Detection: On the SMD dataset, SARAD improved the VUS-ROC (a robust range-based metric) by 15.51% over the next best model. It also achieved state-of-the-art results on the HAI dataset.
  • Diagnosis: SARAD outperformed baselines in identifying the specific anomalous features, showing a 26.67% improvement in Hit Rate on the SMD dataset compared to TranAD.
  • Efficiency: Despite its complexity, SARAD is highly practical. Training on the largest dataset (HAI) took only 32 minutes, and inference takes less than a millisecond per sample, making it suitable for real-time deployment.

Limitations and Future Work

While highly effective, SARAD has a few limitations:

  • Quadratic Complexity: Because it uses standard Transformer attention, the computational cost grows quadratically ($O(N^2)$) with the number of features ($N$). For systems with thousands of sensors, this could become a bottleneck. The authors suggest exploring hierarchical clustering to mitigate this.
  • Diagnosis Label Scarcity: Many datasets (like SWaT and HAI) only label the start of an attack, not every sensor affected by it. This "incomplete" labeling makes it difficult to fully evaluate diagnostic capabilities.
  • Temporal Aggregation: While SARAD captures spatial relationships brilliantly, more sophisticated ways to aggregate temporal information within the spatial windows could be explored in future iterations.

Summary updated

BibTeX
@inproceedings{dai2024sarad,
  author = {Zhihao Dai and Ligang He and Shuanghua Yang and Matthew Leeke},
  title = {{SARAD: Spatial Association-Aware Anomaly Detection and Diagnosis for Multivariate Time Series}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=gmf5Aj01Hz},
}
Figure