metadata
license: apache-2.0
pipeline_tag: other
POST: Prior-Observation Adversarial Learning of Spatio-Temporal Associations for Multivariate Time Series Anomaly Detection
This repository contains the official PyTorch implementation and pre-trained checkpoints for the paper POST: Prior-Observation Adversarial Learning of Spatio-Temporal Associations for Multivariate Time Series Anomaly Detection.
💡 Highlights
- Novel Framework: We propose POST, a model that unifies spatial and temporal anomaly modeling under a joint prior–observation adversarial learning framework.
- Anomaly Localization: The adversarial optimization not only improves time-wise detection but also enables the model to localize anomalies to specific channels.
- SMD+ Dataset: Construction of a dataset featuring precise channel-wise annotations, serving as a generic testbed for anomaly localization in MTS.
- SOTA Performance: Extensive experiments demonstrate that POST consistently outperforms state-of-the-art (SOTA) baselines in standard anomaly detection tasks.
🛠️ Resources
- Code: GitHub Repository
- Paper: huggingface.co/papers/2605.18128
🚀 Get Started
Evaluation
To evaluate the trained models on the benchmarks, run the following scripts. Ensure you have the datasets prepared and the pre-trained weights placed into the ./checkpoints/ folder (named as <dataset_name>_checkpoint.pth).
# SMD
python main.py --anomaly_ratio 0.5 --batch_size 64 --mode test --dataset SMD --data_path dataset/SMD --input_c 38 --output_c 38
# MSL
python main.py --anomaly_ratio 1. --batch_size 64 --mode test --dataset MSL --data_path dataset/MSL --input_c 55 --output_c 55
# SMAP
python main.py --anomaly_ratio 1. --batch_size 64 --mode test --dataset SMAP --data_path dataset/SMAP --input_c 25 --output_c 25
# SWaT
python main.py --anomaly_ratio 1. --win_size 150 --batch_size 64 --mode test --dataset SWaT --data_path dataset/SWaT --input_c 51 --output_c 51
# PSM
python main.py --anomaly_ratio 1. --batch_size 64 --mode test --dataset PSM --data_path dataset/PSM --input_c 25 --output_c 25
# SMD+
python main_channel.py --anomaly_ratio 0.5 --batch_size 64 --mode test --dataset SMD+ --data_path dataset/SMD+ --input_c 38 --output_c 38
Suggested citation
Please consider citing our work:
@misc{zhang2026postpriorobservationadversariallearning,
title={POST: Prior-Observation Adversarial Learning of Spatio-Temporal Associations for Multivariate Time Series Anomaly Detection},
author={Suofei Zhang and Yaxuan Zheng and Haifeng Hu},
year={2026},
eprint={2605.18128},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2605.18128},
}