time series anomaly detection is of significance in managing the overall service quality of a variety of systems and the
Internet of Things [
5
], such as building/infrastructure systems including utility consumption (water, electricity, gas),
structural health monitoring (deflection, displacement), indoor environment (temperature, air quality), etc. Although we
have known the significance of anomaly detection for time series data, it remains a challenge due to its complicated
temporal dependence and stochastic nature [6].
Existing time series anomaly detection methods can generally be divided into the following categories: statistical
approaches (e.g., Autoregressive Model, AutoRegressive Integrated Moving Average (ARIMA) Model, Simple Ex-
ponential Smoothing), classical machine learning approaches(e.g., k-means clustering, isolation forest, one-class
support vector machines, extreme gradient boosting), neural network approaches (e.g., Multiple Layer Perceptron,
Convolutional Neural Networks, Long Short Term Memory network), and generative methods (e.g., Autoencoders,
Generative Adversarial Networks) [
7
]. In addition, depending on how labeled data is used, anomaly detection methods
can also be categorized into supervised and unsupervised approaches. Supervised approaches need labels for the input
time series to differentiate anomalous and normal observations, while unsupervised anomaly detection methods depend
solely on unlabeled data. Owing to the inefficiency of label, time series anomaly detection is more common to be
dealt with as an machine learning problem in an unsupervised paradigm. [
8
]. With the increasing computing power,
more advanced machine learning approaches have emerged. Generative Adversarial Networks (GAN), since introduced
in 2014 [
9
], have gained much popularity in image generation, data augmentation, and image-to-image translation
areas. In recent years, it has also been applied in anomaly detection, mainly by relying on loss scores as metrics
for anomalous pattern recognition. However, only limited research has been conducted on studying the potential of
standalone discriminator (
D
) models in GANs for anomaly detection. To this end, we have proposed an unsupervised
method of GAN-based density estimation for time series, DEGAN, by learning the characteristics of the normal data
patterns through training and validating GAN models on normal data observations. The
D
model is then extracted to
identify patterns that have anomalous features. Kernel density estimation (KDE) is applied to generate probability
density functions on the testing time series.
The highlights of DEGAN framework are as follows: (1) it relies on a well-trained
D
model as a standalone anomaly
detection model; (2) it doesn’t need labeled data for training and the optimal
D
model selection; and (3) it can reach a
relatively high recall and meanwhile well balance recall and precision. We have evaluated DEGAN using a real-world
case study, i.e., detecting anomalous observations on a Class I railroad track inspection dataset.
The rest of this paper is organized as follows. Section 2 introduces related research work on time series anomaly
detection methods and Generative Adversarial Networks. In Section 3, we presented the DEGAN framework and
elaborated on different framework design considerations. In Section 4, the case study has been introduced and the
performance of the framework has been evaluated. In doing so, we have discussed the adopted performance metrics, as
well as influencing factors that affect the overall performance. Finally, in Section 5, the main contributions and results
of this paper are concluded.
2 Related work
Anomaly detection has been a popular research direction because of its value in monitoring conditions of different
systems and providing timely alarms. How to choose a specific anomaly detection method usually depends on the type
of data. Given our focus on time series anomaly detection and GAN-based frameworks, the scope of the review has
been narrowed down to cover time-series-based and GAN-based anomaly detection techniques.
Time series anomaly detection is usually carried out in an unsupervised paradigm and could be challenging because
of its noise and temporal dependencies [
6
]. As early as 1977, a statistical approach was proposed by Tukey [
10
] to
detect anomalies on time series. Meanwhile, as noticeable progress has been achieved in developing machine learning
approaches in the past few decades, many of them have been applied to anomaly detection problems. For example,
k-means clustering [
11
] is an algorithm that can be executed on the sub-sequences of the time series dataset, which
converges to
k
centroids. The distance from a new testing sequence to its nearest centroid could be evaluated to identify
the error. An anomaly can be reported when the corresponding error is higher than a preset threshold. Along the same
line of distance-based techniques, in 2003, Ma et al. [
12
] utilized One-Class Support Vector Machines (OC-SVM) to
detect novelties (anomalies) in time series as outliers of the normal distribution, where the vectors were converted into a
projected space. In 2012, Liu et al. [
13
] proposed Isolation Forest (iForest), which isolates anomalies using binary trees,
without conforming to the normal distribution.
With increasing computing power, deep learning approaches are catching more attention in the past decade. These
methods generally detect anomalies by comparing the new object with the normal distributions predicted based on
given history data. Long Short Term Memory (LSTM) networks have been known as a useful tool for learning the
longer-term pattern contained in sequences. In 2015, Malhotra et al. [
14
] demonstrated stacked LSTM networks’ use
2