[Paper Review] Attention and Autoencoder Hybrid Model for Unsupervised Online Anomaly Detection
The paper proposes a hybrid Attention-AE model for unsupervised online anomaly detection in time series, using an autoencoder to capture local structure and an attention-based transformer in latent space to model long-term dependencies, evaluated on NAB datasets with strong results.
This paper introduces a hybrid attention and autoencoder (AE) model for unsupervised online anomaly detection in time series. The autoencoder captures local structural patterns in short embeddings, while the attention model learns long-term features, facilitating parallel computing with positional encoding. Unique in its approach, our proposed hybrid model combines attention and autoencoder for the first time in time series anomaly detection. It employs an attention-based mechanism, akin to the deep transformer model, with key architectural modifications for predicting the next time step window in the autoencoder's latent space. The model utilizes a threshold from the validation dataset for anomaly detection and introduces an alternative method based on analyzing the first statistical moment of error, improving accuracy without dependence on a validation dataset. Evaluation on diverse real-world benchmark datasets and comparing with other well-established models, confirms the effectiveness of our proposed model in anomaly detection.
Motivation & Objective
- Motivate unsupervised online anomaly detection for time series across diverse real-world domains.
- Develop a hybrid model combining autoencoder embeddings with a Transformer-like attention mechanism.
- Enable parallelizable, real-time anomaly detection without labeled data.
- Explore thresholding and first-mfirst-moment error-based methods to detect anomalies.
- Evaluate robustness across multiple anomaly types (point, contextual, collective).
Proposed method
- Autoencoder learns local window embeddings and reconstructs input windows (unsupervised).
- Attention/Transformer operates on AE latent space to forecast the next window in latent space.
- A pruned decoder and pooling layer are integrated for improved efficiency and parallelization.
- Anomaly detection uses a dynamic criterion: (i) a consecutive-window error exceeding a moving average, or (ii) a threshold-based rule using validation data.
- Data normalization is performed using training data min-max for stable learning.
- Model training proceeds in two stages: AE training on clean windows, then Transformer training to predict next latent window.
Experimental results
Research questions
- RQ1Can a hybrid AE-Transformer model detect point, contextual, and collective anomalies in online time series without labeled data?
- RQ2How does the proposed model compare to established deep anomaly detectors on NAB datasets?
- RQ3Does using a validation-data threshold versus a dynamic error-mallback improve detection under varying anomaly types?
- RQ4What are the computational benefits of removing recurrent/convolutional components and enabling parallel training?
- RQ5How robust is the approach across diverse real-world domains and data characteristics?
Key findings
- Achieves high detection performance across six NAB datasets, with precision and recall often at or near 100%.
- Table 1 shows F1 scores frequently exceeding 96% across datasets like Machine Temperature (99.0%), CPU Utilization (100%), AWS RDS (98.2%), AWS EC2 (98.1%), Google Tweets (96.4%), and Traffic Occupancy (100%).
- The proposed method outperforms several baselines (VAE-LSTM, VAE, LSTM-AD, ARMA) on multiple datasets, with one narrow margin loss (about 1.5% in F1 on one dataset).
- The architecture enables highly parallelizable training and inference due to removal of recurrent/convolutional layers, with GPU acceleration substantially speeding training (AE ~0.15s/epoch; Transformer ~20s/epoch on GPU).
- Two anomaly-detection strategies are evaluated: a consecutive-error pooling approach that works without validation data and a threshold-based method using validation data, with the former offering robustness for contextual/collective anomalies.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.