Temporal-Conditioned Normalizing Flows for Multivariate Time Series Anomaly Detection

David Baumgartner, Helge Langseth, Kenth Engø-Monsen, Heri Ramampiaro · 2026

Read Temporal-Conditioned Normalizing Flows for Multivariate Time Series Anomaly Detection by David Baumgartner, Helge Langseth, Kenth Engø-Monsen, Heri Ramampiaro (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-09490.txt.

Introduction

David Baumgartner and colleagues detect anomalies in multivariate time series with normalizing flows that are conditioned on the recent past. The flow learns a full distribution over what should come next, so odd events stand out as low-probability ones. This autoregressive design captures temporal structure and uncertainty at once. On diverse datasets it shows good accuracy and robustness against prior methods, with open code and a clear account of strengths and limits.

Catalog record

CREATORDavid Baumgartner, Helge Langseth, Kenth Engø-Monsen, Heri Ramampiaro
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE51413
LICENSEhttp://creativecommons.org/licenses/by-sa/4.0/
RIGHTSCC BY SA
SOURCEarXiv

Source: https://arxiv.org/abs/2603.09490

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Temporal-Conditioned Normalizing Flows for Multivariate Time Series Anomaly Detection David Baumgartner, Helge Langseth, Kenth Engø-Monsen, Heri Ramampiaro Abstract This paper introduces temporal-conditioned normalizing flows (tcNF), a novel framework that addresses anomaly detection in time series data with accurate modeling of temporal dependencies and uncertainty. By conditioning normalizing flows on previous observations, tcNF effectively captures complex temporal dynamics and generates accurate probability distributions of expected behavior. This autoregressive approach enables robust anomaly detection by identifying low-probability events within the learned distribution. We evaluate tcNF on diverse datasets, demonstrating good accuracy and robustness compared to existing methods. A comprehensive analysis of strengths and limitations and open-source code is provided to facilitate reproducibility and future research. keywords Machine Learning, Generative Model, Time Series, Anomaly Detection 1 Introduction The increasing reliance on complex interconnected systems, from financial markets to industrial control systems, has made the detection of anomalous behavior more critical than ever 4 ; 38 . Undetected and unhandled anomalies can lead to significant financial losses, system failures, and, in extreme cases, safety hazards. Identifying unusual patterns in vast amounts of multivariate time series data generated by these systems presents a significant challenge, requiring robust methods that are able to capture complex temporal dependencies and account for inherent uncertainties. A crucial aspect is the inherent interdependence between individual time series 36 . As an example, when modeling the production-demand balance within a power grid, it is essential to consider not just the grid’s past performance but also connected grids and other relevant measurements, as these can contribute to power spikes or, in severe cases, blackouts. To illustrate further, consider a production line within a network of processing steps using sensor data. A disturbance in one processing step will have repercussions on the sensor readings of neighboring processing steps, an effect that a univariate model would likely fail to capture. Therefore, to provide accurate anomaly detection, the models must account for these dependencies. So, what is anomaly detection? Among many definitions of anomaly detection available in the literature, we adopt the one provided in 4 , referring to anomaly detection as “the problem of finding patterns in data that do not conform to expected or normal behavior” . This definition is operational in that it suggests first to establish a model or a representation originating from “expected or normal behavior” and then to compare new data points with this gold standard. More importantly, it accounts for the need for robust methods for complex time series data, as mentioned above. To address the challenges of anomaly detection in complex time series, we employ normalizing flows 24 , a powerful class of generative models capable of learning complex probability distributions. By training a normalizing flow on normal data, we can efficiently compute the log-likelihood of new data points, enabling us to identify anomalies as low-likelihood observations. Crucially, we leverage the ability to condition normalizing flows to capture temporal dependencies within the time series. In summary, our main contributions are as follows. • We propose temporal-conditioned normalizing flows (tcNF), a novel probabilistic anomaly detection framework that explicitly models temporal dependencies in time series data. Our framework offers enhanced accuracy and robustness compared to existing methods. • We suggest a framework using unsupervised learning, but can still use labels in selecting good solution candidates if available. The different complexity levels of the methods further provide insights into the model complexity necessary for a given sequence. • We perform a thorough comparison with state-of-the-art methods using two synthetic benchmark suites (mTADS 2 ) and five real-world datasets. Our evaluation reveals that our framework achieves competitive performance in many scenarios, while also exposing specific challenging sequence patterns. • We provide a repository with code, test configurations, and full result tables to reproduce, extend or integrate our framework. The rest of this paper is organized as follows. Sec. 2 introduces normalizing flows and the foundation of conditioned coupling layers. Sec. 3 discusses recent developments related to conditioning or anomaly detection with normalizing flows. Sec. 4 covers temporal-conditioned coupling layers in the context of time series data. Sec. 5 describes the experiment, the datasets, and the evaluation, including the results for each dataset suite. Finally, Sec. 6 concludes the paper and outlines possible future work. 2 Background and Preliminaries 2.1 Normalizing Flows In the context of generative modeling, normalizing flows offer a powerful technique for density estimation 24 . The fundamental principle behind normalizing flows is to transform samples from a simple, well-defined distribution, such as a standard normal distribution, into a complex, unknown probability distribution. This transformation is learned through a series of invertible mappings, which allows for both evaluating the likelihood of observed data and generating new samples from the learned distribution. 24 define normalizing flows as a method that creates complex probability distributions p_{\boldsymbol{X}} by passing random variables \boldsymbol{u}\in\mathbb{R}^{D} , drawn from a simple base distribution p_{\boldsymbol{U}} , commonly a Gaussian distribution, through N nonlinear but invertible transformations (bijections). Even with a simple base distribution, a sufficiently flexible transformation \boldsymbol{F} can produce a complex distribution for the transformed variable \boldsymbol{x} . To achieve such a transformation, normalizing flows commonly combine a sequence of simpler transformations: \boldsymbol{x}=\boldsymbol{F}(\boldsymbol{u})=\boldsymbol{f}_{N}\left(\boldsymbol{f}_{N-1}\left(\cdots\boldsymbol{f}_{2}\left(\boldsymbol{f}_{1}(\boldsymbol{u})\right)\right)\right), (1) where \boldsymbol{u}\sim p_{\boldsymbol{U}} . The forward propagation draws \boldsymbol{u} from p_{\boldsymbol{U}} and computes \boldsymbol{x}=\boldsymbol{F}(\boldsymbol{u}) . The inverse function \boldsymbol{u}=\boldsymbol{G}(\boldsymbol{x})=\boldsymbol{F}^{-1}(\boldsymbol{x}) , maps \boldsymbol{x} back to the base distribution, effectively normalizing the data distribution. When setting N=1 for simplicity, the change-of-variables formula gives p_{\boldsymbol{X}}(\boldsymbol{x})=p_{\boldsymbol{U}}(\boldsymbol{g}(\boldsymbol{x}))|\det\mathbf{J}(\boldsymbol{g})(\boldsymbol{x})|=p_{\boldsymbol{U}}(\boldsymbol{u})|\det\mathbf{J}(\boldsymbol{f})(\boldsymbol{u})|^{-1}, (2) where \mathbf{J}(\boldsymbol{g})(\boldsymbol{x})=\frac{\partial\boldsymbol{g}}{\partial\boldsymbol{x}}|_{\boldsymbol{x}} is the Jacobian matrix of \boldsymbol{g}=\boldsymbol{f}^{-1} evaluated at \boldsymbol{x} . This generalizes directly to N>1 . Taking the \log on both sides and for multiple transformations results in \log p_{\boldsymbol{X}}(\boldsymbol{x})=\log p_{\boldsymbol{U}}(\boldsymbol{G}(\boldsymbol{x}))+\sum_{i=1}^{N}\log|\det\mathbf{J}(\boldsymbol{g}_{i})(\boldsymbol{x}_{i})|, (3) where \boldsymbol{x}_{i}=\boldsymbol{g}_{i}\left(\cdots\boldsymbol{g}_{1}\left(\boldsymbol{x}\right)\right) is the i -th intermediate output of the sequences of inverted transformations. The Jacobian determinant in Eq. 3 of the transformation function \boldsymbol{g}_{i} is a central point in each transformation. Hence, a well-designed \boldsymbol{g}_{i} ensures efficient computation and evaluation, commonly resulting in a lower triangular Jacobian, for which the determinant is comparatively efficient. Building on the introduced concepts, we can efficiently evaluate the log density of \log p_{\boldsymbol{X}}(\boldsymbol{x}) . Thus, a normalizing flow is generative where we can both efficiently generate new data (Eq. 1 ) and calculate the log-likelihood of any data point (Eq. 3 ). This contests other popular generative models like diffusion, which do not provide an exact calculation of likelihoods. 2.2 Coupling Layer Figure 1: Forward propagation of one coupling layer from the base distribution to the data distribution. Coupling layers were outlined by 8 as the transformation in a normalizing flow, which models dependencies between dimensions using non-linear functions. In general a coupling layer partitions the input \boldsymbol{x} into two subspaces, (\boldsymbol{x}^{1:d},\boldsymbol{x}^{d+1:D})\in\mathbb{R}^{d}\times\mathbb{R}^{D-d} , where d\in\{1,2,\cdots,D-1\} . The output \boldsymbol{u} is equally partitioned as (\boldsymbol{u}^{1:d},\boldsymbol{u}^{d+1:D})\in\mathbb{R}^{d}\times\mathbb{R}^{D-d} . Each coupling layer contains a transformation function \boldsymbol{h}(\cdot,\boldsymbol{\theta}):\mathbb{R}^{d}\rightarrow\mathbb{R}^{D-d} , which is parameterized by a conditioner function \boldsymbol{\theta}=\Theta(\boldsymbol{u}^{1:d}) . Those functions define the basics of one coupling layer \boldsymbol{f}_{i}:\mathbb{R}^{D}\rightarrow\mathbb{R}^{D} in a chain of transformations as \begin{split}\boldsymbol{x}^{1:d}&=\boldsymbol{u}^{1:d}\\ \boldsymbol{x}^{d+1:D}&=\boldsymbol{h}(\boldsymbol{u}^{d+1:D},\Theta(\boldsymbol{u}^{1:d})).\end{split} (4) This couples \boldsymbol{u}^{1:d} into \boldsymbol{u}^{d+1:D} through the functions \boldsymbol{h}(\cdot) and the conditioner \Theta(\cdot) . An affine coupling layer is characterized as \boldsymbol{x}^{d+1:D}=\boldsymbol{h}(\boldsymbol{u}^{d+1:D},\Theta(\boldsymbol{u}^{1:d}))=\boldsymbol{u}^{d+1:D}\odot\exp(\boldsymbol{s})+\boldsymbol{t}, (5) where (\boldsymbol{s},\boldsymbol{t})=\boldsymbol{\theta}=\Theta(\boldsymbol{u}^{1:d})\in(\mathbb{R}^{D-d},\mathbb{R}^{D-d}) provide scale and translation respectively, and \odot is the Hadamard product, see Fig. 1 . The conditioner function \Theta(\cdot) is typically

Read the complete text