Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content
/ RED-F Public

Implementation for RED-F: Reconstruction-Elimination based Dual-stream Contrastive Forecasting for Multivariate Time Series Anomaly Prediction

License

Notifications You must be signed in to change notification settings

PenyChen/RED-F

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image description RED-F: Reconstruction-Elimination based Dual-stream Contrastive Forecasting for Multivariate Time Series Anomaly Prediction

Official PyTorch implementation of the paper: RED-F: Reconstruction-Elimination based Dual-stream Contrastive Forecasting for Multivariate Time Series Anomaly Prediction.

If RED-F helps your research, please consider giving us a ⭐ star!

Python PyTorch

💡 Overview

RED-F, a framework composed of the Reconstruction-Elimination Model (REM) and the Dual-Stream Contrastive Forecasting Model (DFM). Technically, we utilize REM to construct a baseline of normal patterns from historical data, providing a foundation for subsequent predictions of anomalies. Then DFM simultaneously predicts both the constructed normal pattern and the current window, employing a contrastive forecast that transforms the difficult AP task into a simpler, more robust task of relative trajectory comparison by computing the divergence between these two predictions.

apmodel

🚀 Getting Started

Installation

Ensure you have a Python 3.8+ environment ready. Install the necessary dependencies via:

pip install -r requirements.txt

Data preparation

Download the pre-processed datasets from the following sources: OneDrive or BaiduCloud. Extract the archives and place the contents into the ./dataset directory.

Train & Evaluation

  • Model Definition: Explore the core logic in here.
  • Reproduction: Run the provided scripts to replicate our results. For instance, to test on the Genesis dataset:
sh ./scripts/multivariate_detection/detect_label/Genesis/REDF_pred32.sh

📊 Experimental Results

Extensive experiments on 6 real-world datasets demonstrate that RED-F achieves state-of-the-art performance. We show the main results of all the 6 real-world datasets:

exp

🛠️ Setup for Running Baseline Models

We also include scripts for baseline models (e.g., PatchTST-AT) for fair comparison:

sh ./scripts/multivariate_detection/detect_label/Genesis/PatchTST-AT.sh

🙏 Acknowledgements

We acknowledge the following open-source projects for their outstanding contributions to the field:

📝 Citation

If you find this repo useful, please cite our paper.

@inproceedings{chen2025redf,
  title     = {{RED-F}: Reconstruction-Elimination based Dual-stream Contrastive Forecasting for Multivariate Time Series Anomaly Prediction},
  author    = {Chen, P Y and Shi, X and Chang, Y and others},
  booktitle = {arXiv preprint arXiv:2511.20044},
  year      = {2025}
}

✉️ Contact

If you have any questions or suggestions, feel free to contact:

About

Implementation for RED-F: Reconstruction-Elimination based Dual-stream Contrastive Forecasting for Multivariate Time Series Anomaly Prediction

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •