CoCAI: Copula-based Conformal Anomaly Identification for Multivariate Time-Series

Nicholas A. Pearson, Francesca Zanello, Davide Russo, Luca Bortolussi, Francesca Cairoli

Introduction

Monitoring critical infrastructure, such as water distribution and sewerage systems, relies on multivariate time-series (MTS) data from numerous sensors. However, traditional monitoring systems face two significant challenges: the lack of quantified uncertainty in forecasts and the difficulty of detecting patterns that deviate from expected temporal behavior in noisy environments. Most predictive models offer a "best guess" without reliable error bars, which can lead to dangerous overconfidence in high-stakes operational settings.

The CoCAI Framework

To address these issues, the Copula-based Conformal Anomaly Identification (CoCAI) framework integrates deep generative modeling with classical statistical rigor. The pipeline consists of three distinct phases designed to move from raw data to actionable, statistically grounded alerts.

  1. Predictive Phase: Utilizing Conditional Score-based Diffusion Models (CSDI), the framework learns the data's entire distribution. This allows for sampling multiple plausible future trajectories rather than a single point estimate.
  2. Conformalization Phase: To provide statistical guarantees, the framework applies Conformal Prediction (CP). By adapting the CopulaCPTS technique with a stable bounded optimization approach, CoCAI ensures that the resulting predictive regions contain the ground truth with a user-defined probability (e.g., 90%).
  3. Anomaly Detection Phase: This phase compresses temporal data using B-splines to represent the distance between observations and predicted intervals. The joint distribution of these spline coefficients is then modeled using Gaussian or Student’s t copulas, allowing for the calculation of a Mahalanobis-based anomaly score.
The CoCAI workflow, showing the transition from offline training and calibration to real-time deployment for prediction and anomaly detection.

Empirical Validation

The framework was validated using real-world operational data from water distribution and sewerage systems in Northern Italy. The models performed "contextual forecasting," predicting the final 4 hours of a 24-hour window based on the preceding 20 hours.

A key finding was the "coverage gap" in standard models. Raw empirical quantile ranges were found to be significantly overconfident, sometimes covering the ground truth only 0.25% of the time when a 90% range was expected. After applying the conformalization phase, the coverage reliably reached the target 90-91% level across all tested scenarios.

Visual output of the CoCAI pipeline: (a) shows the original signal within the conformalized interval; (b-c) illustrate the B-spline approximation of distances; (d) displays the distribution of spline coefficients used for anomaly scoring.

Key Insights and Results

  • Contextual vs. Point Anomalies: By analyzing the trajectory of errors via B-splines rather than single-point spikes, CoCAI identifies "contextual anomalies" that represent sustained deviations from expected behavior.
  • Robustness of Student’s t Copulas: Modeling the joint distribution of spline coefficients with Student’s t copulas proved more effective than Gaussian versions, as they better account for the "heavy tails" typical of extreme sensor events.
  • Operational Interpretability: The resulting anomaly scores are bounded between 0 and 1, providing a clear metric for operators to trigger alarms without requiring deep statistical knowledge.

Limitations and Future Directions

While CoCAI demonstrates high reliability, current implementations process channels individually during the conformalization and anomaly detection stages. Future work aims to develop a fully multivariate approach for these specific components. Additionally, while the fixed threshold of 0.9 for flagging anomalies is effective, practical applications may require per-case tuning to optimize the balance between false alarms and missed detections.

Summary updated

Abstract

We propose a novel framework that harnesses the power of generative artificial intelligence and copula-based modeling to address two critical challenges in multivariate time-series analysis: delivering accurate predictions and enabling robust anomaly detection. Our method, Copula-based Conformal Anomaly Identification for Multivariate Time-Series (CoCAI), leverages a diffusion-based model to capture complex dependencies within the data, enabling high quality forecasting. The model's outputs are further calibrated using a conformal prediction technique, yielding predictive regions which are statistically valid, i.e., cover the true target values with a desired confidence level. Starting from these calibrated forecasts, robust outlier detection is performed by combining dimensionality reduction techniques with copula-based modeling, providing a statistically grounded anomaly score. CoCAI benefits from an offline calibration phase that allows for minimal overhead during deployment and delivers actionable results rooted in established theoretical foundations. Empirical tests conducted on real operational data derived from water distribution and sewerage systems confirm CoCAI's effectiveness in accurately forecasting target sequences of data and in identifying anomalous segments within them.
BibTeX
@inproceedings{pearson2025cocai,
  author = {Nicholas A. Pearson and Francesca Zanello and Davide Russo and Luca Bortolussi and Francesca Cairoli},
  title = {{CoCAI: Copula-based Conformal Anomaly Identification for Multivariate Time-Series}},
  booktitle = {RV},
  year = {2025},
}
Figure