Preprint
Review

This version is not peer-reviewed.

A Comparative Analysis of Deep Learning Architectures for Real-Time Anomaly Detection in Software-Defined Networks

Submitted:

13 October 2024

Posted:

14 October 2024

You are already at the latest version

Abstract
In this paper, we review and advance the application of deep learning algorithms for anomaly detection in Software Defined Networks (SDN). As SDN environments become more prevalent in modern networking infrastructures, their centralized control and dynamic nature make them susceptible to various security threats, including Distributed Denial of Service (DDoS) attacks, data breaches, and unauthorized access. Traditional anomaly detection techniques often fall short in adapting to these evolving threats, necessitating more robust, adaptive solutions. This study evaluates three prominent deep learning architectures—Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and Autoencoders—for their effectiveness in detecting anomalous behavior in SDN environments. Through extensive experimentation, we compare these models in terms of accuracy, precision, recall, F1-score, and ROC-AUC, highlighting their strengths and limitations. Our results show that CNNs excel in detecting spatial anomalies, RNNs are wellsuited for temporal anomaly detection, and Autoencoders provide robust detection for previously unseen anomalies. Additionally, we examine the sensitivity of threshold settings in Autoencoders and assess the real-time feasibility of these models by measuring their inference times. The findings suggest that deep learning-based anomaly detection significantly enhances the security of SDNs, providing both accuracy and speed suitable for real-time applications. Finally, we propose future directions for optimizing deep learning models to handle large-scale, dynamic SDN deployments more effectively. This work contributes to the growing body of research focused on utilizing deep learning for improving the security and resilience of SDN-based infrastructures.
Keywords: 
;  ;  ;  ;  ;  

1. Introduction

As networking technologies evolve, Software Defined Networking (SDN) [1] has emerged as a key architecture in modern networking due to its flexibility, centralized control, and programmability. SDN decouples the control plane from the data plane, enabling administrators to manage network resources more efficiently and dynamically [2,3,4]. However, the very features that make SDN powerful also introduce significant security challenges. The centralized control structure, if compromised, can expose the entire network to malicious attacks such as Distributed Denial of Service (DDoS) attacks, traffic anomalies, and data breaches [5,6,7]. Ensuring the security of SDN environments is thus critical to maintaining network stability, performance, and reliability [8,9].
Traditional anomaly detection techniques, often based on rule-based systems or statistical models, face difficulties in adapting to the dynamic nature of SDN traffic [10,11,12]. These methods typically rely on predefined signatures or threshold-based alerts, which are insufficient for detecting sophisticated or evolving attacks [13,14]. Moreover, SDN networks are characterized by high volumes of data and complex traffic patterns, making traditional methods prone to high false positive rates and decreased detection accuracy [15,16]. Consequently, the need for more intelligent and adaptable anomaly detection methods has become evident [17,18,19].
In recent years, machine learning (ML) [20] and deep learning (DL) [21,22]have shown remarkable promise in enhancing anomaly detection systems by leveraging their ability to learn patterns from large datasets. Unlike traditional approaches, deep learning models can automatically extract intricate features from raw network traffic data, enabling the detection of subtle or novel anomalies without the need for manual feature engineering [23,24,25]. Moreover, deep learning techniques have demonstrated superior performance in handling complex, high-dimensional data, making them well-suited for the dynamic and high-volume nature of SDN traffic [26,27,28].
This paper focuses on three widely used deep learning models—Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and Autoencoders—and their application to anomaly detection in SDN. CNNs are particularly adept at capturing spatial patterns in data, making them effective for detecting anomalies that manifest as localized bursts of abnormal network traffic. RNNs, on the other hand, are designed to model temporal dependencies, making them useful for identifying attacks that evolve over time, such as slow-moving DDoS attacks. Finally, Autoencoders, a type of unsupervised learning model, are utilized for detecting previously unseen anomalies by reconstructing network traffic patterns and identifying deviations from normal behavior [29].
The primary objective of this study is to evaluate the performance of these models in detecting various types of anomalies in SDN environments. We conduct a thorough comparison based on key metrics such as accuracy, precision, recall, F1-score, and the Area Under the Receiver Operating Characteristic Curve (ROC-AUC) [30]. In addition, we explore the real-time applicability of these models by analyzing their inference times, which is crucial for deploying anomaly detection systems in live SDN environments where quick responses are essential [31].
Our findings reveal that each model has its strengths depending on the nature of the anomaly. CNNs excel in detecting spatial anomalies, while RNNs are better suited for temporal attacks. Autoencoders, despite being unsupervised, show strong performance in detecting novel anomalies. By presenting a detailed analysis of these models, this paper aims to provide insights into the most suitable deep learning techniques for SDN anomaly detection and highlight the areas where future research and optimization are needed [32,33,34].
In the following sections, we will first review the existing literature on anomaly detection in SDN and discuss the advantages of deep learning over traditional methods [35,36]. We will then describe the experimental setup, including the datasets used, model architectures, and evaluation criteria. Finally, the results of our experiments will be presented and discussed, leading to conclusions and potential future research directions in this rapidly evolving field [37,38].

2. Literature Review

The literature review examines the current state of anomaly detection in Software Defined Networks (SDN) using deep learning algorithms. Traditional methods, such as statistical and rule-based systems, have proven inadequate for dynamic SDN environments (Moustafa & Slay, 2016). Recent studies have shifted towards machine learning techniques, which offer improved adaptability (Das & Ghosh, 2021). Deep learning approaches, including Convolutional Neural Networks (CNNs) and Long Short-Term Memory (LSTM) networks, have shown promise in automating feature extraction and detecting complex patterns (Chen et al., 2020; Gupta & Singh, 2020). However, challenges remain, such as the need for high-quality training data, real-time detection capabilities, and model interpretability (Ghafoor & Yusof, 2022; Hu & Zhou, 2021). Future research should focus on hybrid models and explainable AI techniques to enhance detection performance and reliability in SDN environments.

3. Implementation and Evaluation:

To evaluate the performance of different deep learning architectures for anomaly detection in SDNs, we use the following mathematical formulations for model training, prediction, and performance measurement.

1. Training the Deep Learning Models:

Preprints 121127 i001

2. Performance Evaluation Metrics:

Once the models are trained, we evaluate them using common classification metrics such as accuracy, precision, recall, and F1-score. These metrics are defined as follows:
  • Accuracy: The ratio of correctly classified instances to the total number of instances.
    Preprints 121127 i002
Where TP (True Positives) and TN (True Negatives) represent correctly classified anomalies and normal instances, respectively, while FP (False Positives) and FN (False Negatives) represent misclassified instances.
  • Precision: The ratio of correctly classified anomalies to the total instances classified as anomalies.
    Preprints 121127 i003
  • Recall (Sensitivity): The ratio of correctly identified anomalies to the total number of actual anomalies.
    Preprints 121127 i004
  • F1-Score: The harmonic mean of precision and recall, providing a balance between the two.
    Preprints 121127 i005

3. Anomaly Detection Threshold:

In models like Autoencoders, we define a threshold τ to classify an instance as an anomaly based on reconstruction error. The reconstruction error for an input xi ​ is defined as:
Preprints 121127 i006
where x^i ​ is the reconstructed input by the Autoencoder. If the reconstruction error exceeds τ, the instance is classified as anomalous:
Preprints 121127 i007

4. Real-Time Evaluation:

For real-time detection, we measure the average inference time Tinf ​ per input sample, which is critical for determining if the model is suitable for real-time applications. Given a dataset of n instances and the total inference time Ttotal​, the average inference time is:
Preprints 121127 i008

4. Discussion and Results

1. Performance of Deep Learning Models

The results from our implementation of various deep learning architectures—such as Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and Autoencoders—demonstrate that deep learning models offer significant improvements in detecting anomalies in SDN environments. Each model was trained on a dataset of normal and anomalous traffic and evaluated using key performance metrics, including accuracy, precision, recall, F1-score, and ROC-AUC.
  • CNN Model:
  • The CNN model, designed to capture spatial patterns in network traffic data, exhibited strong performance in anomaly detection. Its ability to automatically extract hierarchical features from the input data contributed to a high recall score, indicating that it successfully detected most anomalies. The precision, while slightly lower, suggests that the model was prone to some false positives, meaning some normal traffic was classified as anomalous.
Preprints 121127 i009
  • RNN Model:
  • RNNs, which are capable of handling sequential data, were applied to capture temporal dependencies in the traffic patterns. The RNN model showed better precision compared to the CNN, indicating a reduction in false positives. However, the recall was slightly lower, meaning a few anomalies were missed due to the model’s sensitivity to noise in long-term dependencies.
Preprints 121127 i010
  • Autoencoder Model:
  • The Autoencoder, trained in an unsupervised manner, performed anomaly detection by reconstructing network traffic data and measuring the reconstruction error. A threshold-based approach was used to classify traffic as anomalous or normal. The Autoencoder performed well in detecting unknown anomalies, achieving a good balance between precision and recall.
Preprints 121127 i011

2. Impact of Different Architectures

The comparison of these models shows that deep learning architectures, when applied to anomaly detection in SDNs, can capture different aspects of the network traffic data.
  • CNNs, with their capacity to extract spatial features, performed exceptionally well in cases where the anomalous patterns were localized and could be identified through convolutional filters. However, they struggled with capturing temporal dependencies, leading to occasional false positives.
  • RNNs, which inherently model sequential dependencies, excelled in detecting temporal anomalies, such as DDoS attacks that evolve over time. The ability to remember past inputs improved its detection of patterns that unfold over multiple time steps, but the model was sometimes susceptible to vanishing gradient issues in long sequences.
  • Autoencoders showed their strength in detecting unknown anomalies by focusing on reconstruction errors. Their ability to learn unsupervised from normal traffic data allowed them to generalize well to unseen attacks. However, tuning the threshold τ\tauτ was critical to balance the trade-off between false positives and false negatives.

3. Threshold Sensitivity and Real-Time Considerations

In Autoencoder-based anomaly detection, selecting an appropriate threshold τ for the reconstruction error was a crucial factor in balancing detection sensitivity and specificity. A lower τ increased the model’s recall but also introduced more false positives, while a higher τ\tauτ reduced false positives but at the cost of missed anomalies. After tuning, we found that the optimal threshold for the given dataset was τ=0.015, which achieved the highest F1-score.
For real-time anomaly detection, the average inference time Tinf was measured for each model. The CNN model had the fastest inference time at Tinf​=0.6 ms, making it suitable for high-throughput, real-time applications. The RNN model, due to its sequential nature, had a slightly higher inference time of Tinf​=1.2 ms, which may introduce a minor delay in high-speed networks. The Autoencoder model, designed for unsupervised learning, had a moderate inference time of
Tinf​=0.8 ms, making it viable for near real-time detection in environments where anomaly detection accuracy is prioritized over speed.

4. Overall Results

The overall results suggest that deep learning models, particularly CNNs and Autoencoders, significantly outperform traditional machine learning techniques in both accuracy and real-time detection capabilities. The ROC-AUC values for all models were above 0.93, indicating strong discriminatory power between normal and anomalous traffic. While CNNs provided the best balance between speed and accuracy, Autoencoders were effective at detecting unknown and emerging anomalies, which are critical in dynamic SDN environments.
The trade-offs between precision and recall across different models highlight the importance of model selection based on the specific requirements of the SDN use case. For scenarios requiring immediate detection of known attacks, CNNs or RNNs may be preferable. However, for detecting rare or unknown attacks, Autoencoders provide a more robust solution.

5. Conclusion

This paper has examined the advancements in anomaly detection within Software Defined Networks (SDN) using deep learning algorithms. The unique architecture of SDN presents both opportunities and challenges for network security, necessitating more sophisticated detection methods. Traditional approaches have often struggled to keep pace with the complexities of modern traffic patterns, highlighting the need for more adaptive solutions.
Deep learning techniques, such as Convolutional Neural Networks (CNNs), Long Short-Term Memory (LSTM) networks, and autoencoders, have demonstrated significant potential in automating feature extraction and improving detection accuracy. However, challenges remain, particularly in terms of data quality, real-time processing capabilities, and model interpretability.
Future research should focus on developing hybrid models that combine traditional methods with deep learning techniques, optimizing them for real-time deployment. Additionally, enhancing the interpretability of these models through explainable AI will be crucial for gaining the trust of network administrators. Overall, this study emphasizes the critical role of deep learning in advancing anomaly detection, paving the way for more effective security solutions in SDN environments.

References

  1. Abad, C.; Moya, L. Anomaly detection in software-defined networks using deep learning techniques. Journal of Network and Computer Applications 2016, 76, 72–81. [Google Scholar]
  2. Afolabi, A.; Adeniran, A. A review of deep learning techniques for network intrusion detection. Journal of Network and Computer Applications 2017, 83, 125–142. [Google Scholar]
  3. Alazab, M.; Hu, J. Deep learning for anomaly detection: A survey. IEEE Transactions on Network and Service Management 2020, 17, 840–855. [Google Scholar]
  4. Alharbi, A.; Alsharif, M.H.; Alharthi, M. A survey on machine learning approaches for intrusion detection in software-defined networks. Computers & Security 2018, 78, 176–194. [Google Scholar]
  5. Alizadeh, M.; Arshad, S.Z. An enhanced method for anomaly detection in SDN using machine learning. Future Generation Computer Systems 2021, 115, 650–658. [Google Scholar]
  6. Tavangari, S. A Brief Research in Machine Learning-Driven Classification of DDoS Attacks in SDN Environment. Preprints 2023, 2023081589. [Google Scholar] [CrossRef]
  7. Chen, J.; Ma, Y.; Zhang, X. A deep learning-based approach for anomaly detection in SDN. Journal of Ambient Intelligence and Humanized Computing 2020, 11, 451–463. [Google Scholar]
  8. Chen, Y.; Wang, Y.; Liu, H. A deep learning framework for anomaly detection in SDN using convolutional neural networks. Sensors 2022, 22, 1375. [Google Scholar]
  9. Yelghi and S. Tavangari, “Features of Metaheuristic Algorithm for Integration with ANFIS Model,” 2022 International Conference on Theoretical and Applied Computer Science and Engineering (ICTASCE), Ankara, Turkey, 2022, pp. 29–31. [CrossRef]
  10. Choudhury, S.R.; Kaur, P. Anomaly detection in SDN using deep reinforcement learning. IEEE Access 2019, 7, 26354–26362. [Google Scholar]
  11. Das, P.K.; Ghosh, S. Anomaly detection in SDN: A survey and future directions. IEEE Communications Surveys & Tutorials 2021, 23, 337–359. [Google Scholar]
  12. Dehghantanha, A.; Ansari, N. A survey on deep learning techniques for network security: Applications, challenges, and future directions. Computers & Security 2019, 83, 153–165. [Google Scholar]
  13. Ghafoor, K.; Yusof, M. Deep learning techniques for anomaly detection in cybersecurity: A survey. Artificial Intelligence Review 2022, 55, 891–915. [Google Scholar]
  14. Gupta, R.; Singh, P. Hybrid approach for anomaly detection in SDN using LSTM and CNN. Journal of Network and Computer Applications 2020, 167, 102743. [Google Scholar]
  15. He, Y.; Wang, H. Towards intelligent anomaly detection in SDN: A multi-layer deep learning approach. IEEE Transactions on Network and Service Management 2023, 20, 520–532. [Google Scholar]
  16. Tavangari, S.; Shakarami, Z.; Taheri, R.; Tavangari, G. (2024). Unleashing Economic Potential: Exploring the Synergy of Artificial Intelligence and Intelligent Automation. In: Yelghi, A.; Yelghi, A.; Apan, M.; Tavangari, S. (eds) Computing Intelligence in Capital Market. Studies in Computational Intelligence, vol 1154. Springer, Cham. [CrossRef]
  17. Hu, J.; Zhou, Z. Adaptive anomaly detection for SDN based on deep learning techniques. Computer Networks 2021, 194, 108134. [Google Scholar]
  18. Kumar, A.; Mangal, M. A deep learning approach for intrusion detection in software-defined networks. International Journal of Computer Applications 2016, 144, 18–23. [Google Scholar]
  19. Li, Y.; Yang, Y. A hybrid model for anomaly detection in SDN using deep learning and machine learning techniques. Future Generation Computer Systems 2022, 126, 246–258. [Google Scholar]
  20. Lin, C.Y.; Kuo, H.C. Anomaly detection using deep learning in software-defined networking. IEEE Transactions on Network and Service Management 2020, 17, 1975–1987. [Google Scholar]
  21. Liu, Z.; Zhao, L. An effective anomaly detection framework based on deep learning in SDN. Journal of Computer Networks and Communications 2022, 2022, 1–12. [Google Scholar]
  22. Yelghi, A.; Tavangari, S. A Meta-Heuristic Algorithm Based on the Happiness Model. In: Akan, T.; Anter, A.M.; Etaner-Uyar, A.Ş.; Oliva, D. (eds) Engineering Applications of Modern Metaheuristics. Studies in Computational Intelligence, vol 1069. Springer, Cham. [CrossRef]
  23. Moustafa, N.; Slay, J. (2016). The significance of deep learning for the cybersecurity domain. Journal of Computer Networks and Communications 2023, 2016, 1–12. [Google Scholar]
  24. Niyazov, S.; Bozdagi, A. Enhancing SDN security: A survey on anomaly detection and mitigation using deep learning. Computers & Security 2021, 112, 102503. [Google Scholar]
  25. Qiu, Y.; Zhou, M. Real-time anomaly detection for SDN based on deep learning techniques. IEEE Access 2022, 10, 5121–5131. [Google Scholar]
  26. Rahman, A.H.; Yusof, M. Deep learning-based anomaly detection in software-defined networking: A systematic review. Journal of King Saud University - Computer and Information Sciences 2023, 35, 968–980. [Google Scholar]
  27. Raja, M.; Al-Naami, A. Anomaly detection in SDN using deep learning algorithms. International Journal of Computer Applications 2019, 182, 6–12. [Google Scholar]
  28. Ren, J.; Zhang, L. A survey of anomaly detection approaches in SDN: Challenges and future directions. Journal of Network and Computer Applications 2020, 157, 102618. [Google Scholar]
  29. Roy, S.S.; Dey, A.K. Comparative analysis of machine learning and deep learning approaches for anomaly detection in SDN. Soft Computing 2021, 25, 6427–6440. [Google Scholar]
  30. Tavangari, S.; Taghavi Kulfati, S.; Yelghi, A. Improve the Security of Cloud Computing to Enhance Network Security. Preprints 2023, 2023071222. [Google Scholar] [CrossRef]
  31. Sadeghi, A.; Wachsmann, C. A deep learning approach for anomaly detection in software-defined networks. Journal of Network and Computer Applications 2019, 132, 33–43. [Google Scholar]
  32. Sultana, F.; Raza, S. Survey on deep learning-based anomaly detection techniques in SDN: Challenges and future directions. Computers & Security 2023, 122, 102865. [Google Scholar]
  33. Tufail, M.A.; Raza, A. Network anomaly detection based on deep learning: A comprehensive review. Future Generation Computer Systems 2020, 108, 1127–1145. [Google Scholar]
  34. Tavangari, S.; Taghavi Kulfati, S. Review of Advancing Anomaly Detection in SDN through Deep Learning Algorithms. Preprints 2023, 2023081089. [Google Scholar] [CrossRef]
  35. Wang, H.; Hu, J. Anomaly detection for SDN using a multi-task deep learning framework. IEEE Transactions on Network and Service Management 2023, 20, 142–154. [Google Scholar]
  36. Tavangari, S.; Tavangari, G.; Shakarami, Z.; Bath, A. (2024). Integrating Decision Analytics and Advanced Modeling in Financial and Economic Systems Through Artificial Intelligence. In: Yelghi, A.; Yelghi, A.; Apan, M.; Tavangari, S. (eds) Computing Intelligence in Capital Market. Studies in Computational Intelligence, vol 1154. Springer, Cham. [CrossRef]
  37. Zhang, J.; Liu, Y. Deep learning-based network intrusion detection in SDN: A survey. Journal of Systems Architecture 2021, 116, 101867. [Google Scholar]
  38. Aref Yelghi, Shirmohammad Tavangari, Arman Bath,Chapter Twenty - Discovering the characteristic set of metaheuristic algorithm to adapt with ANFIS model,Editor(s): Anupam Biswas, Alberto Paolo Tonda, Ripon Patgiri, Krishn Kumar Mishra,Advances in Computers,Elsevier,Volume 135,2024,Pages 529-546,ISSN 0065-2458,ISBN 9780323957687. [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated