Can normality constraint learning adapt foundation models for time series anomaly detection?

NCL freezes a time series foundation model and steers patch features toward normality, widening the gap between normal and anomalous scores.

Direct answer

Yes, but not by fine-tuning. Normality Constraint Learning (NCL) is a lightweight plug-and-play framework that leaves a pre-trained time series foundation model's parameters frozen and instead constrains its broad pattern space to the normal structure of the target series, so that anomalies are no longer reconstructed or forecasted as accurately and their error-based anomaly scores rise.

1sources cited

This article was generated with WisPaper-powered search and paper analysis.

Why foundation model errors miss anomalies

Time series foundation models (TSFMs) are pre-trained to reconstruct or forecast broad temporal patterns, and the usual anomaly detection recipe reuses their reconstruction or forecasting error as the anomaly score: the larger the error at a timestamp, the more anomalous it is assumed to be. The paper argues this assumption breaks down for foundation models. Because TSFMs are built to model general temporal structure, they can model rare anomalous patterns about as well as normal ones, so anomalies are reconstructed or forecasted accurately and their errors stay small.

The paper illustrates this on the PSM dataset: vanilla MOMENT and Chronos produce heavily overlapping anomaly score distributions for normal and abnormal observations, which makes choosing a threshold difficult. The authors also provide a theoretical analysis of this over-generalization issue in the appendix. This is the problem NCL is designed to fix, and it reframes the practical question from "which foundation model is best" to "how do we stop a good foundation model from explaining away the anomalies."

Freezing the backbone instead of fine-tuning

A natural alternative is fine-tuning the TSFM for anomaly detection, but the paper argues this risks catastrophic forgetting of the rich temporal knowledge that the error-based scoring mechanism still depends on. NCL therefore takes a different route: it does not modify the pre-trained parameters at all. Instead it adds a lightweight module on top of the frozen backbone, so the general temporal representation is preserved while the outputs are steered toward a normality regime.

This design choice has a measurable efficiency consequence. Because the TSFM backbone is frozen and only lightweight projection heads are optimized, NCL needs minimal parameter update overhead. On MOMENT, NCL completes training in roughly 2.59 seconds, compared with 2.71 seconds for LoRA and 3.32 seconds for CoRA. The paper notes one exception: on reconstruction-based TSFMs such as MOMENT and UniTS, NCL has slightly more trainable parameters than LoRA, because reconstruction covers the entire series and the final linear head therefore introduces more parameters. The efficiency advantage is reported as fastest training times across nearly all tested TSFMs, which the authors frame as attractive for deployment scenarios requiring frequent model updates.

Building a normality subspace from few normal patches

NCL is implemented through three components: NormSpace, PatchNT, and ConNC. NormSpace constructs a compact normality subspace from a small number of normal patch features. The paper's theoretical analysis argues that this few-shot construction is sufficient: normal patch features are assumed to lie in a low-dimensional subspace with a nontrivial spectral gap, and using matrix concentration plus the Davis–Kahan theorem, the leading singular subspace estimated from a finite set of normal patches converges to the population normal subspace with estimation error decreasing as O(N^-1/2). In other words, a relatively small number of normal samples can already give a reliable estimate of the normality space.

A second theoretical result covers the top-k truncation used in this construction. Treating the observed data as clean data plus white noise, the paper shows that minimizing the reconstruction error of the clean matrix is equivalent to minimizing the error against the observed matrix, and by the Eckart–Young–Mirsky theorem the best rank-k least-squares estimate is the top-k truncated singular value approximation. This is the justification for keeping only the leading directions rather than the full feature space.

Steering patch features toward normality

PatchNT adaptively steers each patch feature toward normality within the subspace. The transformation is written as a rank-one perturbation of the identity, and the paper's spectral analysis shows that it leaves all components orthogonal to the chosen direction unchanged while rescaling the projection along that direction by a factor of (1 - beta_i). The learnable parameters alpha_i and beta_i control the geometric behavior: beta_i near zero retains old information, beta_i equal to one replaces the projection with the normality target, and beta_i greater than one over-calibrates in the reverse direction. Because each patch feature involves a different degree of normality, the parameters can adaptively choose among under-, moderate-, and over-corrective behavior.

ConNC, the contrastive normality constraint, shapes the subspace so that the transformed views form compact and discriminative normality manifolds. The paper's analysis describes it as also acting as a regularizer against anomaly overfitting: the contrastive loss enforces a margin so that normal features cluster tightly around their centers with inter-cluster distances exceeding intra-cluster distances by at least gamma. If an anomalous patch feature contains components orthogonal to all the normality directions, the projection cannot remove them, the margin constraint is not satisfied, the loss is zero, and no parameter update occurs. That mechanism is what keeps the module from adapting to abnormal patterns.

Fusing calibrated features amplifies anomaly errors

The calibrated features are aggregated to reinforce normal components and then fused with the original TSFM output. The fused prediction is a weighted combination of the NCL prediction and the frozen model prediction, with lambda controlling the mix. The paper's theoretical argument has two sides. On normal data, assuming both the frozen model and the NCL module achieve small errors, the fused prediction error is bounded by a convex combination of those two small errors, so normality is preserved. On anomalous data, the transformation shifts the abnormal input away from the neighborhood where the pre-trained model performs well, so the prediction error on the transformed input increases.

Under the stated assumption, the paper derives that the fused error on anomalies exceeds the frozen model's error on anomalies, which is the formal version of the claim that fusion amplifies the discrepancy between normal and abnormal observations for error-based scoring. The empirical counterpart is shown in the score distributions: NCL enables both reconstruction-based and forecasting-based TSFMs to produce substantially more discriminative anomaly scores on PSM, and additional visualizations report that NCL widens the gap between normal and abnormal score distributions across different TSFMs and datasets.

Where NCL beats deep methods and simple baselines

Across ten datasets and precision-recall metrics including A-P, R-A-P, and VUS-PR, UniTS+NCL achieves an average rank of 2.13, ahead of CroAD at 5.13 and TsNet at 6.27. The paper attributes this to generalization: conventional deep TSAD methods must be trained from scratch for each new dataset, whereas NCL needs only a few normal samples to adapt a pre-trained TSFM. That distinction matters most when training data is scarce or expensive to obtain.

The comparison against trivial baselines is more nuanced and more informative. A simple moving-window variance baseline, Var-100, reaches an average rank of 4.00 and even achieves the best A-P scores on UCR and MSL, outperforming several sophisticated deep methods. The paper reports this as consistent with recent observations that many existing methods fail to beat trivial baselines. Against these baselines, vanilla Chronos wins only about 52% of one-to-one comparisons against Last-1, and vanilla MOMENT wins only 34% against Var-96 with a p-value of 0.4306. After NCL, Chronos+NCL reaches 31% against Last-1, 33% against Last-3, and 35% against Centered-5, with a p-value of 0.0002 against Centered-5; MOMENT+NCL improves to 40% against Var-96, 40% against Var-256, and 43% against Var-512, with the p-value against Var-96 dropping to 0.0303. These comparisons are across 361 time series from ten TSAD datasets.

When simple baselines still win

The paper is explicit that NCL does not win everywhere. There are time series where simple baselines outperform NCL-enhanced TSFMs, and the authors attribute this to two situations. The first is time series with extremely simple periodic patterns, where one-liner methods naturally excel. The second is time series with non-stationary training samples, where the normal subspace construction becomes unstable. The paper suggests stationary processing strategies as a direction for future work.

This boundary is the practical counterpart to the efficiency and accuracy results. NCL's advantage comes from estimating a normality subspace from a few normal patches, so its behavior depends on those normal samples actually representing a stable normal structure. The reported instability under non-stationary training samples is therefore not a peripheral caveat but a direct limit on where the method's core mechanism can be trusted.

What to check before choosing NCL

The most decision-relevant comparison in this paper is not NCL against deep TSAD methods, where the average rank gap is large, but NCL against trivial baselines, where the margin is narrower and dataset-dependent. If a target series has extremely simple periodic structure, a variance baseline may already be competitive, and the paper's own results show Var-100 reaching an average rank of 4.00. The case for NCL is strongest when the frozen TSFM's anomaly scores overlap heavily between normal and abnormal observations, when only a few normal samples are available for adaptation, and when frequent model updates make training cost matter.

The second thing to check is the stability of the normal reference itself. Because the normality subspace is estimated from a few normal patch features, non-stationary training samples can make that estimate unstable, and the paper identifies this as a case where simple baselines can win. The practical priority is therefore to verify two conditions before adopting NCL: that the available normal samples represent a stable normal structure, and that the baseline to beat is a strong trivial baseline rather than only a deep TSAD method trained from scratch.

Sources used in this answer

1

Normality Constraint Learning: Adapting Foundation Models for Time Series Anomaly Detection

NCL is a lightweight plug-and-play framework that freezes a pre-trained TSFM and constrains its broad pattern space to the normal structure of the target series, consistently improving anomaly detection across diverse TSFM families and benchmarks.