Table of Contents
Fetching ...

Forecast2Anomaly (F2A): Adapting Multivariate Time Series Foundation Models for Anomaly Prediction

Atif Hassan, Tarun Kumar, Ashish Mishra, Sergey Serebryakov, Satish Kumar Mopur, Phanidhar Koganti, Murthy Chelankuri, Ramanagopal Vogety, Suparna Bhattacharya, Martin Foltin

TL;DR

Forecast2Anomaly (F2A) addresses the challenge of zero-shot anomaly prediction in multivariate time series by jointly training a Time Series Foundation Model (TSFM) to forecast future signals and predict anomalies, using a focal-loss-based anomaly objective to preserve subtle irregularities. A Retrieval-Augmented Generation (RAG) module retrieves semantically similar past horizons and fuses them with the forecast through a learnable, context-aware aggregation, enabling adaptive behavior under distributional shift without retraining. The framework is plug-and-play with any encoder–decoder TSFM and is evaluated on 16 diverse datasets with multiple backbones, showing consistent improvements over state-of-the-art baselines in zero-shot and non-zero-shot settings, and against traditional statistical methods. The results suggest that combining anomaly-aware forecasting with adaptive retrieval yields scalable, generalizable early-warning capabilities for real-world systems, while highlighting areas for future work such as online update mechanisms and multi-scale horizons.

Abstract

Forecasting anomalies (anomaly prediction) in multivariate time series from different real-world, dynamic, and complex systems is vital for preempting critical failures, leading to a substantial minimization in operational costs and human labor. Yet, existing methods are limited to specific systems while failing to generalize to evolving anomaly patterns over time. In contrast, pretrained Time Series Foundation Models (TSFMs) have recently demonstrated strong generalization and zero-shot forecasting capabilities. However, their potential remains untapped for anomaly prediction, a task fundamentally different from forecasting normal behavior. Thus, we present Forecast2Anomaly (F2A), a novel framework that empowers TSFMs with anomaly prediction abilities through two key innovations. First, we propose a joint forecast-anomaly loss that fine-tunes TSFMs to accurately forecast future signals even at anomalous time points. Second, we introduce a Retrieval-Augmented Generation (RAG) module that retrieves historically relevant horizons and conditions predictions on them. This component dynamically adapts to distributional shifts at inference time, enabling F2A to track evolving anomalies without requiring model updates. By combining targeted fine-tuning with dynamic retrieval, F2A bridges the gap between robust TSFM zero-shot forecasting and zero-shot anomaly prediction. Extensive experiments across 16 diverse datasets and multiple TSFM backbones show that F2A consistently outperforms state-of-the-art methods, offering a scalable, zero-shot anomaly prediction solution for real-world applications.

Forecast2Anomaly (F2A): Adapting Multivariate Time Series Foundation Models for Anomaly Prediction

TL;DR

Forecast2Anomaly (F2A) addresses the challenge of zero-shot anomaly prediction in multivariate time series by jointly training a Time Series Foundation Model (TSFM) to forecast future signals and predict anomalies, using a focal-loss-based anomaly objective to preserve subtle irregularities. A Retrieval-Augmented Generation (RAG) module retrieves semantically similar past horizons and fuses them with the forecast through a learnable, context-aware aggregation, enabling adaptive behavior under distributional shift without retraining. The framework is plug-and-play with any encoder–decoder TSFM and is evaluated on 16 diverse datasets with multiple backbones, showing consistent improvements over state-of-the-art baselines in zero-shot and non-zero-shot settings, and against traditional statistical methods. The results suggest that combining anomaly-aware forecasting with adaptive retrieval yields scalable, generalizable early-warning capabilities for real-world systems, while highlighting areas for future work such as online update mechanisms and multi-scale horizons.

Abstract

Forecasting anomalies (anomaly prediction) in multivariate time series from different real-world, dynamic, and complex systems is vital for preempting critical failures, leading to a substantial minimization in operational costs and human labor. Yet, existing methods are limited to specific systems while failing to generalize to evolving anomaly patterns over time. In contrast, pretrained Time Series Foundation Models (TSFMs) have recently demonstrated strong generalization and zero-shot forecasting capabilities. However, their potential remains untapped for anomaly prediction, a task fundamentally different from forecasting normal behavior. Thus, we present Forecast2Anomaly (F2A), a novel framework that empowers TSFMs with anomaly prediction abilities through two key innovations. First, we propose a joint forecast-anomaly loss that fine-tunes TSFMs to accurately forecast future signals even at anomalous time points. Second, we introduce a Retrieval-Augmented Generation (RAG) module that retrieves historically relevant horizons and conditions predictions on them. This component dynamically adapts to distributional shifts at inference time, enabling F2A to track evolving anomalies without requiring model updates. By combining targeted fine-tuning with dynamic retrieval, F2A bridges the gap between robust TSFM zero-shot forecasting and zero-shot anomaly prediction. Extensive experiments across 16 diverse datasets and multiple TSFM backbones show that F2A consistently outperforms state-of-the-art methods, offering a scalable, zero-shot anomaly prediction solution for real-world applications.

Paper Structure

This paper contains 30 sections, 6 equations, 2 figures, 5 tables.

Figures (2)

  • Figure 1: Overview of our proposed framework, F2A. We assume that the TSFM has an encoder-decoder architecture wherein we freeze the encoder while all other parameters are fine-tuned.
  • Figure 2: Forecast comparison on a randomly picked example from the Daphnet dataset on three channels. Forecasts from three versions of TSPulse: (a) vanilla (no fine-tuning), (b) fine-tuned using F2A without RAG, and (c) fine-tuned using F2A with RAG. Green denotes the ground truth forecast, orange denotes the predicted output, and blue is the context window.