An Explainable Ai Framework for Multi-Class Attack Classification in Mqtt-Coap-Based Hybrid Energy Monitoring Networks

Hybrid renewable-energy microgrids communicate through lightweight MQTT and CoAP links, exposing network traffic and sensor measurements to cyberattacks. This study presents an explainable framework for multi-class attack classification using reproducible message-level co-simulation of a photovoltaic–wind–diesel–battery microgrid. The simulation incorporates exact power balance, eleven sensors, six attack families, and five categories of challenging benign events. The dataset contains 86,400 thirty-second windows spanning 30 days, including 878 attack bursts. Sixty-eight features combine traffic statistics with energy-consistency residuals calibrated during a clean commissioning interval. Evaluation uses chronological partitioning, a purge gap, and block-bootstrap confidence intervals. Among seven classifiers, boosted trees with a five-window lag achieve a macro-F1 of 0.913 (95% confidence interval: 0.893–0.927), Matthews correlation coefficient of 0.907, accuracy of 0.978, and macro-averaged ROC-AUC of 0.974 on seven unseen days. Random partitioning inflates false-data-injection F1 by up to 13 percentage points. All bursts across five network-visible attack classes are detected, with class F1 scores of 0.93–0.98 and a 1.2% false-alarm rate on normal windows. However, window-level detection rates for false-data injection fall to 81% for bias attacks, 65% for ramp attacks, and at most 10% for energy-balance-preserving attacks. Halving attack intensity reduces macro-F1 by five percentage points, while transfer to a second site produces a twelve-point reduction before local adaptation. TreeSHAP explanations demonstrate faithfulness and stability, with deletion AUC of 0.22 versus 0.51 for random rankings, top-five overlap of 0.89, and approximately one-millisecond computation per window. These simulation-based findings highlight both classification effectiveness and limitations under stealthy attacks and site changes; code and data are released for replication.

Authors

Institutions

Publication Details

Journal
Babylonian Journal of Machine Learning
Published
2026-11-07
DOI
https://doi.org/10.58496/bjml/2026/017
Primary Topic
Smart Grid Security and Resilience
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

An Explainable Ai Framework for Multi-Class Attack Classification in Mqtt-Coap-Based Hybrid Energy Monitoring Networks

Ayman AbuBaker, Oras Fadhil Khalaf, Amer Alqutaish, Ahmed Fakhri Abdullah et al.
2 links
Babylonian Journal of Machine Learning
Smart Grid Security and Resilience
article

An Explainable Ai Framework for Multi-Class Attack Classification in Mqtt-Coap-Based Hybrid Energy Monitoring Networks

Ayman AbuBaker, Oras Fadhil Khalaf, Amer Alqutaish, Ahmed Fakhri Abdullah, Omar Ahmed Razooqi, Saidah Khan
article en

Abstract

Hybrid renewable-energy microgrids communicate through lightweight MQTT and CoAP links, exposing network traffic and sensor measurements to cyberattacks. This study presents an explainable framework for multi-class attack classification using reproducible message-level co-simulation of a photovoltaic–wind–diesel–battery microgrid. The simulation incorporates exact power balance, eleven sensors, six attack families, and five categories of challenging benign events. The dataset contains 86,400 thirty-second windows spanning 30 days, including 878 attack bursts. Sixty-eight features combine traffic statistics with energy-consistency residuals calibrated during a clean commissioning interval. Evaluation uses chronological partitioning, a purge gap, and block-bootstrap confidence intervals. Among seven classifiers, boosted trees with a five-window lag achieve a macro-F1 of 0.913 (95% confidence interval: 0.893–0.927), Matthews correlation coefficient of 0.907, accuracy of 0.978, and macro-averaged ROC-AUC of 0.974 on seven unseen days. Random partitioning inflates false-data-injection F1 by up to 13 percentage points. All bursts across five network-visible attack classes are detected, with class F1 scores of 0.93–0.98 and a 1.2% false-alarm rate on normal windows. However, window-level detection rates for false-data injection fall to 81% for bias attacks, 65% for ramp attacks, and at most 10% for energy-balance-preserving attacks. Halving attack intensity reduces macro-F1 by five percentage points, while transfer to a second site produces a twelve-point reduction before local adaptation. TreeSHAP explanations demonstrate faithfulness and stability, with deletion AUC of 0.22 versus 0.51 for random rankings, top-five overlap of 0.89, and approximately one-millisecond computation per window. These simulation-based findings highlight both classification effectiveness and limitations under stealthy attacks and site changes; code and data are released for replication.

Babylonian Journal of Machine LearningVol. 2026
Applied Science Private University (JO), Ministry of Higher Education and Scientific Research (IQ), University of Samarra (IQ), Griffith College (IE), King Faisal University (SA), University of Tikrit (IQ)
King Faisal University
Openalex Percentile: Top 22%
Smart Grid Security and Resilience
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon