arXiv:2610.25059cs.LGOct 2026

Manuscript Offprint

arXiv:2610.25059

HCFM: Helmholtz Component Flow Matching for Time Series Anomaly Detection

Shyam Sundar Saravanan, Tie Luo, Sanjay Madria

Shyam Sundar Saravanan

Department of Computer Science

Missouri University of Science and Technology

Rolla, MO, USA

ssdmw@mst.edu

Tie Luo

Department of ECE

University of Kentucky

Lexington, KY, USA

t.luo@uky.edu

Sanjay Madria

Department of Computer Science

Missouri University of Science and Technology

Rolla, MO, USA

madrias@mst.edu

Abstract—Flow Matching (FM) is an efficient simulation-free approach for training flow-based generative models, making it a promising foundation for scalable time-series anomaly detection (TSAD). However, standard FM learns a monolithic vector field in which nominal transport and local density-changing behavior are entangled. This creates a central challenge for TSAD; local expansion and contraction carry crucial anomaly-sensitive information, yet isolating this signal requires expensive Jacobian-trace estimation over the entire field. We propose Helmholtz Component Flow Matching (HCFM), an unsupervised TSAD framework that parameterizes the vector field prediction network with separate transport, compression, and residual heads. The transport head is constrained to be divergence-free, so divergence estimation is restricted to the compression head, while a lightweight residual head absorbs the remaining mismatch. This structured parameterization improves scalability and detection performance by separating volume-preserving nominal transport from density-changing compression, yielding cleaner anomaly signals from distinct deviations of nominal behavior. Experiments on large-scale univariate and multivariate TSAD benchmarks show that HCFM consistently improves detection accuracy while maintaining efficient inference compared with 16 baselines. The code is available at https://github.com/TrustAIoT/HCFM_time-series-anomaly/

Index Terms—time series, anomaly detection, generative modeling, flow matching, flow-based anomaly detection, vector-field decomposition, divergence-based scoring.

I. INTRODUCTION

Time-series anomaly detection (TSAD) is commonly formulated as a one-class learning problem: a model is trained on nominal data and later scores future windows according to their deviation from learned normal behavior. This setting arises in industrial monitoring, cyber-physical systems, server telemetry, medical signals, spacecraft data, and other domains where anomalies are rare, costly, and difficult to label. Many deep TSAD methods therefore model nominality through reconstruction error, prediction error, likelihood, or latent-space distance [1]-[5].

A key challenge is that anomalies are not always expressed as large point-level error. Abnormal windows may instead appear through localized structural changes: suppressed variation, abnormal amplitude expansion, distorted morphology, or regime shifts that alter how nearby samples are distributed [6], [7]. Such effects suggest that useful anomaly evidence may lie not only in how far a window is from nominal behavior, but also in how the learned nominal model locally deforms around it. However, most generative TSAD methods collapse these effects into a single reconstruction error, likelihood, or distance score, making it difficult to isolate the specific source of abnormality [5].

Flow Matching (FM) provides an appealing foundation for scalable TSAD. FM learns a vector field that transports samples from a simple base distribution to the data distribution using an efficient simulation-free objective [8]. This gives FM several practical advantages over common generative TSAD approaches: it avoids decoder reconstruction as the sole scoring mechanism, does not require iterative diffusion-style denoising, and does not impose the invertibility constraints of normalizing flows. These properties make FM attractive for efficient generative modeling of nominal time-series windows.

However, standard FM predicts the vector field with a monolithic network, so nominal transport and local density-changing behavior are entangled in a single output. Divergence measures local expansion or contraction of the learned flow, and can therefore reveal anomaly-sensitive deformation around abnormal windows. Yet extracting this signal from standard FM requires estimating the Jacobian trace over the entire predicted field, which is computationally expensive and does not distinguish volume-preserving movement from density-changing behavior. Recent divergence-regularized FM methods, such as Flow Divergence Matching (FDM) [9], recognize the importance of divergence by encouraging the learned field to better match the divergence of the target probability path. Nevertheless, FDM still applies divergence matching to a monolithic field predictor, so nominal transport and local expansion or contraction remain entangled in its output.

We propose Helmholtz Component Flow Matching (HCFM), an unsupervised TSAD framework that parameterizes the FM field prediction with transport, compression, and residual heads. HCFM does not train separate flow models; rather, it predicts a single total vector field through an additive head structure. The transport head is constrained to be divergence-free, encouraging it to represent volume-preserving nominal movement. The compression head captures density-changing behavior through divergence, so divergence estimation is required only for this head rather than for the full predicted field. A lightweight residual head absorbs residual mismatch without dominating the transport and compression heads.

Figure 1 illustrates the key idea. Standard FM uses a monolithic field that entangles nominal transport with local density-changing behavior. HCFM preserves a single final field but structures it into divergence-free transport, density-changing compression, and lightweight residual components. This component-structured parameterization localizes divergence-sensitive behavior to the compression head rather than the full field, preserving FM efficiency while exposing more interpretable anomaly evidence.

We evaluate HCFM on large-scale univariate and multivariate TSAD benchmarks, including 250 UCR anomaly datasets and six multivariate datasets. Across these settings, HCFM improves over 16 representative baselines. On UCR, HCFM achieves a 10.4% relative best-F1 improvement over the best non-HCFM baseline, while on multivariate benchmarks it obtains the best aggregate results and the best per-dataset VUS-PR and best F1 on five of six datasets. HCFM also improves inference efficiency over monolithic divergence-based Flow Matching, reducing latency by 35% relative to FDM. These results show that component-structured Flow Matching yields more informative anomaly scores while maintaining efficient inference.

In summary, our contributions are as follows:

• Identify a structural limitation of monolithic Flow Matching for TSAD: nominal transport and local density-changing behavior are entangled in the learned vector field, making divergence-based anomaly evidence difficult to isolate.

• Introduce HCFM, a component-structured Flow Matching framework that represents one final vector field through divergence-free transport, density-changing compression, and lightweight residual components, while retaining standard FM supervision.

• Develop component-specific divergence scoring that localizes Jacobian-trace estimation to the compression component and combines this signal with reverse-flow base energy, yielding complementary evidence for different anomaly modes.

• Establish the effectiveness and efficiency of the proposed structure through large-scale experiments on 250 UCR datasets and six multivariate benchmarks, including controlled ablations that isolate the contribution of field structure, divergence source, and residual allocation.

• Open source code for reproducibility available at https://github.com/TrustAIoT/HCFM__time-series-anomaly/

References (36)