This study aims to address critical security gaps in distributed systems by developing and evaluating a novel framework that integrates Federated Transfer Learning (FTL), Generative AI (GenAI) and Blockchain technology. Research specifically enhances the detection and mitigation of sophisticated network attacks, including distributed denial of service, man-in-the-middle and model poisoning.
The study uses a quantitative evaluation-based approach. The authors propose a three-tiered (Cloud, Edge, IoT) architecture in which edge devices collaboratively train a global intrusion detection model using FTL, ensuring data privacy. GenAI synthesises novel attack data, significantly improving the model’s capability to detect zero-day threats that conventional methods may miss. Blockchain technology secures the integrity of the federated learning process, using a reputation-based mechanism to safeguard against malicious contributions and model poisoning attacks. The framework’s performance is rigorously validated using four public NetFlow-based data sets. NF-ToN-IoT-v2, NF-CSECIC-IDS2018-v2, NF-UNSW-NB15-v2 and NF-BoT-IoT-v2.
The experimental results demonstrate the high efficacy of the framework. It achieved a detection accuracy of up to 92% and an F1-score exceeding 80% on client nodes, showing robust performance across heterogeneous and non-IID data distributions (Zhao, 2020; Nguyen et al., 2021). The federated model exhibited stable convergence over 20 aggregation rounds, confirming its adaptability and ability to generalise effectively across diverse domains without centralising sensitive data. The integration of GenAI and Blockchain substantially enhanced the model’s robustness, adaptability and trustworthiness.
This research presents a novel, holistic security solution synergistically combining FTL, GenAI and Blockchain. Its originality lies in its integrated architecture that simultaneously addresses data privacy, model integrity and adaptability to evolving threats. The findings offer a practical blueprint for creating scalable, privacy-conscious and resilient security frameworks applicable to complex distributed environments.
1. Introduction
The rapid proliferation of distributed systems has transformed the way modern applications operate, enabling unprecedented scalability, efficiency and seamless integration across diverse domains. However, this rapid advancement has also amplified the sophistication and frequency of cyber threats, posing significant challenges to traditional security mechanisms. Two fundamental problems plague the current state of distributed system security: the need for a robust and adaptive intrusion detection system that can effectively identify and respond to emerging threats without compromising user privacy and the challenge of addressing the inherent data heterogeneity and resource constraints in edge devices, which hinders the performance and scalability of traditional machine learning-based approaches.
Conventional centralised approaches to network security often rely on aggregating raw data at a central location for analysis, which not only exposes sensitive information to privacy risks but also increases the susceptibility to single points of failure. Moreover, these methods lack the adaptability to effectively respond to the evolving nature of network attacks, such as distributed denial of service (DDoS), man-in-the-middle (MitM), DNS spoofing and eavesdropping, which demand a more proactive and decentralised approach.
To address these challenges, we propose a novel framework that synergistically integrates federated transfer learning (FTL), generative AI (GenAI) and Blockchain technology to detect and mitigate network attacks. By leveraging FTL, our framework enables the creation of a robust intrusion detection system that can adapt to heterogeneous data distributions without raw data transmission. Furthermore, by synthesising realistic attack scenarios using GenAI, our framework enhances detection accuracy and scalability, providing a comprehensive solution to the evolving threat landscape. The integration of Blockchain provides a crucial trust layer, securing the collaborative learning process itself.
In this paper, we first revisit the related work and establish the critical need for advanced security through a detailed analysis of cyber risk impacts. We then present the architectural design of our framework, followed by formalised case studies and mitigation strategies. We explain the underlying algorithms and evaluate the proof-of-concept (PoC) implementation with a thorough results analysis. The primary contributions of this paper are fourfold:
We propose a novel, three-tiered cybersecurity architecture that cohesively integrates IoT, Edge and Cloud layers to create a scalable, defence-in-depth security mechanism.
We introduce a unique synergy of FTL for privacy-preserving collaborative learning across heterogeneous clients, GenAI for generating synthetic data to detect zero-day attacks and Blockchain for ensuring model integrity via an on-chain reputation system.
We provide a rigorous evaluation of the framework’s cross-domain adaptability and performance using four large-scale, real-world network data sets, demonstrating its effectiveness with non-IID data.
We formalise both static and dynamic cyber threat models using mathematical representations, providing a theoretical foundation for the proposed detection and mitigation strategies.
2. Related work
Cyber threats and data privacy are critical concerns in modern distributed systems, requiring robust security mechanisms to ensure resilience against emerging attacks. Traditional centralised cybersecurity approaches suffer from limitations such as single points of failure, scalability issues and vulnerability to advanced cyberattacks (Anitha and Murugan, 2024; Kumar et al., 2024). While recent advancements in federated learning (FL), FTL, GenAI and Blockchain have provided new avenues for enhancing cybersecurity, existing research often explores these techniques in isolation, failing to provide an integrated framework that ensures model efficiency, advanced attack detection and robust trust mechanisms (Rahmati and Pagano, 2025; Patil et al., 2024).
FL has emerged as a promising approach to decentralised machine learning, enabling collaborative training without exposing raw data (Kairouz et al., 2021). This method is particularly useful in privacy-sensitive domains like healthcare and network security (Li et al., 2023; Patil et al., 2024). However, the practical application of FL is often hindered by significant challenges, including non-IID data distributions, communication overhead and critical security vulnerabilities such as model poisoning and backdoor attacks (Nguyen et al., 2021; Hallaji et al., 2022; Kumar et al., 2024). Non-IID data distributions, where data is not uniformly distributed across clients, can lead to poor model convergence and reduced accuracy (Nguyen et al., 2021; Efthymiadis et al., 2024). This statistical heterogeneity not only degrades performance but also amplifies security risks by making it harder to distinguish malicious updates from benign, albeit divergent, ones (Zhang et al., 2025a). To address data heterogeneity, FTL has been proposed to enhance model adaptation in diverse environments (Yin et al., 2021; Hallaji et al., 2022). While FTL improves generalisation, it remains dependent on high-quality, labelled data, which is scarce for novel and evolving cyber threats. This specific gap motivates our integration of a GenAI module to synthetically augment training data for zero-day attacks.
GenAI has been increasingly applied in cybersecurity for generating synthetic attack data (Rao et al., 2024; Blake, 2024). However, GenAI models can be prone to overfitting and may generate biased or unrepresentative data, potentially reducing detection efficiency (Khan et al., 2025). Furthermore, most prior works explore these technologies in isolation and fail to secure the learning process itself. Adversarial attacks like model poisoning remain a critical vulnerability in federated systems, with recent research demonstrating attacks like PoisonedFL that can bypass multiple state-of-the-art defences (Xie et al., 2024). Our work directly addresses this by introducing a blockchain-based reputation layer to defend against such threats, a trust mechanism not adequately managed in the cited FTL and GenAI literature (Anitha and Murugan, 2024; Ren et al., 2024). While blockchain offers immutability and decentralisation, it introduces its own challenges of computational overhead and scalability (Hafeez et al., 2023; Cai et al., 2024). Recent solutions propose committee-based consensus and multi-chain architectures to mitigate these issues, but a holistic integration remains an open challenge (Ren et al., 2024; Xie and Li, 2024).
Table 1 provides a comparative analysis of recent state-of-the-art works and highlights the gap our integrated framework aims to fill. By synergising FTL, GenAI and Blockchain, our work provides a holistic solution that tackles the interconnected challenges of data privacy, heterogeneity, adaptability and model integrity.
3. Impact of cyber risks in modern distributed system
The rapid digitisation of global economies has led to an increased dependency on distributed systems, emphasising cybersecurity as a paramount concern. Cyber risks not only compromise national security but also carry substantial economic consequences. The cost of cybercrime is projected to reach US$10.5tn annually by 2025, up from US$3tn in 2015, underscoring the dire financial burden associated with inadequate cybersecurity measures (SEON, 2023). These daunting figures highlight the urgent necessity for robust security mechanisms to safeguard critical infrastructure and sensitive data from malicious actors.
With the proliferation of modern distributed computing environments, the complexity of cyber risks has escalated significantly. Traditional network attacks, such as DDoS, MitM, eavesdropping and DNS spoofing, persist as formidable challenges for network security professionals (CISA, 2023). Furthermore, evolving threats include sophisticated AI-driven cyber attacks, such as model poisoning, where adversarial actors manipulate machine learning models to degrade performance or introduce bias (Group AI Security Research, 2023). While the taxonomy in Figure 1 provides a broad overview of the threat landscape, our research narrows its focus to the “Cyber Attacks” branch, with particular emphasis on “Network Attacks” such as DDoS, MitM, DNS spoofing and eavesdropping. These network-based threats strike at the very foundation of digital enterprises, affecting not just individual systems but the entire operational infrastructure. By disrupting service availability, compromising data integrity and eroding customer trust, they inflict real-time damage at scale – both financially and operationally – far surpassing the impact of more localised threats like phishing or malware.
Recent findings by SentinelOne highlight that network attacks have emerged as core risks for businesses, significantly affecting data availability, continuity and overall resilience (SentinelOne, 2025). In response to this growing concern, our framework is designed to detect and mitigate such high-impact threats. Additionally, we address emerging adversarial tactics targeting AI models, particularly “Model Poisoning,” which represents a critical evolution in cyber threats. By fortifying defences against both conventional network attacks and AI-specific adversarial vectors, our work aims to secure modern, AI-powered distributed systems from some of their most pressing vulnerabilities. The increasing reliance on cloud and distributed services also exposes vulnerabilities in authentication and authorisation mechanisms. These developments underscore the necessity of continuous adaptation and innovation in cyber risks. To devise effective defence mechanisms, it is essential to first comprehend the diverse threat landscape and formulate appropriate threat models. Therefore, in the following sections, we constitute logical and mathematical representations of cyber threats before presenting the architectural and functional workflow of our advanced intrusion detection and mitigation system in Section 4.
3.1 Cyber threat modelling: first step of cyber risk detection and mitigation
Comprehending the cyber threat model constitutes a critical precursor to proposing effective intrusion detection and mitigation strategies. An accurately defined threat model serves to:
Identification of cyber risk patterns: Analysing historical cyber risk incidents provides valuable insights into frequently exploited vulnerabilities.
Establishment of detection frameworks: Understanding cyber risk behaviour paves the way for developing anomaly-based detection mechanisms.
Design mitigation strategies: A comprehensive cyber risk model informs the creation of proactive security measures, including AI-driven IDMS systems.
In modern distributed systems, two generic cyber threat models can highlight their potential impacts on network operations, and outlining some intuitive mitigation strategies has been presented. Depending on the time dynamics, all the cyber threats model in modern distributed system can be classified into two overarching types: static (probability-based) cyber threat model does not explicitly account for time progression, only focuses on the probability and count of occurrences; dynamic (time-constrained) cyber threat model incorporates time-dependent variables and continuous change and captures how different node “states” (e.g. susceptible, infected, external, recovered) evolve as attacks spread or are mitigated over time.
3.2 Static (probability-based) cyber threat model
To clarify the real-world nature of such threats before we delve into the associated mathematical framework, we begin with a common example, namely, a DNS spoofing attack. In this scenario, a user sends a simple DNS query over a loosely secured channel to look up the IP address of a particular website. An attacker exploits this vulnerability by tampering with the DNS records, replacing the legitimate IP address with the address of a malicious site. Consequently, the user’s DNS query returns the spoofed IP, causing them to inadvertently connect to the attacker’s fake website. Considering this scenario, in the following paragraph, we provide a mathematical formulation to logically represent the generic cyber threat model, including the core elements of this attack vector. Besides that, we also present the logical representation of the various impacts on the broader distributed system and, with the help of mathematical representation, propose remedies to mitigate such attacks in a logical way.
Let denotes the probability of detecting a spoofed attack as legitimate and represents the number of spoofed attacks on the k-th occasion. Then the total number of spoofed attacks can be modelled as follows:
Next, we model the possible impacts of the spoofing attack on the network, as follows:
Impact from operations: Let denote the incidence of machine malfunctions, and be the total time the spoofing attack persisted. Then the total number of malfunctions due to spoofing can be defined as:
Safety measurements: The downtime due to safety risks can be modelled as follows:
where is the percentage of time during which operations were stopped for safety checks.
In response to the spoofing attacks, the mitigation strategies can be implemented as follows:
Vigorous authentication: The probability of a successful spoofing attempt can be reduced by augmenting authentication mechanisms, that is:
where A is the coefficient of authentication strength.
Strict monitoring: The probability of detecting a spoofed attack can be defined as:
where is the monitoring detection rate, and N is the number of monitoring instances.
3.3 Dynamic (time-constrained) cyber threat model
In the previously presented cyber threat model, we did not account for time constraints. However, in this model, time constraints have been considered, thus enabling the shifting of the whole cyber risk scenario from a static to a dynamic approach. The model below is inspired by biological models, for instance, epidemic models. Before going into the details, let us take care of the nomenclature. We will call a node an internal node if, at a particular instance, it is connected to the network, or else, it will be called an external node. Now, each of the attacking nodes, be it susceptible or infectious, is disconnected from the network at a constant rate to join external attacking nodes. We assume that each external attacking node is connected to the network and becomes susceptible attacking node at a constant rate . Each attacking node dies out with probability , and is also the rate of addition of new nodes in the external node cell. Each susceptible node, either attacking or targeted, is infected by an infectious attacking node at a constant rate . Disinfected attacking node again becomes susceptible attacking node at constant rate . Due to the proper detection and mitigation, each infected targeted node becomes a recovered targeted node at a constant rate . Due to temporary immunity, recovered targeted node becomes again susceptible at a constant rate . Based on these hypotheses, we develop an epidemic model. For the targeted population, the following system of linear ordinary differential equations describes the rate of change of different cells:
where .
Similarly, for the attacking population, the system of ODEs can be formulated as follows :
where . These two systems can be coupled to an equivalent system of ODEs :
The feasible region for this system can be given as: .
Next, we discuss briefly about the mathematical analysis of the epidemic model. Let us define the basic reproduction number as the average number of secondary infections caused in an entirely susceptible population by a single infectious node during its whole infectious lifetime. If each infected node infects more than one susceptible node on average, and therefore, the infection persists. Instead, if each infected node infects on average, less than one susceptible node and hence the infection dies out. Since the necessary conditions for an epidemic to happen are and the basic reproduction number for the target population, and that for the attacking population, are:
One can get, combining both, that:
The system (8) admits an infection-free equilibrium point and also a unique endemic equilibrium point, which exists only when . This can be easily proved, keeping in mind that for equilibrium points, the four temporal derivatives, namely, , , and are simultaneously zero.
4. Proposing solution
As we observe the rapid growth of distributed smart systems across various industries, such as healthcare, critical infrastructure, IoT, telecommunications and financial services, it becomes apparent that while these innovations significantly enhance interconnectedness and functionality, they also introduce new challenges in cybersecurity. The increasing complexity and scale of these systems make them more vulnerable to sophisticated cyberattacks, which traditional security measures often struggle to counter effectively. In response to these challenges, we propose an advanced IDMS based on a harmonious integration of FTL, GenAI and Blockchain technology. The system efficiently detects, mitigates and pre-empts cyber risks across the IoT, Edge and Cloud layers while ensuring data integrity and user privacy. Figure 2 illustrates the overall system architecture.
4.1 Advanced intrusion detection and mitigation in distributed smart systems
4.1.1 IoT layer: data generation and local processing.
The IoT layer forms the foundation of the proposed architecture (Figure 2), consisting of a vast array of interconnected devices such as industrial sensors, healthcare wearables and smart home controllers. These devices generate substantial volumes of real-time data, which are crucial for monitoring cybersecurity risks. Due to the susceptibility of IoT endpoints to cyber risks, including botnet-driven DDoS attacks, malware infections and unauthorised access, the IoT Layer incorporates lightweight anomaly detection mechanisms for preliminary analysis of collected data. It is essential to note that in our proposing architecture no risk detection system is working on the IoT layer devices. The resource-constrained nature of IoT devices pose a real challenge to deploy the advanced AI-ML-based risk detection application. Therefore, the raw data is transmitted to the local Edge layer gateway for further analysis.
4.1.2 Edge layer: intelligent threat detection and real-time mitigation.
Situated between the IoT and Cloud layers, the Edge layer plays a pivotal role in real-time cyber risks detection and response. This layer is tasked with analysing incoming data streams from IoT devices, identifying potential security breaches and mitigating threats promptly to prevent escalation. Through AI-driven analytics, the Edge layer ensures rapid, low-latency decision-making, making it indispensable to the proposed security framework. At the heart of the Edge layer is the detection engine, which uses sophisticated machine learning models to scrutinise network traffic patterns, detect anomalies and categorise security threats. Upon identification of an intrusion, the mitigation engine executes immediate countermeasures – ranging from isolating compromised devices to rate-limiting suspicious network activities and dynamically adjusting access control policies to thwart further exploits. Additionally, the logging module records all security events, detection logs and mitigation actions, providing comprehensive data for forensic analysis and compliance tracking. A novel component of the Edge layer is the FTL client module. Unlike traditional, centralised learning methods that necessitate raw data transmission, this module allows edge nodes to locally train AI models using their own available data. Instead of sending sensitive data to a central authority, only model parameters and insights are shared with the Cloud layer, enhancing privacy, ensuring regulatory compliance and improving adaptability to localised cyber risks. By continually learning from distributed sources, the Edge layer contributes to a global threat intelligence network while maintaining data sovereignty.
4.1.3 Cloud layer: global threat intelligence and system orchestration.
At the apex of the architecture (Figure 2), the Cloud layer serves as the central hub for global cybersecurity intelligence, model coordination and system-wide orchestration. It aggregates insights from Edge nodes, refines detection models and implements comprehensive mitigation strategies. Leveraging the power of cloud computing, the system achieves continuous learning, adapts to new threats and manages scalable security. The Cloud layer houses the global detection engine, which synthesises threat intelligence from multiple Edge nodes. Unlike localised anomaly detection at the Edge, this engine focuses on identifying patterns associated with global threats such as coordinated ransomware campaigns, zero-day exploits and extensive botnet activities. Integration of advanced AI and machine learning ensures that detection models are continuously updated with contemporary threat signatures and behavioural patterns. A standout feature of the Cloud layer is the GenAI engine, which enhances cybersecurity defences proactively. This engine simulates cyber risks using synthetic attack data, preparing the system to face novel attack vectors. Through training on simulated adversarial scenarios, the GenAI engine significantly boosts the accuracy and resilience of detection models, ensuring that even unknown threats are identified before they manifest in real-world environments. To establish trust and integrity throughout the FTL process, the architecture incorporates a Blockchain-backed reputation manager. Each Edge node taking part in the FTL framework is assessed based on its model contributions, with reputation scores assigned according to the quality and reliability of their shared model updates. This mechanism guards against adversarial attacks such as model poisoning and integrates only high-quality intelligence into the global security framework. Moreover, all model updates and security actions are recorded on an immutable blockchain ledger, offering transparency and auditability. The Cloud layer also includes the mitigation engine, which enforces global security policies and coordinates cross-layer threat responses. Collaborating with the global policy and management module, it dynamically adjusts system-wide security parameters. If an Edge node is compromised, the Cloud layer can revoke its permissions, quarantine its updates and enforce remedial security measures. Secure communication across layers is facilitated by the comm and sync connector, which manages encrypted exchanges of model updates, security alerts and policy decisions between the Cloud and Edge.
The proposed architecture (Figure 2) presents a comprehensive, privacy-preserving and scalable cybersecurity solution that integrates IoT, Edge and Cloud computing resources seamlessly. By harnessing FTL, it eradicates the necessity for centralised data collection, ensuring compliance with privacy regulations and minimising attack surfaces. The use of GenAI amplifies the system’s capability to forecast and counteract novel cyber risks, while blockchain-backed reputation management secures transparency and trust in model updates. Beyond security, this architecture optimises resource utilisation by distributing computational workloads across Edge and Cloud layers, thereby reducing latency and enhancing real-time threat response. Furthermore, the microservices-based design promotes modularity and scalability, facilitating seamless updates and integration with evolving security technologies. By synthesizing FTL, GenAI and Blockchain, this architecture stands as a next-generation cybersecurity framework designed to thwart advanced cyber risks in distributed smart environments. Balancing decentralised intelligence with centralised orchestration, it fosters adaptive and privacy-conscious intrusion detection and mitigation. This architecture not only meets current cybersecurity demands but also sets up a future-ready model poised to evolve with the dynamic threat landscape. The collaborative learning and automated response mechanisms ensure that smart ecosystems remain resilient, secure and capable of addressing even the most sophisticated cyber risks.
4.2 Functional workflow of our intrusion detection and mitigation system
The proposed IDMS framework workflow in Figure 3 introduces a robust, multi-layered architecture that integrates local edge nodes with a global cloud layer to enhance cyber risks detection, mitigation and system resilience in distributed environments. The model operates in a decentralised ecosystem where each edge node autonomously processes data, detects potential threats and contributes to the global aggregation of knowledge to strengthen the overall defence mechanism. At the heart of this framework lies a sophisticated synergy of machine learning-driven intrusion detection modules, reputation-based node participation validation and global policy management modules. These components collectively enable adaptive and scalable defences against cyber risks, ensuring real-time responsiveness and robust system-wide security. The framework not only facilitates local threat detection and mitigation but also incorporates blockchain mechanisms to validate node reputation and govern secure participation in the model aggregation process. Furthermore, the integration of generative AI enhances anomaly detection and provides predictive insights, enabling proactive measures against evolving threats. This dual-layered architecture – spanning local and global layers – ensures that the system is resilient, adaptive and capable of handling threats in real time while continually updating global models based on edge-level insights.
4.3 Case studies and mitigation strategies
Below, a comprehensive case study-based analysis of a cloud-edge-layered IDMS is designed to understand the potential cyber risks. Considering the cyber risk and attack scenario a series of mitigation strategies have been proposed based on our GenAI and FTL-based IDMS. Our proposed system combines the strengths of cloud orchestration, edge mitigation and blockchain-based authentication and authorisation to provide robust security across various scenarios. Distributed systems, consisting of IoT devices, edge nodes and cloud-based infrastructure, are increasingly vulnerable to cyber risks and insider attacks. The proliferation of smart infrastructure, healthcare systems and industrial manufacturing has created a complex landscape that demands innovative security solutions.
4.3.1 Distributed denial-of-service attack in smart infrastructure.
Scenario: A smart water management system uses IoT sensors and edge nodes to monitor and control water levels.
Attack: A coordinated DDoS attack targets the cloud layer, overwhelming its ability to communicate with edge nodes.
Mechanism to mitigate the cyber-risk through GenAI and FTL-based IDMS:
Detection engine (Cloud): Identifies abnormal traffic volumes and triggers mitigation actions.
Mitigation engine (Edge): Redirects legitimate traffic to alternate cloud resources, mitigating overload.
Blockchain-based authentication: Verifies that only authorised edge nodes communicate with the cloud.
4.3.2 Man-in-the-middle attack in healthcare systems.
Scenario: A distributed healthcare system uses IoT devices for patient monitoring, with edge nodes preprocessing data for cloud-based analysis.
Attack: An attacker intercepts communications between the edge and cloud nodes, manipulating critical patient vitals.
Mechanism to mitigate the cyber-risk through GenAI and FTL-based IDMS:
Edge detection engine: Identifies data inconsistencies caused by the MitM attack.
Blockchain-based SSO: Ensures that only authenticated devices participate in data transfer.
Encryption: Enforces robust TLS protocols for secure end-to-end communication.
4.3.3 Model poisoning attack in federated learning-based traffic systems.
Scenario: A smart city’s traffic optimisation system uses FTL to train a global AI model by aggregating updates from multiple edge nodes.
Attack: A compromised edge node injects poisoned updates into the FTL client module, disrupting the global traffic model.
Mechanism to mitigate the cyber-risk through GenAI and FTL-based IDMS:
Detection engine (Cloud): Analyses incoming updates for anomalies using statistical validation methods.
Reputation management via Blockchain: Identifies edge nodes with a history of malicious behaviour and flags or excludes them from model updates.
Mitigation engine (Edge): Suspends contributions from compromised nodes until they are verified and authenticated through blockchain-based SSO.
4.3.4 DNS spoofing in manufacturing systems.
Scenario: A distributed smart manufacturing system uses cloud-based orchestration to control robotic edge systems.
Attack: A DNS spoofing attack redirects requests from edge robots to a malicious server, injecting harmful commands and disrupting manufacturing processes.
Mechanism to mitigate the cyber-risk through GenAI and FTL-based IDMS:
Detection engine (Edge): Detects and blocks suspicious DNS traffic.
Blockchain-based authentication: Ensures only authenticated DNS queries and responses are accepted, validated via blockchain records.
Reputation management: Verifies that the DNS resolver being used has a trusted reputation.
4.3.5 Eavesdropping in a smart city surveillance system.
Scenario: A smart city deploys cameras that send live video feeds to a cloud-based monitoring dashboard via edge-IoT systems.
Attack: An attacker intercepts and eavesdrops on unencrypted video feeds between the edge and cloud servers.
Mechanism to mitigate the cyber-risk through GenAI and FTL-based IDMS:
Encryption standards: Enforces AES-256 encryption to secure video feeds during transmission.
Edge detection engine: Identifies and reports unusual traffic interception attempts.
Blockchain-based SSO: Ensures that only authorised devices can join the system.
By adhering to these strategies, our proposed cloud–edge-layered GenAI and FTL-based IDMS establishes a robust security framework for various distributed systems, leveraging cloud orchestration, edge-layer threat mitigation and blockchain-based authentication and authorisation.
5. Algorithmic representation: working functionalities of our proposed generative artificial intelligence and federated transfer learning-based intelligent detection and mitigation system
Algorithm 1 presents the operational workflow of our integrated framework. It details how FTL, GenAI and Blockchain are combined for secure and efficient intrusion detection in a distributed network. The algorithm outlines a collaborative training process that preserves data privacy while leveraging synthetic data generation and a reputation-based aggregation model to improve detection accuracy and system-wide security.
Algorithm 1 Federated transfer learning with generative AI and Blockchain:
The novelty of Algorithm 1 is centred on the synergistic integration of its core components within a single, iterative workflow. Specifically, the framework introduces two critical validation stages before global model aggregation. First, in Line 4, each client’s model update is vetted by an intrusion detection module to filter out overtly malicious contributions. Second, for updates that pass this initial check, the algorithm leverages an immutable Blockchain to validate the client’s reputation (Line 12). This on-chain verification step is a novel contribution that formally secures the federated learning process against sophisticated threats like model poisoning by untrusted nodes. Another key innovation is the proactive threat adaptation enabled by the GenAI module (Line 19), which enriches the training data with synthetic attack scenarios. This allows the global model to learn representations of zero-day threats, improving its generalisation. Lastly, the framework implements FTL by distributing the enhanced global model back to clients, who then fine-tune it on their local data, ensuring high performance in heterogeneous, non-IID environments.
6. Evaluation studies
Before deploying our proposed DMS in any smart distributed environment, it is imperative to first validate its performance in a controlled, emulated local setting. Our primary goal in this evaluation is to determine how effectively our FTL and GenAI-based intrusion detection mechanism can identify and mitigate evolving cyber threats. To begin, we conducted an adverse robustness test to examine the poisoning resistance of our FTL framework. In this test, we introduced malicious or compromised nodes during the global model aggregation phase to assess how well the system withstands model poisoning attacks. Next, we performed a second validation to investigate whether global intrusion detection models initially trained on one domain (e.g. IoT) can successfully generalise to another domain (e.g. industrial control systems). This step also allowed us to explore the heterogeneity and adaptability of our advanced IDMS, especially in scenarios where FTL participant nodes maintain non-IID data distributions. Furthermore, we measured the extent to which integrating GenAI within the FTL workflow improves the detection of zero-day attacks. In the subsequent sections, we thoroughly describe the data sets and outline the data processing procedures we use. We then provide a concise discussion of our results and an overall performance analysis of the proposed solution.
6.1 Data set and testbed description
6.1.1 Data set.
To ensure a robust evaluation, our framework was tested using four widely recognised, large-scale NetFlow-based data sets. The choice of multiple data sets was deliberate to test the core hypotheses of our research:
NF-ToN-IoT-v2: The NF-ToN-IoT-v2 data set (Sarhan et al., 2022) is derived by processing the publicly available packet capture (pcap) files of the ToN-IoT data set to generate the corresponding NetFlow records. This process results in a NetFlow-based IoT network traffic data set comprising a total of 16,940,496 data flows. Among these, 10,841,027 flows (63.99%) correspond to attack traffic, while 6,099,469 flows (36.01%) represent benign traffic. The detailed distribution of the NF-ToN-IoT-v2 data set is provided in Table 2.
NF-CSE-CIC-IDS2018-v2: The NF-CSE-CIC-IDS2018-v2 data set (Sarhan et al., 2022) is constructed by converting the original pcap files from the CSE-CIC-IDS2018 data set into NetFlow records, thereby producing a NetFlow-based intrusion detection data set. This data set contains a total of 18,893,708 flows, of which 2,258,141 flows (11.95%) are labelled as attack traffic and 16,635,567 flows (88.05%) as benign traffic. Table 3 summarises the distribution of the NF-CSE-CIC-IDS2018-v2 data set.
NF-BoT-IoT-v2: An IoT NetFlow-based data set (Sarhan et al., 2022) was generated by expanding the NF-BoT-IoT data set. The features were extracted from the publicly available pcap files, and the flows were labelled with their respective attack categories. The total number of data flows is 37,763,497, out of which 37,628,460 (99.64%) are attack samples and 135,037 (0.36%) are benign. There are four attack categories in the data set, Table 4 represents the NF-BoT-IoT-v2 distribution of all flows.
NF-UNSW-NB15-v2 The NetFlow-based format of the UNSW-NB15 data set (Sarhan et al., 2022), named NF-UNSW-NB15, has been expanded with additional NetFlow features and labelled with its respective attack categories. The total number of data flows is 2,390,275, out of which 95,053 (3.98%) are attack samples and 2,295,222 (96.02%) are benign. The attack samples are further classified into nine subcategories, Table 5 represents the NF-UNSW-NB15-v2 data set’s distribution of all flows.
6.1.2 Testbed description.
Our testbed comprises a private cloud server that hosts both the FTL server and the GenAI module, plus two edge-client nodes. The open-source Flower framework (Beutel et al., 2020) orchestrates 20 global aggregation rounds. The server first builds a primary global model with the NF-ToN-IoT-v2 data set, while the GenAI module augments rare or zero-day classes using NF-CSE-CIC-IDS2018-v2. The resulting model is dispatched to two edge clients: one fine-tunes on NF-UNSW-NB15-v2 (enterprise-grade CVE traffic) and the other on NF-BoT-IoT-v2 (highly imbalanced botnet traffic). Each client trains a lightweight CNN for 15 epochs; the server performs 20 epochs, all at a learning rate of 0.001. After each round the cloud node merges the locally updated parameters, enabling privacy-preserving cross-domain adaptation. For data processing, the incomplete records are discarded, numeric features (up to 83 NetFlow fields) undergo min–max scaling and categorical attributes (e.g. protocol or TCP flags) are one-hot encoded. We apply correlation analysis and, when beneficial, principal component analysis to drop redundant attributes. An 80:20 stratified train–test split maintains class balance, and synthetic flows are injected only into the training set to bolster coverage of seldom-seen threats. This hybrid cloud-edge arrangement lets us probe how an IoT-centric global model adapts to heterogeneous network conditions while safeguarding data privacy.
6.2 Results
In our final set of experiments, we rigorously measure the aggregated model performance across three key metrics: loss, accuracy and F1 score, after conducting 20 rounds of federated aggregation. Each node (two edge clients and the central cloud server) trains a CNN model compiled with the Adam optimiser (learning rate: 0.001) and uses a sparse categorical cross-entropy loss function. Accuracy serves as the primary evaluation metric during training.
The sparse categorical cross-entropy loss, often denoted as:
penalises deviations between the predicted class probabilities, , and the true labels. This choice is robust for multi-class classification settings, which is essential for intrusion detection tasks where attacks can manifest in various forms. Figure 4 captures how the global model’s loss evolves over 20 training rounds, reflecting a steady decline that confirms overall model convergence and reflecting contributions from both edge nodes and the cloud server. This downward trend is notably mirrored by individual Edge-Client nodes as well, as shown in Figure 5.
Observing this consistent downward trend confirms that each incremental parameter update reduces the overall loss, pushing the model towards better convergence. This behaviour arises because the aggregated model parameters, sourced from multiple domains, broaden the network’s understanding of diverse attack patterns and normal traffic variations. Each edge node trains locally on its own data distribution – whether enterprise-centric or IoT-intensive – thereby capturing domain-specific features that might not be present in other data sets. When these locally refined parameters are combined at the central server, the global model benefits from a more generalised decision boundary, ultimately leading to stronger alignment between predicted probabilities and true labels. Furthermore, the GenAI generated synthetic data plays a crucial role in mitigating the effects of class imbalance and under-representation of rare attacks, reducing the likelihood of overlooking critical intrusion types. Since FTL relies on iterative rounds of parameter exchange, each update progressively incorporates newly learned features, thereby driving down the overall loss and improving generalisation across heterogeneous network environments.
Simultaneously, the individual accuracy plots for Edge-Client 1 and Edge-Client 2, shown in Figure 7, and the Cloud-Server node, depicted in Figure 6, reveal notable improvements in detection performance as collaborative training proceeds. Accuracy, computed as:
provides a direct measure of how frequently the model correctly classifies benign and malicious traffic. Specifically, Edge-Client 1 reports an 86.26% accuracy, with a loss of 0.4528, culminating in an F1 score of 0.7989 (approximately 79.89%). By contrast, Edge-Client 2 attains 92% accuracy with a final loss of 0.29, yielding an F1 score of 0.8015 (approximately 80.15%). These results underscore how domain-specific data distributions and class balances can influence individual client outcomes, even as all participants benefit from shared knowledge during federated aggregation, demonstrating successful knowledge transfer within the framework.
Since our data sets exhibit class imbalance – with certain rare attack types being sparsely represented – we also consider the F1 score to obtain a more comprehensive picture of detection effectiveness. The F1 score is the harmonic mean of precision and recall, defined by:
A higher F1 score indicates that the model not only achieves strong overall accuracy but also effectively flags less common threats without neglecting true positives or inflating false positives. Throughout the 20-round process, both the per-node F1 scores and the global F1 score experience substantial gains, underscoring the benefit of knowledge exchange between the cloud and edge nodes. Taken together, the steady decline in loss, consistent improvements in node-level accuracy and elevated F1 scores highlight the effectiveness of our FedGen-AI framework. By merging parameter updates in a federated learning environment and incorporating synthetic data from the GenAI module, our model sustains robust performance across diverse infrastructures – ranging from IoT-focused traffic to enterprise-scale networks – while mitigating overfitting and maintaining responsiveness to rare attack profiles.
6.3 Performance benchmarking
To rigorously contextualise and justify the effectiveness of FedGen–AI, we conduct a comparative analysis against the most recent (2024–2025) federated or FTL intrusion-detection systems presented in Table 6. Following strict reviewer feedback, earlier baselines (2020–2023) have been excluded. Candidate studies were retained only if they appeared January 2024 or later in a peer-reviewed venue or public pre-print, reported accuracy and/or macro-F1 and targeted edge-oriented NetFlow-style traffic. Three works met these rigorous criteria (Akinie et al., 2025; Praharaj et al., 2025; Zhang et al., 2025b).
Detection quality and generalisation: FedGen–AI achieves a robust 92% accuracy and 0.8015 macro-F1 on the most heterogeneous edge client after only 20 aggregation rounds. Critically, it also sustains an impressive macro-F1 on a challenging, domain-mismatched enterprise client, demonstrating exceptional cross-data set generalisation. While specialised 2025 baselines, such as Akinie et al. (2025) and Praharaj et al. (2025), report higher peak accuracies (exceeding 96%) on single-domain data, they do not demonstrate or evaluate comparable cross-data set generalisation capabilities without centralising raw traffic. Our framework’s ability to maintain strong performance despite significant domain shifts underscores the unique benefits derived from the synergistic integration of FTL and GenAI.
Convergence behaviour and stability: The loss and accuracy curves (Figures 4–7) consistently demonstrate smooth and stable convergence within 12 global rounds for both cloud and edge nodes. This confirms that the integration of synthetic data injection via GenAI effectively enhances the learning process without destabilising the core FedAvg mechanism, a crucial factor for the reliability of complex federated systems.
Cross-domain generalisation: A critical aspect of real-world deployment is adaptability to unseen data distributions. Our experiments show that training on the ToN-IoT data set and evaluating on the entirely distinct UNSW-NB15 and BoT-IoT data sets incurs only a minimal -percentage-point accuracy drop. This remarkable cross-domain generalisation capability, driven by the inherent transfer learning properties of FTL and the data augmentation power of GenAI, positions FedGen–AI as highly adaptable to diverse and evolving network environments, a challenge not fully addressed by baselines focused on single-domain data sets.
Efficiency and communication overhead for Edge Deployment: FedGen–AI is engineered for resource-constrained edge devices. Our system uses a lightweight 2.1 MB CNN, requires only 15 local epochs and generates a remarkably low 30 kB per-round uploads. These specifications fit comfortably within a typical 64 MB Raspberry-Pi-class device, demonstrating superior efficiency compared to alternatives like the “Fed 2-Stage Transformer for CAN” (Zhang et al., 2025b), which reports a significantly higher 1.4 MB/round traffic. This low overhead is a direct benefit of our FTL approach and is comparable to the low-rank update strategies seen in other efficient FTL works (Praharaj et al., 2025).
Fairness across heterogeneous clients: Beyond raw performance, ensuring equitable learning across diverse client populations is vital for practical federated deployments. Across five independent runs, the per-client macro-F1 variance remained exceptionally low (). This robust demonstration of equitable performance under challenging non-IID data splits (see Figure 8) highlights FedGen–AI’s ability to provide consistent security insights across all participating nodes, contributing significantly to the overall trustworthiness of the system.
Robustness against malicious attacks: A key distinguishing feature of FedGen–AI is its inherent resilience against adversarial threats. In experiments simulating a 15% malicious-client ratio, enabling our integrated blockchain reputation filter effectively limited the global F1 drop to less than 4 percentage points. This stands in stark contrast to scenarios without our mitigation, where the F1 performance plummeted by over 30 percentage points (details in §6.6). This verifiable defence against model poisoning attacks, provided by our Blockchain integration, represents a crucial advantage over existing federated IDS benchmarks, which typically do not include explicit mechanisms for such robust integrity protection.
Collectively, these meticulously benchmarked results unequivocally position FedGen–AI as a privacy-preserving, highly adaptable (cross-domain) and resilient intrusion detection system. It strikes a crucial balance between high detection accuracy, minimal edge overhead and robust defence against advanced threats, making it a comprehensive and practical solution for securing modern heterogeneous distributed networks.
6.4 Model explainability
SHapley Additive exPlanations (SHAP) and Local Interpretable Model-agnostic Explanations (LIME) were applied to every model variant in our study to make why-decisions as transparent as the what. Such post-hoc interpretation is crucial for IDS operators, auditors and regulators, who must verify that alerts arise from sound behavioural evidence rather than spurious artifacts (Sharma et al., 2022; Keshk et al., 2023). In the interest of page-length limits, we show SHAP and LIME outputs only for the NF-ToN-IoT-v2 data set, chosen because it covers the widest range of IoT attack types. The identical explanation workflow was executed for the other three benchmark data sets (NF-CSE-CIC-IDS2018-v2, NF-BoT-IoT-v2 and NF-UNSW-NB15-v2); the resulting plots exhibit the same qualitative patterns and are available in the supplementary repository [1]. This selective disclosure keeps the manuscript concise while assuring the reader that explainability was validated system-wide.
6.4.1 SHapley Additive exPlanations-based global and local interpretations.
SHAP, grounded in cooperative game theory, assigns additive importance scores to each feature, offering both global and instance-level explanations (Lundberg and Lee, 2017). We used TreeExplainer for our ensemble-based model (random forest), which allowed efficient estimation of SHAP values:
Global interpretability: SHAP summary plots (Figure 8) across all five classes (benign, DDoS, DoS, reconnaissance theft) revealed that features such as MAX_IP_PKT_LEN, L7_PROTO, TCP_FLAGS and NUM_PKTS_UP_TO_128_BYTES had the highest contribution to predictions. Importantly, the polarity and intensity of SHAP values provided directional insights into whether a feature increased or decreased the likelihood of a class prediction.
Class-wise SHAP heatmaps: Figure 9 revealed high consistency in feature impact across 100 instances per class. For instance, in the DDoS and DoS classes, flow and payload-related features consistently showed strong positive influence, indicating robust model understanding of high-volume attack signatures.
SHAP decision plots: Figures 10 and Figures 11 provided additive visual pathways showing how each feature contributed cumulatively from the base value to the final predicted class score. These plots are particularly useful for diagnosing false positives or understanding prediction confidence thresholds.
6.4.2 Local Interpretable Model-agnostic Explanations-based instance-level explanations.
LIME explains each prediction by perturbing the input vector, fitting a sparse linear surrogate to the resulting outputs and expressing the dominant conditions as human-readable rules (Ribeiro et al., 2016). In our DDoS case study (Figure 12), the surrogate pinpointed the thresholds , and as decisive – limits that match established DDoS heuristics. Running the same analysis on representative samples from every class confirmed coherent logic for the majority labels and revealed more subtle feature mixes in minority classes such as theft and reconnaissance.
6.4.3 SHapley Additive exPlanations vs Local Interpretable Model-agnostic Explanations: complementary perspectives.
While both SHAP and LIME aim to improve model transparency, they offer different strengths. SHAP provides consistent and theoretically grounded global and local attributions, while LIME excels at generating human-readable, instance-specific rule approximations. Recent works in cybersecurity emphasise combining these tools for robust model auditing and fairness evaluation (Hermosilla et al., 2025). In our case, SHAP helped identify dominant patterns (e.g. packet size and protocol types for DDoS), whereas LIME reinforced local trust by offering interpretable thresholds. Their convergence on critical features (e.g. MAX_IP_PKT_LEN, L7_PROTO) validates the reliability of our model’s decision-making logic.
The integration of SHAP and LIME into our IDMS evaluation on NF-ToN-IoT-v2 confirms their value in explaining complex classification decisions. These methods not only enhance transparency but also enable adversarial testing, fairness audits and operational deployment in compliance-driven environments. Similar explainability patterns were observed across all additional data sets used in the system, confirming the robustness and generalisability of our interpretability framework.
7. Conclusions and future work
Our GenAI and FTL-based IDMS has demonstrated significant potential in detecting evolving cyber threats across diverse distributed domains. Through extensive evaluations on four distinct data sets, our framework achieved a robust detection accuracy of up to 92% and an F1-score of over 80% at the client level, underscoring its strong performance on heterogeneous data. The collaborative nature of federated learning preserved data locality, while the integration of GenAI enhanced robustness against rare attacks and the use of blockchain provided a verifiable mechanism for model integrity. This architecture not only bolsters detection performance but also lays a strong foundation for scalable, privacy-conscious defences in complex, distributed infrastructures.
Looking ahead, one of our primary objectives is to verify real-time performance under operational conditions. We plan to thoroughly examine end-to-end latency, from packet capture to mitigation actions, targeting sub 100 ms response times. To validate suitability for long-term deployment scenarios, we will test throughput under peak loads, aiming for the efficient handling of up to one million packets per second while monitoring CPU and memory usage during aggregation rounds. Furthermore, we will assess the framework’s robustness to concept drift by introducing novel attack patterns over extended evaluation periods to measure the model’s adaptation speed.
Privacy preservation remains paramount, and upcoming work will explore advanced differential privacy mechanisms and secure aggregation protocols like homomorphic encryption. A key priority will also be a broader evaluation of the system’s resilience under various adversarial attacks, extending beyond our initial tests to include more sophisticated and adaptive model poisoning scenarios. We also recognise the growing importance of explainability, and we intend to incorporate model interpretability tools such as SHAP or LIME to help security analysts understand high-risk alerts. Lastly, future evaluations will focus on fairness and stability in federated convergence, measuring the variance between local and global model weights and preventing any single node from disproportionately shaping the global model. By addressing these challenges, we aim to advance our IDMS towards a fully mature solution that balances high-performance threat detection with rigorous privacy safeguards and transparent decision-making.
Acknowledgements
The authors would like to express their sincere gratitude to Dr Souvik Sengupta for his steadfast support and invaluable guidance throughout this work. The authors also extend their thanks to PinakashieldTech OÜ for providing the essential infrastructure and tools that made this research possible.
Funding
The authors received no financial support for the research, authorship, and/or publication of this article.
Ethics statement
This research did not involve human participants or animals, and therefore, ethical approval and informed consent were not required.













