Table of Contents
Fetching ...

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

David Baumgartner, Eliezer de Souza da Silva, Iñigo Urteaga

TL;DR

This work relocations the notion of anomaly to a prescribed latent space, and introduces 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.

Abstract

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.

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

TL;DR

This work relocations the notion of anomaly to a prescribed latent space, and introduces 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.

Abstract

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.
Paper Structure (26 sections, 5 equations, 4 figures, 11 tables)

This paper contains 26 sections, 5 equations, 4 figures, 11 tables.

Figures (4)

  • Figure 1: Anomaly detection comparison between the proposed moel when using NLL scores and proposed GOF test. (Top) The input sequence, contaminated with amplitude and frequency modifications (in shared regions). (Middle) Heatmap of the continuous and thresholded NLL (threshold set to the maximum NLL value in training): NLL-based scores fail to detect amplitude changes. (Bottom) The MV-KS score heatmap, showing successful detection of the modified sections. As detailed in \ref{['tab:synthetic_res_table']}, our approach outperforms the NLL baseline across various metrics, highlighted by a $7\%$ improvement in the affiliation F1 score.
  • Figure 2: Sensitivity of the latent space GOF to input data variations. (3D Plot) The test range, where the color gradient encodes the relative difference in MVN-KS values compared to the baseline training sequence at the center. Points with a red border remain below the critical threshold, despite having higher MVN-KS values than the training baseline. (2x2 Scatter Plot) Visualizes the $\tilde{{\bm{z}}_t}$ latent space for the training sequence and three modified test cases (blue borders). Overall, the reported MVN-KS values indicate that greater deviations from the training sequences lead to more pronounced violations of the GOF criteria.
  • Figure 3: Example of 3 different CNF configurations and their impact on the $\tilde{{\bm{z}}_t}$ latent space. The first column shows a well-fitting and trustworthy model. The remaining columns show two models with too many layers or too much temporal context. A version including the $\boldsymbol{\mu_t}$ space is in \ref{['axssec:wrong_capacty']}.
  • Figure 4: Example of 3 different CNF configurations and their impact on the $\tilde{{\bm{z}}_t}$ latent space. Row one contains the training sequence. Rows 2 and 3 contain the LG-LDM across all 4 dimensions. Rows 4 and 5 contain the $\tilde{{\bm{z}}_t}$ space for all 4 dimensions. The first column shows an expected fit of a Gaussian behavior. The other two columns contain CNF results with too many layers or too much temporal context. Row 4 includes in the title each model's MVN-KS value.