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 · 2026
Read Anomaly detection in time-series via inductive biases in the latent space of conditional normalizing flows by David Baumgartner, Eliezer de Souza da Silva, Iñigo Urteaga (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-11756.txt.
Introduction
Baumgartner, de Souza da Silva, and Urteaga move anomaly detection for time series into the latent space of normalizing flows. Standard deep models train on raw likelihood, which rewards density, not true temporal fit. Odd or out-of-distribution samples can then score high by mistake. Their fix prescribes latent dynamics inside a discrete-time state-space frame. Expected behavior means compliance with that latent path law. Detection becomes a goodness-of-fit test on the latent path, which stays sharp even where raw likelihood runs high.
Catalog record
| CREATOR | David Baumgartner, Eliezer de Souza da Silva, Iñigo Urteaga |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 47782 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2603.11756
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
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 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. 1 Introduction Anomaly detection (AD), also known as outlier or novelty detection, is a fundamental problem in signal processing and machine learning with applications ranging from fraud detection and predictive maintenance to medical imaging and network security [ 5 , 21 ] . Anomaly detection for time-series have temporal dependence that introduces additional complexity, requiring methods that distinguish structured deviations from expected dynamics [ 24 ] . Classical AD typically relies on hand crafted anomaly scores, such as reconstruction error, distance to cluster centers, or density estimates, which must be converted into binary decisions via manually chosen thresholds. In practice, these thresholds are often tuned using labeled examples of anomalous behavior or extensive domain expertise, which can be costly, brittle across domains, and difficult to justify statistically when anomalies are inherently rare and heterogeneous [ 5 ] . In many realistic settings, annotated anomalies are scarce or unavailable, whereas large amounts of data describing expected behavior can be collected at low cost. This motivates unsupervised anomaly detection, where the learning algorithm is trained on data representing expected behavior and must infer deviations without explicit supervision [ 21 ] . In this setup, the objective is to learn an inherent notion of what constitutes expected behavior directly from data, so that deviations from this learned notion can be flagged as anomalies. Formally, we posit a parametric generative model with density p_{\theta}{\left({\bm{x}}\right)} encoding the expected behavior into a region of the data space with a well defined statistical distribution p_{\theta}{\left(\cdot\right)} , with samples outside of that region regarded as out-of-distribution (OOD) or anomalous. With this probabilistic framework, anomalies can be scored via quantities intrinsic to the generative model, such as likelihoods, reconstruction-based discrepancies, or hybrid criteria that combine data and latent-space representations. Crucially, this also allows us to develop an approach for AD using goodness-of-fit (GOF) statistical tests. Modern deep generative models (DPMs) provide flexible parametric families for approximating complex data distributions and have become popular building blocks for probabilistic modeling [ 10 , 13 ] . Recent studies demonstrate the effectiveness of and interest in unsupervised DPMs for AD across domains [ 19 , 27 , 3 ] . However, these models are not free of pitfalls: recent work on OOD detection has revealed that deep generative models can behave counterintuitively [ 25 , 14 ] , sometimes assigning higher likelihoods to OOD inputs than to in-distribution data. Notably, 17 cautioned us against the naive use of negative log-likelihood (NLL) as a proxy for typicality , highlighting the importance of appropriate inductive biases and model diagnostics for AD [ 29 ] . These shortcomings reveal a need for generative models that not only fit the nominal data distribution well, but also induce a robust and interpretable separation between expected and unexpected patterns. As argued by 14 , likelihood-based training alone does not provide an inherent notion of unexpected behavior, and that such distinctions must arise from explicit structural inductive biases encoded in the model. In this work, we propose an unsupervised, state-space probabilistic framework for time-series data and study how inductive biases in representation-space can overcome some of these limitations. Specifically, we define a normalizing-flow-based DPM with explicit inductive biases to capture the expected behavior of data via latent, prescribed dynamics. Conditioned on a successful training procedure, the framework provides an inherent (statistical) definition of expected (in-distribution) versus anomalous (out-of-distribution) behavior, enabling unsupervised anomaly detection. Our contributions include: • A state-space deep generative model that couples a conditional normalizing flow with explicit (e.g., linear-Gaussian) latent dynamics, constraining observations to map to a temporally coherent, latent trajectories of prescribed density. • A statistically principled, unsupervised (i.e., label- and threshold-free) anomaly detector based on a goodness-of-fit (e.g., a multivariate Kolmogorov-Smirnov) test in latent space, capable of identifying anomalies even in high-density regions of the DPM. • A built-in, compliance diagnostic to identify when the DPM training procedure is successful in enforcing the prescribed inductive bias, explicitly signaling when the unsupervised AD procedure is ready for testing. • Showcasing empirically ( i ) the in-distribution AD issues with negative log-likelihood-based scores, ( ii ) the robustness and detection accuracy of the proposed framework, and ( iii ) its successful performance in-par with established baselines on real-data AD scenarios. 2 Background and Related Work We provide the necessary background on AD and normalizing flows, situating our work within the existing literature. Anomaly, outlier, and OOD detection all aim to identify patterns in data that deviate from expected behavior [ 23 , 5 ] . Deep generative models have been widely explored across this and other domains over the last few years [ 19 , 27 , 3 ] . Specifically, time-series anomaly detection (TSAD) deals with connected and ordered data points over time, which yields additional AD challenges. 24 provide a good overview of the complexities inherent in TSAD and the existing approaches to addressing it. 26 further highlight metrics used in this domain and point out issues that make fair comparisons across methods difficult. VAE based DPM methods for AD often use reconstruction probability or related likelihood surrogates as anomaly scores, enabling a more principled interpretation than ad hoc error thresholds [ 28 ] . Similarly, GAN-based approaches such as TadGAN [ 9 ] or USAD [ 2 ] employ sequence-to-sequence generators and critics to reconstruct time-series, deriving anomaly scores from reconstruction residuals and critic responses, highlighting anomalous segments rather than isolated point outliers. Normalizing flows (NF) are generative probabilistic models that learn a bijective transformation that maps the data to a known distribution [ 20 ] . These models enable both model fitting and sample generation; i.e., NFs can efficiently compute the log-likelihood of observations ( \log p{\left({\bm{x}}\right)} ) and generate new data ( {\bm{x}}\sim\mathrm{F}^{-1}{\left(\mathcal{N}\left(\cdot\right)\right)} ), which requires tractable Jacobian determinants. We denote the normalizing and likelihood of a data point {\bm{x}} as p{\left({\bm{z}}=\mathrm{F}{\left({\bm{x}}\right)}\right)} and the generation of a data point {\bm{x}}=\mathrm{F}^{-1}{\left({\bm{z}}\sim\mathcal{N}\left(\cdot\right)\right)} , where \mathrm{F}{\left(\cdot;\theta\right)} is the NF with parameters \theta which we omit when it is clear from