# CAST: Context- and Anomaly Structure-Conditioned Time Series Anomaly Generation

arXiv: https://arxiv.org/abs/2609.27825 · HTML: https://mlsanity.com/paper/2609.27825/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 25 of its 45 references that are in the map.
- First posted on arXiv 19 Aug 2026.

## Builds on (most cited first, 25 of 25)

- [mixup: Beyond Empirical Risk Minimization](https://mlsanity.com/paper/1710.09412/) (2017)
- [CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features](https://mlsanity.com/paper/1905.04899/) (2019)
- [TimesNet: Temporal 2D-Variation Modeling for General Time Series Analysis](https://mlsanity.com/paper/2210.02186/) (2022)
- [A decoder-only foundation model for time-series forecasting](https://mlsanity.com/paper/2310.10688/) (2023)
- [One Fits All:Power General Time Series Analysis by Pretrained LM](https://mlsanity.com/paper/2302.11939/) (2023)
- [MOMENT: A Family of Open Time-series Foundation Models](https://mlsanity.com/paper/2402.03885/) (2024)
- [TS2Vec: Towards Universal Representation of Time Series](https://mlsanity.com/paper/2106.10466/) (2021)
- [Unsupervised Representation Learning for Time Series with Temporal Neighborhood Coding](https://mlsanity.com/paper/2106.00750/) (2021)
- [Diffusion-TS: Interpretable Diffusion for General Time Series Generation](https://mlsanity.com/paper/2403.01742/) (2024)
- [Time-Series Anomaly Detection Service at Microsoft](https://mlsanity.com/paper/1906.03821/) (2019)
- [TimeVAE: A Variational Auto-Encoder for Multivariate Time Series Generation](https://mlsanity.com/paper/2111.08095/) (2021)
- [Deep Learning for Time Series Anomaly Detection: A Survey](https://mlsanity.com/paper/2211.05244/) (2022)
- [Predict, Refine, Synthesize: Self-Guiding Diffusion Models for Probabilistic Time Series Forecasting](https://mlsanity.com/paper/2307.11494/) (2023)
- [Non-autoregressive Conditional Diffusion Models for Time Series Prediction](https://mlsanity.com/paper/2306.05043/) (2023)
- [PSA-GAN: Progressive Self Attention GANs for Synthetic Time Series](https://mlsanity.com/paper/2108.00981/) (2021)
- [Generative Modeling of Regular and Irregular Time Series Data via Koopman VAEs](https://mlsanity.com/paper/2310.02619/) (2023)
- [Neural Contextual Anomaly Detection for Time Series](https://mlsanity.com/paper/2107.07702/) (2021)
- [Utilizing Image Transforms and Diffusion Models for Generative Modeling of Short and Long Time Series](https://mlsanity.com/paper/2410.19538/) (2024)
- [FlowTS: Time Series Generation via Rectified Flow](https://mlsanity.com/paper/2411.07506/) (2024)
- [Robust PCA for Anomaly Detection in Cyber Networks](https://mlsanity.com/paper/1801.01571/) (2018)
- [A Diffusion Model for Regular Time Series Generation from Irregular Data with Completion and Masking](https://mlsanity.com/paper/2510.06699/) (2025)
- [GenIAS: Generator for Instantiating Anomalies in time Series](https://mlsanity.com/paper/2502.08262/) (2025)
- [Training-Free Time Series Classification via In-Context Reasoning with LLM Agents](https://mlsanity.com/paper/2510.05950/) (2025)
- [LTSM-Bundle: A Toolbox and Benchmark on Large Language Models for Time Series Forecasting](https://mlsanity.com/paper/2406.14045/) (2024)
- [Towards Stable and Structured Time Series Generation with Perturbation-Aware Flow Matching](https://mlsanity.com/paper/2511.14488/) (2025)

## Abstract (arXiv)

Anomalous time series play a critical role in safety-critical domains, yet they are inherently scarce, heterogeneous, and costly to obtain. Existing time series generation methods predominantly focus on synthesizing normal data, providing limited value when anomalous samples are needed. We identify two fundamental challenges in anomaly generation: (i) the scarcity of anomaly data, and (ii) the heterogeneous morphological characteristics of anomalies. To address these challenges, we propose CAST, a Context- and Anomaly Structure-conditioned Time series anomaly generation framework with principled two-stage pretraining and finetuning strategy. In pretraining stage, we leverage abundant normal time series data to learn underlying system dynamics and substantially mitigate the limited availability of anomaly data. During finetuning, CAST explicitly conditions the generator on learned anomaly structure representations, enabling it to capture heterogeneous anomaly morphologies under similar contextual conditions. Extensive experiments on multiple real-world univariate and multivariate datasets demonstrate that CAST consistently outperforms state-of-the-art anomaly generation methods in terms of both generation fidelity and downstream task utility, highlighting the effectiveness of the proposed approach.
