Journal of Robotics, Networking and Artificial Life
Vol. 6(4); March (2020), pp. 231–234
DOI: https://doi.org/10.2991/jrnal.k.200222.005; ISSN 2405-9021; eISSN 2352-6386
https://www.atlantis-press.com/journals/jrnal

Research Article

Autoencoder with Spiking in Frequency Domain for Anomaly
Detection of Uncertainty Event
Umaporn Yokkampon1,*, Sakmongkon Chumkamon1, Abbe Mowshowitz2, Eiji Hayashi1
Department of Computer Science and Systems Engineering, Kyushu Institute of Technology, 680-4 Kawazu, Iizuka, Fukuoka 820-8502, Japan
Department of Computer Science, The City College of New York, 160 Convent Avenue, New York, NY 10031, USA

12ARTICLE INFOABSTRACT

Article History

This paper proposes the autoencoder method with spiking raw data to the frequency domain to analyze and predict theanomaly case among the standard data set and compare it with original data. The dataset is the real-world data from factory
automation. The combination of frequency domain and original data can improve the validity and accuracy in detecting ananomaly data. Therefore, analyzing time-series data using combination of autoencoder and the frequency domain can be
efficient in detecting anomalies.

Received 11 November 2019
Accepted 21 December 2019
Keywords
Anomaly detection
autoencoder
data mining
factory automation© 2020 The Authors. Published by Atlantis Press SARL.
This is an open access article distributed under the CC BY-NC 4.0 license (http://creativecommons.org/licenses/by-nc/4.0/).

1. INTRODUCTION
Anomaly detection in time-series is an important real-world problem. Nowadays, sensors and internet of things devices are ubiquitous and produce data continuously. While the data gathered bythese devices is valuable and can provide meaningful insights, there
is a growing need for developing algorithms that can process thesedata efficiently. Anomaly detection is applied in network intrusion
detection, credit card fraud detection, sensor network fault detection, medical diagnosis and numerous other fields [1].
Among many anomaly detection methods, there are a few ways toreduce the dimensions of large data sets to ensure computational
efficiency such as backwards selection, removing variables exhibiting high correlation, high number of missing values but by far
the most popular is Principal Components Analysis (PCA). A relatively new method of dimensionality reduction is the autoencoder.
Autoencoders although is quite similar to PCA but its autoen­coders are much more flexible than PCA. Autoencoders can represent both liners and non-linear transformation in encoding but
PCA can only perform linear transformation. Autoencoders are abranch of neural network which attempt to compress the information of the input variables into a reduced dimensional space andthen recreate the input data set. Moreover, the autoencoders canapply dimension reduction in a hierarchical manner, obtaining
more abstract features in higher hidden layers leading to a betterreconstruction of the data [2].
In this paper, the autoencoder method with underlined spiking
raw data has been proposed to detect any anomaly by frequency
domain to analyze and predict. Moreover, we also compare andCorresponding author. Email: may@mmcs.mse.kyutech.ac.jp*

validate our proposed method with original data, which is fromfactory automation data and real-world data based on Area under theCurve (AUC), Precision (Pre), Recall (Rec) and F1-score criteria.

2. PROPOSED METHOD
We proposed the novel method using the autoencoder methodwith spiking raw data to the frequency domain to analyze and predict the anomaly case. Step-by-step procedure is as follows:
1. Divide all datasets into two groups.
2. For the second group, calculate the Fast Fourier Transform(FFT) of each dataset.
3. Spike plot by using FFT values.
4. Combine raw data and FFT values of each dataset. This is theinput of the second group. For first group has only originaldata.
5. Input both groups of all datasets into the autoencoder process.
Figure 1 describe the whole procedure algorithmically.

2.1. Autoencoder
Autoencoder neural network is an unsupervised machine learningalgorithm that applies backpropagation, setting the target values
to be equal to the inputs. Autoencoder consists of three components: encoder, code, and decoder. The encoder compresses
the input and produces the code, the decoder then reconstructs theinput only using this code. Given a data point x Î d (d is the232

U. Yokkampon et al. / Journal of Robotics, Networking and Artificial Life 6(4) 231–234

2.3. Spike PlotSpikes represent any number of horizontal or vertical line segmentswith fixed or variable heights. It is usual to use in time series plots.
They may also be useful in more domain-specific cases, such as
visualizing spike trains for neurophysiology or spectrograms inphysics and chemistry applications.

3. EXPERIMENTS
This section introduces the data sets we used and the evaluation
metric we compared and evaluate to demonstrate the effectivenessof our proposed method in anomaly detection.

Figure 1 | Architecture of the proposed method.

dimension of x), the loss function can be viewed as minimizing
the reconstruction error between the training data and the outputs of the autoencoder [3]:2		    L(x , x) = x - x (1)After training, autoencoder uses the reconstruction error as theanomaly score. The data with high anomaly score is considered to
be anomalies, because only the normal data are used to train theautoencoder. The autoencoder will reconstruct normal data very
well, while failing to do so with anomalous data the autoencoder
has not encountered.

2.2. Frequency Domain (FFT)Frequency-domain analysis is a tool of utmost importance insignal processing applications. Frequency-domain analysis is
widely used in such areas as communications, geology, remotesensing, and image processing. While time-domain analysis
shows how a signal changes over time, frequency-domain analysis shows how the signal’s energy is distributed over a rangeof frequencies.
Fast Fourier Transform is a mathematical technique for converting asignal from the time domain into the frequency domain. Signals ona flaw detector, on an oscilloscope or on an acoustic emission displayare typically time domain signals showing how the amplitude varieswith time. When transformed into the frequency domain, the display
shows how the amplitude varies with the frequency. This display isoften referred to as the frequency spectra of the signal. A sine wave
of a single frequency in the time domain will give a single line at thatfrequency in the frequency domain. A spike in the time domain will
give a spread of frequencies in the frequency domain.
The FFT computes the Discrete Fourier Transform (DFT) in an
efficient manner. The DFT is defined given byn -1		    H k = å xie
i =0

where j is the imaginary number
points in T and F.

2 jp ik / n(2)

-1, and n is the number of

3.1. Data Sets
To illustrate the effectiveness of our method, time series data is got
from UCR public data set [4]. More details about datasets are shownin Table 1. All datasets are given in time series form and every data
point is manually labelled. All datasets, we choose the minority classas anomaly class. We split 20% of the data as test data.

3.2. Performance Evaluation
We evaluate the accuracy of anomaly detection method using AUCof the receiver operating characteristic, Pre, Rec, and F1-score,
which are defined as follows:
TPTP+FP (3)TP		    Rec = TP+FN (4)		   Pre =			 F1 = 2 ´Pre ´ Rec
Pre+Rec(5)where TP is the correctly detected anomaly, FP is the falselydetected anomaly, TN is the correctly assigned normal, and FN isthe falsely assigned normal.

4. RESULTS AND DISCUSSION
We evaluate the anomaly detection performance for both spiking
raw data and combine frequency domain using the autoencoder
Table 1 | Summary of the datasets
Datasets
SonyAIBORobotSurface2
ItalyPowerDemand
Wafer

LengthNumber ofinstances

Anomaly
ratio

65
24152

980
1096
7164

0.38
0.49
0.11

U. Yokkampon et al. / Journal of Robotics, Networking and Artificial Life 6(4) 231–234

233

method. For the second group, we calculated FFT of all datasets
and spike plot. Example of spike plot is shown in Figure 2. We
showed the results of the wafer dataset.
We performed experiments on accuracy on three data sets andused AUC as the criterion. From Figure 3, the left column is original data and the right column is raw data combined with frequency
domain. We can see that our method could outcome AUC value
more than original data from all datasets. It shows that our method
has good performance in anomaly detection for time series data.
The anomaly detection results and comparisons are summarized inTable 2. The results show that the method that we proposed outperformed the original data in all aspects and datasets. In particular,
the wafer dataset gave recall is perfect.

Figure 2 | The example of spike plot.

Figure 3 | AUC comparisons between original data and combine frequency domain. (a) SonyAIBORobotSurface2. (b) ItalyPowerDemand. (c) Wafer.
Table 2 | Comparison between original data and combine frequency domain
Datasets
SonyAIBORobotSurface2
ItalyPowerDemand
Wafer

Original dataCombine frequency domain

AUC

Precision

Recall

F1-score

AUC

Precision

Recall

F1-score

0.89990.59170.98200.90430.70910.73490.76470.5166
0.99790.82870.59770.84640.95200.9031
0.99630.95650.97270.80080.83330.72791.0000

0.89070.83270.8894

U. Yokkampon et al. / Journal of Robotics, Networking and Artificial Life 6(4) 231–234

234

5. CONCLUSIONREFERENCES

In this paper, we propose the autoencoder method with original
data compared with spiking raw data to the frequency domain toanalyze and predict the anomaly case based on AUC, Pre, Rec andF1-score criteria. The evaluation results show that our proposed
method in anomaly detection improves accuracy in all aspects.
Therefore, analyzing time-series data in the frequency domain canbe efficient in detecting anomalies for time series data.

[1]

In the future we will use the variational autoencoder with timeseries data to the frequency domain to analyze and predict theanomaly case and compare with the autoencoder method.

[2]
[3]
[4]

V. Chandola, A. Banerjee, V. Kumar, Anomaly detection: a survey,
ACM Comput. Surv. 41 (2009), 1–58.
J. An, S. Cho, Variational autoencoder based anomaly detection
using reconstruction probability, Technical Report, SNU Data
Mining Center, 2015.
X. Wang, Y. Du, S. Lin, P. Cui, Y. Yang, Self-adversarial variational autoencoder with Gaussian anomaly prior distribution foranomaly detection, CoRR, abs/1903.00904, 2019.
Y. Chen, E. Keogh, B. Hu, N. Begum, A. Bagnall, A. Mueen, et al.,The UCR time series classification archive, 2019. Available from:https://www.cs.ucr.edu/~eamonn/time_series_data 2018/.

CONFLICTS OF INTEREST
The authors declare they have no conflicts of interest.

AUTHORS INTRODUCTION
Ms. Umaporn Yokkampon
She received Master of Science degree inApplied Statistics from King Mongkut’s
University of Technology North Bangkokin 2019. Presently she is a doctoral student
in the Department of Computer Scienceand Systems Engineering at Kyushu
Institute of Technology. Her researchinterests include data mining, anomaly
detection and time series analysis.

Dr. Sakmongkon Chumkamon
He received Doctor of Engineering degreefrom Kyushu Institute of Technology in2017. He was a postdoctoral researcher at
Guangdong University of Technology in2017–2019. Presently he is a postdoctoral
researcher in Kyushu Institute of Technology
since 2019. His research interests include
factory automation robots and social robots.

Prof. Abbe Mowshowitz
He received the PhD degree fromUniversity of Michigan in 1967. He has
been professor of computer science at theCity College of New York and member ofthe doctoral faculty at the Graduate Centerof the City University of New York since1984. His current research interests lie in
two areas are organizational and managerial issues in computing,and network science. In addition to teaching and research, He has
acted as consultant on the uses and impacts of information technology (especially computer networks) to a wide range of public
and private organizations in North America and Europe.

Prof. Eiji Hayashi
He is a professor in the Department ofIntelligent and Control Systems at Kyushu
Institute of Technology. He received thePhD (Dr. Eng.) degree from Waseda
University in 1996. His research interests
include Intelligent mechanics, Mechanicalsystems and Perceptual information processing. He is a member of The Instituteof Electrical and Electronics Engineers (IEEE) and The Japan
Society of Mechanical Engineers (JSME).