Explainable Time-Series Anomaly Detection Using Transformer Reconstruction and Statistical Scoring
Abstract
Operational time-series anomaly detection requires accurate event identification, controlled alert generation, and interpretable evidence for detected deviations. A hybrid approach is proposed in this paper, which integrates sequence reconstruction based on Transformer and z-score and interquartile-range (IQR) deviation. Normalized component scores are combined into a single anomaly score and quantile-based thresholding controls the sensitivity/alert frequency balance. A perturbation-based explanation module also detects temporal regions that affect the individual anomaly scores. It was evaluated using precision, recall, F1-score, rate of false alarms, notifications per 1,000 observations, and average duration between notifications on a range of genuine and synthetic univariate datasets from the Numenta Anomaly Benchmark. With a precision of 0.7831, a recall of 0.1003, and an F1 score of 0.1481, q=0.98 represented the threshold that yielded the best recall and F1 score. These findings point to the detection's low sensitivity and comparatively high selectivity. The hybrid framework was slightly less effective at conventional detection, but also detected fewer and more widely spaced alerts and also provided local temporal attributions. The study thus provides an integrated approach of temporal modelling, statistical deviation analysis, operation alert evaluation and qualitative explanation.