Anomaly detection in time-series via inductive biases in the latent space of conditional normalizing flows

Anomaly detection in time-series via inductive biases in the latent space of conditional normalizing flows
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

Deep generative models for anomaly detection in multivariate time-series are typically trained by maximizing data likelihood. However, likelihood in observation space measures marginal density rather than conformity to structured temporal dynamics, and therefore can assign high probability to anomalous or out-of-distribution samples. We address this structural limitation by relocating the notion of anomaly to a prescribed latent space. We introduce explicit inductive biases in conditional normalizing flows, modeling time-series observations within a discrete-time state-space framework that constrains latent representations to evolve according to prescribed temporal dynamics. Under this formulation, expected behavior corresponds to compliance with a specified distribution over latent trajectories, while anomalies are defined as violations of these dynamics. Anomaly detection is consequently reduced to a statistically grounded compliance test, such that observations are mapped to latent space and evaluated via goodness-of-fit tests against the prescribed latent evolution. This yields a principled decision rule that remains effective even in regions of high observation likelihood. Experiments on synthetic and real-world time-series demonstrate reliable detection of anomalies in frequency, amplitude, and observation noise, while providing interpretable diagnostics of model compliance.


💡 Research Summary

This paper tackles a fundamental flaw in many deep generative approaches to time‑series anomaly detection: they are trained to maximize likelihood in the observation space, which only captures marginal density and ignores the structured temporal dynamics that define normal behavior. Consequently, anomalous or out‑of‑distribution (OOD) sequences can receive high likelihood scores, leading to unreliable detection.

To overcome this, the authors relocate the notion of “anomaly” from the raw observation space to a prescribed latent space and explicitly embed inductive biases about temporal evolution into that space. The core of the method is a conditional normalizing flow (CNF) that maps each observation xₜ to a latent variable zₜ conditioned on a short history Wₜ = {xₜ₋ₖ,…,xₜ₋₁}. The CNF is trained jointly with a latent dynamics model so that the latent representations follow a predefined stochastic process. In the concrete instantiation presented, the latent dynamics are linear‑Gaussian (LG‑LDM): an initial mean μ₀ ∼ N(0,I) evolves deterministically via μₜ₊₁ = A μₜ + b, while the covariance is fixed to the identity. The parameters A and b are learned together with the CNF parameters θ by minimizing the negative log‑likelihood (NLL) of the whole model.

Training can be performed either on the full sequence (sequential loss) or on mini‑batches that respect the Markovian structure, which greatly reduces computational cost for long series. The loss consists of the log‑density of the latent Gaussian (with mean μₜ and covariance Σₜ) plus the sum of log‑determinants of the Jacobians of each CNF layer, exactly as in standard flow training. Crucially, because the latent dynamics are prescribed, the model is forced to embed the expected temporal behavior into the latent trajectories.

After training, two complementary uses of the model arise. First, the same MV‑Kolmogorov‑Smirnov (MV‑KS) goodness‑of‑fit test applied to the latent trajectories of the training data provides a diagnostic: a low KS statistic indicates that the CNF has successfully learned to map normal observations onto trajectories that obey the prescribed dynamics. This statistic can be used as a threshold‑free indicator of training success. Second, for any new sequence, the CNF maps the observations to a latent trajectory, and the MV‑KS test evaluates whether this trajectory is compatible with the target Gaussian distribution defined by the linear‑Gaussian dynamics. If the KS statistic exceeds the critical value (s ≥ τ), the sequence is flagged as anomalous. Because the test operates in latent space, anomalies can be detected even when the observation‑space likelihood is high, directly addressing the failure mode of likelihood‑based detectors.

The authors evaluate the approach on synthetic benchmarks designed to inject frequency shifts, amplitude changes, and increased observation noise, as well as on real‑world datasets from sensor monitoring, finance, and healthcare. Compared against strong baselines—including NLL‑based scoring, VAE reconstruction error, and GAN‑based detectors—the proposed method consistently achieves higher area‑under‑curve (AUC) and F1 scores, while maintaining a low false‑positive rate. Notably, the method remains robust in regions of high observation likelihood where other methods often misclassify.

Beyond detection performance, the paper contributes a principled, label‑free decision rule: anomaly detection is reduced to a statistical compliance test rather than an arbitrary threshold on a learned score. The MV‑KS statistic also serves as an automatic training diagnostic, signaling when the inductive bias has been successfully enforced.

In summary, the work introduces (1) a state‑space deep generative model that couples a conditional normalizing flow with explicit linear‑Gaussian latent dynamics, (2) a non‑parametric, multivariate KS test for latent‑space goodness‑of‑fit that yields a threshold‑free anomaly decision, and (3) a diagnostic mechanism to verify that the model has learned the intended inductive bias. By embedding temporal structure directly into the latent space, the method overcomes the well‑known limitation of likelihood‑only training and provides a statistically sound, interpretable, and effective solution for unsupervised time‑series anomaly detection.


Comments & Academic Discussion

Loading comments...

Leave a Comment