Multivariate Time Series Anomaly Detection
Why anomalies in systems of many sensors often live in broken relationships rather than in any single channel, the classical and deep detectors built to find them, and why the benchmark evidence for the deep ones is much weaker than their reported scores suggest.
The SWaT water treatment testbed logs 51 sensors and actuators. Suppose an attacker spoofs a valve so it reports open while the downstream flow meter reads as though it were closed. Each reading is inside its normal range; only the pair is impossible. Detectors that watch channels one at a time cannot see this class of anomaly, and it is the class that matters most in industrial control, server fleets and any system whose components are physically or logically coupled.
Relationships, measured classically
Take two sensors standardised to unit variance with correlation \(\rho = 0.9\). The squared Mahalanobis distance of a reading \(z\) is
If both read +1.5, \(D^2 \approx 2.4\): unremarkable. If one reads +1.5 and the other −1.5, \(D^2 = 45\), far beyond the 99.9% point of a \(\chi^2_2\) distribution at 13.8. Neither channel moved more than 1.5 standard deviations. This is Hotelling's \(T^2\) idea, and process-monitoring practice pairs it with PCA: fit principal components on normal operation, then flag either large \(T^2\) within the retained subspace or large squared prediction error off it, the latter catching readings that break the correlation structure.
The classical approach has two limits. It is static, ignoring temporal dynamics unless lagged values are stacked in, and a \(d\)-sensor covariance has \(d(d+1)/2\) parameters, 1,326 for 51 sensors, which strains estimation when normal data is short or regimes shift.
Deep detectors
Deep methods model normal behaviour over windows and score departures, in several families.
Reconstruction with stochastic latents. OmniAnomaly couples a recurrent network with a variational autoencoder, learning a stochastic latent representation of normal multivariate windows and scoring by reconstruction probability. Its authors also released the Server Machine Dataset, now a standard benchmark (Su et al., 2019, Robust Anomaly Detection for Multivariate Time Series through Stochastic Recurrent Neural Network, KDD).
Learned sensor graphs. GDN learns a graph of which sensors depend on which, forecasts each sensor from its neighbours with attention, and scores deviations; the attention weights double as a root-cause hint pointing at the sensors whose relationships broke (Deng & Hooi, 2021, Graph Neural Network-Based Anomaly Detection in Multivariate Time Series, AAAI, arXiv:2106.06947).
Attention patterns as the signal. Anomaly Transformer observes that normal points attend broadly across a series while rare anomalous points attend mostly to their neighbours, and scores the discrepancy between those association patterns (Xu et al., 2022, Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy, ICLR, arXiv:2110.02642).
What the benchmark numbers are worth
The general point-adjustment problem is covered under evaluating anomaly detectors. In the multivariate literature its effect is concrete. Kim et al. scored a uniformly random anomaly score on the standard benchmarks: under point adjustment it reached F1 of 0.969 on SWaT, 0.965 on WADI, 0.931 on MSL and 0.961 on SMAP, above the published methods they compared on all but SMD. Without adjustment the same random score gets 0.216 on SWaT. They also found an untrained, randomly initialised model performing comparably to published methods when adjustment was forbidden (Kim et al., 2022, Towards a Rigorous Evaluation of Time-Series Anomaly Detection, AAAI, arXiv:2109.05257).
The datasets have problems of their own. Wu and Keogh argue that most popular benchmarks suffer from at least one of four flaws, triviality, unrealistic anomaly density, mislabelled ground truth and run-to-failure bias, with many anomalies findable by a one-line rule (Wu & Keogh, 2021, Current Time Series Anomaly Detection Benchmarks are Flawed and are Creating the Illusion of Progress, IEEE TKDE, arXiv:2009.13807).
The most pointed result for this concept comes from Garg et al. Across a grid of 10 models and 4 scoring functions on cyber-physical datasets, a channel-wise univariate fully connected autoencoder with a dynamic Gaussian scoring function beat the state-of-the-art multivariate methods, and the choice of scoring function mattered more than the choice of model (Garg et al., 2022, An Evaluation of Anomaly Detection and Diagnosis in Multivariate Time Series, IEEE TNNLS 33(6), arXiv:2109.11428).
So the field disagrees on something basic. Graph and attention methods claim that inter-sensor structure is where the signal lives; careful re-evaluations find that on current benchmarks, per-channel models with good post-processing do as well or better. Both can be true if the benchmarks mostly contain anomalies visible in single channels, which is what Wu and Keogh's triviality critique predicts.
When it breaks
Normal changes break the learned relationships. A maintenance event, a new deployment or a seasonal load pattern changes correlations legitimately, and every relationship-based detector alerts on it. Retraining windows and change-aware baselines are operational requirements, not refinements.
Scores need calibration per channel. Channels differ in noise and in how well they are modelled, so raw reconstruction or forecast errors summed across channels are dominated by the noisiest sensors. Normalising errors per channel, which is what the dynamic scoring in Garg et al. does, often matters more than the architecture.
Detection is not diagnosis. Operators need to know which sensors broke the pattern. Attribution from attention weights or per-channel errors is suggestive, and a fault in one sensor often shows up as large errors in the sensors predicted from it.
Report the baselines. A multivariate result without a random score, a per-channel baseline and an unadjusted event-level metric cannot currently be interpreted.
7 flashcards for this concept
Click a card to reveal the answer.