0% found this document useful (0 votes)
2 views22 pages

1

The document presents the Federated Proximal Long Short-Term Memory (FP-LSTM) model, designed for detecting zero-day cyberattacks by combining federated proximal optimization and LSTM autoencoders. FP-LSTM addresses limitations of traditional intrusion detection systems by enhancing accuracy, maintaining data privacy, and stabilizing learning in heterogeneous environments, achieving high performance metrics compared to existing models. Experimental results demonstrate FP-LSTM's effectiveness in identifying previously unknown attack patterns in dynamic networks.

Uploaded by

shaiksalma4505
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views22 pages

1

The document presents the Federated Proximal Long Short-Term Memory (FP-LSTM) model, designed for detecting zero-day cyberattacks by combining federated proximal optimization and LSTM autoencoders. FP-LSTM addresses limitations of traditional intrusion detection systems by enhancing accuracy, maintaining data privacy, and stabilizing learning in heterogeneous environments, achieving high performance metrics compared to existing models. Experimental results demonstrate FP-LSTM's effectiveness in identifying previously unknown attack patterns in dynamic networks.

Uploaded by

shaiksalma4505
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Journal of Computer Virology and Hacking Techniques (2026) 22:34

[Link]

RESEARCH

FP-LSTM: a federated proximal LSTM autoencoder framework


for zero-day cyberattack detection
Peda Gopi Arepalli1 · Karuna Sri Jaladi1 · Jairam Naik Khetavath2 · Chaitanya Kosaraju1 ·
Satya Sandeep Kanumalli1 · Lakshman Narayana Vejendla1

Received: 17 December 2025 / Accepted: 11 March 2026


© The Author(s), under exclusive licence to Springer-Verlag France SAS, part of Springer Nature 2026

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

B Peda Gopi Arepalli The rising interdependence of electronic structures has


gopiarepalli2@[Link] greatly raised the chances of zero-day cyber attacks which
Karuna Sri Jaladi take advantage of the unidentified vulnerability prior to its
karunasrijaladi13@[Link] fix or reporting [1]. These attacks are also very dangerous
Jairam Naik Khetavath since the standard Intrusion Detection System (IDS) uses
[Link]@[Link] known signatures or heuristic patterns which are unable to
Chaitanya Kosaraju detect new or dynamic threats [2]. Consequently, attackers
chaitanyacns3@[Link] will be able to break into smart networks and cyber-physical
Satya Sandeep Kanumalli systems without occasioning any preset alerts. The growing
satyasandeepk@[Link] complexity of cyber infrastructures and the spread of Internet
Lakshman Narayana Vejendla of Things (IoT)-related devices are another complication on
lakshmanv58@[Link] detection endeavors, thus, making zero-day attacks an urgent
1 issue among cybersecurity scholars and practitioners [3].
Vignan’s Nirula Institute of Technology and Science for
Women, Guntur, Guntur, India The effects of not identifying a zero-day cyberattack may
2 be devastating to the contemporary digital infrastructure.
National Institute of Technology Raipur, Raipur, India

0123456789().: V,-vol 123


34 Page 2 of 22 P. G. Arepalli et al.

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.

A graph-based signature detection approach was introduced 3.1 Data acquisition


by Kumar and Sinha [19], which can be used to identify new
attack patterns in raw streams of bytes but has low efficiency The data employed in this work is taken into the dataset
when it comes to detecting small-scale attacks. Sarhan et al. UGRansome [21] which is a publicly available benchmark
[20] proposed a Zero-Shot Learning (ZSL) model [20] that dataset created by the research group of the University of
recognizes unknown attacks without known samples, which Granada and available at Kaggle. The data has large size net-
allows future threats to be detected adaptively. Although it work traffic logs of the enterprise network setting in which
is new, ZSL has the challenge of rare or unstructured attack normal user operations and ransomware attack conditions
data because of inconsistent feature representation. All these were modeled. To obtain realistic communication patterns
studies indicate the increased use of deep learning and fed- between hosts the data collection process was carried out
erated paradigms in zero-day attack detection, with some over a long period of monitoring a controlled enterprise net-
challenges that remain in the scalability, heterogeneity, and work infrastructure. The network flow attributes in the dataset
explainability. are much varied like the source IP address, destination IP
Research Gaps Identified address, ports, communication protocols, number of pack-
ets, flow duration, source bytes, destination bytes and the
a. Although federated learning models are useful in privacy timestamp. Besides, the dataset gives the labeled instances
preservation, they do not always perform well in hetero- of traffic that should be considered as the benign behavior
geneous and non-IID client data distributions. and as the malicious acts related to ransomware. These fea-
b. Autoencoder-based, LSTM-based, and CNN-based mod- tures indicate the temporal and spatial nature of the network
els are seen to be very efficient in capturing complex communications and the machine learning and deep learn-
anomalies, but they have a high computational and com- ing designs will be able to learn behavioral patterns that are
munication overhead that makes them less suitable to related to cyberattacks.
real-time or scalable systems. The data distribution violin plot in Fig. 1 demonstrates the
c. Combination and hybrid models like ESA-LSTM-GRU change and the concentration of network traffic parameters,
enhance the ability of the detection but come at the cost of both of normal and attack classes. The visualization implies
much more complex and expensive models and training. the heterogeneous character of the dataset and demonstrates
d. The majority of the existing strategies are domain- the existence of various traffic patterns, which are signifi-
specific, i.e. targeting specific attacks or network fea- cant in assessing the strength of intrusion detection models.
tures, thus limiting these methods in generalisation to a UGRansome dataset is essential to testing the FP-LSTM
variety of different or industrial applications. framework (in its proposed form) because it offers realistic
e. Explainable and privacy preserving federated frame- traffic patterns that can allow the model to learn time-
works that can be deployed in real time and scale up dependent correlation and detect abnormal behavior that can
to detect zero-day attacks are lacking. be linked to the zero-day cyberattacks. These heterogeneous
and imbalanced patterns of traffic within the dataset enable
the LSTM Autoencoder to acquire long-term dependencies
within network behavior, and the Federated Proximal (Fed-
3 Materials and methods Prox) learning algorithm recreates distributed client settings
in which data privacy and locality may be maintained. This
This section describes the methodology adopted to come architecture enables the proposed FP-LSTM model to effi-
up with Federated Proximal Long Short-Term Memory (FP- ciently identify the abnormal traffic patterns on decentralized
LSTM) framework of detecting zero-day attacks. FP-LSTM clients and privacy in distributed cybersecurity settings.
model combines a sequence reconstruction and classification
temporal LSTM Autoencoder with the FedProx optimiza-
tion strategy to stabilize client updates and reduce drift in 3.2 Data augmentation and pre-processing
the process of federated aggregation. The whole process,
including the data acquisition, augmentation, and prepro- The UGRansome data is a collection of heterogeneous net-
cessing, client-side and server-side model training are to work traffic logs with benign and malicious (known and
process heterogeneous and non-IID network traffic with- unknown) traffic whose characteristics include the duration
out breaking privacy of distributed clients. In this section, of the flow containing packets, the number of packets, bytes,
we present the key steps, formulas, and architecture that and protocol type. In order to transform the data to be com-
make the FP-LSTM framework to guarantee robust, scal- patible with temporal learning and stable federated training,
able and privacy-preserving zero-day attacks detection on systematic preprocessing was performed as it is done in the
the dynamic cyber environment. FP-LSTM code. This guaranteed uniformity of data, less

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

noise and enhanced convergence in training when the condi- with


tion of non-IID clients was used.


1 
N 1 N
 2
(a) Cleaning and Deduplication μj  fi j , σ j   fi j − μ j (3)
N N
The need to have duplicate and missing entries was elim- i1 i1

inated to ensure data integrity and eliminate bias due to


repeated flows. This action was necessary to make sure where μ j and σ j denote the mean and standard devia-
that the LSTM Autoencoder is being trained to learn tion of feature j across N samples. This normalization
meaningful time dependencies and avoids the process ensures balanced gradient flow within the LSTM and
of distorted reconstruction of traffic series. stabilizes federated updates under the FedProx strategy.

(b) Categorical Encoding (d) Tensor Conversion and Mini-batching.


Label Encoding was used to encode categorical features: The arrays that have been processed were then converted
Protocol and Flags as numerical features. For each cat- into tensors of 32 bits and trained in batches of 32 sam-
egorical column C j with categories {c1 , . . . , ck }, the ples. Each client operates based on this batching that
transformation maps ci → i for i  1, . . . , k, enabling facilitates effective gradient updates and avoids overfit-
the features to be used in the neural network: ting but still has data locality.

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.

The preprocessing is essential to FP-LSTM because it trans- 3.4 Methodology


forms network traffic, which is complex to clean, consistent,
and numerically stable sequences of inputs. This allows the The FP-LSTM framework methodology includes a feder-
model to recreate normal behaviour, identify abnormalities, ated learning system, in which several clients train an LSTM
and zero-day attacks with great stability and accuracy under autoencoder on their local non-IID network traffic data. All
a federated environment. clients clean, encode, and normalize data and pretrain the
autoencoder to reconstruct sequences and fine-tune it to clas-
sify the attacks. The local model updates are subsequently
3.3 Proposed FP – LSTM framework sent to the server which sums them up with the FedProx
algorithm so as to reduce client drift and stabilize conver-
The FP-LSTM model combines the Federated Proximal gence. This is an iterative algorithm that maintains privacy
(FedProx) maximization and LSTM Autoencoder sequence and increases robustness and the accuracy of zero-day attack
learning to successfully identify zero-day attacks in decen- detection in a distributed network.
tralized settings. It fixes the client updates by the reduction Figure 3 takes a closer look of what LSTM-Autoencoder
of drift when aggregating models and temporal dependencies consists of. Each input sequence time step is delivered into
in network traffic. FP-LSTM marks invisible abnormalities an LSTM cell made up of forget, input and output gates.
among heterogeneous customers via joint reconstruction and These gates regulate the size of the past information in the
classification. It is based on the stability of FedProx and tem- store, the size of the new information in the store and the
poral learning of LSTM to create a proposal to make both size of the internal state that is exposed to the next layer.
FedProx and LSTM work together to provide a robust and The encoder is a compression of the sequence into a latent
private anomaly detector. representation, and the decoder is an approximation of the
original sequence, which is based on the latent represen-
tation. This design allows the model to learn the normal
3.3.1 Architecture of FP – LSTM framework behaviour patterns and support the abnormalities through
massive reconstruction mistakes.
The FP-LSTM architecture, as shown in Fig. 2, represents a The forget gate (Equation 4) allows the cell state to retain
federated learning system in which several clients will learn a certain amount of the past cell state through the application
on LSTM Autoencoders on local network traffic data. The of a sigmoid function on both input and hidden states. This
LSTM Autoencoder of each client will be composed of an allows the model to forget the irrelevant information in the
encoder that will learn the high-level temporal characteris- past selectively and retain useful temporal dependencies to
tics of the sequential network inputs and a decoder that will detect zero-day attacks better.
learn how to reconstruct the original input sequences and   
therefore, the errors in reconstruction will be used to detect Ft  σ W f h t−1 , xt + b f (4)
anomalies. This local training maintains the privacy of data
because it does not involve transmission of raw traffic data, as The input gate (Equation 5) determines how much of the
well as privacy of bound data locality. The model will bring new candidate memory to write to the cell state is determined
to attention the intricate temporal interconnections that are by a sigmoid function. It selects incoming features to update
suggestive of the zero-day attacks and adapt to the hetero- the memory to enable the model adapt to the changes in
geneity within the datasets of the clients. network attack behaviour.
Client updates the model parameter updates instead of   
raw data, and then sent to an aggregation server at the central It  σ Wi h t−1 , xt + bi (5)
site after the local model training. The Federated Proximal
(FedProx) optimization strategy is used by the server to pool The potential new memory content is calculated by the
these updates into a shared model across the world. FedProx candidate cell state (Equation 6) based on the existing input
provides a proximal term that controls the client drift to sta- and previous hidden state and with tanh activation. This
bilize the impact of non-IID and heterogeneous data among assists the model to encode temporal features with relevant
clients. This is the cumulative world model of all the knowl- new information of network state changes.
edge shared among the various clients and it is further shared   
among the clients involved to improve the knowledge. Local C̃t  tanh Wc h t−1 , xt + bc (6)
training followed by global aggregation includes repetitive-
ness to improve the overall robustness, scalability and privacy The retained past memory and the scaled candidate mem-
protection of the FP-LSTM framework to detect zero-day ory are element-wisely added to form cell state update
cyber threats in decentralized networked settings. (Equation 7). It is this selective update mechanism that allows

123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 7 of 22 34

Fig. 2 Architecture of FP –
LSTM

Fig. 3 LSTM Architecture

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

Zero-day attacks are detected by hybrid decision rule


ŷt  softmax(Wc z t + bc ) (12)
(Equation 18) on the basis of reconstruction error surpass-
ing a threshold, but otherwise, it is based on classification
Mean squared error between inputs and reconstructions
output. This takes advantage of unsupervised and supervised
(Equation 13) is used to measure reconstruction loss, which
learning to detect strongly.
directs the autoencoder to act as normal networks do. Low
loss means that the reconstruction has been accurately done,
i f xt − x̂t 2 > τ then Z er o − Day Attackelseuse ŷt (18)
which is needed in the detection of anomalies.

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

Fig. 4 Client-side architecture

Algorithm 1: Client-Side Training with LSTM-Autoencoder and FedProx

Input: Client dataset , global parameters , hyperparameters , , , ,


Output: Updated client parameters
1. Initialize model with global weights ← .
2. For each pre-training epoch = 1 to pre :
3. For each batch :
4. Compute forget gate, input gate, candidate state, cell state, and hidden state using Eqs. (4)-(9).
← { , ℎ , , }, ← { , ℎ , , }, ˜ ← { , ℎ , , },
← , , , ˜ , ← , ℎ , , ,ℎ ← { , }
5. Obtain latent representation from encoder (Eq. 10).
← { ,ℎ , }
6. Reconstruct ˆ from decoder (Eq. 11).
ˆ ←{ , , }
7. Compute reconstruction loss ℒrec (Eq. 13).
ℒ ← , , ,ˆ
8. Add FedProx regularize (Eq. 15) to form total loss ℒlocal (Eq. 16).
ℒprox ← { , , }, ℒlocal ← {ℒrec , ℒcls , ℒprox }
9. Backpropagate and update using Adam optimizer.
10. End For
11. End For
12. For each fine-tuning epoch = 1 to ft :
13. For each batch ( , ) :
14. Compute latent and classification logits (Eq. 12).
ˆ ← , ,
15. Compute classification loss ℒcls (Eq. 14).
ℒ ← , , ,ˆ
16. Add reconstruction loss and FedProx regularize using Eqs. 13, 15.
ℒ ← { , , , ˆ }, ℒprox ← { , , }
17. Backpropagate total loss (Eq. 16) and update .
ℒlocal ← {ℒrec , ℒcls , ℒprox }
18. End For
19. End For
20. Return updated weights to server.

The client-side training process of the FP-LSTM frame-


work is encapsulated by Algorithm 1 that allows every client 3.4.2 Server – side aggregation of FP – LSTM
to optimize locally a hybrid loss that trades off sequence
reconstruction and classification. This also has two stages The server-side aggregation part of the FP-LSTM model,
refining of latent representations and reconstruction accu- as indicated in Fig. 5: Server-side Architecture, aggregates
racy during initial pretraining, and fine-tuning that combines the published model parameters by the FedProx algorithm.
supervised classification loss with FedProx regularization The server gathers encoder, decoder and classifier weights
to stabilize updates in parameters. Such a two-phase train- of clients, calculates weighted average of weights depending
ing scheme guarantees a model adaptation specific to any on client dataset size, and updates the global model. This
client without reducing federated coherence, which is critical step stabilizes training by minimizing the client drift and
to detecting zero-day attacks in the heterogeneous network harmonizing the heterogeneous client models, which lie at
environment. the core of the strength of the proposed solution.

123
34 Page 10 of 22 P. G. Arepalli et al.

Fig. 5 Server – side architecture

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.

Algorithm 2: Server-Side FedProx Aggregation and Hybrid Decision


( )
Input: Initial global weights , number of rounds , number of clients
( )
Output: Final global weights and hybrid predictions

1. Initialize global model ( ) .


2. For each round = 1 to :
3. Broadcast ( ) to all clients.
( )
4. Receive client updates , after running Algorithm 1.
5. Aggregate weights using sample-size weighted average (Eq. 17):
( ) ( )
←{ , , , , }
6. Save ( ) if = .
7. End For
8. Compute threshold on normal data from reconstruction errors (Eq. 13).
ℒ ← , , ,ˆ
# Hybrid inference:
9. For each new sample :
10. Compute reconstruction error and class probabilities.
11. If error > , classify as zero-day
12. else take class with highest probability (Eq. 18).
,ˆ , , ˆ
13. End For
14. Output hybrid predictions and final model

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)

Number of epochs 20 4.2 Metric analysis for zero-day attacks


Batch size 32
The classical metrics of deep learning are used to evaluate the
Optimizer Adam
proposed FP-LSTM model of the zero-day attack detection
Learning rate 0.001
as follows:
Weight decay 0.00018
Loss: Loss is adopted in the FP-LSTM model to estimate
Loss function Categorical cross entropy
the difference between the measured attack values and the
FedProx proximal term (µ) 0.01 real labels of the training process. The reduction of the loss
Latent dimension 64 is useful in training the model and enhancing performance.

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.

(a)Cosine Similarity (b) Client Drift

(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

(a) Loss (b) Accuracy

(c) Precision, Recall, F1 score


Fig. 7 FP-LSTM model performance on training with loss, accuracy, precision, recall, and F1-score on the training

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.

(a) ROC curve (b) False Negative Rate

(c) False Positive Rate


Fig. 8 Performance evaluation of the proposed FP-LSTM and baseline models using ROC curve, False Positive Rate (FPR), and False Negative
Rate (FNR) metrics

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

(a)FP - LSTM (b) FedAvg-LSTM

(c) ESA-LSTM-GRU (d) Fed Avg


Fig. 9 Confusion matrix of the FP-LSTM model with A, S and SS traffic samples on the classification performance

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.

(a)FP - LSTM (b) FedAvg-LSTM

(c) ESA-LSTM-GRU (d) Fed Avg


Fig. 10 SHAP importance feature plots showing the contribution of network traffic features in helping detect attack

FedAvg. ESA-LSTM-GRU is more consistent than FedAvg 4.5 Explainability analysis


and, however, not as powerful as FP-LSTM. The consistency
of FP-LSTM when folds are changed emphasizes the ability SHAP is employed to offer explainability and analysis of
of this method to be resistant to variation in data, which is complexity in the format of radial bias and partial depen-
the direct consequence of its federated learning with FedProx dency plot, and parameter and time complexity plot. These
and hybrid detection scheme. images exhibit the attribution of what features make pre-
dictions and response to changes in features, increasing the
levels of transparency. Complexity plots confirm high per-
formance of the model with a smaller number of parameters
and fewer training time than state-of-art models.

123
FP-LSTM: a federated proximal LSTM autoencoder framework … Page 17 of 22 34

(a)FP - LSTM (b) FedAvg-LSTM

(c) ESA-LSTM-GRU (d) Fed Avg


Fig. 11 Radial Basis Function (RBF) plots of the model reaction to feature variations to FP-LSTM and basic models

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

(a) Parameter Complexity (b) Time Complexity


Fig. 13 Comparison of the parameter and time complexity of the FP-LSTM and the baseline models

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.

Table 3 Cross validation table


Model Metric/fold 2 4 6 8 10

FP – LSTM Accuracy 0.9598 0.9571 0.9631 0.9549 0.9626


Precision 0.9576 0.9545 0.9632 0.9548 0.9617
Recall 0.9604 0.9580 0.9615 0.9537 0.9628
F1-score 0.9587 0.9560 0.9622 0.9542 0.9622
Loss 0.1006 0.1096 0.0937 0.1065 0.0935
FedAvg-LSTM Accuracy 0.9484 0.9444 0.9462 0.9444 0.9492
Precision 0.9445 0.9417 0.9464 0.9426 0.9471
Recall 0.9489 0.9446 0.9441 0.9444 0.9497
F1-score 0.9470 0.9429 0.9447 0.9432 0.9481
Loss 0.1613 0.1675 0.1626 0.1688 0.1620
ESA-LSTM-GRU Accuracy 0.9102 0.9046 0.9072 0.9104 0.9088
Precision 0.9101 0.9053 0.9082 0.9111 0.9093
Recall 0.9102 0.9046 0.9072 0.9104 0.9088
F1-score 0.9100 0.9043 0.9064 0.9101 0.9083
Loss 0.2543 0.2489 0.2649 0.2823 0.2539
Fed Avg Accuracy 0.9078 0.9159 0.8818 0.8738 0.9114
Precision 0.9005 0.9156 0.8859 0.8766 0.9101
Recall 0.9129 0.9120 0.8846 0.8677 0.9078
F1-score 0.9052 0.9115 0.8796 0.8691 0.9070
Loss 0.3101 0.2800 0.3410 0.3610 0.2800

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

Competing interests The authors declare no competing interests.

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

You might also like