Abstract
Deep learning has seen increasing applications in time series in recent years. For time series anomaly detection scenarios, such as in finance, Internet of Things, data center operations, etc., time series usually show very flexible baselines depending on various external factors. Anomalies unveil themselves by lying far away from the baseline. However, the detection is not always easy due to some challenges including baseline shifting, lacking of labels, noise interference, real time detection in streaming data, result interpretability, etc. In this paper, we develop a novel deep architecture to properly extract the baseline from time series, namely Deep Baseline Network (DBLN). By using this deep network, we can easily locate the baseline position and then provide reliable and interpretable anomaly detection result. Empirical evaluation on both synthetic and public real-world datasets shows that our purely unsupervised algorithm achieves superior performance compared with state-of-art methods and has good practical applications.
Introduction
In industrial settings like IoT, finance, and data center operations, time series data rarely follows a simple, static pattern. Instead, "baselines"—the underlying normal behavior—shift constantly due to external factors. An anomaly is defined as a data point lying significantly far from this baseline.
Detecting these anomalies is difficult because trends are complex and non-stationary, real-world data is rarely labeled, and high-frequency noise can be mistaken for anomalies. Existing tools like ARIMA are computationally expensive, while newer deep learning models often use overly simplistic trend models. The Deep Baseline Network (DBLN) addresses these issues by combining the power of deep learning with the interpretability of classical local regression.
Methodology
The DBLN uses a modular, stacked architecture inspired by N-Beats to extract robust baselines from noisy, non-stationary data.
1. The Baseline Block
The network consists of multiple "baseline blocks" connected in series. Each block takes the residual from the previous block and produces two outputs: a Backcast (estimation of the baseline for the current window) and a Forecast (prediction for the next data point).
2. Deep Local Regression
Inside each block, a bi-LSTM predicts the coefficients for a locally weighted regression (LOWESS). Unlike standard regression, this approach weighs nearby points more heavily using a kernel (e.g., tri-cube or Gaussian). This allows the model to follow shifting trends flexibly while remaining robust to outliers.
3. The Q Statistic Loss
To ensure the model extracts all useful information, the authors use the Ljung-Box Q statistic as a loss function. This forces the remaining residuals to approximate "white noise" (randomness with no autocorrelation). If a pattern remains in the residual, the Q loss stays high, pushing the model to learn more.
4. Probabilistic Anomaly Detection
The final layer outputs a point forecast and a standard deviation ($\sigma$). Anomaly detection is performed using an $n$-sigma rule: if the observed value falls too many standard deviations away from the forecast, it is flagged as an anomaly.
Key Insights and Results
The model was evaluated on synthetic datasets, Yahoo’s Anomaly Detection Dataset, and the KPI Dataset from the AIOPS competition.
DBLN was compared against DeepAR and Spectral Residual (SR) using the F1-score as the primary metric:
- Yahoo Dataset: DBLN achieved an F1-score of 0.786, significantly higher than DeepAR (0.72) and SR (0.563).
- KPI Dataset: DBLN achieved an F1-score of 0.695, outperforming DeepAR (0.634) and SR (0.622).
- Precision: DBLN showed a marked improvement in precision (0.746 on Yahoo vs. 0.62 for DeepAR), meaning it produced fewer false alarms while maintaining high detection rates.
Conclusion
The DBLN successfully bridges the gap between "black box" deep learning and "white box" statistical smoothing. By stacking blocks and varying kernel bandwidths, the network acts as a multi-scale filter. While the current model treats seasonal patterns as part of the flexible baseline, future work aims to integrate explicit seasonal basis functions to enhance robustness for long-term forecasting and complex periodic data.
Summary updated