Comparative Study of Machine Learning Algorithms for DDoS Attack Detection in SDN Networks: A Carbon Emission Analysis with Hyperparameter Optimization Using Bayesian Optimization
How to cite (IJASEIT) :
Results show that RF achieves the highest accuracy across both datasets (99.81%) while reducing carbon emissions by 44.6% after optimization of TPE. XGBoost, while slightly less accurate (99.77%), produces the lowest carbon emissions (0.0006 kg CO₂), demonstrating superior energy efficiency. SVM, despite a 35% reduction in emissions, remains the least efficient in energy consumption and exhibits lowest accuracy. These findings highlight the role of Bayesian Optimization in balancing predictive performance with sustainability. This study contributes by demonstrating a quantitative approach to evaluating the trade-off between accuracy and energy efficiency in ML-based DDoS attack detection in SDN, offering insights into selecting environmentally sustainable models.
S. Chattopadhyay, A. K. Sahoo, S. Jasola, and T. Choudhury, “Detection of DDoS Attacks in SDN Using Machine Learning Approaches: A Review,” Lect. Notes Networks Syst., vol. 1025, pp. 295–305, 2024, doi: 10.1007/978-981-97-3594-5_24.
N. F. Rozam and M. Riasetiawan, “XGBoost Classifier for DDOS Attack Detection in Software Defined Network Using sFlow Protocol,” Int. J. Adv. Sci. Eng. Inf. Technol., vol. 13, no. 2, pp. 718–725, Apr. 2023, doi: 10.18517/ijaseit.13.2.17810.
M. A. Setitra, M. Fan, I. Benkhaddra, and Z. E. A. Bensalem, “DoS/DDoS attacks in Software Defined Networks: Current situation, challenges and future directions,” Computer Communications, vol. 222. Elsevier B.V., pp. 77–96, Jun. 01, 2024, doi:10.1016/j.comcom.2024.04.035.
Y. Cui et al., “Towards DDoS detection mechanisms in Software-Defined Networking,” J. Netw. Comput. Appl., vol. 190, no. November 2020, p. 103156, 2021, doi: 10.1016/j.jnca.2021.103156.
N. S. S. Shaji, R. Muthalagu, and P. M. Pawar, “SD-IIDS: intelligent intrusion detection system for software-defined networks,” Multimed. Tools Appl., vol. 83, no. 4, pp. 11077–11109, Jan. 2024, doi:10.1007/s11042-023-15725-y.
N. T. Cam and T. D. Viet, “uitSDD: Protect software defined networks from distributed denial-of-service using multi machine learning models,” Cluster Comput., vol. 28, no. 1, p. 11, Feb. 2025, doi:10.1007/s10586-024-04757-0.
R. Ma, Q. Wang, X. Bu, and X. Chen, “Real-Time Detection of DDoS Attacks Based on Random Forest in SDN,” Appl. Sci., vol. 13, no. 13, 2023, doi: 10.3390/app13137872.
H. Kheddar, D. W. Dawoud, A. I. Awad, Y. Himeur, and M. K. Khan, “Reinforcement-Learning-Based Intrusion Detection in Communication Networks: A Review,” IEEE Commun. Surv. Tutorials, vol. PP, no. 00, pp. 1–1, 2024, doi:10.1109/comst.2024.3484491.
Y. Wang, X. Wang, M. M. Ariffin, M. Abolfathi, A. Alqhatani, and L. Almutairi, “Attack detection analysis in software-defined networks using various machine learning method,” Comput. Electr. Eng., vol. 108, 2023, doi: 10.1016/j.compeleceng.2023.108655.
W. Man, G. Yang, and S. Feng, “Joint Selfattention-SVM DDoS Attack Detection and Defense Mechanism Based on Self-Attention Mechanism and SVM Classification for SDN Networks,” IEICE Trans. Fundam. Electron. Commun. Comput. Sci., vol. E107.A, no. 6, pp. 881–889, 2024, doi: 10.1587/transfun.2023eap1057.
R. Ma, Q. Wang, X. Bu, and X. Chen, “Real-Time Detection of DDoS Attacks Based on Random Forest in SDN,” Appl. Sci. 2023, Vol. 13, Page 7872, vol. 13, no. 13, p. 7872, Jul. 2023, doi:10.3390/app13137872.
A. A. Najar and S. Manohar Naik, “DDoS attack detection using MLP and Random Forest Algorithms,” Int. J. Inf. Technol., vol. 14, no. 5, pp. 2317–2327, 2022, doi: 10.1007/s41870-022-01003-x.
H. Nurwarsito and M. F. Nadhif, “DDoS Attack Early Detection and Mitigation System on SDN using Random Forest Algorithm and Ryu Framework,” in 2021 8th International Conference on Computer and Communication Engineering (ICCCE), 2021, pp. 178–183, doi:10.1109/iccce50029.2021.9467167.
T. Arvind and K. Radhika, “XGBoost Machine Learning Model-Based DDoS Attack Detection and Mitigation in an SDN Environment,” Int. J. Eng. Trends Technol., vol. 71, no. 2, pp. 349–361, 2023, doi:10.14445/22315381/ijett-v71i2p237.
R. Ben Said, Z. Sabir, and I. Askerzade, “CNN-BiLSTM: A Hybrid Deep Learning Approach for Network Intrusion Detection System in Software-Defined Networking with Hybrid Feature Selection,” IEEE Access, vol. 11, pp. 138732–138747, 2023, doi:10.1109/access.2023.3340142.
A. A. Najar and S. Manohar Naik, “Cyber-Secure SDN: A CNN-Based Approach for Efficient Detection and Mitigation of DDoS attacks,” Comput. Secur., vol. 139, 2024, doi:10.1016/j.cose.2024.103716.
O. Polat et al., “Multi-Stage Learning Framework Using Convolutional Neural Network and Decision Tree-Based Classification for Detection of DDoS Pandemic Attacks in SDN-Based SCADA Systems,” Sensors, vol. 24, no. 3, 2024, doi:10.3390/s24031040.
R. Priyadarshini and R. K. Barik, “A deep learning based intelligent framework to mitigate DDoS attack in fog environment,” J. King Saud Univ. - Comput. Inf. Sci., vol. 34, no. 3, pp. 825–831, 2022, doi:10.1016/j.jksuci.2019.04.010.
N. M. Yungaicela-Naula, C. Vargas-Rosales, J. A. Perez-Diaz, E. Jacob, and C. Martinez-Cagnazzo, “Physical Assessment of an SDN-Based Security Framework for DDoS Attack Mitigation: Introducing the SDN-SlowRate-DDoS Dataset,” IEEE Access, vol. 11, pp. 46820–46831, 2023, doi: 10.1109/access.2023.3274577.
D. G. Narayan, W. Heena, and K. Amit, “A Collaborative Approach to Detecting DDoS Attacks in SDN Using Entropy and Deep Learning,” J. Telecommun. Inf. Technol., no. 3, pp. 79–87, 2024, doi:10.26636/jtit.2024.3.1609.
H. Wang and W. Li, “DDosTC: A transformer-based network attack detection hybrid mechanism in SDN,” Sensors, vol. 21, no. 15, 2021, doi: 10.3390/s21155047.
L. D. Manocchio, S. Layeghy, W. W. Lo, G. K. Kulatilleke, M. Sarhan, and M. Portmann, “FlowTransformer: A transformer framework for flow-based network intrusion detection systems,” Expert Syst. Appl., vol. 241, p. 122564, May 2024, doi:10.1016/j.eswa.2023.122564.
D. Patterson et al., “The Carbon Footprint of Machine Learning Training Will Plateau, Then Shrink,” Computer (Long. Beach. Calif)., vol. 55, no. 7, pp. 18–28, Jul. 2022, doi: 10.1109/MC.2022.3148714.
Z. Fan, Z. Yan, and S. Wen, “Deep Learning and Artificial Intelligence in Sustainability: A Review of SDGs, Renewable Energy, and Environmental Health,” Sustain. 2023, Vol. 15, Page 13493, vol. 15, no. 18, p. 13493, Sep. 2023, doi: 10.3390/SU151813493.
T. Adem, A. Mccrabb, V. Goyal, and V. Bertacco, “Evergreen: Comprehensive Carbon Model for Performance-Emission Tradeoffs,” Proc. - 2024 IEEE Int. Symp. Workload Charact. IISWC 2024, pp. 132–143, 2024, doi: 10.1109/IISWC63097.2024.00021.
D. Patterson et al., “Carbon Emissions and Large Neural Network Training,” pp. 1–22, Apr. 2021, doi: 10.48550/arXiv.2104.10350.
R. Nishant, M. Kennedy, and J. Corbett, “Artificial intelligence for sustainability: Challenges, opportunities, and a research agenda,” Int. J. Inf. Manage., vol. 53, no. January, p. 102104, 2020, doi:10.1016/j.ijinfomgt.2020.102104.
V. Mehra et al., “Impacts of digital technologies and social media platforms on advocating environmental sustainability in sports sector,” Discov. Sustain., vol. 6, no. 1, 2025, doi: 10.1007/s43621-025-00932-4.
F. Abdelfattah, K. Dahleez, H. Al Halbusi, and M. Salah, “Strategic green alliances: Integrating green dynamic capabilities, AI, and electronic entrepreneurial innovation for sustainability,” Sustain. Futur., vol. 9, no. January, p. 100433, 2025, doi:10.1016/j.sftr.2025.100433.
X. Wang et al., “A Novel Energy Saving Algorithm for Network Deep Learning Tasks,” 2024 6th Int. Conf. Next Gener. Data-Driven Networks, NGDN 2024, pp. 339–343, 2024, doi:10.1109/ngdn61651.2024.10744084.
T. S. Reddy and B. M. Beena, “Analysis of Green Computing Models on AWS Using Machine Learning Algorithms,” 2024 1st Int. Conf. Women Comput. InCoWoCo 2024 - Proc., pp. 1–6, 2024, doi:10.1109/InCoWoCo64194.2024.10863061.
S. Sarkar et al., “Carbon Footprint Reduction for Sustainable Data Centers in Real-Time,” Proc. AAAI Conf. Artif. Intell., vol. 38, no. 20, pp. 22322–22330, 2024, doi: 10.1609/aaai.v38i20.30238.
T. Akiba, S. Sano, T. Yanase, T. Ohta, and M. Koyama, “Optuna: A Next-generation Hyperparameter Optimization Framework,” Proc. ACM SIGKDD Int. Conf. Knowl. Discov. Data Min., pp. 2623–2631, Jul. 2019, doi: 10.1145/3292500.3330701.
Z. Liu, Y. Wang, F. Feng, Y. Liu, Z. Li, and Y. Shan, “A DDoS Detection Method Based on Feature Engineering and Machine Learning in Software-Defined Networks,” Sensors, vol. 23, no. 13, 2023, doi: 10.3390/s23136176.
S. Bhadauria, N. Aildasani, J. P. Kushwaha, and H. Gauttam, “DDoS Attacks Detection using Ensemble Learning,” 2024 15th Int. Conf. Comput. Commun. Netw. Technol. ICCCNT 2024, pp. 1–6, 2024, doi:10.1109/icccnt61001.2024.10724315.
W. Zhang, G. Yang, and R. Zhang, “DDoS Attack Detection Based on Rényi-RF in SDN Environment,” in 2024 IEEE 7th Information Technology, Networking, Electronic and Automation Control Conference (ITNEC), Sep. 2024, vol. 46, no. 4, pp. 1365–1369, doi:10.1109/itnec60942.2024.10733276.
H. A. Alamri and V. Thayananthan, “Bandwidth control mechanism and extreme gradient boosting algorithm for protecting software-defined networks against DDoS attacks,” IEEE Access, vol. 8, pp. 194269–194288, 2020, doi: 10.1109/access.2020.3033942.
G. B. N. Rao, A. Kumar, N. Kumar, and P. Raj, “Efficient Intelligent Network Intrusion Detection for SDN Using XGBoost,” in 2024 15th International Conference on Computing Communication and Networking Technologies (ICCCNT), 2024, pp. 1–9, doi:10.1109/icccnt61001.2024.10723841.
Y. Ozaki, Y. Tanigaki, S. Watanabe, and M. Onishi, “Multiobjective tree-structured parzen estimator for computationally expensive optimization problems,” GECCO 2020 - Proc. 2020 Genet. Evol. Comput. Conf., pp. 533–541, Jun. 2020, doi:10.1145/3377930.3389817.
B. Shahriari, K. Swersky, Z. Wang, R. P. Adams, and N. De Freitas, “Taking the human out of the loop: A review of Bayesian optimization,” Proc. IEEE, vol. 104, no. 1, pp. 148–175, 2016, doi:10.1109/jproc.2015.2494218.
X. Wang, Y. Jin, S. Schmitt, and M. Olhofer, “Recent Advances in Bayesian Optimization,” ACM Comput. Surv., vol. 55, no. 13s, Dec. 2023, doi: 10.1145/3582078.
T. T. Khoei, S. Ismail, and N. Kaabouch, “Boosting-based Models with Tree-structured Parzen Estimator Optimization to Detect Intrusion Attacks on Smart Grid,” in 2021 IEEE 12th Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON), 2021, pp. 165–170, doi:10.1109/uemcon53757.2021.9666607.
S. Watanabe, "Tree-structured Parzen estimator: Understanding its algorithm components and their roles for better empirical performance," arXiv, preprint arXiv:2304.11127, 2023. [Online]. Available: https://arxiv.org/abs/2304.11127
J. Li et al., “Water quality soft-sensor prediction in anaerobic process using deep neural network optimized by Tree-structured Parzen Estimator,” Front. Environ. Sci. Eng., vol. 17, no. 6, 2023, doi:10.1007/s11783-023-1667-3.
B. Courty et al., “mlco2/codecarbon: v2.4.1.” Zenodo, May 2024, doi:10.5281/zenodo.11171501.
A. Mehra and S. Badotra, “A Novel Framework for Prevention against DDoS Attacks using Software Defined-machine Learning Model,” Int. J. Performability Eng., vol. 18, no. 8, pp. 580–588, 2022, doi:10.23940/ijpe.22.08.p6.580588.

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).