RFformer: Rectified Flow Transformer for Time Series Anomaly Detection
摘要
Although diffusion models have become the dominant paradigm in generative modeling and have been widely applied in the field of sequence generation, most current models are often unable to adapt to real-time tasks such as time series anomaly detection due to their high inference costs and limited conditional generation performance. To address these limitations, we introduce RFformer, a novel Rectified Flow Transformer for time series anomaly detection that straightens the sampling trajectory, achieving efficient and high-quality reconstruction with fewer steps. It consists of two key components: a conditional-aware encoder (CE) that effectively encodes clean data conditions using cross-attention and adaptive instance normalization, and a temporal decomposition decoder (TDD) that decomposes time series features into different trend and seasonal components. Five real-world benchmark experiments have shown that RFformer achieves excellent accuracy and the fastest speed. The rectified flow framework has made practical progress in efficient time series anomaly detection.