1
1
[Link]
RESEARCH
Abstract
The rapid growth of interconnected devices and complex cyber infrastructures has significantly increased the risk of zero-
day attacks and sophisticated cyber infrastructures that use unexamined vulnerabilities and are not detected by conventional
intrusion detection systems (IDS). The traditional signature-based and heuristic detection methods cannot detect new or
emerging threats, and the centralized deep learning models predispose significant privacy and communication issues since
they require aggregation of the data. In order to amend these problems, some recent works have embraced the use of federated
learning and deep neural networks to detect anomalies in a distributed nature. Nevertheless, current methods like FedAvg-
LSTM, ESA-LSTM-GRU and FedAvg continue to have the issue of slow convergence, client drift, as well as, low adaptability
to heterogeneous data conditions leading to poor accuracy and excessive training loss. To overcome these shortcomings, this
article introduces Federated Proximal Long Short-Term Memory (FP-LSTM) model that combines the strengths of federated
proximal optimization and sequence learning using LSTM autoencoders to be effective in detecting zero-day attacks. FP-
LSTM framework improves the robustness, stabilizes non-IID data model aggregation, and maintains the privacy of data
among clients involved. It has been shown that on experimental evaluation, FP-LSTM has an accuracy of 0.9732, precision of
0.9718, recall of 0.9740, F1-score of 0.9729, and a much lower loss of 0.0649, giving it a better performance than the current
state-of-the-art models. These findings affirm that the FP-LSTM model is a more dependable and privacy-conserving model
of zero-day attacks detection in dynamic and distributed network frameworks.
Keywords Federated proximal · Zero-day attack detection · LSTM autoencoder · Intrusion detection system (IDS) · Federated
learning
1 Introduction
When used in critical systems like industrial control systems, (FedProx) optimization and an LSTM Autoencoder to suc-
smart grids, medical networks and Internet of Things (IoT) cessfully detect zero-day attacks. The FedProx element adds
ecosystems, any vulnerability that goes undetected can cause a proximal word that reduces the difference between local
the disruption of services, data breaches, financial losses and global model parameters, as such, it reduces client drift
or even physical destruction of infrastructure. An example and stabilizes learning using non-IID datasets. In the mean-
is the interruption of a manufacturing process by attacks time, the LSTM Autoencoder tends to effectively capture
on industrial automation systems, and the exploitation of both temporal and sequential dependencies in network traf-
the IoT-based smart environment vulnerability by attackers fic, allowing the identification of anomalous behavior in the
gaining unauthorized access to sensitive data or controlling network to occur early. This combination benefits the speed
connected devices. The growing dependency on distributed of convergence, increases strong performance, and maintains
and interconnected systems consequently enhances the pos- privacy of data. The experimental analysis of the UGRan-
sible effect of the zero-day threats. With the ongoing growth some dataset supports the hypothesis that FP-LSTM attains
of cyber infrastructures in the areas of cloud computing, edge a high result with an accuracy of 0.9732, precision of 0.9718,
devices, and intelligent networks, the capacity to monitor recall of 0.9740, F1-score of 0.9729, and a loss of 0.0649 that
hitherto unknown patterns of attacks is a pressing demand is better than the current state-of-the-art models i.e., FedAvg-
towards ensuring the safety and dependability of digital sys- LSTM [2], ESA-LSTM-GRU [6] and FedAvg [8].
tems in the contemporary world. The main contributions of this study are summarized as
Despite the demonstrations of deep learning-based IDS follows:
models as the promising models to represent intricate attack
patterns, the general constraints continue to impede their a. The article suggests a Federated Proximal LSTM
implementation in practice. Aggregation of large volumes Autoencoder (FP-LSTM) architecture to identify the
of data needed by centralized architectures breaches the pri- zero-day cyberattacks in the distributed environment.
vacy of data, and it adds additional communication overhead The model uses federated learning combined with an
among clients [4]. Besides, these systems usually presuppose LSTM-based autoencoder to learn attack patterns over
equal and balanced data distributions, which is not possible time and maintain the privacy of the data of many clients.
in dynamic and heterogeneous networks. The latter therefore b. The suggested framework includes the FedProx opti-
means that centralized learning frameworks are not scaled mization strategy that enhances the model convergence
well, their privacy is leaked, and unstable when implemented and stability in the heterogeneous federation settings
in decentralized environments [5]. They are not effective where the client data distributions and computational
in identifying zero-day attacks on distributed or resource- resource can be different.
constrained networks including IoT, vehicular networks, and c. The model collaboratively together makes the
industrial systems due to these challenges [6]. reconstruction-based anomaly detection and classi-
Federated Learning (FL) has developed to address these fication, which allows successful identification of
limitations and provide a privacy-preserving model that can hitherto unknown or zero-day attack patterns.
be trained by many clients sharing a common model with- d. The FP-LSTM model is tested on large-scale experiments
out sharing their raw data [7]. Nevertheless, a number of and contrasted with a range of other models, such as
FL-based IDS systems continue to have critical weaknesses FedAvg-LSTM, ESA-LSTM-GRU, and FedAvg, and is
in the face of non-IID data. As an example, LSTM-FedAvg shown to show better results in terms of accuracy, preci-
[2] implements Long Short-Term Memory (LSTM) networks sion, recall, and the F1-score.
with Federated Averaging (FedAvg) algorithm to identify e. To make the models easier to interpret and analyze, the
anomalies over distributed networks, however, it is slow to paper additionally incorporates features importance anal-
converge and has client drift when the distribution of client ysis using SHAP and latent space visualization, which are
data differs. On the same note, ESA-LSTM-GRU [6] is an used to understand how the model identifies anomalous
ensemble stacked autoencoders, LSTM and GRU based net- behaviors.
work that is designed to enhance feature learning but comes
with high training loss and lower adaptability to hetero-
geneous data. Unstable aggregation as well as the loss of
accuracy can also pose difficulties in the standard FedAvg
model because of the inconsistent update of clients [8]. 2 Literature survey
In order to address these drawbacks, this paper pro-
poses the Federated Proximal Long Short-Term Memory The recent cases of cyber-attacks on industrial control sys-
(FP-LSTM) model, which combines Federated Proximal tems, smart infrastructures, and IoT-enabled environments
show that the risks posed by zero-day vulnerabilities have
123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 3 of 22 34
only increased. Such attacks have a tendency to take advan- CNNs need uncontaminated and steady information, thus,
tage of unknown vulnerabilities in network protocols and they are not as effective in noisy or real-time scenarios.
computer software so that attackers can bypass conventional In the article by Popoola et al. [8], Federated Deep
signature-based intrusion detection tools. Consequently, Learning (FDL) was adopted and FedAvg algorithm was
scholars have grown interested in using the concept of deep used to identify IoT botnet attacks. The method ensures
learning and federated learning to enhance the ability to iden- privacy, as well as minimizes network and memory over-
tify previously unknown attack patterns at the same time head the commonness in communication between clients and
preserving data privacy in distributed scenarios. server elevates the latency and therefore not suitable in time
Zero-day attacks were identified as a research direction sensitive settings. A hybrid of VAE-SVDD and Federated
that becomes necessary because of the increasing sophis- Learning proposed by Huong et al. [9] can support Explain-
tication of cyber threats to the IoT, industrial, and smart able AI (XAI) and fast learning, which is called FedeX.
networks systems. Various writings have been conducted on However, when there is an unequal distribution of data, it low-
the deep learning and federated learning models in enhancing ers its stability due to synchronization issues. The article by
intrusion detection. Li et al. [1] proposed MS-Zero Wall that Korba et al. [10] proposed a Federated Learning system based
consists of a Variational Autoencoder (VAE) and an Aggre- on Deep Autoencoders to identify intrusion in Connected
gated Hidden Markov Model (AHMM) to identify multi-step and Automated Vehicles (CAVs) and achieve privacy protec-
zero-day attacks in smart homes. The model works well tion. Non-IID data, however, is problematic to the approach,
with low-resource IoT devices, but has been tested on only a and it has to be tested further on various network topolo-
small set of attack scenarios, casting doubts on scaling. On gies. Under a federated network of vehicles, Campos et al.
the same note, Shrestha et al. [2] used Federated Averag- [11] used Gaussian Mixture Models (GMM) and Variational
ing (FedAvg) using deep autoencoders to identify anomalies Autoencoders (VAE). Although it is a successful anomaly-
in smart grids without violating data privacy. Despite the detecting approach on unlabelled data, its use of Gaussian
ability of this method to maintain user privacy and scale to assumptions restricts its applicability to highly dynamic data
distributed clients, it has slower convergence characteristics conditions.
with the ability to create trust problems between the clients Chaurasia et al. [12] built a Federated IDS based on
and the central server because of the overhead in communi- Residual Network (ResNet) to CAVs with low cost of com-
cation. FedAvg was also used by Belenguer et al. [3] to create munication and also achieves good detection of anomalies
a privacy-preserving framework to detect intrusion in IoT but but lacks generalization capacity in mixed networks. Another
noted that most federated models do not have sophisticated example of VAE-LSTM architecture use on IIoT data is Pinto
architectures that can perform well and generalize to other et al. [13], which identified most of the attack scenarios but
datasets. was unsuccessful in adaptability in real time. According to
A lightweight intrusion detection system that is Federated Ohtani et al. [14], the IDAC framework automatically labels
CNN-LSTM based, namely FL-LIDS, was proposed by Devi attack users during federated learning without human actions,
et al. [4] to be applied in smart cities and Wireless Sensor Net- and it reveals fast detection within a variable level of per-
works. It is very effective in detecting DDoS attacks as well as formance, which is not consistent across devices. Alshehri
minimizing communication costs, but it is not able to detect et al. [15] provided a Federated Learning with Fully Con-
undetectable attacks and demonstrates poor accuracy in very nected Autoencoder (FC-AE) of electricity theft detection
distributed data networks. In the study by Aslam et al. [5] an in smart grids. Although it is privacy friendly, it cannot
Improved Autoencoder (ImpAE) dedicated to the Industrial be used efficiently in limited environments because of its
Control Systems (ICS) is created and can identify anomalies high local computation requirement. FedAvg, FedProx, and
and cyber threats in critical infrastructure. Its performance on FedOpt were incorporated in the Flower framework by Desh-
various datasets, however, has not been tested, which limits mukh et al. [16], making use of the distributed detection
its industrial performance. Babaey and Faragardi [6] intro- protection of sensitive data. Nevertheless, the problem of
duced a stacked autoencoders (ESA-LSTM-GRU) ensemble communication costs and model personalization has not been
model, which involves LSTM, GRU, and stacked autoen- resolved. Massarani et al. [17] proposed a Prototype and
coders to detect web attacks. Even though the ensemble is Meta-Ensemble Learning method of smart meter data, which
more stable and is able to capture intricate temporal char- has shorter training duration and lower false alarms, but it has
acteristics, it requires high computational fees and shows not been verified in actual deployment.
latencies in real time performance. Ibrahim Hairab et al. [7] A Dual Autoencoder and One-Class SVM Federated
applied Convolutional Neural Networks (CNN) to identify Learning was suggested by Verma et al. [18] to work with
anomalies in IoT networks, and the results showed high qual- 5G-enabled IIoT systems, with high-quality detection in the
ity in comparison with the traditional approaches. However, case of uneven data conditions. Nevertheless, it has a dual-
architecture design, which adds to computational complexity.
123
34 Page 4 of 22 P. G. Arepalli et al.
123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 5 of 22 34
Fig. 1 Violin plot of the distribution of network traffic features of normal and attack classes in UGRansome dataset. The inconsistency and
heterogeneity of the traffic patterns on which the FP-LSTM model is trained and tested are emphasized by the plot
ci → LE(ci ) i (1)
(e) Federated Partitioning
After preprocessing, the data was split into five fed-
The FP-LSTM model is able to encode symbolic traffic
erated clients (NUMCLIENTS 5) with each client
characteristics in numerical format, and learn protocol-
getting non-IID slice of the data. This simulated physical
based behaviours transitions that reveal attack patterns.
distributed environments where network nodes receive
locally different traffic patterns. To address the hetero-
(c) Standardization geneity of data that is presented by these partitions
Numbers were normalized using z-score normalization the FedProx optimizer uses a proximal regularization
in order to enhance convergence and stability in training: term μwi − wglobal 2 , which is used to find the large
deviations between the local and global weights. This
f j − μj provides stable convergence across the world even in
fj , j 1,2, . . . , d (2)
σj cases when there is a large variation in client datasets.
123
34 Page 6 of 22 P. G. Arepalli et al.
123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 7 of 22 34
Fig. 2 Architecture of FP –
LSTM
the LSTM to remember important historical context and still Equation 9 is the hidden state update which uses tanh
be able to take into consideration new information of rele- activation on the updated state of the cell, multiplied by the
vance. output gate. The resulting latent vector is effectively a sum-
mary of time to be used in other downstream work.
Ct Ft Ct−1 + It C̃t (7)
h t Ot tanh(Ct ) (9)
The amount (or degree) of the cell state with which the
hidden state is affected by the output gate is regulated by Latent vector extraction (Equation 10) maps temporal
a sigmoid gate (Equation 8). This choice assists in selecting features into a lower dimensional representation containing
the most informative characteristics downstream to make a important dynamics of the network. This is a vector that is
reconstruction and categorize them. employed in input reconstruction and anomaly classification.
Ot σ Wo h t−1 , xt + bo (8) z t f enc (h t ) φ(Wz h t + bz ) (10)
123
34 Page 8 of 22 P. G. Arepalli et al.
The latent vector is used to reconstruct the original input This trade-off is effective in improving detection effective-
(Decoder reconstruction Equation 11) with a minimal error to ness and model consistency.
identify normative and abnormal patterns. Tolerant errors at
high reconstruction are used to identify of possible zero-day Llocal Lr ec + Lcls + L pr ox (16)
attacks
Aggregation of servers (Equation 17) calculates
x̂t f dec (z t ) ψ(Wd z t + bd ) (11) weighted averaging of client updating parameters in depend-
ing on data sizes to create a global model of consensus. This
The logits of classification probabilities (Equation 12) saves on privacy since raw data is not shared.
are calculated by running latent features through SoftMax
and fully connected layers and produce probabilities of the
K
nk (r )
known attack classes. This eases the process of accurate ω(r ) ωk (17)
n
multi-classification as well as anomaly identification k1
1
N
Lrec xt − x̂t 2 (13) 3.4.1 Client – side aggregation of FP – LSTM
N
t1
The client-side aggregation of the FP-LSTM framework,
Cross-entropy between actual labels and predicted prob- depicted in Fig. 4: Client-side architecture, specifies where
abilities between the actual labels and the predicted ones is each client is left to train a local LSTM Autoencoder on their
used as classification loss (Equation 14) to punish misclassi- partitioned non-IID data. Pretraining is done on sequence
fication. This loss increases the discrimination of the model reconstruction and then fine-tuning is done to distinguish
of types of attacks. normal, known, and zero-day attacks and maintain privacy
of the data by not sharing the raw traffic data. Mini-batch
1
N
training proves to be efficient and enables the model to adapt
Lcls − yt log ŷt (14)
N to the individual distribution of the data of each client
t1
The results including the new model parameters of
Equation 15 is known as FedProx regularization, which encoder, decoder and classifier weights are extracted and
fines the gap between local and global model parame- transmitted to the central server to undergo federated aggre-
ters to minimize client drift during federated training. This gation. This algorithm, which is presented in Algorithm 1,
encourages the steady convergence even when there is het- guarantees the exchange of parameters instead of raw data,
erogeneous data distribution. which respects privacy and reduces the communication cost.
By means of such a decentralized update process with the
μ FedProx optimization, the suggested FP-LSTM model shows
L pr ox ωk − ω2 (15)
2 balanced global knowledge incorporation stabilizing con-
vergence in heterogeneous environments and increasing the
Total loss (Equation 16) it adds reconstruction, classifi-
accuracy of zero-day attack detection.
cation, and FedProx losses into a unified objective, which
jointly trains to make client and global models consistent.
123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 9 of 22 34
123
34 Page 10 of 22 P. G. Arepalli et al.
The server iteratively sums up client models and sends data. This methodology, which allows the correct classifica-
the revised global model to the clients aiding the refinement tion of zero-day attacks on errors and provides known classes
of models over federated rounds as outlined in Algorithm on probabilities, does not make the global model refinement
2. This form of aggregation maintains privacy of client data and adaptive threat detection reliable and privacy preserving
since it only shares parameters, provides scalability and con- in the federated environment.
vergence towards efficient global model of zero-day attack
detection in distributed networks.
The aggregation process on the server side in the FP- 4 Results and discussion
LSTM system, where the global model is initialized and
updated through aggregation of weighted client updates as The FP-LSTM model was tested on the UGRansome dataset,
they come following local training, is described in Algo- which was divided among five federated clients as a close
rithm 2. To enable the hybrid decision rule in inference, the replica of heterogeneous and real-world network setups.
server determines the threshold to be used in the detection Each client trained a local LSTM autoencoder independently,
of anomalies based on the reconstruction errors on normal based on mini-batch learning, both during pretraining to do
123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 11 of 22 34
Table 1 Hyper-parameters used in the proposed FP-LSTM model resulting in more dependable and consistent federated train-
ing.
Parameter FP–LSTM (proposed model)
1
N
sequence reconstruction and during fine-tuning to do clas- Loss − [yi log( yi ) + (1 − yi )log(1 − yi )] (23)
N
sification. A central server combined client models with the i1
FedProx algorithm in 20 global rounds periodically, converg-
ing the models, and maintaining privacy because it did not Accuracy: The accuracy proposed of FP-LSTM model,
explicitly exchange data. Table 1 shows the hyper-parameters accuracy is a metric used to evaluate the effectiveness of
used to implement proposed FP-LSTM model. the proposed model in terms of the correct prediction of the
attack categories relative to the real ones.
4.1 Federated stability plots for proposed N umber o f Corr ect Pr edictions
and state-of-art models Accuracy × 100
T otal N umbero f Predictions
(24)
The FP-LSTM model suggested uses federated stability to
measure convergence behavior repeatability and parameter Precision: Precision is employed to assess the number of
correspondence of distributed clients in collaborative learn- the attacks predicted by the FP-LSTM model as the correct
ing. Client drift can be prevented using stability and can offer ones. It can be used to minimize zero-day attack detection
stable model behavior in a federated environment despite the false alarms.
heterogeneity of the data.
Cosine Similarity measures parameter align- T r ue Positives
Pr ecision (25)
ment: Similarit y AB A·B
(Equation 20) remains T r ue Positives + False Positives
high due to regularized updates.
Client Drift quantifies deviation ωk − ωglobal 2 Recall: Recall is used to determine the effectiveness of
(Equation 21) minimized through proximal regularization. the FP-LSTM model to recognize all the actual samples of
Loss Reduction shows stable convergence with hybrid positive attacks. It is useful in ensuring that fewer samples
loss Llocal L pr evious − Lcurr ent (Equation 22) ensuring of attacks are overlooked during prediction.
efficient learning.
T r ue Positives
The FP-LSTM model, as shown in Fig. 6, has the highest Recall (26)
federated stability compared to the baseline model includ- T r ue Positives + FalseN egatives
ing FedAvg-LSTM, ESA-LSTM-GRU and FedAvg. Cosine
F1-Score: F1-Score The FP-LSTM model uses F1-Score
similarity between FP-LSTM is also high (≈0.98) which
to offer a more balanced metric of precision and recall par-
means there are strong similarities in the parameters across
ticularly when imbalanced datasets of attacks are concerned.
the clients. Client drift is reduced (≈0.02) and reduction of
losses is more stable and faster as it converts to smaller value Pr ecision × Recall
(0.0649). By comparison, FedAvg-LSTM and FedAvg have F1 − Scor e 2 × (27)
Pr ecision + Recall
greater drift (≈0.08-0.12) and slower convergence because
they do not have drift regularization. Although ESA-LSTM- Figure 7 shows the training curves indicated that FP-
GRU is more resilient than FedAvg variants, it exhibits LSTM has outstanding learning properties. The loss plot
oscillations in loss and similarity measures, which is due to indicates that the training loss (0.068) and the validation loss
its complicated ensemble structure and absence of federated (0.065) converge very fast with the loss stabilizing at low
regularization. The introduction of FedProx into FP-LSTM, values, which means that effective learning is achieved with-
therefore, overcomes the constraints of current methods, out overfitting. Accuracy plot indicates that training accuracy
123
34 Page 12 of 22 P. G. Arepalli et al.
(c)Loss Reduction
Fig. 6 Federated stability comparison in both FP-LSTM and baseline models with cosine similarity, client drift, and loss reduction in the process
of federated training
steadily increases to 97.8 % and validation accuracy of 97.3 and federated learning strategies, which are compared and
% indicating good generalization. The classification metrics contrasted, are FedAvg-LSTM [2], ESA-LSTM-GRU [6],
plot has a fair balance in terms of precision (97.18%), recall and FedAvg [8]. In order to measure the performance of
(97.40%), and F1-score (97.29%) during training. the proposed FP-LSTM framework with respect to zero-day
This performance is achieved because of the integrated cyberattack detection, several performance metrics were put
architecture of FP-LSTM. The similarity in the training and into consideration, such as accuracy, precision, recall, F1-
validation curves indicates the effectiveness of the model to score, and loss. The proposed model was trained and assessed
identify zero-day attacks with a minimal number of false on the basis of experimental data, and the outcomes were
positives in the distributed network setting. compared to the current baseline models like FedAvg-LSTM,
ESA-LSTM-GRU, and FedAvg. The experiment findings
indicate that the FP-LSTM model has a better performance
4.3 Evaluation metrics for proposed and state-of-art
with the accuracy of 0.9732, precision of 0.9718, recall
models
0.9740 and F1-score of 0.9729 but with a lower loss value of
0.0649.
This section will give a comparative analysis of the proposed
According to the results in Table 2, the FP-LSTM model
FP-LSTM model with the state-of-the-art federated and deep
has been shown to be above all the baseline models in all the
learning-based intrusion detection models. The architectural
123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 13 of 22 34
evaluation metrics. FP-LSTM (97.32%) has a higher accu- 4.3.1 ROC, FPR and FNR analysis
racy by about 6% when compared to FedAvg-LSTM and
FedAvg as well as by 3% compared to ESA-LSTM-GRU. To continue assessing the efficiency of the proposed FP-
In the same way, the loss value of FP-LSTM (0.0649) is LSTM model, other assessment measures such as Receiver
much smaller, about one-third of the FedAvg-LSTM and Operating Characteristic (ROC) analysis, False Positive Rate
a quarter of fedavgs. Absence of combined reconstruction- (FPR) and False Negative Rate (FNR) were evaluated. ROC
classification decision rule and lack of federated stabilization analysis is used to determine the capabilities of the model
mechanisms in the baseline models are the main reasons to differentiate between normal and malicious network traf-
of this gap in performance. As an example, FedAvg-LSTM fic under varying classification thresholds. The bigger the
and FedAvg only use averaging as an aggregation method, area under the ROC curve (AUC) the better the classifica-
which is likely to suffer client drift in non-IID data. Although tion ability. The comparison results of the ROC show that
ESA-LSTM-GRU uses ensemble learning, it lacks federated the proposed FP-LSTM model has the highest value of AUC
regularization and is more computationally expensive and 0.973 in comparison to the output of the models used as the
fails to train. By contrast, FP-LSTM combines FedProx to baseline: FedAvg-LSTM (0.906), ESA-LSTM-GRU (0.941),
counter drift and has a hybrid mechanism of dealing with and FedAvg (0.908). This shows that FP-LSTM has a better
anomaly, which allows it to deliver both incremental perfor- capability of discriminating normal traffic and attack traffic.
mance improvements and reliable high accuracy in various Besides that, the False Positive Rate (FPR) and False
network settings. Negative Rate (FNR) in Fig. 8 were studied to define the
123
34 Page 14 of 22 P. G. Arepalli et al.
dependability of the intrusion detection mechanism. Smaller 4.4 Robustness and generalization
values of FPR imply that there are less normal traffic sam-
ples that are categorized as attacks and smaller values of FNR The principle of robustness and generalization states that
imply that there are less attack samples that are misclassified the service can survive new demands that were not present
as normal traffic. The findings indicate that FP-LSTM has during its initial test scenarios. It can be justified that the
the lowest FPR (0.028) and FNR (0.026) values among the proposed FP-LSTM model is stronger and has the general-
models that have been compared, which proves its efficiency ization power by the fact that the confusion matrix is of the
to minimize false alarms and false negative attack detection. diagonally dominant nature and that the same is employed
in 10-fold cross-validation. These two analyses indicate that
the model is reliable in categorizing normal, known and zero-
day attacks on a large scale of splits and it is not overfitted.
It implies that the framework can be practiced with a great
123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 15 of 22 34
level of confidence even in the heterogeneous settings of a variants, nevertheless, a significant number of zero-day sam-
real world. ples is misclassified. The strength of FP-LSTM lies in the
fact that it has a dual reconstruction-classification goal and
4.4.1 Confusion matrix for proposed and state-of-art federated stabilization, which contributes to the decreased
models overfitting and improved generalization in the case of unseen
attack patterns.
A confusion matrix gives a specific orientation of model pre-
dictions against actual labels showing true positives, false 4.4.2 10-fold cross validation for proposed and state-of-art
positives, true negatives and false negatives. It is also a cru- models
cial measure to test the strength and generalization of the
classification models in the imbalanced and multi-class sce- The generalizability and stability of the model are also deter-
narios like zero-day attacks. mined using 10-fold cross-validation with different data
Figure 9 demonstrates the confusion matrices of FP- partitions. It assists in determining whether the model is
LSTM and the models of the state-of-art-models. The reliable regardless of the way the data is split which is instru-
FP-LSTM model exhibits a large count of true positives mental to the application in real world.
on both known and zero-day attack classes as well as Table 3 provides the 10-fold cross-validation of FP-
shows low misclassification between normal and attack LSTM and the baseline models. FP-LSTM has high accuracy
traffic. On the contrary, FedAvg-LSTM and FedAvg have (between 0.9549 and 0.9631) and low loss (between 0.0935
higher false positive and false negative rates, especially in and 0.1096) in all the folds. Comparatively, FedAvg-LSTM
the identification of zero-day attacks and normal behavior. and FedAvg are more variable and less averagely perform-
ESA-LSTM-GRU demonstrates better results than FedAvg ing, with the accuracy values going down to 0.8738 in
123
34 Page 16 of 22 P. G. Arepalli et al.
123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 17 of 22 34
4.5.1 SHAP plots values. It is observed that the average absolute SHAP of fea-
tures flow duration, packet count, and source bytes are large
SHAP (SHapley Additive exPlanations) plots are able to give relative to other features, meaning that the attributes are the
model interpretability, with each input feature measured on most influential ones in the classification choices of the FP-
how it contributes to the final prediction. Model explainabil- LSTM model. Features which have a greater SHAP value are
ity is of special concern to cybersecurity applications to assist always likely to enhance the likelihood of detecting malicious
analysts with the explanation of attack detection decisions to traffic patterns whereas features with lower SHAP values do
know what features of a network work the most in identifying not make much difference to the prediction result. This quan-
attacks. titative interpretation validates the FP-LSTM model as being
The significance of the most important network traffic fea- based on temporal traffic characteristics as the main indica-
tures is also emphasized by a quantitative analysis of SHAP tor of differentiating between normal and anomalous network
behavior.
123
34 Page 18 of 22 P. G. Arepalli et al.
(a) FP – LSTM
(b) FedAvg-LSTM
(c) ESA-LSTM-GRU
Fig. 12 Partially Dependency Plots that show the impact of significant network characteristics on model predictions
123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 19 of 22 34
(d)Fed Avg
Fig. 12 continued
Table 2 Comparison of FP –
LSTM with state-of-the-art Models Accuracy Precision Recall F1-score Loss
models
FP – LSTM 0.9732 0.9718 0.9740 0.9729 0.0649
FedAvg-LSTM 0.9105 0.9048 0.9077 0.9062 0.2360
ESA-LSTM-GRU 0.9407 0.9413 0.9407 0.9409 0.1625
Fedavg 0.9081 0.9014 0.9154 0.9083 0.2795
The SHAP summary plots of FP-LSTM and the state- 4.5.2 Radial bias plots
of-art-models are shown in Fig. 10. FP-LSTM demonstrates
the strong and consistent rank of features with flow duration, Radial Bias Function (RBF) plots are used to see predictions
number of packets, and source bytes the most important ones. variation in comparison to central feature values, whereas the
Conversely, the state-of-art-models have more scattered and Partial Dependency Plots (PDPs) are used to see the marginal
less interpretable SHAP values, which means that they do not impact of single features on model outputs.
have a stable feature learning. The ability to better explain the Based on this Fig. 11 demonstrates the plots of RBF
FP-LSTM is explained by its stabilized training and hybrid between FP-LSTM and the state-of-art-models. FP-LSTM
architecture that combine to give more reliable and inter- shows curves that are smooth and monotonic that imply
pretable features attributions. constant and predictable behaviour to feature change. Nev-
ertheless, FedAvg-LSTM has a moderate variance, ESA-
LSTM-GRU and FedAvg have sporadic non-monotonic
123
34 Page 20 of 22 P. G. Arepalli et al.
patterns which mean that they are not stable when the data is when compared to ESA-LSTM-GRU (3.5M the most com-
not homogeneous. plex because of the ensemble structure). FP-LSTM is simpler
to train than ESA-LSTM-GRU (in terms of time complexity
4.5.3 Partial dependency plots it takes around 45s per round) and FedAvg-LSTM (around
52s per round), and as such it is more efficient when feder-
Figure 12 presents PDPs for example to show features ated deployed. Although FedAvg is computationally light, it
marginal effects. FP-LSTM has the same dependency rela- has poor performance and stability. FP-LSTM is balanced in
tionships, and features such as flow duration and packet complexity and is scalable coupled with the ability to detect
count have a gradual and rational influence on predictions. zero-day attacks over a distributed system.
State-of-art-models have irregular curves with abrupt jumps, Practically, the suggested FP-LSTM framework offers a
especially FedAvg which displays irregular trends as a result number of design recommendations to planners and system
of client drift problems. designers in terms of cybersecurity. First, federated learning
The consistency in the plots of FP-LSTM is a confirmation architectures are expected to allocate network monitoring
of its strength, which can be explained by FedProx regular- functions to a number of clients or edge nodes to retain data
ization and the hybrid structure that provides the consistency privacy, but collaborate to detect threats. Second, federa-
of learning on clients. The relationships in predictability fea- tion optimization methods like FedProx should be utilized in
tures make the model easier to interpret and more reliable in practice when deploying the system because network traffic
deployment to the real world. within organizations or devices can possibly have heteroge-
neous data distributions. Third, LSTM-based autoencoders
4.6 Complexity plots are useful in situations where network traffic has a tempo-
ral relationship, including enterprise networks, IoT systems,
Complexity Model is determined by the number of param- and cloud systems. Also, system designers are advised to
eters (parameter complexity) and the Time Complexity is make training choices including the batch size, learning rate,
determined by training/inference time (time complexity). and communication rounds in order to optimize the trade-off
Figure 13 shows the parameter and time complexity of between performance in detection and the cost of computa-
FP-LSTM and the base models. FP-LSTM is neither over tion. Lastly, explainability methods like SHAP analysis will
complex nor over-parametrized (parameter count of 2.1M) enable the security analyst to gain a better understanding
123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 21 of 22 34
of the model decision and enhance their trust in automated Data availability The data that support the findings of this study are
intrusion detectors. These suggestions represent the ability available from the corresponding author on request. The data is not
publicly available due to privacy or ethical restrictions.
of the FP-LSTM framework to be successfully implemented
in the real-life distributed cybersecurity setting.
Declarations
Ethical approval Author seen and agreed with the contents of the
manuscript and are looking forward to publishing this paper in this
5 Conclusion and future work journal.
The proposed FP-LSTM framework effectively addresses the Consent for publication Author gave explicit consent to publish
this manuscript.
challenge of detecting zero-day cyberattacks in distributed
network environments in the distributed network setting
because the Federated Proximal optimization technique is
incorporated along with the LSTM autoencoder architecture.
This combination method yields impressive accuracy, preci-
References
sion, recall and F1-score of 97.32, 97.18, 97.40, and a small
loss of 0.0649, and is much better performing than other 1. Li, T., Hong, Z., Feng, W., Yu, L., Wen, Z.: Ms-zerowall: detecting
state of the art models, such as FedAvg-LSTM, ESA-LSTM- zero-day multi-step attack in smart home using vae and hmm. IEEE
GRU, and FedAvg. The solution is effective in reducing client Trans Vehicul Technol 73(9), 13278–13291 (2024)
2. Shrestha, R., Mohammadi, M., Sinaei, S., Salcines, A., Pampliega,
drift by using FedProx regularization, and user privacy by
D., Clemente, R., et al.: Anomaly detection based on LSTM and
using federated learning concepts. The practical use of the autoencoders using federated learning in smart electric grid. J Par-
model can be applied to many different areas of cybersecurity allel Distrib Comput 193, 104951 (2024)
such as IoT networks, smart grid systems, industrial control 3. Belenguer, A., Pascual, J.A., Navaridas, J.: A review of federated
learning applications in intrusion detection systems. Comput Netw
systems, and enterprise security systems in which privacy-
258, 111023 (2025)
preserving, adaptive threat detection is critical. The moderate 4. Devi, M., Nandal, P., Sehrawat, H.: Federated learning-enabled
levels of complexity profile predispose it as applicable to be lightweight intrusion detection system for wireless sensor net-
deployed in environments with limited resources and still works: a cybersecurity approach against DDoS attacks in smart
city environments. Intell Syst Appl 27, 200553 (2025)
provides a high level of protection against dynamic zero-day
5. Aslam, M.M., Tufail, A., De Silva, L.C., Haji Mohd Apong,
attacks. R.A.A., Namoun, A.: An improved autoencoder-based approach
Although such developments have been made, there are for anomaly detection in industrial control systems. Syst Sci Con-
some drawbacks that can be improved in the future. The trol Eng 12(1), 2334303 (2024)
6. Babaey, V., Faragardi, H.R.: Detecting zero-day web attacks with
present study presupposes rather constant conditions of net-
an ensemble of LSTM, GRU, and stacked autoencoders. Computers
works and does not extensively cover extreme non-IID cases 14(6), 205 (2025)
when the distribution of client data differs drastically. The 7. Ibrahim Hairab, B., Aslan, H.K., Elsayed, M.S., Jurcut, A.D., Azer,
future research and development might be conducted on M.A.: Anomaly detection of zero-day attacks based on CNN and
regularization techniques. Electronics 12(3), 573 (2023)
the establishment of dynamic client selection processes and
8. Popoola, S.I., Ande, R., Adebisi, B., Gui, G., Hammoudeh,
adaptive aggregation strategies so that more heterogeneous M., Jogunola, O.: Federated deep learning for zero-day botnet
environments can be addressed. Also, the inclusion of real- attack detection in IoT-edge devices. IEEE Internet Things J 9(5),
time model updating feature and federated learning across 3930–3944 (2021)
9. Huong, T.T., Bac, T.P., Ha, K.N., Hoang, N.V., Hoang, N.X.,
organizational boundaries would be critical to enhance the
Hung, N.T., Tran, K.P.: Federated learning-based explainable
practical implementation. Additionally, explainable AI meth- anomaly detection for industrial control systems. IEEE Access 10,
ods to ensure interpretability by security analysts can be also 53854–53872 (2022)
incorporated in further research and examine the framework 10. Korba, A.A., Boualouache, A., Brik, B., Rahal, R., Ghamri-
Doudane, Y., Senouci, S. M. (2023). Federated learning for
against adversarial attacks in federated systems, eventually
zero-day attack detection in 5g and beyond v2x networks.
leading to more robust and transparent zero-day detection In: ICC 2023-IEEE International Conference on Communica-
systems to protect critical infrastructure. tions (pp. 1137–1142). IEEE.
11. Campos, E.M., Gonzalez-Vidal, A., Hernandez-Ramos, J.L.,
Author contributions Concepts, development of methodologies, Skarmeta, A.: Federated learning for misbehaviour detection with
Dataset analysis, Experimentation, results analysis, and writing of the variational autoencoders and Gaussian mixture models. Int J Inf
original draft; Sec 24(2), 1–16 (2025)
12. Chaurasia, N., Ram, M., Verma, P., Mehta, N., Bharot, N. (2024).
Funding It’s not funded by any agency/organization either technically A federated learning approach to network intrusion detection using
or financially. residual networks in industrial IoT networks.
123
34 Page 22 of 22 P. G. Arepalli et al.
13. Pinto, A., Herrera, L.C., Donoso, Y., Gutierrez, J.A.: Enhancing 19. Kumar, V., Sinha, D.: A robust intelligent zero-day cyber-attack
critical infrastructure security: unsupervised learning approaches detection technique. Complex Intell Syst 7(5), 2211–2234 (2021)
for anomaly detection. Int J Comput Intell Syst 17(1), 236 (2024) 20. Sarhan, M., Layeghy, S., Gallagher, M., Portmann, M.: From zero-
14. Ohtani, T., Yamamoto, R., Ohzahata, S.: IDAC: federated learning- shot machine learning to zero-day attack detection. Int J Inf Sec
based intrusion detection using autonomously extracted anomalies 22(4), 947–959 (2023)
in IoT. Sensors 24(10), 3218 (2024) 21. Dr. Mike Wa Nkongolo. UGRansome . Kaggle, [Link]
15. Alshehri, A., Badr, M.M., Baza, M., Alshahrani, H.: Deep anomaly [Link]/datasets/nkongolo/ugransome-dataset (Accessed on
detection framework utilizing federated learning for electricity December 14,2023)
theft zero-day cyberattacks. Sensors 24(10), 3236 (2024)
16. Deshmukh, A., de la Rosa, P.E., Rodriguez, R.V., Dasari, S.:
Enhancing privacy in IoT-enabled digital infrastructure: evaluat-
Publisher’s Note Springer Nature remains neutral with regard to juris-
ing federated learning for intrusion and fraud detection. Sensors
dictional claims in published maps and institutional affiliations.
25(10), 3043 (2025)
17. Massarani, A.H., Badr, M.M., Baza, M., Alshahrani, H., Alshehri,
Springer Nature or its licensor (e.g. a society or other partner) holds
A.: Efficient and accurate zero-day electricity theft detection from
exclusive rights to this article under a publishing agreement with the
smart meter sensor data using prototype and ensemble learning.
author(s) or other rightsholder(s); author self-archiving of the accepted
Sensors 25(13), 4111 (2025)
manuscript version of this article is solely governed by the terms of such
18. Verma, P., Bharot, N., Breslin, J.G., O’Shea, D., Vidyarthi, A.,
publishing agreement and applicable law.
Gupta, D.: Zero-day guardian: a dual model enabled federated
learning framework for handling zero-day attacks in 5G enabled
IIoT. IEEE Trans Consum Electron 70(1), 3856–3866 (2023)
123