acceptodds
Under review as a conference paper at ICLR 2027

Dynamic Causal Contrastive Learning for Multivariate Time-Series Anomaly Detection

Abstract

Multivariate time-series anomaly detection requires modeling temporal patterns and inter-variable relationships varying across operating states. Using static causal graphs to guide contrastive augmentation can misalign downstream variable updates in positive samples and overlook changes in outgoing connectivity when selecting negative perturbation targets. We propose DCCAD, a dynamic causal contrastive learning framework that constructs positive and negative samples using the causal relationships estimated for each window. DCCAD learns a shared causal predictor from blocks of normal data and freezes it to estimate dynamic graphs under a consistent construction procedure for training and unseen sequences. Positive augmentation selects sources with nonzero current out-degrees when available and coordinates their perturbations with updates to graph-specified downstream variables. Negative augmentation prioritizes variables with larger current out-degrees and samples a perturbation ratio to vary coverage. These augmentations encourage representations that distinguish variations consistent with the estimated causal relationships from synthetic disruptions of those relationships. During inference, DCCAD combines representation distance and causal prediction error with a graph change score quantifying changes in estimated causal influence and topology relative to a historical reference. Experiments on five real-world datasets and one synthetic dynamical system demonstrate strong detection performance, with ablation studies validating the contribution of each component.

Primary area:
learning on time series and dynamical systems
Keywords:
Time-series anomaly detection, Dynamic causal graphs, Contrastive learning, Causality-aware data augmentation

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_hedNOpenReview ↗
Rating
2
Confidence
4
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes DCCAD, a dynamic causal contrastive learning framework for multivariate time-series anomaly detection. The method estimates time-varying causal graphs to guide positive and negative sample augmentation and combines contrastive representation distance, causal prediction error, and graph change scores for anomaly detection. Experiments on five real-world datasets and a synthetic dynamical system demonstrate improved detection performance, supported by ablation and sensitivity analyses.

Critical strengths
  1. The paper addresses a relevant problem in multivariate time-series anomaly detection. Using dynamic causal relationships to guide contrastive augmentation is reasonably motivated, since inter-variable dependencies may change across operating conditions.

  2. The experiments cover multiple real-world datasets, a synthetic dynamical system, and recent baselines. The ablation studies and entity-level evaluations provide useful evidence for the effectiveness of the proposed approach.

Critical weaknesses
  1. The methodological novelty is relatively limited. DCCAD largely extends CAROTS by replacing static causal graphs with dynamic ones, modifying variable selection for contrastive augmentation, and introducing a graph change score. Although these modifications are reasonable, the overall framework remains closely related to existing work.

  2. The computational overhead and practical applicability are insufficiently addressed. Dynamic causal graph estimation introduces additional computation, but the efficiency evaluation excludes the offline graph construction stage. Even under this setting, DCCAD requires approximately 2.33 times the runtime of CAROTS, raising concerns about scalability and practical deployment.

Questions for authors
  1. Could the authors clarify the methodological contributions beyond CAROTS and identify which proposed modifications are primarily responsible for the performance improvements?

  2. Could the authors report the complete end-to-end computational cost, including dynamic causal graph construction, and evaluate scalability with increasing numbers of variables?

3 comments

Response to Reviewer hedN

We thank the reviewer for the comments. Both concerns are answered below with a component attribution and new end-to-end measurements.

W1/Q1. Contributions beyond CAROTS and attribution of improvements

DCCAD is not CAROTS with a different graph. It identifies a flaw in static-graph contrastive supervision and is the first method to remove it.

The flaw. Causality-preserving augmentation is valid only relative to the dependencies of the window being augmented. A positive built from a mismatched graph updates variables along absent edges and skips present ones (Fig. 1): it is a dependency-violating sample labeled as positive. A static graph injects this label noise whenever dependencies vary across operating states.

Why replacing the graph is not a drop-in change. (i) A graph is needed for every window, and static discovery cannot supply it: CUTS+ takes 5,073 s for one graph. (ii) Time-resolved estimation is difficult: GCAD's dynamic graphs recover the true Lorenz-96 edges at 0.553 AUROC, DCCAD's at 0.894. (iii) Training and test graphs must follow identical criteria without fitting on test data. DCCAD trains one predictor across normal-data blocks, freezes it, and fixes one threshold on normal data. (iv) Dependencies also change in normal operation, so graph change alone is not anomaly evidence. DCCAD learns each normal state under its own graph and scores change against recent history.

Method. The augmentation operator becomes a function of the current window instead of a dataset-level constant. CDA-PA draws sources with nonzero current out-degree and updates their current downstream variables; CDA-NA ranks variables by current out-degree and samples the perturbation coverage. CAROTS draws sources from all variables, including those with no downstream target, and selects negatives by DFS on the fixed graph. GCAD compares its graphs with a fixed normal reference and never uses them in training.

Attribution. Averages over seven benchmarks (Tables 8–9):

ModificationAUROCAUPRCF1
CAROTS0.75920.34880.4234
+ Dynamic graphs0.78870.39480.4686
+ Nonzero-out-degree sources0.79050.40370.4935
+ Degree-ranked negatives0.80610.43200.5267
+ Graph-change scoring0.81780.47200.5517

Window-specific graphs are the primary source of improvement: +0.030 AUROC, +0.046 AUPRC, and +0.045 F1, the largest step on every metric. Degree-ranked negatives add +0.016 AUROC. Graph-change scoring adds +0.040 AUPRC, most strongly for sparse anomalies (MSL P-15: 0.1969 → 0.3738). DCCAD improves on CAROTS by 5.86 AUROC points.

W2/Q2. End-to-end cost and scalability

End-to-end cost. Table 13 excludes causal discovery for both methods. With discovery included in the same setting:

MethodCausal discoveryDetectorEnd to end
CAROTS5,073.23 s696.77 s5,770 s
DCCAD2,660.15 s1,620.78 s4,280.93 s

DCCAD cuts causal-discovery cost by 47.6% and end-to-end cost by 25.8%. Its estimator is also more accurate: edge AUROC on Lorenz-96 is 0.894 ± 0.012, against 0.865 ± 0.013 for CUTS+. Graphs for every time step cost less than CAROTS's single static graph. DCCAD's detector time remains below CrossAD (2,638.50 s) and CARLA (> 4,500 s).

Scalability. Lorenz-96 sequences of identical length (40,000 steps, split equally into training and testing) with increasing dimension NN:

NNDiscovery (s)Detector (s)End to end (s)
20342.187111.018453.205
40412.857124.888537.745
80836.264181.9871,018.251
1201,469.110247.5801,716.690

A sixfold increase in NN raises end-to-end runtime 3.8-fold. From N=40N=40 to N=120N=120, runtime grows 3.2-fold for a threefold increase: scaling is near-linear, as expected from one perturbed forward pass of the frozen predictor per variable. Detector runtime grows 2.2-fold over the full range. At N=120N=120, close to WADI's 123 variables, the complete pipeline finishes in 28.6 minutes.

Online latency. On WADI, sequential test-time processing takes 5.253 ms per step, 0.53% of its 1 s sampling interval. Each observation is scored before the next one arrives.

Storage and deployment. DCCAD computes weighted graphs in a stream and never writes them to disk. It retains bit-packed binary graphs and three one-dimensional series: influence change, topology change, and the fused score. The total footprint across all evaluated datasets, including graph files, detector artifacts, and models, is 0.66 GiB. Training graphs are constructed once offline and reused; test windows are processed sequentially with the frozen predictor, without retraining.

We hope these results resolve both concerns and that the reviewer will consider raising the score.

Thank you for the clarifications and additional experiments. The end-to-end results address my efficiency concern. However, I still view the methodological contribution as primarily an incremental extension of CAROTS, so I will keep my original rating.

Thank you for confirming that our end-to-end results address your efficiency concern. We respectfully disagree that DCCAD is primarily an incremental extension of CAROTS. Two distinctions are central to our assessment.

1. What a positive sample should preserve during normal operation. CAROTS assumes that normal causal relationships are time-invariant (Kim et al., 2025, §3.2). For a given perturbed source, its predictor can produce different values at different times, but its fixed graph selects the same downstream variables to update. DCCAD allows those dependencies to change during normal operation. It estimates a Granger graph at every time step, so perturbing the same source at two normal time steps can call for different downstream updates. For a training window ending at tt, the graph BtB_t guides source and downstream target selection for positives, and its out-degree ranking guides perturbation target selection for negatives.

Table 8 tests what these rules add once dynamic graphs are already available. With the same encoder architecture, dynamic graphs in both configurations, and graph-change scoring disabled, replacing CAROTS’s augmentation rules with ours improves AUPRC on six of seven evaluation series. Mean AUPRC rises from 0.3948 to 0.4320, and mean Best-F1 from 0.4686 to 0.5267.

2. How changes in dependencies are measured at test time. CAROTS retains the graph learned during training. DCCAD uses a frozen predictor and a threshold calibrated on normal training data to estimate a graph at each new time step. It can therefore score changes in both estimated influence and topology relative to recent history. On the Lorenz-96 causal-shift anomalies, where the data-generating mechanism is explicitly altered, the full DCCAD model improves AUROC over CAROTS from 0.6863 to 0.7270 and from 0.5818 to 0.6679 at the two difficulty levels (Table 2).

We will make these distinctions clearer in the revision and incorporate the new end-to-end efficiency and scalability measurements. Thank you for the constructive discussion.

Reviewer_VhYeOpenReview ↗
Rating
3
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes DCCAD, a framework for multivariate time-series anomaly detection that uses window-specific causal graphs to guide contrastive augmentation. A predictor trained on normal data is frozen and used to estimate dynamic predictive dependencies through temporal perturbations. Positive augmentation selects source variables with nonzero out-degree and updates their direct downstream variables, while negative augmentation prioritizes high-out-degree variables with varying perturbation coverage. At inference, the method combines representation distance, prediction error, and changes in graph strength and topology. Evaluation on five real-world datasets and a Lorenz-96 synthetic system shows improved average detection performance over the evaluated baselines, supported by component ablations and additional entity-level results.

Critical strengths
  1. A well-motivated extension of graph-guided augmentation to changing dependencies. A static graph can specify inappropriate downstream update targets when dependencies vary across operating conditions. Conditioning augmentation on the current estimated graph directly addresses this limitation. Using dynamic graphs to construct training samples, in addition to anomaly scoring, is the most compelling aspect of the approach.

  2. Broad empirical evaluation supporting the combined framework. The paper evaluates heterogeneous real-world benchmarks and synthetic anomalies involving changes in system dynamics. Cross-dataset ablations and full entity-level comparisons against CAROTS on MSL and SMD provide useful evidence beyond the representative subsets in the main text. The evaluation also avoids point adjustment. Although improvements are not uniform, the results support the practical value of the proposed framework.

Critical weaknesses
  1. The methodological contribution appears incremental relative to closely related work. CAROTS already provides causality-guided positive and negative augmentation and combines representation distance with prediction error. UnCLe supplies the perturbation-based dynamic graph estimator, while GCAD already detects anomalies through deviations in dynamic causal patterns. DCCAD’s principal distinction is to use the current graph for augmentation, together with nonzero-out-degree source selection, degree-prioritized negative selection, and graph-change score fusion. These choices are sensible, and their combined empirical benefit is supported by the experiments. Nevertheless, the methodological advance appears to be primarily an extension and integration of existing approaches, which limits the novelty of the contribution.
Questions for authors
  1. Clarification—normal operating transitions: The paper motivates dynamic graphs by noting that dependencies can change during normal operation, but also uses graph changes as an anomaly signal. Combining this signal with representation distance and prediction error is reasonable. However, do the reported experiments specifically examine false positives around normal operating transitions? Please clarify what evidence supports the method’s ability to accommodate benign dependency changes while detecting anomalous ones.

  2. Clarification—graph threshold selection: Appendix B.2 specifies different quantile levels for different dataset families. Although the numerical threshold is estimated from normal training data, how were the quantile levels themselves selected? Was there a predefined rule or a validation criterion using only normal data? Since these choices determine both augmentation targets and graph-change scores, understanding their selection is important for assessing applicability to a new dataset.

  3. Clarification—negative-sample difficulty: What does “difficulty” mean operationally in CDA-NA? Selecting high-out-degree variables and varying perturbation coverage may produce diverse negatives, but does not necessarily make them harder to distinguish from normal samples. Please clarify whether the existing results establish a connection between these choices and contrastive difficulty, or whether the intended claim is primarily about perturbation coverage and diversity.

  4. Clarification—causal-shift experiment: The parent-set description in Appendix A.2 appears inconsistent with Equation (13). At the experimental strengths (λ=1,2\lambda=1,2), we have (ωλ=1/3,2/3\omega_\lambda=1/3,2/3), respectively, so both the original and modified coupling terms remain active. The original parents are therefore generally retained alongside the newly introduced parents, rather than replaced as stated. Please reconcile this description with the equation and clarify whether the reported results should be interpreted as detecting weakened original dependencies together with newly added dependencies, rather than complete parent replacement.

3 comments

Response to Reviewer VhYe

We thank the reviewer for the precise reading.

W1. Contribution beyond CAROTS, UnCLe, and GCAD

The contribution is a new principle and the first method that realizes it, not an assembly of components.

Principle. Causality-preserving augmentation is valid only relative to the dependencies of the window being augmented. A positive built from a mismatched graph updates variables along absent edges and skips present ones: it is a dependency-violating sample labeled as positive. Static-graph augmentation injects this label noise whenever dependencies vary. DCCAD is the first method to identify this failure and to construct contrastive samples from window-specific graphs.

Why the existing components do not compose into a solution.

  • CAROTS has no window-level graph, and its discovery cannot supply one: CUTS+ takes 5,073 s for a single graph on PSM.
  • UnCLe infers graphs for a given sequence. A detector needs training and test graphs produced under identical criteria without fitting on test data. DCCAD trains one predictor across normal-data blocks, freezes it, and fixes one threshold on normal data.
  • GCAD scores deviations from a fixed normal reference, and its graphs never reach training; they recover the true Lorenz-96 edges at 0.553 AUROC, against 0.894 for DCCAD. DCCAD uses the graph to define what the encoder learns as normal and scores change against recent history.

Evidence. Average AUROC over seven benchmarks (Tables 8–9) rises from 0.7592 (CAROTS) to 0.7887 with dynamic graphs, 0.8061 with graph-guided augmentation, and 0.8178 with graph-change scoring. Window-specific graphs give the largest gain (+0.030); graph-change scoring, the element closest to GCAD, adds +0.012. Aggregating the same dynamic estimates into one static graph lowers Lorenz-96 edge AUROC from 0.894 to 0.830: the advantage comes from time resolution.

Q1. False positives around normal operating transitions

The submitted experiments did not isolate normal transitions. A new Lorenz-96 experiment uses several normal regimes with distinct ground-truth structures and transitions between them:

QuantityValue
False-positive rate, normal transitions0.53% ± 0.30%
False-positive rate, steady normal operation0.65% ± 0.23%
Detection rate, anomalous events83.3% ± 5.8%

Normal transitions raise no additional false alarms. Three properties explain this. (i) CDA-PA builds each positive from the graph of its own window, so every normal regime is learned as normal. (ii) The graph-change score is standardized by normal training statistics, which include normal transitions, and enters with weight λgc=0.1\lambda_{gc}=0.1. (iii) Its reference spans the previous H=10H=10 steps, so a benign transition produces a transient, not a persistent offset.

Q2. Quantile selection and sensitivity

Rule. On normal training data, we compute the source-node coverage for each candidate quantile and select the largest qq for which at least 95% of windows retain at least 60% of the maximum coverage. Labels and test results are not used. A new dataset is handled by applying the rule to its normal training data.

Sensitivity. On PSM the rule selects q=0.75q=0.75:

qqAUROCAUPRCF1
0.750.75060.59000.5893
0.850.71300.54560.5582
0.900.73640.55630.5613
0.950.69490.53560.5610

Every quantile above the selected one violates the coverage constraint and performs worse on all three metrics.

Q3. Operational meaning of difficulty

Difficulty is the similarity between a negative and its anchor in representation space: higher similarity means a harder negative. Over ρ∈[0.2,0.8]\rho\in[0.2,0.8], the mean anchor–negative similarity decreases monotonically from 0.845 to 0.761 as coverage increases. Sampling ρ\rho exposes the encoder to the full range of difficulty. Out-degree ranking chooses which variables are perturbed; replacing DFS with it raises average AUROC from 0.7905 to 0.8061 (Table 8).

Q4. Causal-shift experiment

The reviewer is correct. With α=min⁡(λ/3,1)\alpha=\min(\lambda/3,1), Eq. (13) weights the original coupling by 1−α1-\alpha and the new coupling by α\alpha:

Settingλ\lambdaOriginal couplingNew coupling
Lorenz#121/32/3
Lorenz#212/31/3

In both settings the original parents xi+1,xi−2x_{i+1},x_{i-2} are weakened and retained while xi+2,xi−3x_{i+2},x_{i-3} are added; the parents are fully replaced only at λ≥3\lambda\ge3. The reported CS results measure the detection of weakened original dependencies together with newly introduced ones. We will correct Appendix A.2 and Sec. 4.2. Complete replacement is the λ=3\lambda=3 case of Appendix C.8, where DCCAD attains the highest CS AUPRC and F1.

Thank you for the clarifications and additional experiments, which address most of my questions and strengthen the empirical support for the method. While I appreciate these responses, some concerns about the novelty relative to closely related work remain. Therefore, I maintain my original positive rating.

Thank you for your careful consideration and constructive feedback. We appreciate your continued positive assessment and your helpful suggestions for improving our paper.

Reviewer_w4FAOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes DCCAD, a dynamic causal contrastive learning framework for multivariate time-series anomaly detection. It estimates window-specific causal graphs to guide positive and negative sample augmentation, and combines representation distance and graph changes for anomaly scoring. Experiments on real-world and synthetic datasets demonstrate promising detection performance.

Critical strengths
  1. The paper addresses a relevant problem by incorporating time-varying inter-variable dependencies into contrastive learning for time-series anomaly detection.
  2. The proposed augmentation strategy uses dynamic causal graphs to guide positive and negative sample construction, providing a structured approach to learning representations that distinguish normal patterns from disrupted dependencies.
  3. The evaluation covers five real-world datasets and a synthetic dynamical system.
Critical weaknesses
  1. The dynamic causal graph is estimated by perturbing each variable's history and measuring the resulting changes in prediction errors. However, this procedure may not reliably identify causal relationships, as the perturbation can disrupt temporal dependencies and the estimated influences may reflect prediction errors rather than genuine causal effects.
  2. The motivation could be further strengthened by positioning DCCAD within the broader literature on causal and contrastive learning for time-series anomaly detection. While CAROTS provides a relevant point of comparison, it would be helpful to clarify how DCCAD advances beyond existing causal contrastive methods and dynamic causal graph-based approaches, such as GCAD, to better highlight its general contributions.
  3. Adding noise to selected variables does not necessarily disrupt their causal dependencies.
Questions for authors

See weaknesses.

1 comment

Response to Reviewer w4FA

We thank the reviewer for the comments. Each concern is answered below with new experiments.

W1. Reliability of the perturbation-based graph estimation

Scope. DCCAD estimates Granger-causal predictive dependencies: xjx_j Granger-causes xix_i if the history of xjx_j improves the prediction of xix_i beyond the other histories. Removing the temporal structure of xjx_j is the operation this definition requires, not a side effect. Permuting the history of xjx_j removes its temporal predictive information, preserves its marginal distribution, and leaves all other variables unchanged; it emulates the restricted model of the Granger test without retraining NN predictors. Eq. (2) subtracts the baseline error from the perturbed error, so the score isolates the error attributable to xjx_j and excludes the prediction error itself.

Ground-truth recovery. On Lorenz-96 with known Granger-causal edges:

EstimatorGraphEdge AUROC
UnCLe-based (DCCAD)dynamic0.894 ± 0.012
UnCLe, temporally aggregatedstatic0.830 ± 0.011
CUTS+ (CAROTS)static0.865 ± 0.013
Gradient-based (GCAD)dynamic0.553 ± 0.008

Time resolution adds 0.064 AUROC (0.830 → 0.894), and the aggregated graph trails CUTS+. DCCAD's advantage over CUTS+ therefore comes from resolving time-varying structure, not from a stronger static estimator.

Robustness. With the predictor, data, preprocessing, and edge threshold fixed, we varied the perturbation implementation. The recovered edge sets differ in 3.13%–4.42% of entries, every block-bootstrap one-sided 95% upper bound lies below the prespecified 5% equivalence margin, and the Jaccard similarity of stable edges is 0.896–1.000.

W2. Positioning beyond CAROTS and GCAD

The problem. Causality-preserving augmentation is valid only relative to the dependencies of the window being augmented. A positive built from a graph that differs from the window's own structure updates variables along absent edges and skips present ones: it is a dependency-violating sample labeled as positive. Every static-graph method injects this label noise into contrastive supervision whenever dependencies vary across operating states. DCCAD is the first method to identify this failure and to remove it by constructing positives and negatives from window-specific graphs.

Why it is hard. (i) A graph is needed for every window. Static discovery returns one graph per dataset, at 5,073 s for CUTS+ on PSM; refitting per window is infeasible. (ii) Time-resolved estimation is difficult: GCAD's dynamic graphs recover the true edges at 0.553 AUROC. (iii) Training and test graphs must follow identical criteria without fitting on test data, which sequence-wise discovery such as UnCLe does not provide. (iv) Dependencies also change in normal operation, so graph change alone is not anomaly evidence.

How DCCAD solves it. One predictor, trained across normal-data blocks and then frozen, with one threshold calibrated on normal data, yields a graph at every time step under identical train–test criteria, at 0.894 edge AUROC and 47.6% lower cost than CAROTS's single static graph. CDA-PA and CDA-NA turn the augmentation operator from a dataset-level constant into a function of the current window.

Essential differences.

GraphRole of the graph
CAROTSone static graphfixed augmentation targets for all windows
GCADdynamictest-time score against a fixed normal reference; unused in training
DCCADdynamic, inductivedefines each window's positives and negatives; scores change against recent history

Evidence. Over seven benchmarks (Tables 8–9), average AUROC rises from 0.7592 (CAROTS) to 0.8178, with the largest step (+0.030) from dynamic graphs. DCCAD exceeds GCAD by 8.04 points (Table 1).

W3. Does adding noise disrupt the dependencies?

Additive noise leaves the generating mechanism unchanged. CDA-NA violates a different property, the predictive consistency of the observed window: it perturbs the selected variables with σ=1.0\sigma=1.0, one standard deviation of the standardized data, and leaves their downstream variables untouched. CDA-PA propagates a smaller perturbation (0.1) downstream through the frozen predictor.

Matched-noise control. The control uses identical variables, time steps, and noise, and additionally updates the downstream variables through the predictor. On every dataset, CDA-NA produces a propagation inconsistency with RMS magnitude 0.10–1.23 times the standard deviation of the normal prediction error; the control stays at numerical zero. With identical noise, the inconsistency arises entirely from the missing downstream coordination.

Effect on detection. Reducing σ\sigma from 1.0 to 0.25 lowers AUPRC on SWaT from 0.75 to 0.68 (Table 5).

We hope the reviewer will consider raising the score.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.