Three autoencoder variants for detecting anomalies using reconstruction error:
- Dense AE for tabular signals
- LSTM AE for sequential data
- Conv1D AE for local temporal patterns
The notebook provides a clean, comparative pipeline with reproducible metrics and visual diagnostics.
- Data prep (windowing/standardization if time series)
- Train AEs on normal data (or normal-heavy data)
- Compute reconstruction error on val/test
- Choose threshold (e.g., val quantile, Youden’s J, or F1-max)
- Evaluate: ROC-AUC, PR-AUC, Accuracy, F1; visualize error distributions
- Explain errors: overlay recon vs. original; error heatmaps
- Dense AE: MLP encoder/decoder with bottleneck (e.g., 128→32→128)
- LSTM AE: Encoder LSTM → bottleneck → Decoder LSTM
- Conv1D AE: Temporal conv blocks + upsampling/transposed conv
Loss: MSE
Optimizer: Adam (lr=1e-3)
Regularization: Dropout/weight decay as needed
Early stopping on val reconstruction loss
- Picking threshold on validation avoids test leakage
- LSTM AE shines with temporal drift; Conv1D with local bursts
- Robust standardization and window size are key hyperparameters
All the results from my run which of test, train, validation reults including data analysis and corellations are in notebook.
The dataset I used in the folder called 'NAB'. There are many other datasets in the folder, which can be tried out for improvement and practice purposes.