Machine Learning-Based Anomaly Detection
Machine Learning-Based Anomaly Detection
Secure and reliable data communication in optical networks is critical for high-speed Internet. However, optical
fibers, serving as the data transmission medium providing connectivity to billons of users worldwide, are prone to a
variety of anomalies resulting from hard failures (e.g., fiber cuts) and malicious physical attacks (e.g., optical
eavesdropping (fiber tapping)) etc. Such anomalies may cause network disruption and thereby inducing huge
financial and data losses, or compromise the confidentiality of optical networks by gaining unauthorized access to
the carried data, or gradually degrade the network operations. Therefore, it is highly required to implement efficient
anomaly detection, diagnosis, and localization schemes for enhancing the availability and reliability of optical
networks. In this paper, we propose a data driven approach to accurately and quickly detect, diagnose, and localize
fiber anomalies including fiber cuts, and optical eavesdropping attacks. The proposed method combines an
autoencoder-based anomaly detection and an attention-based bidirectional gated recurrent unit algorithm,
whereby the former is used for fault detection and the latter is adopted for fault diagnosis and localization once an
anomaly is detected by the autoencoder. We verify the efficiency of our proposed approach by experiments under
various anomaly scenarios using real operational data. The experimental results demonstrate that: (i) the
autoencoder detects any fiber fault or anomaly with an F1 score of 96.86%; and (ii) the attention-based bidirectional
gated recurrent unit algorithm identifies the the detected anomalies with an average accuracy of 98.2%, and
localizes the faults with an average root mean square error of 0.19 m.
http://dx.doi.org/10.1364/JOCN.99.099999
̂ ‖2
ℒ(𝜃) = ∑‖𝒙 − 𝒙 (3)
Fig. 2. Structure of the gated recurrent unit (GRU) cell.
AE has been widely used for anomaly detection by adopting the
reconstruction error as anomaly score. It is trained with only BiGRU is an extension of GRU that helps to improve the
normal data representing the normal behavior. After training, performance of the model. It consists of two GRUs: one forward
AE will reconstruct the normal instances very well, while it will GRU model that takes the input in a forward direction, and one
fail to reproduce the anomalous observations by yielding high backward GRU model that learns the reversed input. The output
reconstruction errors. The process of the classification of an 𝒚𝑡 of the model is generated by combining the forward output ⃑𝒉𝑡
instance as anomalous/normal is shown in Alg. 1. and backward output ⃐⃑𝒉⃑𝑡 as described by the following equations:
30
30
0 km ad splice 2.2 km m .2 km 0. km
0 0
0 0
m
2 m
Fiber cut
irty connector
2m
0
m
Fig. 6. Experimental setup for generating OTDR data containing different faults induced at different locations in an optical network.
• Precision (P) quantifies the relevance of the
predictions made by the ML model. It is expressed as:
𝑇𝑃
𝑃 =
𝑇𝑃 + 𝐹𝑃
𝑇𝑃
𝑅 =
𝑇𝑃 + 𝐹𝑁
𝑃𝑅
𝐹1 =
𝑃+𝑅
Fig. 7. Example of OTDR trace generated using the experimental
setup shown in Fig. 6. 4.3.2 Fault Detection Capability
(a) (b)
Fig. 9. The optimal threshold selection based on the precision,
recall and F1 scores yielded by GRU-AE.
++
(a)
(b)
The confusion matrix shown in Fig. 13, proves that the attention
based BiGRU model (A-BiGRU) diagnoses the different faults Fig. 14. The diagnosis accuracy of the A-BiGRU model.
with an accuracy higher than 97%, and accurately distinguishes
the physical fiber attack by achieving an accuracy of 98%. As for The feature learning ability of A-BiGRU under very low SNR
low SNR sequences, the patterns of eavesdropping and bad conditions (SNR ≤ 5 dB) for solving the task 𝑇1 is visually
splice faults look similar, the ML model mis-classified a little investigated using the t-distributed stochastic neighbor
these classes. The same applies for dirty connector and fiber cut embedding (t-SNE) technique [15]. Figure 15 shows that first the
patterns under low SNR conditions leading to low learned features under SNR levels lower than 1 dB are of very
misclassification rates. poor separability and A-BiGRU misclassifies most of the faults as
fiber cut mainly due to the similarity of the different fault
patterns under those SNR conditions because of the high noise
overwhelming the patterns, second the extracted features
become more and more discriminative with the increase of the
SNR, and third A-BiGRU can learn effective features for accurate
fault diagnosis even for an SNR condition higher than 2 dB.
(a)
(a)
TABLE III
COMPARISON OF ML MODELS IN TERMS OF AVERAGE ACCURACY . THE BEST
RESULT IS SHOWN IN BOLD.
Fig. 19: Comparison between the proposed model and existing Model A (GRU-AE + BiGRU) 96.9
ML methods in terms of: (a) average diagnostic accuracy and (b)
Model B (without GRU-AE) 91.8
average RMSE.
The comparison of the results of computational inference time 4.3.9 Investigation of the Robustness of BiGRU
between the proposed model and the existing methods are
shown in Table 2. As it can be seen, the proposed model
Given that the BiGRU model is trained with data incorporating
consumes slightly more time than the existing methods due to
the faults induced at fixed locations of the network to assess the
its deeper architecture.
robustness capability of the proposed method, we modify the
locations of the different faults as shown in Fig. 20, and test the
performance of BiGRU given the new data generated using the
TABLE II
COMPUTIONAL TIME OF POPOSED MODEL AND EXISTING METHODS. new experimental setup.
THE BEST RESULT IS SHOWN IN BOLD. 0 km
Fiber tapping .2 km
0
Method Inference time (12,370 samples)
BiLSTM 1.06 ± 𝟎. 𝟎𝟑 𝒔 m
0
T m
REFERENCES
[1] . W et al., “ dentification method of non-reflective faults
based on index distribution of optical fibers,” pt press.
2014 Jan 13;22(1):325-37.
[2] O. N- oateng, et al., “ redicting the actual location of faults
in underground optical networks using linear regression,”
Engineering Reports (2021).
[3] K. bdelli et al., “ eflecti e fiber fault detection and
characterization using long short-term memory,”
IEEE/OSA J. Opt. Commun. Netw., vol. 13, no. 10, October
2021.
[4] K. bdelli et al., “ eflecti e ent etection and
Characterization in Fiber Optical Links Given Noisy OTDR
Signals,” hotonic Networks; 22th ITG Symposium, 2021.
[5] W. Zhang et al., “ deep con olutional neural network with
new training methods for bearing fault diagnosis under
noisy en ironment and different working load, “Mechanical
Systems and Signal Processing, Volume 100, 2018.
[ ] K. bdelli et al., “ i STM-CNN based Multitask Learning
pproach for Fiber Fault iagnosis,” F 202 .
[7] K. Abdelli et al., "Optical Fiber Fault Detection and
Localization in a Noisy OTDR Trace Based on Denoising
Convolutional Autoencoder and Bidirectional Long Short-
Term Memory," in Journal of Lightwave Technology, doi:
10.1109/JLT.2021.3138268.
[8] A. A.- . akar, et al., “ new technique of real-time
monitoring of fiber optic cable networks transmission,”
Optics and Lasers in Engineering 45: 126-130 (2007).
[9] han, .K., et al., “Fiber-fault identification for branched
access networks using a wavelength-sweeping monitoring
source,” hoton. Technol. ett., : 4-616 (1999).
[10] oronha, Val. “ etworks, Security and omple ity: The
Role of Public Policy in Critical Infrastructure Protection -
y Sean . orman.” (200 ).
[11] K. Shaneman and S. Gray, "Optical network security:
technical analysis of fiber tapping mechanisms and
methods for detection & prevention," IEEE MILCOM 2004.
Military Communications Conference, 2004., 2004, pp. 711-
716 Vol. 2.