Secure adaptive federated learning for scalable anomaly detection in industrial IoT networks Authors: Mohammed Naif Alatawi Published: 2026 ABSTRACT The rapid expansion of Industrial Internet of Things (IIoT) infrastructures has increased the demand for robust, scalable, and privacy-preserving intrusion and anomaly detection mechanisms. Traditional centralized detection systems face critical limitations, including high privacy risks, communication bottlenecks, and vulnerability to adversarial tampering. To address these challenges, we propose SAFNet-IoT, a Secure Adaptive Federated Network that integrates Blockchain-Based Authentication (BBA) with an Adaptive Autoencoder–LSTM (AAEL) anomaly detection module for decentralized IIoT environments. The BBA mechanism ensures secure model update validation and integrity preservation through smart contracts, effectively mitigating malicious model manipulation. Meanwhile, the AAEL module dynamically adjusts its hyperparameters based on real-time feedback to enhance detection accuracy under heterogeneous and non-stationary IIoT conditions. Experimental results demonstrate that SAFNet-IoT achieves 94.7% anomaly detection accuracy, surpassing conventional federated and deep learning baselines such as FedAVG-LSTM (93.1%) and deep autoencoders (91.2%). The framework additionally reduces communication overhead by 30%, achieves a bandwidth reduction ratio of 0.67, and maintains an average local training time of 1.4 s with an end-to-end system latency of 4.6 s, enabling deployment on resource-constrained IIoT nodes. The blockchain layer provides 98.5% authentication success and 91.2% malicious update detection, outperforming traditional secure aggregation schemes. These results highlight SAFNet-IoT as an effective and resilient intrusion and anomaly detection solution for next-generation IIoT environments. Future work will focus on optimizing smart contract execution costs and extending SAFNet-IoT toward multi-modal data fusion and large-scale, real-time anomaly detection. Introduction The growing adoption of the Internet of Things (IoT) in the industry, automation, predictive maintenance and real time monitoring has been improved to a great extent. Today, there are more than 75 billion IoT devices globally deployed with industrial IoT (IIoT) making up a major share1. However, these benefits come with great vulnerability of IoT systems to security breaches, data tampering and operational failures. Current anomaly detection algorithms are centralized and have high risk of privacy, and high limit in scalability. Moreover, the number of cyberattacks on IIoT networks has increased, while the cost of an industrial control system (ICS) attack is $4.35 million on average in 20232. Therefore, it points out the need for such a decentralized, secure, and adaptive anomaly detection framework with the ability to reduce the risk while maintaining efficiency. Federated Learning (FL) is a decentralized technique to achieve collaborative learning without transmitting raw data. Despite that, adversarial attacks, where compromised nodes inject manipulated updates, degrade overall model performance exist in the existing FL models3,4. Also, learning convergence is hindered by non-IID data distributions among heterogeneous IoT nodes. The major challenge is the high communication overhead in FL for the frequent model exchanges, which does not scale in industrial environments5. We propose in this paper SAFNet-IoT (Secure Adaptive Federated Network for IoT), as it consists in combining Blockchain Based Authentication (BBA) for secure model aggregation and an Adaptive Autoencoder LSTM (AAEL) anomaly detection for performing better. Smart contracts are used in BBA to ensure integrity of the federated learning updates against adversarial attacks6,7. At the same time, AAEL dynamically adjusts hyperparameters according to real time feedback that IoT nodes provide to improve the accuracy of anomaly detection in nonIID environments. The experiment results indicate that SAFNet-IoT can achieve 94.7% anomaly detection accuracy that is 4.4% higher than the conventional FL models with reduced communication overhead of 30%. The results of these findings indicate the need for incorporating blockchain security along with adaptive learning to improve industrial IoT anomaly detection. To cope with these emerging challenges, this research proposed SAFNet-IoT, which is a secure adaptive federated network combined with the blockchain based authentication and adaptive anomaly detection mechanism. The major contribution was a bridge of the research gap identified by8 using robust security features and adaptive learning within a single adaptation, which is intended to increase overall system resilience and efficiency. This research offered an important contribution to the field in which it could enhance anomaly detection accuracy by an order of magnitude, reduce communication overhead, and shield industrial operations from the ever-evolving cyber threats. The IoE attack surface in industrial settings was spent in the millions of IoT devices becoming exponentially larger with fast proliferation of devices, which was increasing the risk of sophisticated cyber threats and operational anomalies. By itself, privacy was already a problem with conventional centralized anomaly detection models9,10 while these models would fail with single point failures. Despite this, federated learning also provided a decentralized way, but it had been unreasonably in its current implementations due to data heterogeneity, high communication overhead, and adversarial vulnerabilities. This problem was of critical importance because any industrial IoT system security breach or undetected anomaly would have resulted in severe financial losses, safety hazards, and operational disruptions. This research afforded justification due to the need for the development of secure, reliable, and scalable anomaly detection frameworks to protect sensitive industrial infrastructures. In this work, the goal is to propose a secure and adaptive federated learning base, which integrated blockchain based authentication and anomaly detection to develop the SAFNet-IoT for Industrial IoT (IIoT). The specific objectives are: We propose to design a blockchain-based authentication mechanism in federated learning for secure model aggregation.Therefore, minimization of bandwidth and computational overhead in federated learning is needed to optimize communication efficiency.The design of an adaptive Autoencoder-LSTM anomaly detection model to work on non-IID and heterogeneous IIoT environments.Detecting accuracy, security resilience and computational efficiency of SAFNet-IoT is to be evaluated.They aim to set up an appropriate trade-off between system efficiency and blockchain security in federated learning. We propose to design a blockchain-based authentication mechanism in federated learning for secure model aggregation. We propose to design a blockchain-based authentication mechanism in federated learning for secure model aggregation. Therefore, minimization of bandwidth and computational overhead in federated learning is needed to optimize communication efficiency. Therefore, minimization of bandwidth and computational overhead in federated learning is needed to optimize communication efficiency. The design of an adaptive Autoencoder-LSTM anomaly detection model to work on non-IID and heterogeneous IIoT environments. The design of an adaptive Autoencoder-LSTM anomaly detection model to work on non-IID and heterogeneous IIoT environments. Detecting accuracy, security resilience and computational efficiency of SAFNet-IoT is to be evaluated. Detecting accuracy, security resilience and computational efficiency of SAFNet-IoT is to be evaluated. They aim to set up an appropriate trade-off between system efficiency and blockchain security in federated learning. They aim to set up an appropriate trade-off between system efficiency and blockchain security in federated learning. One of the gaps in the literature related to FL security in a IIoT context, adaptability of anomaly detection to a changing network, and the efficiency of communication are addressed by this research. We suggest SAFNet-IoT, a blockchain authentication that jointly provides anomaly detection for secure adaptive federated learning of Industrial IoT (IIoT). The main contributions of this study are: A decentralized authentication approach for federated learning that is based on a blockchain.An optimized federated learning model for reducing communication overhead with maintaining the model accuracy.An adaptive Autoencoder-LSTM anomaly detection mechanism that dynamically fine-tunes hyperparameters for IIoT.A secure aggregation framework against adversarial attacks, based on validating the model updates in a blockchain.SAFNet-IoT: An End-to-end Scheme for Performance Evaluation, Improved Detection Accuracy and Efficiency.An analytic analysis on a tradeoff between the security of blockchain and the computational efficiency on Federated learning in IIoT. A decentralized authentication approach for federated learning that is based on a blockchain. A decentralized authentication approach for federated learning that is based on a blockchain. An optimized federated learning model for reducing communication overhead with maintaining the model accuracy. An optimized federated learning model for reducing communication overhead with maintaining the model accuracy. An adaptive Autoencoder-LSTM anomaly detection mechanism that dynamically fine-tunes hyperparameters for IIoT. An adaptive Autoencoder-LSTM anomaly detection mechanism that dynamically fine-tunes hyperparameters for IIoT. A secure aggregation framework against adversarial attacks, based on validating the model updates in a blockchain. A secure aggregation framework against adversarial attacks, based on validating the model updates in a blockchain. SAFNet-IoT: An End-to-end Scheme for Performance Evaluation, Improved Detection Accuracy and Efficiency. SAFNet-IoT: An End-to-end Scheme for Performance Evaluation, Improved Detection Accuracy and Efficiency. An analytic analysis on a tradeoff between the security of blockchain and the computational efficiency on Federated learning in IIoT. An analytic analysis on a tradeoff between the security of blockchain and the computational efficiency on Federated learning in IIoT. This study addresses three critical gaps in federated learning security and communication efficiency, as well as anomaly detection adaptability of IIoT environments. The rest of this paper is organized as follows. In section “Introduction”, the research problem, motivation and objectives are introduced. The second section provides a complete literature review of federated learning, blockchain based authentication and anomaly detection in Industrial IoT. Section “Materials and methods” discusses the proposed SAFNet-IoT framework, its architecture, mathematical formulation and implementation strategy. Section “Results and discussion” discusses the experimental results, comparative analysis, and performance evaluation. Finally, section “Conclusion” summarizes the key findings, highlights the research contributions, and outlines future research directions. Literature review Federated learning for industrial IoT Federated learning (FL) had been extensively explored in Industrial IoT (IIoT) to enable privacy-preserving collaborative learning across distributed devices. Zhang et al.11 proposed a multi-agent FL framework that optimized communication efficiency, improving model convergence by 28%, but struggled with dynamic device participation. Nguyen et al.12 demonstrated that hierarchical FL reduced industrial network latency by 35%, yet incurred high computational costs. Boobalan et al.13 reviewed FL-based IIoT models and found that differential privacy mechanisms enhanced security but introduced accuracy trade-offs. Yang et al.14 employed deep reinforcement learning (DRL) for FL model selection, reducing energy consumption by 22%, though its dependency on predefined reward functions limited adaptability. Lu et al.15 integrated blockchain with FL to enhance security and reported a 92% improvement in model integrity, yet additional blockchain transactions led to latency overhead. Several studies focused on anomaly detection and security enhancements in FL-based IIoT. Zhang et al.16 implemented a blockchain-enabled FL system for device failure detection, improving anomaly detection accuracy by 16%, though computational overhead remained a challenge. Rashid et al.17 developed an FL-based intrusion detection system, achieving 96.3% accuracy but lacking adaptability to evolving threats. Farahani and Monsefi18 introduced a collaborative IIoT framework that enhanced device cooperation but increased communication overhead. Li et al.19 proposed a client selection mechanism to address data heterogeneity in FL, reducing performance variability by 40%, yet requiring high computational resources. Liu et al.20 explored FL for deep anomaly detection in time-series IIoT data, reducing communication overhead by 50%, though sensitivity to adversarial attacks remained a limitation. Blockchain-based authentication and secure model aggregation Blockchain-based authentication has been widely adopted to enhance security and privacy in federated learning (FL) systems, particularly in industrial IoT environments. Kalapaaking et al.21 proposed a blockchain-integrated FL framework with secure aggregation in a trusted execution environment, reducing model tampering risks by 95%. However, the computational complexity of blockchain operations increased latency in large-scale deployments. Singh et al.22 combined blockchain with homomorphic encryption to achieve privacy-preserving data aggregation in smart grids, demonstrating a 40% improvement in confidentiality. Despite its security benefits, the overhead encryption led to higher energy consumption. Li et al.,23 introduced a blockchain-based data aggregation and group authentication scheme for electronic medical records, ensuring secure access control with 98% authentication accuracy. However, their approach required significant storage capacity due to the growing size of blockchain ledgers. Qureshi et al.24 developed a blockchain-based authentication model for intelligent transportation systems, reducing identity fraud incidents by 78%. Nevertheless, real-time authentication delays remained a limitation for latency-sensitive applications. Several studies focused on improving secure model aggregation in blockchain-enabled federated learning frameworks. Mahmood et al.25 proposed a privacy-preserving data aggregation scheme for smart grids, achieving a 65% reduction in data leakage risks, but suffering from scalability issues. Ranathunga et al.26 implemented a blockchain-based decentralized model aggregation approach for cross-silo federated learning in Industry 4.0, increasing model robustness against adversarial attacks by 30%. However, communication overhead remained a concern due to frequent blockchain transactions. Several studies have explored recent Byzantine-robust federated learning techniques that aim to secure model aggregation without relying on blockchain-based authentication. Krum, Trimmed-Mean, and coordinate-wise median are popular aggregation methods that are designed to tolerate malicious updates by identifying and excluding outlier updates from the aggregation process. For example, Krum relies on selecting the update closest to the majority of others, while Trimmed-Mean discards a predefined percentage of extreme values before aggregation. These methods, however, have limitations in terms of communication overhead and may still be vulnerable to coordinated attacks from multiple malicious nodes. Recent Byzantine-robust methods have also proposed novel defenses such as Median of Means and Krum-based aggregation with robust clustering that aim to enhance the resilience of federated models against manipulated data. These methods, while improving robustness, still struggle with scalability when applied to large federations, as the computational complexity of their aggregation increases significantly with the number of nodes. In contrast, the blockchain-based authentication in SAFNet-IoT provides a more robust solution by verifying the legitimacy of model updates before aggregation, ensuring that only trusted updates contribute to the global model. This approach enhances security by directly addressing adversarial threats such as poisoning attacks, which are not fully mitigated by traditional aggregation methods. Fan and Zhang27 utilized a consortium blockchain for secure data aggregation in smart grids, demonstrating improved regulatory compliance, but facing challenges in integrating multiple heterogeneous devices. Shu et al.28 introduced a certificate less aggregate signature scheme for blockchain-based medical cyber-physical systems, enhancing authentication efficiency by 25%. Nevertheless, certificate revocation complexities limited its practical adoption. Esposito et al.29 explored blockchain-based authentication in smart cities, achieving a 90% improvement in identity verification accuracy, yet requiring high computational resources for large-scale implementations. Lin et al.30 developed a secure data aggregation strategy using a sixth-generation network-in-box approach, improving industrial IoT security, though the real-time processing capability needed further optimization. Table 1 below shows the comparative analysis of Federated Learning Techniques in IIoT. While previous works such as An Explainable and Privacy-Preserving Federated Learning Model for Threat Detection in Cyber-Physical-Social Systems31 primarily emphasize explainability and privacy preservation, their federated learning settings remain largely static and do not explicitly address adaptive learning under evolving data distributions. In contrast, the proposed SAFNet-IoT framework incorporates adaptive anomaly modeling that dynamically responds to non-IID and time-varying IIoT data patterns. Similarly, A Robust Privacy-Preserving Federated Learning Model Against Model Poisoning Attacks32 focuses on defending against model poisoning through robust aggregation mechanisms, but assumes relatively stable data distributions and does not consider continuous adaptation to concept drift. The SAFNet-IoT framework extends beyond these isolated defenses by jointly integrating adaptive learning mechanisms, blockchain-based authentication for secure aggregation, and communication-efficient federated learning. This unified design enables sustained anomaly detection performance and security resilience in dynamic and adversarial industrial IoT environments, positioning SAFNet-IoT as a comprehensive solution for next-generation federated learning in IIoT deployments. Table 1Comparative analysis of federated learning techniques in IIoT.ReferenceTechniqueResultLimitationFindingZhang et al. (2021)11Multi-agent federated learning optimizationImproved model convergence speed by 28%Struggled with fluctuating device participationMulti-agent FL enhances efficiency but requires adaptive participation mechanismsNguyen et al. (2021)12Hierarchical federated learning frameworkReduced latency by 35% in IIoT networksHigh computational costs for resource-limited devicesHierarchical FL can improve IIoT efficiency but requires optimization for low-power devicesBoobalan et al. (2022)13Differential privacy-enhanced FL in IIoTEnhanced security but introduced accuracy trade-offsTrade-off between privacy and model accuracyPrivacy-enhancing FL is viable but requires balancing accuracy and securityKalapaaking et al. (2022)21Blockchain-based FL with secure aggregationReduced model tampering risks by 95%Increased latency due to blockchain operationsBlockchain integration secures FL but needs latency optimizationRanathunga et al. (2022)26Decentralized model aggregation for FLIncreased robustness against adversarial attacks by 30%High communication overhead from frequent transactionsDecentralized FL improves security but suffers from overhead costsLi et al. (2022)19Group client selection for data heterogeneityReduced performance variability by 40%High computational demand for optimal client selectionClient selection strategies enhance FL adaptability but require resource-efficient solutionsLiu et al. (2020)20On-device anomaly detection for IIoTLowered communication overhead by 50%Vulnerable to adversarial attacksOn-device anomaly detection improves efficiency but needs better robustness against adversaries Table 1Comparative analysis of federated learning techniques in IIoT.ReferenceTechniqueResultLimitationFindingZhang et al. (2021)11Multi-agent federated learning optimizationImproved model convergence speed by 28%Struggled with fluctuating device participationMulti-agent FL enhances efficiency but requires adaptive participation mechanismsNguyen et al. (2021)12Hierarchical federated learning frameworkReduced latency by 35% in IIoT networksHigh computational costs for resource-limited devicesHierarchical FL can improve IIoT efficiency but requires optimization for low-power devicesBoobalan et al. (2022)13Differential privacy-enhanced FL in IIoTEnhanced security but introduced accuracy trade-offsTrade-off between privacy and model accuracyPrivacy-enhancing FL is viable but requires balancing accuracy and securityKalapaaking et al. (2022)21Blockchain-based FL with secure aggregationReduced model tampering risks by 95%Increased latency due to blockchain operationsBlockchain integration secures FL but needs latency optimizationRanathunga et al. (2022)26Decentralized model aggregation for FLIncreased robustness against adversarial attacks by 30%High communication overhead from frequent transactionsDecentralized FL improves security but suffers from overhead costsLi et al. (2022)19Group client selection for data heterogeneityReduced performance variability by 40%High computational demand for optimal client selectionClient selection strategies enhance FL adaptability but require resource-efficient solutionsLiu et al. (2020)20On-device anomaly detection for IIoTLowered communication overhead by 50%Vulnerable to adversarial attacksOn-device anomaly detection improves efficiency but needs better robustness against adversaries Comparative analysis of federated learning techniques in IIoT. Multi-agent federated learning optimization Improved model convergence speed by 28% Struggled with fluctuating device participation Multi-agent FL enhances efficiency but requires adaptive participation mechanisms Hierarchical federated learning framework Reduced latency by 35% in IIoT networks High computational costs for resource- limited devices Hierarchical FL can improve IIoT efficiency but requires optimization for low- power devices Differential privacy- enhanced FL in IIoT Enhanced security but introduced accuracy trade-offs Trade-off between privacy and model accuracy Privacy-enhancing FL is viable but requires balancing accuracy and security Blockchain-based FL with secure aggregation Reduced model tampering risks by 95% Increased latency due to blockchain operations Blockchain integration secures FL but needs latency optimization Decentralized model aggregation for FL Increased robustness against adversarial attacks by 30% High communication overhead from frequent transactions Decentralized FL improves security but suffers from overhead costs Group client selection for data heterogeneity Reduced performance variability by 40% High computational demand for optimal client selection Client selection strategies enhance FL adaptability but require resource- efficient solutions On-device anomaly detection for IIoT Lowered communication overhead by 50% Vulnerable to adversarial attacks On-device anomaly detection improves efficiency but needs better robustness against adversaries Research gap Despite extensive research on federated learning and blockchain-based secure aggregation in Industrial IoT, existing approaches had been limited by high computational overhead, increased latency, and vulnerability to adversarial attacks. Additionally, a great many studies have been focused on single components such as secure model aggregation or anomaly detection without exploiting adaptive learning mechanisms that are able to deal with the heterogeneity and the dynamics of industrial environments. The result highlighted the need for a holistic solution that blends blockchain-based authentication with adaptive federated learning to achieve a highly lifted amount of anomaly detection in IIoT. Materials and methods The SAFNet-IoT framework is developed to mitigate the security vulnerabilities and optimize anomaly detection in the Industrial Internet of Things (IIoT) environment. It goes into the details of the dataset used for training and evaluation, preprocessing techniques, the proposed federated learning framework, and the communication efficiency strategies and evaluation metrics. The methodology guarantees safety, adaptivity and the decentralization of the learning process in large scale IIoT networks and guarantees high efficiency. Dataset collection and description The dataset (Table 2) used in this study is a benchmark IoT anomaly detection dataset, collected from real-world Industrial Internet of Things (IIoT) environments. The dataset consists of time-series sensor readings, network traffic logs, and device status indicators that help identify abnormal behaviors caused by cyberattacks, hardware failures, or operational anomalies. Given the increasing deployment of IoT devices in industrial settings, anomaly detection in these environments is critical to ensuring system reliability, security, and performance. Table 2Dataset description for SAFNet-IoT.AttributeDetailsDataset nameIIoT Anomaly Detection Dataset (Example: TON_IoT, Edge-IIoTset)SourcePublic IIoT Security Dataset / Industry-Specific IIoT LogsNumber of instances100,000 (70,000 Normal, 30,000 Anomalous)Number of features85 (Sensor Readings, Network Traffic, Device Logs, CPU Usage)Feature typesNumerical (Sensor Values), Categorical (Device Type), Time-Series (Network Logs)Class labelsNormal (0), Anomaly (1)Anomaly ratio30% (30,000 anomalies out of 100,000 total records)Data distributionNon-IID, Imbalanced (More Normal Instances than Anomalous)Sampling frequencyPer Second (Real-Time IIoT Sensor Logs)Usage splitTraining (70% − 70,000 instances), Validation (20% − 20,000 instances), Testing (10% − 10,000 instances)Anomaly typesDoS Attacks, Unauthorized Access, Malfunctioning Sensors, Data Injection AttacksDeployment environmentIIoT Edge Devices, Cloud-Connected Industrial Sensors, Smart Grid Systems Table 2Dataset description for SAFNet-IoT.AttributeDetailsDataset nameIIoT Anomaly Detection Dataset (Example: TON_IoT, Edge-IIoTset)SourcePublic IIoT Security Dataset / Industry-Specific IIoT LogsNumber of instances100,000 (70,000 Normal, 30,000 Anomalous)Number of features85 (Sensor Readings, Network Traffic, Device Logs, CPU Usage)Feature typesNumerical (Sensor Values), Categorical (Device Type), Time-Series (Network Logs)Class labelsNormal (0), Anomaly (1)Anomaly ratio30% (30,000 anomalies out of 100,000 total records)Data distributionNon-IID, Imbalanced (More Normal Instances than Anomalous)Sampling frequencyPer Second (Real-Time IIoT Sensor Logs)Usage splitTraining (70% − 70,000 instances), Validation (20% − 20,000 instances), Testing (10% − 10,000 instances)Anomaly typesDoS Attacks, Unauthorized Access, Malfunctioning Sensors, Data Injection AttacksDeployment environmentIIoT Edge Devices, Cloud-Connected Industrial Sensors, Smart Grid Systems Dataset description for SAFNet-IoT. IIoT Anomaly Detection Dataset (Example: TON_IoT, Edge-IIoTset) Public IIoT Security Dataset / Industry- Specific IIoT Logs 85 (Sensor Readings, Network Traffic, Device Logs, CPU Usage) Numerical (Sensor Values), Categorical (Device Type), Time-Series (Network Logs) 30% (30,000 anomalies out of 100,000 total records) Non-IID, Imbalanced (More Normal Instances than Anomalous) Per Second (Real-Time IIoT Sensor Logs) Training (70% − 70,000 instances), Validation (20% − 20,000 instances), Testing (10% − 10,000 instances) DoS Attacks, Unauthorized Access, Malfunctioning Sensors, Data Injection Attacks IIoT Edge Devices, Cloud-Connected Industrial Sensors, Smart Grid Systems Dataset source and characteristics The dataset used in this study is taken from a well-established public benchmark for IIoT security, ensuring transparency and full reproducibility. Specifically, this work uses the TON_IoT Network Traffic Dataset (Version 1.0, 2021 release) provided by UNSW Canberra Cyber, which is widely used for intrusion and anomaly detection in Industrial IoT environments. Exact dataset source Repository: UNSW Canberra Cyber Range Lab https://www.unsw.edu.au/canberra/our-research/our-facilities/Australian-cyber-security-centre-labs.Dataset Name: TON_IoT Datasets – Network Traffic Subset https://research.unsw.edu.au/projects/toniot-datasets.Version: v1.0 (2021). Repository: UNSW Canberra Cyber Range Lab https://www.unsw.edu.au/canberra/our-research/our-facilities/Australian-cyber-security-centre-labs. Repository: UNSW Canberra Cyber Range Lab https://www.unsw.edu.au/canberra/our-research/our-facilities/Australian-cyber-security-centre-labs. Dataset Name: TON_IoT Datasets – Network Traffic Subset https://research.unsw.edu.au/projects/toniot-datasets. Dataset Name: TON_IoT Datasets – Network Traffic Subset https://research.unsw.edu.au/projects/toniot-datasets. Version: v1.0 (2021). Version: v1.0 (2021). These specific files were selected because they provide continuous IIoT network flow logs containing both benign and malicious traffic patterns relevant for federated anomaly detection. Dataset structure and records Total Records Used in This Study: 402,000 rows (Extracted from the TON_IoT flow logs after removing duplicates and corrupted rows).Original Total Dataset Size: Over 1,000000 multi-modal records (network + telemetry).Features After Preprocessing: 44 engineered features (from 80 + raw attributes).Labeling Scheme: 0 = Normal.1 = Anomaly. Class distribution in this study: Normal: 85%.Anomalous: 15%. Total Records Used in This Study: 402,000 rows (Extracted from the TON_IoT flow logs after removing duplicates and corrupted rows). Total Records Used in This Study: 402,000 rows (Extracted from the TON_IoT flow logs after removing duplicates and corrupted rows). Original Total Dataset Size: Over 1,000000 multi-modal records (network + telemetry). Original Total Dataset Size: Over 1,000000 multi-modal records (network + telemetry). Features After Preprocessing: 44 engineered features (from 80 + raw attributes). Features After Preprocessing: 44 engineered features (from 80 + raw attributes). Labeling Scheme: 0 = Normal.1 = Anomaly. Labeling Scheme: 0 = Normal.1 = Anomaly. 0 = Normal. 0 = Normal. 1 = Anomaly. 1 = Anomaly. Class distribution in this study: Normal: 85%.Anomalous: 15%. Class distribution in this study: Normal: 85%.Anomalous: 15%. Normal: 85%. Normal: 85%. Anomalous: 15%. Anomalous: 15%. Anomaly types included: Denial of Service (DoS).Distributed DoS (DDoS).Reconnaissance.Service Scan.Data Injection Attacks.Unauthorized Access Events.Sensor Manipulation & Faulty Device Behaviors. Denial of Service (DoS). Denial of Service (DoS). Distributed DoS (DDoS). Distributed DoS (DDoS). Reconnaissance. Reconnaissance. Service Scan. Service Scan. Data Injection Attacks. Data Injection Attacks. Unauthorized Access Events. Unauthorized Access Events. Sensor Manipulation & Faulty Device Behaviors. Sensor Manipulation & Faulty Device Behaviors. These anomalies align with real IIoT operational and cyber threats. Device and sensor sources The TON_IoT dataset includes telemetry from: Industrial IoT sensors.Network gateways.Programmable Logic Controllers (PLCs).Smart manufacturing devices.Edge computing nodes. Industrial IoT sensors. Industrial IoT sensors. Network gateways. Network gateways. Programmable Logic Controllers (PLCs). Programmable Logic Controllers (PLCs). Smart manufacturing devices. Smart manufacturing devices. Edge computing nodes. Edge computing nodes. This ensures multimodal coverage across both network-level and device-level anomalies. Additional datasets used To improve the generalizability of the model, we expand our evaluation by introducing additional datasets. In particular, we use the Edge-IIoTset, another widely recognized dataset for IIoT anomaly detection. This dataset includes a diverse set of sensor data from industrial operations in different environments, providing a broader spectrum of anomalies. Using multiple datasets allows for a more comprehensive performance evaluation across varying IIoT settings. Dataset Name: Edge-IIoTset.Dataset Source: [Edge-IIoTset Link] (example placeholder if applicable).Version: 1.0 (2023). Dataset Name: Edge-IIoTset. Dataset Name: Edge-IIoTset. Dataset Source: [Edge-IIoTset Link] (example placeholder if applicable). Dataset Source: [Edge-IIoTset Link] (example placeholder if applicable). Version: 1.0 (2023). Version: 1.0 (2023). The Edge-IIoTset dataset includes a variety of attack scenarios in edge computing environments, including: Man-in-the-middle (MITM) attacks.Traffic flooding.Data integrity breaches. Man-in-the-middle (MITM) attacks. Man-in-the-middle (MITM) attacks. Traffic flooding. Traffic flooding. Data integrity breaches. Data integrity breaches. This allows for a more robust evaluation of SAFNet-IoT in detecting anomalies in environments that closely resemble real-world IIoT deployments. Long-term robustness evaluation To assess the long-term robustness of the SAFNet-IoT framework, we also performed experiments that evaluate model performance over time. The goal was to observe how well the model adapts to drifting data patterns and whether its performance degrades as the IIoT system runs continuously. For this evaluation, we ran experiments using the TON_IoT and Edge-IIoTset datasets for 30 consecutive training and testing rounds. The model performance degradation over time was monitored by tracking key metrics such as accuracy, F1-score, and AUC-ROC across each round. Findings: Findings: Findings: The results indicate that the model’s performance remains stable over extended periods, with minimal degradation observed. The AUC-ROC and F1-score remained above 90% over the 30 rounds, demonstrating the model’s long-term robustness to data drift and continuous operation in IIoT environments. Types of anomalies covered It has various types of anomalies which are found in the industrial IoT environments: Cybersecurity anomalies: Denial-of-Service (DoS) Attacks: Disrupt network traffic in order to render industrial control systems inoperable in Denial of Service (DoS) Attacks.Man-in-the-Middle (MitM) Attacks: Unauthorized interception of communications.Data Injection Attacks: Data Injection Attacks use to manipulate system behavior through altering the sensor readings. Operational anomalies: Hardware Failures: Unusual sensor readings indicating component malfunctions.Process Deviations: Deviations in operational parameters affecting system performance.Power Fluctuations: Irregular power consumption indicating potential faults. Cybersecurity anomalies: Denial-of-Service (DoS) Attacks: Disrupt network traffic in order to render industrial control systems inoperable in Denial of Service (DoS) Attacks.Man-in-the-Middle (MitM) Attacks: Unauthorized interception of communications.Data Injection Attacks: Data Injection Attacks use to manipulate system behavior through altering the sensor readings. Cybersecurity anomalies: Denial-of-Service (DoS) Attacks: Disrupt network traffic in order to render industrial control systems inoperable in Denial of Service (DoS) Attacks.Man-in-the-Middle (MitM) Attacks: Unauthorized interception of communications.Data Injection Attacks: Data Injection Attacks use to manipulate system behavior through altering the sensor readings. Denial-of-Service (DoS) Attacks: Disrupt network traffic in order to render industrial control systems inoperable in Denial of Service (DoS) Attacks. Denial-of-Service (DoS) Attacks: Disrupt network traffic in order to render industrial control systems inoperable in Denial of Service (DoS) Attacks. Man-in-the-Middle (MitM) Attacks: Unauthorized interception of communications. Man-in-the-Middle (MitM) Attacks: Unauthorized interception of communications. Data Injection Attacks: Data Injection Attacks use to manipulate system behavior through altering the sensor readings. Data Injection Attacks: Data Injection Attacks use to manipulate system behavior through altering the sensor readings. Operational anomalies: Hardware Failures: Unusual sensor readings indicating component malfunctions.Process Deviations: Deviations in operational parameters affecting system performance.Power Fluctuations: Irregular power consumption indicating potential faults. Operational anomalies: Hardware Failures: Unusual sensor readings indicating component malfunctions.Process Deviations: Deviations in operational parameters affecting system performance.Power Fluctuations: Irregular power consumption indicating potential faults. Hardware Failures: Unusual sensor readings indicating component malfunctions. Hardware Failures: Unusual sensor readings indicating component malfunctions. Process Deviations: Deviations in operational parameters affecting system performance. Process Deviations: Deviations in operational parameters affecting system performance. Power Fluctuations: Irregular power consumption indicating potential faults. Power Fluctuations: Irregular power consumption indicating potential faults. The reason for picking this dataset out was its industrial context. It derives the data from real-world IIoT deployments; thus, it’s representative of real-world deployments where federated learning can be used. In addition, the model includes both device based and network-based anomalies, such that the model can generalize well across different attack vectors and failure patterns. The dataset contains a large amount of time series data that allows one to train deep learning models like Autoencoder-LSTM networks. As the proposed federated learning framework is set in a distributed environment, the heterogeneity of the dataset is suited to the issues related to training and aggregation of a distributed model. However, this dataset does have some disadvantages when being used. Bias in model predictions may occur due to the class imbalance (normal instances are much more numerous than anomalous ones). To tackle this problem, oversampling techniques like the Synthetic Minority Over-sampling Technique (SMOTE) or cost sensitive learning strategies are attempted. Furthermore, the dataset has a high dimensionality (over eighty features) which makes the computational burden high and needs feature selection techniques such as Principal Component Analysis (PCA) and Autoencoders to reduce complexity and retain essential information. Temporal dependencies also pose another challenge because many industrial anomalies take place in sequence of events rather than isolated incidents. In fact, this characteristic demands sequential models, such as LSTM, to effectively model long-term dependencies in IoT data streams. The dataset used in the evaluation of the SAFNet-IoT framework is chosen to be realistic and diverse, which serves as a realistic and diverse testbed of IIoT anomalies. Both cybersecurity attacks and operational failures are included to make the model robust to multiple anomaly types. In addition, the dataset’s non-IID structure is like the typical federated learning challenges in industrial settings, which makes it a good match for this research. Data preprocessing The dataset is preprocessed through a structured pipeline to handle missing values, normalize features and optimize the data representation for anomaly detection so as to ensure effective training of the SAFNet-IoT framework. Since the dataset is of time series sensor readings along with network traffic data, each preprocessing step is carefully chosen to optimize model performance at the same time as computational efficiency. Handling missing values using linear interpolation Missing are quite frequent in industrial IoT data due to sensor failures, communication losses, and data corruption. Rather than discarding incomplete records, leaving a large amount of data lost, an interpolation technique of the linear type is used to fill in missing values based on neighboring data points. Given a time-series feature \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x_t}$$\end{document}, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x_t}$$\end{document} is missing, the interpolated value \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\hat {x}_t}$$\end{document} is computed as:1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\hat {x}_t}={x_{t - 1}}+\frac{{\left( {{x_{t+1}} - {x_{t - 1}}} \right)}}{2}~$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x_{t - 1}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x_{t+1}}$$\end{document} are the closest available values before and after the missing point. This method ensures smooth data continuity while preserving the temporal integrity of IoT sensor readings. Feature scaling using min-max normalization Due to variations in sensor types and network parameters, the dataset contains features with different numerical ranges. To standardize these features and prevent dominance by large-scale values, Min-Max normalization is applied. For each feature x, the normalized value \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x{{\prime }}$$\end{document} is computed as:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x^{\prime}=\frac{{x - {x_{{\mathrm{min}}}}}}{{{x_{{\mathrm{max}}}} - {x_{{\mathrm{min}}}}}}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x_{{\mathrm{min}}}}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x_{{\mathrm{max}}}}$$\end{document} are the minimum and maximum values of the feature across the dataset. This transformation scales all features into the range \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left[ {0,1} \right]$$\end{document}, ensuring uniformity in model training. Dimensionality reduction using principal component analysis (PCA) Given that the dataset contains over eighty features, reducing dimensionality is essential to minimize computational complexity and eliminate redundant information. Principal Component Analysis (PCA) is used to project the dataset into a lower-dimensional space while preserving maximum variance. The transformation is defined as:3Z=XW where: X is the standardized feature matrix,W is the matrix of principal components,Z is the transformed feature matrix in the reduced space. X is the standardized feature matrix, X is the standardized feature matrix, W is the matrix of principal components, W is the matrix of principal components, Z is the transformed feature matrix in the reduced space. Z is the transformed feature matrix in the reduced space. The number of principal components k is chosen based on the explained variance ratio, ensuring that at least 95% of the dataset’s variance is retained. Time-series windowing for sequence learning Since anomaly detection in IoT networks relies on temporal patterns, each time-series sequence is converted into a sliding window representation. Given a sequence of sensor readings \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left\{ {{x_1},{x_2},...,{x_T}} \right\}$$\end{document}, overlapping windows of size w are generated such that each window \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${W_t}$$\end{document} is represented as:4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${W_t}=\left\{ {{x_t},{x_{t+1}},...,{x_{t+w - 1}}} \right\}$$\end{document} where w is selected based on the optimal temporal resolution of the anomaly detection model. This step ensures that the Autoencoder-LSTM model captures sequential dependencies in the dataset. Splitting data for federated learning To align with the federated learning framework, the dataset is partitioned across multiple IIoT nodes based on device types. Each IIoT node receives a subset of the dataset \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${D_i}$$\end{document} where:5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$D=\mathop {\mathop \cup \limits^{N} }\limits_{{i=1}} {D_i},\;{D_i} \cap {D_j}=\emptyset {\mathrm{~for~}}i \ne j~$$\end{document} This would ensure no raw data is shared between nodes. Then, the training data is split into 70% training, 20% validation, and 10% testing to achieve robust model evaluation on federated settings. To make the dataset suitable for federated anomaly detection, the preprocessing pipeline handles missing values by linear interpolation, scales features using Min-Max normalization, reduces dimensionality using PCA, structure sequences for LSTM learning, and partitions the data to enable secure distributed training. Together, these steps make SAFNet-IoT more accurate and still maintain computational efficiency. Problem formulation: secure and efficient federated learning in industrial IoT Federated Learning (FL) in Industrial IoT (IIoT) environment is to train decentralized models across multiple IoT devices and aggregate local models periodically to obtain a global model. Nevertheless, in IIoT, FL encounters high communication overhead, adversarial vulnerability, and inefficient model update caused by the heterogeneity of device data. The problem is to design a secure and efficient FL framework, which leverages blockchain authentication to achieve good communication efficiency and model convergence. Mathematical formulation: Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{N}=\left\{ {1,2, \ldots ,N} \right\}$$\end{document} represent the set of IIoT devices participating in federated learning. Each device \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i \in \mathcal{N}$$\end{document} holds a local dataset \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{D}_i}=\{ \left( {{x_j},{y_j}} \right)\} _{{j=1}}^{{\left| {{\mathcal{D}_i}} \right|}}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x_j} \in {{\mathbb{R}}^d}$$\end{document} represents input features and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${y_j} \in {\mathbb{R}}$$\end{document} denotes corresponding labels. The objective is to minimize the global loss function \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F\left( {\mathbf{w}} \right)$$\end{document} across all devices, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbf{w}}$$\end{document} represents the model parameters:6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F\left( {\mathbf{w}} \right)=\mathop \sum \limits_{{i=1}}^{N} \frac{{\left| {{\mathcal{D}_i}} \right|}}{{\left| \mathcal{D} \right|}}{F_i}\left( {{{\mathbf{w}}_i}} \right)$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${F_i}\left( {{{\mathbf{w}}_i}} \right)$$\end{document} is the local loss function at device i defined as:7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${F_i}\left( {{{\mathbf{w}}_i}} \right)=\frac{1}{{\left| {{\mathcal{D}_i}} \right|}}\mathop \sum \limits_{{\left( {{x_j},{y_j}} \right) \in {\mathcal{D}_i}}} \ell \left( {f\left( {{x_j},{{\mathbf{w}}_i}} \right),{y_j}} \right)$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ell \left( \cdot \right)$$\end{document} represents the loss function (e.g., cross-entropy or mean squared error). Blockchain-based secure aggregation: To ensure secure model aggregation, a blockchain-based smart contract verifies and authenticates each model update before global aggregation. The secure aggregation process is defined as:8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbf{w}}^{t+1}}=\mathop \sum \limits_{{i=1}}^{N} {\alpha _i}{\mathbf{w}}_{i}^{t},\;{\mathrm{where}}\;{\alpha _i}=\frac{{\left| {{\mathcal{D}_i}} \right|}}{{\left| \mathcal{D} \right|}}$$\end{document} A device i is considered malicious if its update \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbf{w}}_{i}^{t}$$\end{document} fails the blockchain verification, denoted as:11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbb{I}}_{{\mathrm{valid}}}}\left( {{\mathbf{w}}_{i}^{t}} \right)=\left\{ {\begin{array}{*{20}{l}} {1,}&{{\mathrm{if}}{\mathbf{w}}_{i}^{t}{\mathrm{passes~blockchain~authentication,}}} \\ {0,}&{{\mathrm{otherwise}}{\mathrm{.}}} \end{array}} \right.$$\end{document} Thus, the final aggregation process only considers authenticated updates:12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbf{w}}^{t+1}}=\mathop \sum \limits_{{i=1}}^{N} {\alpha _i}{{\mathbb{I}}_{{\mathrm{valid}}}}\left( {{\mathbf{w}}_{i}^{t}} \right){\mathbf{w}}_{i}^{t}{\mathrm{~~}}$$\end{document} Objective function: To optimize security and efficiency, we formulate the following multi-objective optimization problem:11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathop {{\mathrm{min}}}\limits_{{\mathbf{w}}} \;F\left( {\mathbf{w}} \right)+{\lambda _1}{C_{{\mathrm{comm}}}}+{\lambda _2}{R_{{\mathrm{blockchain}}}}{\mathrm{~}}$$\end{document} where: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C_{{\mathrm{comm}}}}$$\end{document} represents the commication cost.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${R_{{\mathrm{blockchain}}}}$$\end{document} denotes the blockchain verification overhead.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\lambda _1},{\lambda _2}$$\end{document} are trade-off hyperparameters balancing model accuracy, communication efficiency, and security. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C_{{\mathrm{comm}}}}$$\end{document} represents the commication cost. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C_{{\mathrm{comm}}}}$$\end{document} represents the commication cost. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${R_{{\mathrm{blockchain}}}}$$\end{document} denotes the blockchain verification overhead. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${R_{{\mathrm{blockchain}}}}$$\end{document} denotes the blockchain verification overhead. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\lambda _1},{\lambda _2}$$\end{document} are trade-off hyperparameters balancing model accuracy, communication efficiency, and security. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\lambda _1},{\lambda _2}$$\end{document} are trade-off hyperparameters balancing model accuracy, communication efficiency, and security. Notations: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{N}$$\end{document}: Set of IIoT devices participating in federated learning.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{D}_i}$$\end{document}: Local dataset for device i.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${F_i}\left( {{{\mathbf{w}}_i}} \right)$$\end{document}: Local loss function at device i.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbf{w}}_{i}^{t}$$\end{document}: Model parameters of device i at iteration t.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbf{w}}^{t+1}}$$\end{document}: Aggregated global model parameters.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\alpha _i}$$\end{document}: Weight of device i in the aggregation process.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbb{I}}_{{\mathrm{valid}}}}\left( {{\mathbf{w}}_{i}^{t}} \right)$$\end{document}: Indicator function for blockchain authentication.Scalability\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C_{{\mathrm{comm}}}}$$\end{document}: Communication overhead in federated learning.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${R_{{\mathrm{blockchain}}}}$$\end{document}: Blockchain verification latency.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\lambda _1},{\lambda _2}$$\end{document}: Trade-off hyperparameters for efficiency and security. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{N}$$\end{document}: Set of IIoT devices participating in federated learning. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{N}$$\end{document}: Set of IIoT devices participating in federated learning. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{D}_i}$$\end{document}: Local dataset for device i. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{D}_i}$$\end{document}: Local dataset for device i. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${F_i}\left( {{{\mathbf{w}}_i}} \right)$$\end{document}: Local loss function at device i. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${F_i}\left( {{{\mathbf{w}}_i}} \right)$$\end{document}: Local loss function at device i. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbf{w}}_{i}^{t}$$\end{document}: Model parameters of device i at iteration t. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbf{w}}_{i}^{t}$$\end{document}: Model parameters of device i at iteration t. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbf{w}}^{t+1}}$$\end{document}: Aggregated global model parameters. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbf{w}}^{t+1}}$$\end{document}: Aggregated global model parameters. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\alpha _i}$$\end{document}: Weight of device i in the aggregation process. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\alpha _i}$$\end{document}: Weight of device i in the aggregation process. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbb{I}}_{{\mathrm{valid}}}}\left( {{\mathbf{w}}_{i}^{t}} \right)$$\end{document}: Indicator function for blockchain authentication. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbb{I}}_{{\mathrm{valid}}}}\left( {{\mathbf{w}}_{i}^{t}} \right)$$\end{document}: Indicator function for blockchain authentication. Scalability\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C_{{\mathrm{comm}}}}$$\end{document}: Communication overhead in federated learning. Scalability\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C_{{\mathrm{comm}}}}$$\end{document}: Communication overhead in federated learning. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${R_{{\mathrm{blockchain}}}}$$\end{document}: Blockchain verification latency. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${R_{{\mathrm{blockchain}}}}$$\end{document}: Blockchain verification latency. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\lambda _1},{\lambda _2}$$\end{document}: Trade-off hyperparameters for efficiency and security. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\lambda _1},{\lambda _2}$$\end{document}: Trade-off hyperparameters for efficiency and security. Analysis and communication overhead Scaling federated learning in IIoT environments introduces challenges, particularly communication overhead and model aggregation efficiency. These challenges become more pronounced as the number of devices increases. The communication cost for each round of federated learning can be described as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O\left( n \right)$$\end{document}, where nnn is the number of participating devices. Each device transmits its local model updates, and these updates are aggregated to form the global model, which grows linearly with the number of devices. The latency for federated learning also grows linearly with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O\left( n \right)$$\end{document}, due to the increasing number of devices sending updates and the additional time required to verify and aggregate these updates through the blockchain. This leads to higher transaction volume and network congestion as the size of the federation increases. Extrapolated growth of communication overhead and latency The communication and latency overhead for federated learning with a growing number of devices can be modeled as follows:12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C_{total}}=O\left( n \right)+O\left( {k \cdot n} \right)+O\left( n \right)~~$$\end{document} where: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{O}}\left( {\boldsymbol{n}} \right)$$\end{document} represents the overhead of transmitting updates from all devices.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{O}}\left( {{\boldsymbol{k}} \cdot {\boldsymbol{n}}} \right)$$\end{document} is the complexity for aggregating k parameters from n devices.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{O}}\left( {\boldsymbol{n}} \right)$$\end{document} is the complexity of blockchain transactions and verification for n devices. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{O}}\left( {\boldsymbol{n}} \right)$$\end{document} represents the overhead of transmitting updates from all devices. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{O}}\left( {\boldsymbol{n}} \right)$$\end{document} represents the overhead of transmitting updates from all devices. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{O}}\left( {{\boldsymbol{k}} \cdot {\boldsymbol{n}}} \right)$$\end{document} is the complexity for aggregating k parameters from n devices. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{O}}\left( {{\boldsymbol{k}} \cdot {\boldsymbol{n}}} \right)$$\end{document} is the complexity for aggregating k parameters from n devices. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{O}}\left( {\boldsymbol{n}} \right)$$\end{document} is the complexity of blockchain transactions and verification for n devices. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{O}}\left( {\boldsymbol{n}} \right)$$\end{document} is the complexity of blockchain transactions and verification for n devices. This model shows that both communication overhead and latency will scale linearly with n, making it challenging to scale federated learning to large federations without optimized solutions. To address these scalability issues, we propose: Optimizing blockchain transactions: Using off-chain verification and transaction batching to reduce the blockchain-related overhead.Model compression: Applying quantization and sparse updates to reduce the size of model updates transmitted across the network.Adaptive aggregation: Dynamically adjusting the frequency of global model aggregation based on convergence rates to reduce the number of updates required. Optimizing blockchain transactions: Using off-chain verification and transaction batching to reduce the blockchain-related overhead. Optimizing blockchain transactions: Using off-chain verification and transaction batching to reduce the blockchain-related overhead. Model compression: Applying quantization and sparse updates to reduce the size of model updates transmitted across the network. Model compression: Applying quantization and sparse updates to reduce the size of model updates transmitted across the network. Adaptive aggregation: Dynamically adjusting the frequency of global model aggregation based on convergence rates to reduce the number of updates required. Adaptive aggregation: Dynamically adjusting the frequency of global model aggregation based on convergence rates to reduce the number of updates required. By implementing these strategies, we aim to keep communication overhead and latency manageable even as the number of devices grows, ensuring scalability and efficiency in large-scale IIoT federations. However, federated learning in IIoT is challenging to be secured and efficient in anomaly detection, adversarial robustness, and communication overhead. However, problems arise when various attacks such as poisoning attacks, where malicious nodes introduce malicious updates leading to compromised model integrity, take place in the context of the conventional FL frameworks. Blockchain based authentication provides enhanced security, validating models updated before aggregation, however it comes at the cost of extra computationally and communication overhead. Securing and efficiently updating the global model is accomplished by this problem formulation, which guarantees contributions from authenticated updates alone. The proposed approach seeks to achieve three objectives: (1) maximization of model accuracy, (2) reduction of communication costs, and (3) ensuring blockchain security at low computational overhead by incorporating secure blockchain based aggregation and adaptive learning mechanisms. SAFNet-IoT can recreate IIoT environment and dynamically adapt to it to enhance anomaly detection while reducing the risk of security threat elimination. Proposed framework: SAFNet-IoT This work proposes the SAFNet IOT framework that offers anomaly detection advantage in Industrial Internet of Things (IIoT) environments via federated learning, blockchain based authentication and a adaptive Autoencoder-LSTM Model. The main objective is to construct a secure, adaptive, communication efficient anomaly detection mechanism to secure IIoT networks from cyber security attacks and from operational failures. In this section we present an overview of the proposed framework, its system architecture, mathematical formulation, communication efficiency optimizations and the algorithmic implementation of SAFNet-IoT. Overview The SAFNet-IoT framework uses FL for collaborative model training of anomaly detection across multiple distributed IIoT nodes without exposing raw data. So, unlike traditional centralized learning approaches, FL also allows each IoT device to train its own model locally and to update the model but only share model updates. A blockchain-based authentication is added to mitigate adversarial attacks, allowing only authorized model updates to be aggregated in the global model. Furthermore, an Autoencoder-LSTM based anomaly detection module is made adaptive with respect to real time feedback from IIoT devices in such a way that it dynamically changes its learning parameters to increase accuracy in non-IID environments. The advantages of SAFNet-IoT include: Enhanced Security: Blockchain based smart contracts validate model updates to prevent the poisoning attacks.Hyperparameter Tuning: Real-time Autoencoder-LSTM mechanism utilizes the neural network to dynamically fine tune the hyperparameters to optimize the data patterns that are continuously evolving.Model Compression and Selective Update Aggregation: For reducing bandwidth consumption, we reduce model updating bandwidth, patch bandwidth, and memory consumption.Easiest use case: The framework is designed with easy use case in mind where heavy computation is not required. Enhanced Security: Blockchain based smart contracts validate model updates to prevent the poisoning attacks. Enhanced Security: Blockchain based smart contracts validate model updates to prevent the poisoning attacks. Hyperparameter Tuning: Real-time Autoencoder-LSTM mechanism utilizes the neural network to dynamically fine tune the hyperparameters to optimize the data patterns that are continuously evolving. Hyperparameter Tuning: Real-time Autoencoder-LSTM mechanism utilizes the neural network to dynamically fine tune the hyperparameters to optimize the data patterns that are continuously evolving. Model Compression and Selective Update Aggregation: For reducing bandwidth consumption, we reduce model updating bandwidth, patch bandwidth, and memory consumption. Model Compression and Selective Update Aggregation: For reducing bandwidth consumption, we reduce model updating bandwidth, patch bandwidth, and memory consumption. Easiest use case: The framework is designed with easy use case in mind where heavy computation is not required. Easiest use case: The framework is designed with easy use case in mind where heavy computation is not required. System architecture The SAFNet-IoT system consists of three main components: Federated learning-based anomaly detection: The private dataset of each IIoT device is trained by each local Autoencoder-LSTM model and the model updates are shared with a central aggregator. These updates are aggregated by the central server using a secure federated averaging approach.Blockchain-based secure aggregation: The local model updates are then integrated with a blockchain based authentication layer that ensures that before global aggregation these updates are indeed valid. Finally, update integrity is verified by deploying smart contracts that only legitimate updates are contributions to the final global model.Adaptive anomaly detection module: The Autoencoder-LSTM anomaly detection module is a dynamic hyperparameter tuning module that tunes the hyperparameters of the learning rate and dropout rate with real time anomaly detection feedback from IIoT nodes. It improves the model’s adaptability in environments where the data distribution is non-IID or evolves over time. Federated learning-based anomaly detection: The private dataset of each IIoT device is trained by each local Autoencoder-LSTM model and the model updates are shared with a central aggregator. These updates are aggregated by the central server using a secure federated averaging approach. Federated learning-based anomaly detection: The private dataset of each IIoT device is trained by each local Autoencoder-LSTM model and the model updates are shared with a central aggregator. These updates are aggregated by the central server using a secure federated averaging approach. Blockchain-based secure aggregation: The local model updates are then integrated with a blockchain based authentication layer that ensures that before global aggregation these updates are indeed valid. Finally, update integrity is verified by deploying smart contracts that only legitimate updates are contributions to the final global model. Blockchain-based secure aggregation: The local model updates are then integrated with a blockchain based authentication layer that ensures that before global aggregation these updates are indeed valid. Finally, update integrity is verified by deploying smart contracts that only legitimate updates are contributions to the final global model. Adaptive anomaly detection module: The Autoencoder-LSTM anomaly detection module is a dynamic hyperparameter tuning module that tunes the hyperparameters of the learning rate and dropout rate with real time anomaly detection feedback from IIoT nodes. It improves the model’s adaptability in environments where the data distribution is non-IID or evolves over time. Adaptive anomaly detection module: The Autoencoder-LSTM anomaly detection module is a dynamic hyperparameter tuning module that tunes the hyperparameters of the learning rate and dropout rate with real time anomaly detection feedback from IIoT nodes. It improves the model’s adaptability in environments where the data distribution is non-IID or evolves over time. In Fig. 1, it presents a high level of architecture diagram for these components that describe the interaction of federated learning, blockchain authentication, and the adaptive anomaly detection. Fig. 1SAFNet-IoT model architecture. SAFNet-IoT model architecture. Mathematical formulation of SAFNet-IoT The federated learning objective in SAFNet-IoT is to minimize the global loss function across all participating IIoT nodes. Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{N}=\left\{ {1,2, \ldots ,N} \right\}$$\end{document} represent the set of IIoT devices, where each device i holds a local dataset \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{D}_i}$$\end{document}. The global loss function is defined as:13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F\left( {\mathbf{w}} \right)=\mathop \sum \limits_{{i=1}}^{N} \frac{{\left| {{\mathcal{D}_i}} \right|}}{{\left| \mathcal{D} \right|}}{F_i}\left( {{{\mathbf{w}}_i}} \right){\mathrm{~}}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbf{w}}$$\end{document} represents the model parameters, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${F_i}\left( {{{\mathbf{w}}_i}} \right)$$\end{document} is the local loss function at device i:14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${F_i}\left( {{{\mathbf{w}}_i}} \right)=\frac{1}{{\left| {{\mathcal{D}_i}} \right|}}\mathop \sum \limits_{{\left( {{x_j},{y_j}} \right) \in {\mathcal{D}_i}}} \ell \left( {f\left( {{x_j},{{\mathbf{w}}_i}} \right),{y_j}} \right)$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ell \left( \cdot \right)$$\end{document} is the loss function, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$f\left( {{x_j},{{\mathbf{w}}_i}} \right)$$\end{document} is the model prediction. To ensure secure model aggregation, a blockchain-based validation process is integrated. Each model update is validated using a smart contract-based authentication mechanism before being included in the global aggregation. The final global model update is computed as:15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbf{w}}^{t+1}}=\mathop \sum \limits_{{i=1}}^{N} {\alpha _i}{{\mathbb{I}}_{{\mathrm{valid}}}}\left( {{\mathbf{w}}_{i}^{t}} \right){\mathbf{w}}_{i}^{t}{\mathrm{~~}}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbb{I}}_{{\mathrm{valid}}}}\left( {{\mathbf{w}}_{i}^{t}} \right)$$\end{document} is an indicator function that forces only authenticated updates into the final model. Adaptive autoencoder–LSTM (AAEL) mechanism The core novelty of SAFNet-IoT is the Adaptive Autoencoder–LSTM (AAEL) module, which dynamically adjusts its hyperparameters based on real-time drift signals from IIoT data streams. This adaptivity enables the model to remain effective under non-stationary, heterogeneous, and evolving IIoT conditions. The adaptive mechanism consists of two major components: Drift Detection Model — identifies change in data distribution.Dynamic Hyperparameter Adjustment — modifies learning rate, LSTM window size, and dropout rate. Drift Detection Model — identifies change in data distribution. Drift Detection Model — identifies change in data distribution. Dynamic Hyperparameter Adjustment — modifies learning rate, LSTM window size, and dropout rate. Dynamic Hyperparameter Adjustment — modifies learning rate, LSTM window size, and dropout rate. Drift detection using KL-divergence. Drift detection using KL-divergence. Drift detection using KL-divergence. Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${B_t}$$\end{document}​ and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${B_{t - 1}}$$\end{document}​ represent the probability distributions of the current and previous input batches (after normalization). The drift is computed as:16\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${D_{KL}}\left( {{B_t}\parallel {B_{t - 1}}} \right)=\mathop \sum \limits_{{i=1}}^{n} {B_t}\left( i \right)log\frac{{{B_t}\left( i \right)}}{{{B_{t - 1}}\left( i \right)}}~$$\end{document} A drift event is triggered if:17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${D_{KL}}>{\delta _{drift}}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\delta _{drift}}$$\end{document} is determined empirically (set to 0.15 in experiments). 2.Adaptive learning rate update 2.Adaptive learning rate update Adaptive learning rate update 18\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathrm{\boldsymbol{\upeta}}}_{{\mathrm{t}}=1}}=\begin{array}{*{20}{c}} {{{\mathrm{\boldsymbol{\upeta}}}_{\mathrm{t}}}}&{{\gamma _{inc}}}&{if~{D_{KL}}>~{\delta _{drift}}} \\ {{{\mathrm{\boldsymbol{\upeta}}}_{\mathrm{t}}}}&{{\gamma _{dec}}}&{OTHERWISE} \end{array}~$$\end{document} Parameters used: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\gamma _{inc}}$$\end{document}=1.15.\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\gamma _{dec}}$$\end{document}=0.85.Initial learning rate: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\eta _0}$$\end{document} =0.001. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\gamma _{inc}}$$\end{document}=1.15. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\gamma _{inc}}$$\end{document}=1.15. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\gamma _{dec}}$$\end{document}=0.85. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\gamma _{dec}}$$\end{document}=0.85. Initial learning rate: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\eta _0}$$\end{document} =0.001. Initial learning rate: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\eta _0}$$\end{document} =0.001. This enables faster convergence during sudden pattern changes. 3.Adaptive LSTM window size 3.Adaptive LSTM window size Adaptive LSTM window size 19\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${W_{t+1}}={W_t}+\alpha \left( {{D_{KL}} - {\delta _{drift}}} \right)~$$\end{document} Where: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{W}}$$\end{document} = sequence length (initially 20).\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{\alpha}$$\end{document}=5. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{W}}$$\end{document} = sequence length (initially 20). \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\boldsymbol{W}}$$\end{document} = sequence length (initially 20). \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{\alpha}$$\end{document}=5. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{\alpha}$$\end{document}=5. When data becomes more volatile, longer temporal windows are created automatically. 4.Adaptive dropout regulation. 4.Adaptive dropout regulation. Adaptive dropout regulation. To avoid overfitting when drift is detected:20\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${p_{t=1}}=\begin{array}{*{20}{c}} {{p_t}+0.05,}&{{D_{KL}}>{\delta _{drift}}} \\ {\hbox{max} \left( {{p_t} - 0.03,~0.1} \right),}&{otherwise} \end{array}~~$$\end{document} Initial dropout = 0.2, bounded between 0.1 and 0.5. Pseudocode for the AAEL adaptive mechanism: Algorithm 1Adaptive AAEL mechanism. Adaptive AAEL mechanism. Table 3 summarizes the accuracy, F1-score, and convergence behavior of the proposed Adaptive Autoencoder–LSTM (AAEL) compared with a well-tuned standard FL-LSTM baseline, demonstrating AAEL’s improvements in predictive performance and reduced training rounds under non-stationary IIoT conditions. Table 3Comparative performance of the standard FL-LSTM baseline and the proposed adaptive AAEL model.ModelAccuracyF1-ScoreConvergence roundsStandard FL-LSTM (well-tuned)93.1%0.9050Adaptive AAEL (ours) 94.7% 0.92 40 Significant values are in [bold]. Table 3Comparative performance of the standard FL-LSTM baseline and the proposed adaptive AAEL model.ModelAccuracyF1-ScoreConvergence roundsStandard FL-LSTM (well-tuned)93.1%0.9050Adaptive AAEL (ours) 94.7% 0.92 40 Significant values are in [bold]. Comparative performance of the standard FL-LSTM baseline and the proposed adaptive AAEL model. Significant values are in [bold]. The adaptive mechanism improves:Accuracy by + 1.6%. F1-Score by + 0.02.Convergence speed by 20%. Accuracy by + 1.6%. Accuracy by + 1.6%. F1-Score by + 0.02. F1-Score by + 0.02. Convergence speed by 20%. Convergence speed by 20%. while increasing computational cost by only 0.1 s per round, which is acceptable for IIoT nodes. Computational complexity justification: To address the concern regarding the added computational complexity of the adaptive mechanism, we compared the FLOPs, runtime, and memory usage of the baseline FL-LSTM and the proposed Adaptive AAEL on a resource-constrained IIoT device profile (Raspberry Pi 4, 4GB RAM, quad-core 1.5 GHz). The adaptive mechanism introduces two additional lightweight operations: (1) drift-score calculation and (2) hyperparameter adjustment per round. The drift-score operation adds 0.42 million additional FLOPs and less than 6.5 MB of temporary memory allocation, which is negligible relative to the total model footprint. Empirical profiling shows that AAEL increases per-round computation time from 2.84 s (baseline FL-LSTM) to 2.94 s, resulting in only + 0.1 s overhead. Memory consumption increased by 3.8%, remaining well within IIoT device constraints. Despite this minor overhead, AAEL reduces total convergence rounds from 50 to 40, resulting in an overall 12% reduction in total training time. Thus, the added adaptive complexity is minimal and is fully compensated by faster convergence and higher predictive performance. Communication efficiency optimization Frequent model updates are one of the key challenges that are quite challenging in federated learning, which results in high communication overhead. SAFNet-IoT operates the following communication-efficient strategies to optimize bandwidth usage.1. Model Compression by Quantization: Instead of transmitting the full-precision model updates, quantized weights are used to reduce the amount of transmission with similar accuracy. Each weight w is quantized as:21\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${w_q}={\mathrm{round}}\left( {w \times {2^b}} \right)/{2^b}{\mathrm{~}}$$\end{document} b denotes the number of quantization bits. 2. Sparse Model Updates: Only the most important weight updates are being sent reducing unnecessary communication. It sets a threshold τ and only updates satisfying:22\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left| {\Delta {w_i}} \right|>\tau ~$$\end{document} The global aggregation process includes these. 3. Adaptive Federated Averaging: Instead of averaging model updates at every round, adaptive aggregation dynamically changes the frequency of global update to the convergence rate. All together, these methods lower communication overhead by 30% and improve scalability in large scale IIoT deployments. Scalability in large-scale federations: While these methods help reduce communication overhead, scaling SAFNet-IoT to larger federations introduces additional challenges. As the number of devices increases, both communication overhead and latency grow, especially due to frequent blockchain transactions and the complexity of aggregating updates from many devices. Communication overhead: As the number of devices grows, communication overhead tends to increase linearly. The communication cost can be described as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:O\left(n\right)$$\end{document}, where nnn is the number of participating devices. Communication overhead: Communication overhead: As the number of devices grows, communication overhead tends to increase linearly. The communication cost can be described as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:O\left(n\right)$$\end{document}, where nnn is the number of participating devices. Latency growth: The latency also grows linearly with the number of devices \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:O\left(n\right)$$\end{document}, due to the increased number of blockchain transactions and the aggregation process. Latency growth: Latency growth: The latency also grows linearly with the number of devices \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:O\left(n\right)$$\end{document}, due to the increased number of blockchain transactions and the aggregation process. To mitigate this: We propose optimizing smart contract execution by using off-chain verification and batching transactions. These methods help reduce blockchain-related delays.Additionally, model compression, sparse updates, and adaptive federated averaging can further reduce the communication cost and improve scalability. We propose optimizing smart contract execution by using off-chain verification and batching transactions. These methods help reduce blockchain-related delays. We propose optimizing smart contract execution by using off-chain verification and batching transactions. These methods help reduce blockchain-related delays. Additionally, model compression, sparse updates, and adaptive federated averaging can further reduce the communication cost and improve scalability. Additionally, model compression, sparse updates, and adaptive federated averaging can further reduce the communication cost and improve scalability. Algorithm: SAFNet-IoT Second is that the SAFNet-IoT algorithm performs an iterative process where IIoT devices train local models, validate updates using blockchain authentication, and then aggregate with secure aggregation. Below is the process of federated learning in the form of pseudocode: SAFNet-IoT is a privacy preserving, communication efficient and adaptive anomaly detection algorithm which is highly appropriate for secure IIoT environment. Evaluation metrics To validate the effectiveness of the SAFNet-IoT framework, anomaly detection accuracy, federated learning convergence efficiency, and blockchain security validation as well as communication overhead are considered. These metrics correspond to model’s capability to detect anomalies, maintain privacy, optimize communication costs and secure model aggregation. Anomaly detection performance It is proceeded to validate the effectiveness of the SAFNet-IoT framework based on anomaly detection accuracy, the convergence efficiency of federated learning, the security of the blockchain used, and communication overhead. These metrics are related to model’s ability to detect anomalies, maintain privacy, minimize communication cost and secure model aggregation:23\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{Accuracy}}=\frac{{TP+TN}}{{TP+TN+FP+FN}}~$$\end{document} The precision and recall are used to measure the reliability of the model in identifying anomalies:24\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{Precision}}=\frac{{TP}}{{TP+FP}}~$$\end{document}25\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{Recall}}=\frac{{TP}}{{TP+FN}}~$$\end{document} F1 score is computed as the harmonic mean of precision and recall since they are always in trade off:26\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{F1-score}}=2 \times \frac{{{\mathrm{Precision}} \times {\mathrm{Recall}}}}{{{\mathrm{Precision}}+{\mathrm{Recall}}}}~$$\end{document} Furthermore, the model’s capability to make a distinction between normal and anomalous instances is evaluated using the AUC-ROC (Area Under the Receiver Operating Characteristic Curve):27\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{AUC-ROC}}=\mathop \smallint \limits_{0}^{1} TPR\left( {FPR} \right)\,dFPR~~~$$\end{document} It is plotted where FPR (False Positive Rate) is plotted against TPR (True Positive Rate) in various classification thresholds. Federated learning convergence and model aggregation It analyzes global loss function on many training rounds for federated learning and capture it by convergence. The federated loss function is given by:28\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F\left( {\mathbf{w}} \right)=\mathop \sum \limits_{{i=1}}^{N} \frac{{\left| {{\mathcal{D}_i}} \right|}}{{\left| \mathcal{D} \right|}}{F_i}\left( {{{\mathbf{w}}_i}} \right){\mathrm{~}}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{D}_i}$$\end{document} is the local dataset of i -th IoT node, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${F_i}\left( {{{\mathbf{w}}_i}} \right)$$\end{document} is the local loss function. Therefore, the global loss function is plotted to assess the convergence rate.:29\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\frac{{dF\left( {\mathbf{w}} \right)}}{{dt}} \approx 0,\;\;{\mathrm{as}}t \to T~$$\end{document} This indicates that the stability of the model is reached as training progresses. In addition, secure aggregation based on the blockchain guarantees that only authenticated model updates contribute to the global model. The global model update is computed valid as:30\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbf{w}}^{t+1}}=\mathop \sum \limits_{{i=1}}^{N} {\alpha _i}{{\mathbb{I}}_{{\mathrm{valid}}}}\left( {{\mathbf{w}}_{i}^{t}} \right){\mathbf{w}}_{i}^{t}{\mathrm{~}}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathbb{I}}_{{\mathrm{valid}}}}\left( {{\mathbf{w}}_{i}^{t}} \right)$$\end{document} ensures only authenticated updates are included. Blockchain security validation The authentication success rate (ASR) is computed to make sure the blockchain based authentication mechanism filter out malicious model updates:31\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{ASR}}=\frac{{{M_{{\mathrm{valid}}}}}}{{{M_{{\mathrm{total}}}}}} \times 100{{\% }}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${M_{{\mathrm{valid}}}}$$\end{document} is the number of model updates successfully validated by the blockchain, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${M_{{\mathrm{total}}}}$$\end{document} is the total number of submitted updates. Additionally, the percentage of malicious model update detection (MUD) is measured:32\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{MUD}}=\frac{{{M_{{\mathrm{rejected}}}}}}{{{M_{{\mathrm{total}}}}}} \times 100{{\% }}~$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${M_{{\mathrm{rejected}}}}$$\end{document} represents the number of rejected updates due to authentication failure. Sensitivity analysis of drift threshold To evaluate the robustness of the adaptive anomaly detection mechanism, a sensitivity analysis was conducted on the drift threshold used in the KL-divergence trigger. The default value of 0.15 was selected based on initial empirical validation, but its effectiveness may vary across different IIoT environments or with varying noise levels in the data. In this section, we analyze how different values of the drift threshold affect the overall performance, focusing on key metrics such as anomaly detection accuracy, F1-score, and AUC-ROC across multiple IIoT datasets. Justification for threshold selection: In our ablation study, we tested several drift threshold values, including 0.10, 0.15, and 0.20, using different IIoT datasets. The results showed that the performance of the model remained consistent across these thresholds, with the 0.15 threshold providing the best balance between model accuracy and robustness to changes in drift. Specifically, the 0.15 threshold yielded the highest F1-score and AUC-ROC while maintaining strong accuracy. We also conducted a grid search over several threshold values (from 0.05 to 0.25), and the 0.15 threshold consistently outperformed others in terms of accuracy and robustness. This provides empirical evidence for its selection, confirming that 0.15 is not an arbitrary value but a result of extensive testing. The sensitivity analysis results for three tested thresholds (0.10, 0.15, and 0.20) are presented in the table below, showing the performance metrics (Accuracy, F1-score, AUC-ROC) for each threshold. The analysis demonstrates that while the model performs optimally at a threshold of 0.15, slight variations in this parameter (e.g., values between 0.10 and 0.20) do not drastically affect performance, with minimal variation observed in the Accuracy, F1-score, and AUC-ROC metrics. This indicates that the framework is robust to moderate changes in drift detection sensitivity, and the choice of drift threshold within this range does not significantly compromise detection performance. Table 4 shows the performance of the model across three different drift thresholds (0.10, 0.15, and 0.20), highlighting key metrics such as Accuracy, F1-score, and AUC-ROC. The results suggest that the model remains stable and performs effectively even with slight variations in the drift threshold. Table 4Performance comparison for different drift thresholds.ThresholdAccuracy (%)F1-scoreAUC-ROC0.1092.30.890.940.1594.70.920.960.2093.20.910.95 Table 4Performance comparison for different drift thresholds.ThresholdAccuracy (%)F1-scoreAUC-ROC0.1092.30.890.940.1594.70.920.960.2093.20.910.95 Performance comparison for different drift thresholds. Communication overhead and bandwidth efficiency Communication overhead is measured and evaluated on the efficiency of the federated learning process, as it is the amount of data transmitted during the process. It is shown that the total communication cost per global round equals:33\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C_{{\mathrm{comm}}}}=N \times {S_{{\mathrm{update}}}}{\mathrm{~}}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${S_{{\mathrm{update}}}}$$\end{document} is the size of a single model update, and N is the number of participating IoT nodes. SAFNet-IoT makes use of quantized model updates to reduce the transmission size and optimizes bandwidth usage:34\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${S_{{\mathrm{quantized}}}}={S_{{\mathrm{update}}}} \times \frac{b}{{32}}{\mathrm{~}}$$\end{document} where b represents the bit precision used for weight quantization (e.g., 8-bit instead of 32-bit floating-point representation). The bandwidth reduction ratio (BRR) is then computed as:35\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{BRR}}=1 - \frac{{{S_{{\mathrm{quantized}}}}}}{{{S_{{\mathrm{update}}}}}}$$\end{document} indicating the proportion of bandwidth saved due to quantization. Computational efficiency SAFNet-IoT is evaluated on the computational efficiency of training time per federated learning round. Since local model training happens on IIoT devices with limited resources, the total computation time per device is:36\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${T_{{\mathrm{local}}}}=E \times \left( {\frac{{{F_{{\mathrm{comp}}}}}}{{{C_{{\mathrm{device}}}}}}} \right){\mathrm{~}}$$\end{document} where: E is the number of local training epochs. - \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${F_{{\mathrm{comp}}}}$$\end{document} is the computational complexity of the Autoencoder-LSTM model. - \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C_{{\mathrm{device}}}}$$\end{document} represents the device’s processing capability. Evaluation of the SAFNet-IoT framework is done using several performance metrics to see how well it detects anomalies, how secure it is, how high the communication efficiency and how much overhead does it provoke in computational resources. Finally, accuracy, precision, recall, F1-score and AUC-ROC are used to measure the anomaly detection performance to evaluate the model’s ability to classify normal and anomalous instances accurately. Tracking the global loss function over the round of training is carried out to analyze the federated learning convergence and obtaining stable and accurate model updates. Through the authentication success rate (ASR) and malicious model update detection (MUD), we quantify the security resilience of blockchain based authentication as having the property that only verified model updates are aggregated. Total data transmission costs, bandwidth reduction ratio (BRR) and the sizes of the quantized model updates are measured to evaluate communication efficiency and to optimize bandwidth usage. Finally, local training time per device is computed and analyzed based on processing capabilities as well as model complexity, to assess computational efficiency. The evaluation metrics presented in Table 5 are comprehensive, showing that SAFNet-IoT achieves high anomaly detection accuracy with security, low communication cost and low computational cost, making it a robust approach to securing IIoT environments. Table 5Evaluation metrics used in SAFNet-IoT.MetricFormulaAccuracy \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{Accuracy}}=\frac{{TP+TN}}{{TP+TN+FP+FN}}$$\end{document} Precision \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{Precision}}=\frac{{TP}}{{TP+FP}}$$\end{document} Recall \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{Recall}}=\frac{{TP}}{{TP+FN}}$$\end{document} F1-Score \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{F1-Score}}=2 \times \frac{{{\mathrm{Precision}} \times {\mathrm{Recall}}}}{{{\mathrm{Precision}}+{\mathrm{Recall}}}}$$\end{document} AUC-ROC \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{AUC-ROC}}=\mathop \smallint \limits_{0}^{1} TPR\left( {FPR} \right)\,dFPR$$\end{document} Federated loss function \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F\left( {\mathbf{w}} \right)=\mathop \sum \limits_{{i=1}}^{N} \frac{{\left| {{\mathcal{D}_i}} \right|}}{{\left| \mathcal{D} \right|}}{F_i}\left( {{{\mathbf{w}}_i}} \right)$$\end{document} Convergence rate \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\frac{{dF\left( {\mathbf{w}} \right)}}{{dt}} \approx 0,\;\;\;{\mathrm{as}}t \to T$$\end{document} Authentication success rate (ASR) \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{ASR}}=\frac{{{M_{{\mathrm{valid}}}}}}{{{M_{{\mathrm{total}}}}}} \times 100{{\% }}$$\end{document} Malicious update detection (MUD) \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{MUD}}=\frac{{{M_{{\mathrm{rejected}}}}}}{{{M_{{\mathrm{total}}}}}} \times 100{{\% }}$$\end{document} Communication cost \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C_{{\mathrm{comm}}}}=N \times {S_{{\mathrm{update}}}}$$\end{document} Bandwidth reduction ratio (BRR) \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{BRR}}=1 - \frac{{{S_{{\mathrm{quantized}}}}}}{{{S_{{\mathrm{update}}}}}}$$\end{document} Computational efficiency \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${T_{{\mathrm{local}}}}=E \times \left( {\frac{{{F_{{\mathrm{comp}}}}}}{{{C_{{\mathrm{device}}}}}}} \right)$$\end{document} Table 5Evaluation metrics used in SAFNet-IoT.MetricFormulaAccuracy \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{Accuracy}}=\frac{{TP+TN}}{{TP+TN+FP+FN}}$$\end{document} Precision \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{Precision}}=\frac{{TP}}{{TP+FP}}$$\end{document} Recall \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{Recall}}=\frac{{TP}}{{TP+FN}}$$\end{document} F1-Score \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{F1-Score}}=2 \times \frac{{{\mathrm{Precision}} \times {\mathrm{Recall}}}}{{{\mathrm{Precision}}+{\mathrm{Recall}}}}$$\end{document} AUC-ROC \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{AUC-ROC}}=\mathop \smallint \limits_{0}^{1} TPR\left( {FPR} \right)\,dFPR$$\end{document} Federated loss function \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F\left( {\mathbf{w}} \right)=\mathop \sum \limits_{{i=1}}^{N} \frac{{\left| {{\mathcal{D}_i}} \right|}}{{\left| \mathcal{D} \right|}}{F_i}\left( {{{\mathbf{w}}_i}} \right)$$\end{document} Convergence rate \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\frac{{dF\left( {\mathbf{w}} \right)}}{{dt}} \approx 0,\;\;\;{\mathrm{as}}t \to T$$\end{document} Authentication success rate (ASR) \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{ASR}}=\frac{{{M_{{\mathrm{valid}}}}}}{{{M_{{\mathrm{total}}}}}} \times 100{{\% }}$$\end{document} Malicious update detection (MUD) \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{MUD}}=\frac{{{M_{{\mathrm{rejected}}}}}}{{{M_{{\mathrm{total}}}}}} \times 100{{\% }}$$\end{document} Communication cost \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${C_{{\mathrm{comm}}}}=N \times {S_{{\mathrm{update}}}}$$\end{document} Bandwidth reduction ratio (BRR) \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{BRR}}=1 - \frac{{{S_{{\mathrm{quantized}}}}}}{{{S_{{\mathrm{update}}}}}}$$\end{document} Computational efficiency \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${T_{{\mathrm{local}}}}=E \times \left( {\frac{{{F_{{\mathrm{comp}}}}}}{{{C_{{\mathrm{device}}}}}}} \right)$$\end{document} Evaluation metrics used in SAFNet-IoT. Results and discussion An evaluation of the performance of the proposed SAFNet-IoT framework is based on anomaly detection accuracy, convergence of the federated learning, security validation, communication efficiency, and computational overhead. We found the results on the integration of federated learning, blockchain authentication and adaptive anomaly detection on completing the Liu model and enhancing the security and efficiency in the IIoT environments. In this section, we describe in detail interpretation of the results from the experimental work, stressing out the framework’s strengths and areas for optimization. Anomaly detection performance Accuracy, precision, recall, F1 score, and AUC ROC are used to evaluate Autoencoder LSTM based anomaly detection model. Results that demonstrate that SAFNet-IoT achieves the overall anomaly detection accuracy of 94.7% outperforms conventional centralized models without adaptive learning mechanisms, and the key advantages are explained. The F1 score of 0.92 is a strong balance between precision and recall and should have little false positives and false negatives. The AUC-ROC value of 0.96 also confirms the model to be able to distinguish normal instances from the anomalies. These results clearly validate the inclusion of adaptive hyperparameter tuning towards improvement of detection accuracy in non-IID and heterogeneous IIoT environments. A comparison is made between SAFNet-IoT and other existing anomaly detection models operating in IIoT environment to further evaluate the performance of the model. Baselines we select include Support Vector Machine (SVM), Random Forest (RF), Deep Autoencoder (DAE), LSTM and an ordinary Federated Learning model (FedAVG-LSTM). The results of the comparative results based on accuracy, F1-score, and AUC-ROC are shown in Table 6. Table 6Performance comparison of SAFNet-IoT with baseline models.ModelAccuracy (%)F1-scoreAUC-ROCSVM85.30.810.84Random Forest (RF)88.90.850.88Deep Autoencoder (DAE)91.20.880.91LSTM92.50.890.93FedAVG-LSTM93.10.900.94SAFNet-IoT (Ours) 94.7 0.92 0.96 Significant values are in [bold]. Table 6Performance comparison of SAFNet-IoT with baseline models.ModelAccuracy (%)F1-scoreAUC-ROCSVM85.30.810.84Random Forest (RF)88.90.850.88Deep Autoencoder (DAE)91.20.880.91LSTM92.50.890.93FedAVG-LSTM93.10.900.94SAFNet-IoT (Ours) 94.7 0.92 0.96 Significant values are in [bold]. Performance comparison of SAFNet-IoT with baseline models. Significant values are in [bold]. Table 6 shows that SAFNet-IoT is superior to conventional ML models (SVM and Random Forest) that cannot process high dimensions and sequential IIoT data. Although the Deep Autoencoder (DAE) model is better in performance compared to classical models, it cannot perform sequential learning as a result, and the detection accuracy is slightly lower. The standalone LSTM and FedAVG-LSTM, though, show improved performance compared to the existing LSTM based models, but do not take into account adaptive hyperparameter tuning as well as blockchain authentication that are the key components of SAFNet-IoT. As shown, the proposed framework outperforms the baselines with an accuracy of 94.7%, 1.6% higher compared to FedAVG-LSTM and 6.4% higher superior to traditional machine learning models (Fig. 2). These improvements demonstrate that adaptive learning and federated aggregation in secure form is an effective way for performing anomaly detection in IIoT environments. Figure 2 shows the accuracy comparison across models, whereas Fig. 3 shows the F1 Score across the models. Fig. 2Accuracy comparison across models. Accuracy comparison across models. Fig. 3F1 and AUC comparison of models. F1 and AUC comparison of models. Federated learning convergence The convergence of the federated learning process in SAFNet-IoT is studied by observing the global loss function from various communication rounds. Convergence is very important in federated learning to converge faster and more stably and quicker while having smaller computational and communication overheads. Adaptive learning and secure aggregation of blockchain based are proposed to optimize the learning rate and avoid a compromised model update from damaging the global model. SAFNet-IoT converges in 40 global rounds of training, which is faster than conventional federated learning models. As training progresses the model becomes more stable in the sense that the loss function freezes at some point and takes an extreme value that indicates that the model parameters are also more likely to attain their optimal state. In contrast to standard federated learning approaches which require over 60 rounds for convergence, SAFNet-IoT is based on its adaptive model updates and secure aggregation strategy for robust learning of non-IID distributed IIoT nodes. According to the improved convergence rate, SAFNet-IoT is compared with several federated learning models like FedAVG, FedProx, FedLSTM, and FedAVG-LSTM to validate. Loss stabilization and the final model accuracy are used to measure the performance in terms of the number of training rounds needed for loss stabilization. Table 7 presents the comparative results. Table 7Federated learning convergence comparison of SAFNet-IoT with baseline models.Federated learning modelRounds to convergeFinal accuracy (%)FedAVG6589.8FedProx5891.2FedLSTM5592.5FedAVG-LSTM5093.1SAFNet-IoT (Ours) 40 94.7 Significant values are in [bold]. Table 7Federated learning convergence comparison of SAFNet-IoT with baseline models.Federated learning modelRounds to convergeFinal accuracy (%)FedAVG6589.8FedProx5891.2FedLSTM5592.5FedAVG-LSTM5093.1SAFNet-IoT (Ours) 40 94.7 Significant values are in [bold]. Federated learning convergence comparison of SAFNet-IoT with baseline models. Significant values are in [bold]. The results in Table 7 indicate that SAFNet-IoT requires 40 training rounds to converge, which is 10 rounds faster than FedAVG-LSTM and 25 rounds faster than traditional FedAVG models. Finally, the adaptive anomaly detection and blockchain secured aggregation also outperform other models with the final accuracy of 94.7%. SAFNet-IoT achieves improved convergence efficiency by means of optimized model updates, dynamic learning rate adjustment, and filtering of unreliable updates through blockchain authentication. These mechanisms help prevent degradation of the model by malicious or inconsistent updates so that the learning is faster and more stable in IIoT environment. Figure shows the rounds to converge and final accuracy comparison. Fig. 4Rounds to converge and final accuracy comparison. Rounds to converge and final accuracy comparison. Blockchain security validation Under the IIoT (Industrial IoT) environments, malicious actors can inject adversarial updates that degrade the models; this type of integrity challenge is highly critical to protect federated learning updates. The SAFNet-IoT framework combines a blockchain based authentication algorithm to validate the updates of the model before aggregation to prevent data manipulation, model poisoning and adversarial attacks. Through smart contract authenticated, each participating IoT node would send the locally trained model update to a blockchain ledger for verification prior to the inclusion of those updates to the global model aggregation process. SAFNet-IoT is evaluated in terms of security performance by using authentication success rate (ASR) and malicious update detection (MUD) rate. ASR is the percentage of submitted updates successfully verified by the blockchain, and only legitimate model contributions are included. The MUD rate is used to evaluate how well the framework detects and rejects malicious updates. To evaluate the effectiveness of SAFNet-IoT, it is compared to the conventional security mechanisms, Federated Averaging without security (FedAVG), Differential Privacy (DP), Secure Aggregation (SA-FL). Table 8 presents comparative results. Table 8Security performance comparison of SAFNet-IoT with baseline security mechanisms.Security mechanismAuthentication success rate (ASR %)Malicious update detection (MUD %)FedAVG (No Security)78.456.3Differential privacy (DP) 86.169.8Secure aggregation (SA-FL)92.581.4SAFNet-IoT (Ours) 98.5 91.2 Significant values are in [bold]. Table 8Security performance comparison of SAFNet-IoT with baseline security mechanisms.Security mechanismAuthentication success rate (ASR %)Malicious update detection (MUD %)FedAVG (No Security)78.456.3Differential privacy (DP) 86.169.8Secure aggregation (SA-FL)92.581.4SAFNet-IoT (Ours) 98.5 91.2 Significant values are in [bold]. Security performance comparison of SAFNet-IoT with baseline security mechanisms. Significant values are in [bold]. The results in Table 8 indicate that SAFNet-IoT achieves an authentication success rate (ASR) of 98.5%, outperforming traditional secure aggregation (SA-FL) models, which achieve 92.5%. Additionally, SAFNet-IoT demonstrates a malicious update detection (MUD) rate of 91.2%, significantly higher than Differential Privacy-based approaches, which achieve only 69.8%. These results highlight the effectiveness of blockchain-based authentication in preventing adversarial updates from corrupting the global model. Figure 5 shows the authentication success rate and malicious update detection comparison. Fig. 5Authentication success rate and malicious update detection comparison. Authentication success rate and malicious update detection comparison. While blockchain authentication enhances security, it introduces additional computational overhead. However, SAFNet-IoT optimizes this by minimizing on-chain transactions using smart contract efficiency techniques, ensuring that security improvements do not excessively impact training time. These findings confirm that integrating blockchain with federated learning significantly strengthens model integrity, making it highly suitable for secure anomaly detection in IIoT networks. Communication overhead and bandwidth efficiency One of the key challenges in federated learning is the high communication overhead caused by frequent model updates between distributed IoT nodes and the central aggregator. Traditional federated learning models require the transmission of large-sized model parameters, leading to excessive bandwidth consumption, particularly in large-scale IIoT environments. SAFNet-IoT addresses this challenge by implementing quantized model updates and adaptive aggregation, which significantly reduces the volume of data exchanged while preserving model accuracy. To reduce the size of transmitted model updates, the proposed framework proposes to quantize model parameters such that model parameters are represented using lower bit precision rather than full precision floating point values. By ensuring that each update requires less bandwidth while not affecting the model performance, this ensures that. An adaptive aggregation mechanism is also included that selectively aggregates updates based on their importance, so as to avoid unnecessary transmission of updates from low impact updates. Results from experiments show that SAFNet-IoT reduces the total data transmission cost by 30% to the traditional federated learning models. In addition, the communication load reduction ratio (BRR) is 0.67, which implies that the accuracy of the global model is preserved while the communication load is reduced by 67%. Compared with other Internet of Thing (IoT) solutions, the scalability in SAFNet-IoT is due to the low communication overheads required for real time anomaly detection and system responsiveness, and such large scale IIoT deployments are high. Lastly, the communication efficiency of the proposed SAFNet-IoT is compared to conventional federated learning methods FedAVG, FedProx, FedLSTM and FedAVG-LSTM. The comparative results are presented in Table 9 using total data transmission cost, bandwidth reduction ratio (BRR), and communication efficiency improvement. Table 9Comparison of communication overhead and bandwidth efficiency.ModelData transmission cost reduction (%)Bandwidth reduction ratio (BRR)Communication efficiency improvement (%)FedAVG0.00.000.0FedProx12.50.1510.2FedLSTM19.70.3015.8FedAVG-LSTM25.20.4522.1SAFNet-IoT (Ours)30.00.6727.4 Table 9Comparison of communication overhead and bandwidth efficiency.ModelData transmission cost reduction (%)Bandwidth reduction ratio (BRR)Communication efficiency improvement (%)FedAVG0.00.000.0FedProx12.50.1510.2FedLSTM19.70.3015.8FedAVG-LSTM25.20.4522.1SAFNet-IoT (Ours)30.00.6727.4 Comparison of communication overhead and bandwidth efficiency. As demonstrated by the results shown in Table 9 SAFNet-IoT achieves much better communication overhead and bandwidth efficiency than the traditional federated learning models. It turns out that the standard federated learning approach FedAVG does not incorporate any optimization techniques and therefore has the highest communication overhead. While FedProx includes proximal updates in FedProx slightly improves communication efficiency, it is still quite high compared to more sophisticated approaches. LSTM for sequential learning is integrated within FedLSTM, which provides moderate communication savings but lacks adaptive aggregation mechanisms. Since FedAVG-LSTM further enhances efficiency by optimizing update selection, it does not fully exploit quantization techniques. Figure 6 shows the data transmission cost reduction comparison. Fig. 6Data transmission cost reduction Comparison. Data transmission cost reduction Comparison. Fig. 7Bandwidth reduction ration comparison. Bandwidth reduction ration comparison. Fig. 8Communication efficiency improvement comparison. Communication efficiency improvement comparison. When comparing to all baseline models, SAFNet-IoT demonstrates highest communication overhead reduction, saving 30% of data transmission cost and having the BRR of 0.67 which is the best. Specifically, the proposed framework improves communication efficiency by 27.4% over standard federated learning methods and can serve as a practical solution for IIoT networks where the bandwidth constraints and the real time processing are the main concerns. This confirms that SAFNet-IoT achieves these balances, where it optimally balances efficiency and accuracy and models converge smoothly in distributed IIoT environments. Figure 7 shows bandwidth reduction ration comparison and Fig. 8 show communication efficiency improvement comparison. Computational efficiency We evaluate the computational efficiency of SAFNet-IoT in terms of the local training time per federated learning round considering constraints of IIoT edge devices. As IIoT nodes usually have restricted computing capacity, low computational overhead is required for real-time anomaly detection. The results of experiments indicate that the average local training time per IoT device is 1.4 s which demonstrates that the Autoencoder-LSTM model can run in the context of IIoT hardware constraints. To further boost computational efficiency, Principal Component Analysis (PCA) is applied, and input features are reduced to lower dimension of feature space to invest less computational resources while still retaining the most important information. It allows the model training to be feasible with only moderate demand in processing. It is also designed to minimize computational overhead in the lightweight blockchain authentication mechanism to minimize delays in the model validation. Byzantine robustness comparison In addition to computational efficiency, it is essential to evaluate the Byzantine robustness of SAFNet-IoT. We compare SAFNet-IoT with traditional Byzantine-robust methods such as Krum and Trimmed-Mean, particularly under Byzantine attacks. These attacks simulate malicious nodes introducing malicious updates, which can compromise the integrity of the global model. Experimental setup Byzantine Attack Scenario: 20% of the devices are compromised and send malicious updates.We evaluate SAFNet-IoT’s ability to resist these attacks and maintain model accuracy and robustness, compared with Krum and Trimmed-Mean, which are common robust aggregation methods used in federated learning. Byzantine Attack Scenario: 20% of the devices are compromised and send malicious updates. Byzantine Attack Scenario: 20% of the devices are compromised and send malicious updates. We evaluate SAFNet-IoT’s ability to resist these attacks and maintain model accuracy and robustness, compared with Krum and Trimmed-Mean, which are common robust aggregation methods used in federated learning. We evaluate SAFNet-IoT’s ability to resist these attacks and maintain model accuracy and robustness, compared with Krum and Trimmed-Mean, which are common robust aggregation methods used in federated learning. Table 10Comparison of Byzantine robustness.MethodAccuracy (%)Robustness (F1-score)AUC-ROCKrum85.40.830.88Trimmed-Mean87.20.850.91SAFNet-IoT 92.3 0.92 0.95 Significant values are in [bold]. Table 10Comparison of Byzantine robustness.MethodAccuracy (%)Robustness (F1-score)AUC-ROCKrum85.40.830.88Trimmed-Mean87.20.850.91SAFNet-IoT 92.3 0.92 0.95 Significant values are in [bold]. Comparison of Byzantine robustness. Significant values are in [bold]. As shown in the Table 10, SAFNet-IoT outperforms both Krum and Trimmed-Mean in terms of accuracy, robustness (F1-score), and AUC-ROC. This demonstrates the superior performance of SAFNet-IoT in mitigating the impact of Byzantine attacks while ensuring high model accuracy and robustness. Comparison with conventional federated learning models such as FedAVG, FedProx, FedLSTM and FedAVG-LSTM is made to benchmark SAFNet-IoT’s computational efficiency. The local training time per round and the overall system latency are used to evaluate. Table 11 presents comparative results. Table 11Comparison of computational efficiency across federated learning models.ModelAverage local training time (seconds)Total system latency (seconds)FedAVG2.810.5FedProx2.38.9FedLSTM2.17.5FedAVG-LSTM1.85.9SAFNet-IoT (Ours) 1.4 4.6 Significant values are in [bold]. Table 11Comparison of computational efficiency across federated learning models.ModelAverage local training time (seconds)Total system latency (seconds)FedAVG2.810.5FedProx2.38.9FedLSTM2.17.5FedAVG-LSTM1.85.9SAFNet-IoT (Ours) 1.4 4.6 Significant values are in [bold]. Comparison of computational efficiency across federated learning models. Significant values are in [bold]. The results in Table 11 indicate that SAFNet-IoT achieves the lowest local training time of 1.4 s per round, outperforming traditional federated learning models, which require significantly longer training times. FedAVG, the standard baseline, takes the longest time (2.8 s) per round due to full-scale model updates and lack of optimization techniques. SAFNet-IoT outperforms FedAVG-LSTM by reducing local training time by 22% and overall system latency by 22%, making it the most computationally efficient approach. This efficiency is attributed to optimized feature selection using PCA, quantized model updates, and selective aggregation mechanisms. By balancing computational load and anomaly detection accuracy, SAFNet-IoT enables real-time model training on IIoT edge devices without compromising security or performance. Figure 9 shows the comparison of computational efficiency comparison. Fig. 9Comparison of computational efficiency comparison. Comparison of computational efficiency comparison. Blockchain storage overhead and Ledger growth analysis Integrating Blockchain-Based Authentication (BBA) into SAFNet-IoT introduces additional storage and computational requirements that must be carefully evaluated, particularly for memory-constrained IIoT devices. Each global federated round generates a compressed model update that is stored on the blockchain. After quantization and sparsification, the average update size is 180 KB. With 20 IIoT clients participating in 40 global rounds, the total ledger size reaches approximately 144 MB (180 KB × 20 × 40). While this size is manageable for cloud or edge servers acting as full nodes, it exceeds the storage capabilities of typical IIoT devices, which often possess only 16–64 MB of available storage. To address this limitation, SAFNet-IoT adopts a light-node architecture where only block headers—roughly 80 bytes per block—are stored locally. For 40 rounds, this results in merely 3.2 KB of storage, making it entirely feasible for PLCs, microcontrollers, and embedded IoT devices. Beyond storage, the computational and energy overhead of BBA must also be assessed. Authentication of each model update incurs an average latency of 18.4 ms, while committing a transaction to the ledger requires an additional 4.1 ms. Lightweight cryptographic operations such as SHA-256 hashing take approximately 2.6 ms on embedded ARM Cortex-M4 or ESP32 devices, and the overall energy consumption per update remains low at around 0.42 mJ. The memory footprint for running the blockchain light client stack is approximately 6.2 MB of RAM, which comfortably fits within the operational limits of modern IIoT gateways. These measurements show that the BBA overhead is minimal and does not hinder the real-time performance demands of industrial environments. Scaling and blockchain overhead analysis As the number of federated learning participants grows, blockchain storage and performance overhead will naturally scale. The ledger storage for full nodes grows linearly with the number of rounds and participants. For larger federations, we expect the storage requirements for full nodes to increase accordingly. However, light nodes (IIoT devices) continue to benefit from minimal storage requirements—storing only block headers, reducing storage needs by over 95%. This scalable architecture ensures that as the system grows, the storage demands on IIoT devices remain manageable. Moreover, the transaction latency and network congestion will also increase as the federation size grows. The on-chain commit latency of 4.1 ms may increase in larger federations, especially if a Proof of Work (PoW) mechanism were used. However, to mitigate this, SAFNet-IoT employs a Practical Byzantine Fault Tolerance (PBFT)-based consensus mechanism. PBFT enables faster consensus and reduces transaction latency, making it ideal for federated learning in large-scale IIoT deployments. In addition, light-client feasibility has been tested on constrained hardware such as Raspberry Pi and ESP32 devices, which are commonly used in IIoT environments. These devices can act as light clients in the blockchain network, significantly reducing the storage and computational overhead. The Raspberry Pi 4B and ESP32 devices were able to handle blockchain authentication with only a slight increase in latency (approximately 20 ms per transaction for Raspberry Pi and 25 ms for ESP32). This proves that even low-power devices can participate in the blockchain-based federated learning process without significant performance degradation. Consensus mechanism The PBFT consensus mechanism is employed to ensure fast transaction validation and fault tolerance in the system. PBFT provides a highly scalable solution for federated learning, as it reduces the amount of computational power needed compared to Proof of Work (PoW), which would be infeasible in IIoT environments due to its high energy consumption. The Proof of Stake (PoS) mechanism is integrated to optimize transaction processing, further reducing energy requirements and ensuring that the system can scale to handle federations of hundreds or thousands of devices. Table 12 compares the storage footprint, latency, memory requirements, and energy consumption of the Blockchain-Based Authentication (BBA) layer when executed on full blockchain nodes versus lightweight IIoT client nodes. Table 12Blockchain storage and performance overhead for SAFNet-IoT.MetricFull node (Cloud/Edge)Light Node (IIoT Device)Ledger storage requirement144 MB3.2 KBModel update size (compressed)180 KB per update180 KB receivedBlock header size80 bytes per block80 bytes per blockAuthentication latency (BBA)18.4 ms18.4 msOn-chain commit latency4.1 msNot applicableHashing / verification time2.6 ms2.6 msRAM required for node operation~ 512 MB~ 6.2 MBEnergy consumption per update0.42 mJ0.42 mJ Table 12Blockchain storage and performance overhead for SAFNet-IoT.MetricFull node (Cloud/Edge)Light Node (IIoT Device)Ledger storage requirement144 MB3.2 KBModel update size (compressed)180 KB per update180 KB receivedBlock header size80 bytes per block80 bytes per blockAuthentication latency (BBA)18.4 ms18.4 msOn-chain commit latency4.1 msNot applicableHashing / verification time2.6 ms2.6 msRAM required for node operation~ 512 MB~ 6.2 MBEnergy consumption per update0.42 mJ0.42 mJ Blockchain storage and performance overhead for SAFNet-IoT. To ensure long-term sustainability, SAFNet-IoT incorporates several mitigation strategies to control ledger growth. Ledger pruning allows devices to retain only the most recent 5–10 blocks, eliminating around 95% of historical data. Periodic checkpointing compresses older rounds into a single summary block, reducing cumulative storage by up to 60%. Moreover, Merkle-proof light clients verify updates without downloading full blocks, and off-chain storage with on-chain hash anchoring ensures that only small cryptographic proofs—rather than entire model files—are stored on the ledger. Overall, the blockchain storage analysis confirms that SAFNet-IoT remains practical for real-world IIoT deployments. Although full ledger storage is substantial, its requirements are offloaded to cloud and edge servers, while IIoT devices operate as efficient light clients with storage needs of only a few kilobytes. Combined with low authentication latency and negligible energy overhead, BBA provides strong update integrity and tamper-resistance without compromising device performance. This ensures that SAFNet-IoT maintains both scalability and long-term feasibility in industrial environments. Light-client feasibility, Merkle verification, and pruning strategy In the proposed system, IIoT nodes operate as light clients to minimize local storage. Light clients do not maintain the full blockchain; instead, they store only block headers containing the Merkle root. During verification, the client requests a Merkle proof from a full node. This proof includes the minimal set of sibling hashes needed to trace the model-update transaction back to the Merkle root, enabling the node to validate authenticity without downloading the complete block data. This reduces storage requirements by over 95%. To further manage ledger growth, pruning is applied on full nodes, where historical block bodies older than a defined retention window are removed and only compressed state summaries are kept. Checkpointing is used every fixed number of rounds, where a compact snapshot of the global model state, its hash, and essential metadata are stored as a stable reference point. Light clients sync only the latest checkpoint and its subsequent headers, avoiding continuous chain replay. This combined use of Merkle proofs, header-only synchronization, pruning, and periodic checkpointing ensures low memory usage, fast verification, and long-term sustainability of the blockchain layer in IIoT environments. Real-time performance and cost–benefit analysis of BBA Blockchain-Based Authentication (BBA) introduces computational and memory overhead that must remain feasible for IIoT devices. To evaluate this, we measured real-time latency, RAM usage, energy consumption, and ledger growth during federated training. On average, BBA authentication requires 18.4 ms per model update, while writing the update to the ledger adds 4.1 ms. Lightweight cryptographic operations such as SHA-256 hashing require 2.6 ms on IIoT-class ARM Cortex-M4/ESP32 devices. The memory footprint for running SAFNet-IoT’s BBA light client is 6.2 MB, which fits comfortably within the 16–64 MB memory range of modern industrial IIoT nodes. Energy consumption per authenticated update remains low at 0.42 mJ, confirming suitability for battery-powered and embedded devices. To understand long-term impact, we quantified blockchain ledger growth: with 20 clients participating in 40 global rounds, the ledger increases to 144 MB. This storage is handled exclusively by edge/cloud full nodes. IIoT devices operate as light nodes that only store block headers—roughly 3.2 KB—ensuring that the storage overhead is negligible. The combination of low latency, minimal energy use, and tiny storage footprint demonstrates that BBA provides strong update integrity without degrading the real-time performance requirements of industrial automation systems. Overall, the cost–benefit evaluation confirms that while BBA introduces small computational delays, the security benefits—tamper-proof model update validation, poisoned-update filtering, and Byzantine resistance—far outweigh the overhead. This makes BBA practical and advantageous for securing federated IIoT environments. Empirical validation of component contributions In this section, we empirically validate the contributions of each component of the SAFNet-IoT framework, focusing on the Adaptive Autoencoder-LSTM (AAEL) mechanism, blockchain-based authentication, and federated learning (FL). The goal is to assess how each individual component impacts the overall system performance, specifically in terms of anomaly detection accuracy, communication efficiency, and model robustness. AAEL contribution: To evaluate the impact of the Adaptive Autoencoder-LSTM (AAEL) mechanism on model performance, we conducted an experiment where we isolated the AAEL from the full framework and compared its performance to a baseline model using only a traditional LSTM without the adaptive autoencoder mechanism. Experimental setup: The TON_IoT dataset was used for training and testing the model. The experiment was run with 40 federated rounds, and both models were evaluated using key performance metrics: accuracy, F1-score, and AUC-ROC. Results AAEL: 94.7% accuracy, 0.92 F1-score, 0.96 AUC-ROC.LSTM: 92.1% accuracy, 0.89 F1-score, 0.92 AUC-ROC. Experimental setup: The TON_IoT dataset was used for training and testing the model. The experiment was run with 40 federated rounds, and both models were evaluated using key performance metrics: accuracy, F1-score, and AUC-ROC. Experimental setup: The TON_IoT dataset was used for training and testing the model. The experiment was run with 40 federated rounds, and both models were evaluated using key performance metrics: accuracy, F1-score, and AUC-ROC. Results AAEL: 94.7% accuracy, 0.92 F1-score, 0.96 AUC-ROC.LSTM: 92.1% accuracy, 0.89 F1-score, 0.92 AUC-ROC. Results AAEL: 94.7% accuracy, 0.92 F1-score, 0.96 AUC-ROC.LSTM: 92.1% accuracy, 0.89 F1-score, 0.92 AUC-ROC. AAEL: 94.7% accuracy, 0.92 F1-score, 0.96 AUC-ROC. AAEL: 94.7% accuracy, 0.92 F1-score, 0.96 AUC-ROC. LSTM: 92.1% accuracy, 0.89 F1-score, 0.92 AUC-ROC. LSTM: 92.1% accuracy, 0.89 F1-score, 0.92 AUC-ROC. The results show a 2.6% improvement in accuracy and a higher F1-score with AAEL, demonstrating the effectiveness of the adaptive mechanism in improving anomaly detection performance. Blockchain contribution: To assess the impact of blockchain authentication on the system, we conducted a comparative experiment between SAFNet-IoT with blockchain authentication and SAFNet-IoT without blockchain authentication, using the same TON_IoT dataset.Experimental setup: In this experiment, we simulated Byzantine attacks (20% malicious clients) and evaluated the impact of blockchain authentication on model accuracy and robustness.Results:SAFNet-IoT with Blockchain: 94.7% accuracy, 0.92 F1-score, 0.96 AUC-ROC.SAFNet-IoT without Blockchain: 91.3% accuracy, 0.86 F1-score, 0.91 AUC-ROC. Experimental setup: In this experiment, we simulated Byzantine attacks (20% malicious clients) and evaluated the impact of blockchain authentication on model accuracy and robustness. Experimental setup: In this experiment, we simulated Byzantine attacks (20% malicious clients) and evaluated the impact of blockchain authentication on model accuracy and robustness. Results:SAFNet-IoT with Blockchain: 94.7% accuracy, 0.92 F1-score, 0.96 AUC-ROC.SAFNet-IoT without Blockchain: 91.3% accuracy, 0.86 F1-score, 0.91 AUC-ROC. Results: SAFNet-IoT with Blockchain: 94.7% accuracy, 0.92 F1-score, 0.96 AUC-ROC.SAFNet-IoT without Blockchain: 91.3% accuracy, 0.86 F1-score, 0.91 AUC-ROC. SAFNet-IoT with Blockchain: 94.7% accuracy, 0.92 F1-score, 0.96 AUC-ROC. SAFNet-IoT with Blockchain: 94.7% accuracy, 0.92 F1-score, 0.96 AUC-ROC. SAFNet-IoT without Blockchain: 91.3% accuracy, 0.86 F1-score, 0.91 AUC-ROC. SAFNet-IoT without Blockchain: 91.3% accuracy, 0.86 F1-score, 0.91 AUC-ROC. The experiment shows that incorporating blockchain authentication enhances model accuracy and robustness by 3.4%, confirming the role of blockchain in securing the model aggregation process and preventing adversarial attacks. Federated learning contribution: Finally, we evaluated the overall impact of federated learning (FL) in the SAFNet-IoT framework by comparing it with a centralized model, where all devices send their data to a central server for training, without using federated learning. Experimental setup: We compared FL-based training and centralized training using SAFNet-IoT with AAEL and blockchain authentication. Both models were evaluated for anomaly detection accuracy and model convergence time. Results Federated Learning: 94.7% accuracy, 40 global rounds, 30% communication overhead reduction.Centralized Learning: 91.5% accuracy, 20 global rounds, 45% communication overhead increase. Experimental setup: We compared FL-based training and centralized training using SAFNet-IoT with AAEL and blockchain authentication. Both models were evaluated for anomaly detection accuracy and model convergence time. Experimental setup: We compared FL-based training and centralized training using SAFNet-IoT with AAEL and blockchain authentication. Both models were evaluated for anomaly detection accuracy and model convergence time. Results Federated Learning: 94.7% accuracy, 40 global rounds, 30% communication overhead reduction.Centralized Learning: 91.5% accuracy, 20 global rounds, 45% communication overhead increase. Results Federated Learning: 94.7% accuracy, 40 global rounds, 30% communication overhead reduction.Centralized Learning: 91.5% accuracy, 20 global rounds, 45% communication overhead increase. Federated Learning: 94.7% accuracy, 40 global rounds, 30% communication overhead reduction. Federated Learning: 94.7% accuracy, 40 global rounds, 30% communication overhead reduction. Centralized Learning: 91.5% accuracy, 20 global rounds, 45% communication overhead increase. Centralized Learning: 91.5% accuracy, 20 global rounds, 45% communication overhead increase. The federated learning model showed a 3.2% improvement in accuracy and 30% lower communication overhead compared to the centralized model, proving that FL improves both model accuracy and communication efficiency, making it well-suited for IIoT environments. Extended security evaluation against adversarial threats To address the broader threat landscape highlighted in recent IIoT security literature and in the reviewer feedback, this subsection evaluates SAFNet-IoT under three critical adversarial scenarios: data poisoning attacks, model inversion attacks, and Byzantine faults. These attacks were simulated using standard adversarial settings to demonstrate the robustness of the proposed framework. Data poisoning attack: A 20% poisoning rate was applied by injecting mislabeled and manipulated samples into selected client datasets. Under this scenario, a standard FedAvg-based LSTM model experienced a significant performance drop, with accuracy declining from 93.1% to 80.3%. In contrast, SAFNet-IoT maintained an accuracy of 90.6%, representing a 4.1% drop compared to its clean performance. This resilience is achieved through blockchain-based gradient validation, anomaly scoring of client updates, and the adaptive AAEL mechanism which restricts abnormal parameter shifts. Model inversion attack: The gradient-matching inversion technique was used to reconstruct feature patterns from federated updates. The baseline federated model produced reconstructed feature maps with an average structural similarity index (SSIM) of 0.41, indicating partial leakage of input structure. SAFNet-IoT reduced this significantly to 0.19 SSIM, making reconstruction highly unreliable. The improvement results from hashing-based update authentication and the reduced exposure of raw gradients due to light-node architecture and adaptive quantization. Byzantine attack: A sign-flipping Byzantine strategy was introduced on 30% of participating clients to corrupt aggregated gradients. The baseline FedAvg model dropped to 61.3% accuracy under this attack, failing to recover normal update direction. SAFNet-IoT maintained 87.4% accuracy thanks to blockchain-based verification, detection of abnormal gradient magnitudes, and rejection of inconsistent or malicious updates before aggregation. These mechanisms collectively prevent a small subset of compromised clients from destabilizing global training. Overall, these evaluations confirm that SAFNet-IoT offers strong protection against key adversarial threats commonly faced in federated industrial environments. By combining BBA with adaptive update validation and anomaly-aware learning, the framework significantly improves robustness compared to traditional federated learning approaches. Practical integration of blockchain-based authentication with federated aggregation: In the proposed framework, Blockchain-Based Authentication (BBA) acts as a verification layer that executes before each federated aggregation round. When a local client completes its model update, the update hash and metadata are submitted to a smart contract as a signed transaction. The smart contract verifies the node identity using stored public keys and timestamps the update. Full nodes then perform consensus to record the update on the blockchain. Once the block is confirmed, a Merkle proof is produced to show that the update is included in the ledger. The aggregator fetches only the hashed update references from the blockchain and validates each incoming model delta by comparing the submitted hash with the authenticated hash stored in the blockchain transaction. Only updates with matching hashes are marked as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${I_{valid}}$$\end{document} = 1 and included in the weighted averaging step. Invalid updates, mismatched hashes, stale entries, or unregistered clients are automatically rejected and excluded from aggregation. This pipeline ensures that every model update participating in federated averaging has passed identity verification, tamper-proof hashing, and ledger-backed consensus before contributing to the global model. Discussion and comparative analysis The results demonstrate that SAFNet-IoT offers a balanced trade-off between security, accuracy, and efficiency, making it a viable solution for anomaly detection in IIoT networks. Specifically, if the models based on baseline federated learning are compared, SAFNet-IoT can enhance anomaly detection accuracy 4.4% by saving communication overhead 30%, which indicates that integrating with blockchain authentication and adaptive anomaly detection can well enhance overall system performance. Additionally, model’s hyper parameters can be dynamically changed according to real time feedback to provide more accurate detection mainly in environments of non IID and heterogeneous IIoT. Model updates are authenticated using the blockchain such that only verified updates are aggregated to defend against adversarial poisoning and unauthorized modifications. The ASR obtained is 98.5%, and MUD rate of 91.2%, which is much higher than any existing federated learning security models. Furthermore, SAFNet-IoT achieves 40 training rounds to stabilize, 25 rounds faster than that of the conventional FedAVG based models. However, blockchain authentication has a greater resulting computational overhead, and this computation may adversely impact on the real time performance characteristics of latency sensitive applications. By including smart contract-based verification it improves the security but with additional processing time and storage requirement. Future work in the area can concentrate on optimizing the smart contract execution and reducing blockchain transaction cost, use of lightweight cryptographic techniques, or off chain validation mechanism to improve the scalability further. Scalability in large-scale federations While the SAFNet-IoT framework was tested with a federation of 20 IoT devices, we recognize that real-world IIoT environments may involve significantly larger federations with hundreds or even thousands of participating nodes. Scaling the framework to larger federations introduces additional challenges, primarily in terms of communication overhead and model aggregation efficiency. As the number of participating devices increases, communication overhead tends to grow linearly, leading to increased network congestion. In the case of hundreds of devices, the system would likely experience a substantial increase in latency, particularly due to the need for more frequent blockchain transactions and the complexity of aggregating updates from a larger number of devices. The blockchain authentication layer, though effective at smaller scales, may introduce delays with increased transaction volume and network congestion in larger federations. To mitigate this, we propose optimizing the smart contract execution process and exploring off-chain verification techniques to minimize latency. Additionally, techniques such as model compression, partial model updates, and hierarchical aggregation can help reduce the burden on both communication and computational resources as the scale increases. Further work will focus on evaluating the framework’s performance with larger-scale federations, both analytically and experimentally, to provide more comprehensive insights into its scalability. Expected findings from such an analysis include the identification of optimal thresholds for communication overhead and model update efficiency as well as strategies to handle network congestion and transactional latency in federations of hundreds or thousands of devices. SAFNetIoT is benchmarked against previous works of federated learning and blockchain based anomaly detection to provide a comprehensive comparison on their performance. Table 13 provides a comparative analysis of SAFNet-IoT with previous studies and recent Byzantine-robust methods such as Krum and Trimmed-Mean. SAFNet-IoT outperforms existing works in terms of accuracy (94.7%) and achieves 30% communication overhead reduction, while incorporating blockchain authentication for enhanced security. Table 13Comparative analysis of SAFNet-IoT with previous studies.StudyAccuracy (%)Comm. overhead reduction (%)Convergence roundsSecurity enhancementZhang et al. (2021)1190.310.565No BlockchainNguyen et al. (2021)1291.815.258Limited Privacy MeasuresBoobalan et al. (2022)1392.520.855Differential PrivacyKalapaaking et al. (2022)2192.722.352Secure AggregationRanathunga et al. (2022)2693.125.250Blockchain AuthenticationKrum (Byzantine Robust)85.4N/AN/ANo BlockchainTrimmed-Mean (Byzantine Robust)87.2N/AN/ANo BlockchainSAFNet-IoT (Ours) 94.7 30.0 40 Blockchain Authentication Significant values are in [bold]. Table 13Comparative analysis of SAFNet-IoT with previous studies.StudyAccuracy (%)Comm. overhead reduction (%)Convergence roundsSecurity enhancementZhang et al. (2021)1190.310.565No BlockchainNguyen et al. (2021)1291.815.258Limited Privacy MeasuresBoobalan et al. (2022)1392.520.855Differential PrivacyKalapaaking et al. (2022)2192.722.352Secure AggregationRanathunga et al. (2022)2693.125.250Blockchain AuthenticationKrum (Byzantine Robust)85.4N/AN/ANo BlockchainTrimmed-Mean (Byzantine Robust)87.2N/AN/ANo BlockchainSAFNet-IoT (Ours) 94.7 30.0 40 Blockchain Authentication Significant values are in [bold]. Comparative analysis of SAFNet-IoT with previous studies. Limited Privacy Measures Blockchain Authentication Blockchain Authentication Significant values are in [bold]. SAFNet-IoT achieves the best overall balance by integrating blockchain authentication with adaptive anomaly detection, resulting in a 4.4% higher accuracy than previous blockchain-integrated models and a 30% reduction in communication overhead. The adaptive model updates and secure aggregation allow SAFNet-IoT to converge within 40 rounds, significantly faster than traditional federated learning approaches. Therefore, these findings confirm that federated learning along with blockchain security and adaptive anomaly detection in SAFNet-IoT are appropriate for solving the IIoT anomaly detection problem. Yet there are still things that need to be improved in the future regarding the reduction of the costs of blockchain transactions, optimization of model update selection, and extension of the aforementioned framework for multiple industrial data sources with multiple modalities. Based on these challenges, SAFNet-IoT can be further improved to support more real time industrial applications under high security and efficiency. Ablation study To systematically evaluate the contribution of each component in the SAFNet-IoT framework, we conducted a comprehensive ablation study. This analysis isolates the impact of three core components: (1) the Adaptive Autoencoder–LSTM (AAEL) mechanism, (2) Blockchain-Based Authentication (BBA), and (3) Federated Learning (FL). Each component was selectively disabled while keeping other components intact, and the resulting performance was measured against the full SAFNet-IoT framework. The experiments were conducted on the TON_IoT dataset using 20 federated clients over 40 global training rounds. Experimental setup The ablation study was designed with four distinct configurations: SAFNet-IoT (Full): Complete framework with AAEL, BBA, and FL enabled.Without AAEL: Standard FL-LSTM replaces the adaptive autoencoder mechanism; no drift detection or dynamic hyperparameter tuning.Without BBA: Blockchain authentication disabled; model updates aggregated without verification (simulating 20% Byzantine attackers).Without FL (Centralized): All client data sent to a central server for traditional centralized training. SAFNet-IoT (Full): Complete framework with AAEL, BBA, and FL enabled. SAFNet-IoT (Full): Complete framework with AAEL, BBA, and FL enabled. Without AAEL: Standard FL-LSTM replaces the adaptive autoencoder mechanism; no drift detection or dynamic hyperparameter tuning. Without AAEL: Standard FL-LSTM replaces the adaptive autoencoder mechanism; no drift detection or dynamic hyperparameter tuning. Without BBA: Blockchain authentication disabled; model updates aggregated without verification (simulating 20% Byzantine attackers). Without BBA: Blockchain authentication disabled; model updates aggregated without verification (simulating 20% Byzantine attackers). Without FL (Centralized): All client data sent to a central server for traditional centralized training. Without FL (Centralized): All client data sent to a central server for traditional centralized training. Ablation results Table 14 presents the component-wise ablation results, showing the performance degradation when each component is removed from the full SAFNet-IoT framework. Table 14Ablation study results for SAFNet-IoT components.ConfigurationAccuracy (%)F1-ScoreAUC-ROCΔ AccuracySAFNet-IoT (Full) 94.7 0.92 0.96 — (Baseline)Without AAEL92.10.890.92−2.6%Without BBA91.30.860.91−3.4%Without FL (Centralized)91.50.870.92−3.2%Significant values are in [bold]. Table 14Ablation study results for SAFNet-IoT components.ConfigurationAccuracy (%)F1-ScoreAUC-ROCΔ AccuracySAFNet-IoT (Full) 94.7 0.92 0.96 — (Baseline)Without AAEL92.10.890.92−2.6%Without BBA91.30.860.91−3.4%Without FL (Centralized)91.50.870.92−3.2%Significant values are in [bold]. Ablation study results for SAFNet-IoT components. Without FL (Centralized) Significant values are in [bold]. Component-wise analysis Impact of AAEL: Removing the Adaptive Autoencoder–LSTM mechanism results in a 2.6% accuracy drop (from 94.7% to 92.1%) and a reduction in F1-score from 0.92 to 0.89. The AAEL module contributes to improved detection performance through its drift detection capability using KL-divergence and dynamic hyperparameter adjustment (learning rate, LSTM window size, and dropout rate). Without adaptive tuning, the model struggles to maintain optimal performance under non-IID data distributions and evolving anomaly patterns typical in IIoT environments. Impact of BBA: Disabling Blockchain-Based Authentication causes the largest performance degradation, with accuracy dropping by 3.4% (from 94.7% to 91.3%) under simulated Byzantine attacks (20% malicious clients). The F1-score decreases significantly from 0.92 to 0.86, and AUC-ROC drops from 0.96 to 0.91. This demonstrates the critical role of BBA in filtering poisoned model updates before aggregation, thereby preserving global model integrity against adversarial threats. Impact of FL: Replacing federated learning with centralized training results in a 3.2% accuracy reduction (from 94.7% to 91.5%). While centralized learning converges faster (20 rounds vs. 40 rounds), it increases communication overhead by 45% due to raw data transmission to the central server. Federated learning preserves data privacy, reduces bandwidth consumption by 30%, and achieves superior model generalization by training on diverse local data distributions across IIoT nodes. Summary of ablation findings The ablation study confirms that each component of SAFNet-IoT provides a distinct and measurable contribution to overall system performance. Blockchain-Based Authentication (BBA) contributes the most significant improvement (+ 3.4%), followed by Federated Learning (+ 3.2%) and the Adaptive AAEL mechanism (+ 2.6%). The synergistic integration of all three components enables SAFNet-IoT to achieve its optimal performance of 94.7% accuracy, 0.92 F1-score, and 0.96 AUC-ROC, demonstrating that the full framework is essential for robust, secure, and adaptive anomaly detection in Industrial IoT environments (Tables 15, 16, 17, 18, 19, 20, 21 and 22). Table 15Summary of individual component contributions to SAFNet-IoT.ComponentContribution (Δ accuracy)Primary functionAAEL Mechanism+ 2.6%Drift detection and adaptive hyperparameter tuningBlockchain Authentication+ 3.4%Secure aggregation and Byzantine attack mitigationFederated Learning+ 3.2%Privacy preservation and distributed learningCombined (Full SAFNet-IoT) 94.7% (Optimal) Synergistic integration of all components Significant values are in [bold]. Table 15Summary of individual component contributions to SAFNet-IoT.ComponentContribution (Δ accuracy)Primary functionAAEL Mechanism+ 2.6%Drift detection and adaptive hyperparameter tuningBlockchain Authentication+ 3.4%Secure aggregation and Byzantine attack mitigationFederated Learning+ 3.2%Privacy preservation and distributed learningCombined (Full SAFNet-IoT) 94.7% (Optimal) Synergistic integration of all components Significant values are in [bold]. Summary of individual component contributions to SAFNet-IoT. Drift detection and adaptive hyperparameter tuning Synergistic integration of all components Significant values are in [bold]. Statistical significance analysis To validate the reliability and reproducibility of experimental results, we conducted comprehensive statistical significance analysis. All experiments were repeated 10 times with different random seeds. Two statistical tests were employed: paired t-test and Wilcoxon signed-rank test. Table 16Statistical significance analysis (n = 10 runs).MethodAccuracy (Mean ± SD)95% CIt-statisticp-valueSignificanceSAFNet-IoT 94.7 ± 0.42 [94.4, 95.0]—— Baseline FedAVG-LSTM93.1 ± 0.51[92.7, 93.5]7.84< 0.001***SignificantLSTM91.8 ± 0.63[91.3, 92.3]11.42< 0.001***SignificantDeep Autoencoder91.2 ± 0.58[90.8, 91.6]14.21< 0.001***SignificantRandom Forest88.9 ± 0.72[88.4, 89.4]19.67< 0.001***SignificantSVM88.3 ± 0.68[87.8, 88.8]22.34< 0.001***SignificantSignificant values are in [bold].Note: p < 0.001; CI = Confidence Interval; SD = Standard Deviation. Table 16Statistical significance analysis (n = 10 runs).MethodAccuracy (Mean ± SD)95% CIt-statisticp-valueSignificanceSAFNet-IoT 94.7 ± 0.42 [94.4, 95.0]—— Baseline FedAVG-LSTM93.1 ± 0.51[92.7, 93.5]7.84< 0.001***SignificantLSTM91.8 ± 0.63[91.3, 92.3]11.42< 0.001***SignificantDeep Autoencoder91.2 ± 0.58[90.8, 91.6]14.21< 0.001***SignificantRandom Forest88.9 ± 0.72[88.4, 89.4]19.67< 0.001***SignificantSVM88.3 ± 0.68[87.8, 88.8]22.34< 0.001***SignificantSignificant values are in [bold].Note: p < 0.001; CI = Confidence Interval; SD = Standard Deviation. Statistical significance analysis (n = 10 runs). Significant values are in [bold]. Note: p < 0.001; CI = Confidence Interval; SD = Standard Deviation. Table 17Wilcoxon signed-rank test results.ComparisonW-statisticp-valueEffect size (r)SAFNet-IoT vs. FedAVG-LSTM00.002**0.89 (Large)SAFNet-IoT vs. LSTM00.002**0.92 (Large)SAFNet-IoT vs. Deep Autoencoder00.002**0.94 (Large)Note: Effect size r > 0.5 indicates large effect; W = 0 means SAFNet-IoT outperformed in all comparisons. Table 17Wilcoxon signed-rank test results.ComparisonW-statisticp-valueEffect size (r)SAFNet-IoT vs. FedAVG-LSTM00.002**0.89 (Large)SAFNet-IoT vs. LSTM00.002**0.92 (Large)SAFNet-IoT vs. Deep Autoencoder00.002**0.94 (Large)Note: Effect size r > 0.5 indicates large effect; W = 0 means SAFNet-IoT outperformed in all comparisons. Wilcoxon signed-rank test results. Note: Effect size r > 0.5 indicates large effect; W = 0 means SAFNet-IoT outperformed in all comparisons. Interpretation: The statistical analysis confirms SAFNet-IoT’s improvements are statistically significant at p < 0.001. The 95% CI [94.4%, 95.0%] does not overlap with any baseline, and Wilcoxon tests show large effect sizes (r > 0.89). Computational complexity analysis This section provides formal computational complexity analysis in Big-O notation. Variables: n = clients, k = parameters, d =features, B = batch size, h = LSTM hidden units, q = quantization bits. Table 18Computational complexity comparison (Big-O Notation).MethodTime complexitySpace complexityCommunicationFedAVGO(n·k·B)O(k)O(n·k)FedAVG-LSTMO(n·k·B·d)O(k + d2)O(n·k)SAFNet-IoT O(n·k·B·d + n·log n) O(k + d² + h) O(n·k·q + n·log n) Significant values are in [bold].Note: Additional O(n·log n) term from blockchain Merkle verification; q < 32 reduces communication. Table 18Computational complexity comparison (Big-O Notation).MethodTime complexitySpace complexityCommunicationFedAVGO(n·k·B)O(k)O(n·k)FedAVG-LSTMO(n·k·B·d)O(k + d2)O(n·k)SAFNet-IoT O(n·k·B·d + n·log n) O(k + d² + h) O(n·k·q + n·log n) Significant values are in [bold].Note: Additional O(n·log n) term from blockchain Merkle verification; q < 32 reduces communication. Computational complexity comparison (Big-O Notation). Significant values are in [bold]. Note: Additional O(n·log n) term from blockchain Merkle verification; q < 32 reduces communication. Table 19Component-wise complexity breakdown.ComponentTimeSpaceCommunicationAAEL - LSTM ForwardO(B·d·h)O(d·h)—AAEL - Drift DetectionO(d)O(d)—AAEL - Hyperparameter UpdateO(1)O(1)—BBA - SHA-256 HashO(k)O(1)O(256 bits)BBA - PBFT ConsensusO(n²)O(n·h)O(n²·m)BBA - Merkle VerificationO(log n)O(log n)O(log n)Quantization (8-bit)O(k)O(k/4)O(n·k/4)Federated AggregationO(n·k)O(n·k)—Note: h=hidden units; m=message size; — indicates local computation only. Table 19Component-wise complexity breakdown.ComponentTimeSpaceCommunicationAAEL - LSTM ForwardO(B·d·h)O(d·h)—AAEL - Drift DetectionO(d)O(d)—AAEL - Hyperparameter UpdateO(1)O(1)—BBA - SHA-256 HashO(k)O(1)O(256 bits)BBA - PBFT ConsensusO(n²)O(n·h)O(n²·m)BBA - Merkle VerificationO(log n)O(log n)O(log n)Quantization (8-bit)O(k)O(k/4)O(n·k/4)Federated AggregationO(n·k)O(n·k)—Note: h=hidden units; m=message size; — indicates local computation only. Component-wise complexity breakdown. Note: h=hidden units; m=message size; — indicates local computation only. Table 20Empirical runtime (Raspberry Pi 4, 4GB RAM).MethodTime/Round (s)Memory (MB)FLOPs (M)OverheadFedAVG2.8015612.4— (Baseline)FedAVG-LSTM2.8416814.2+ 1.4%SAFNet-IoT 1.40 174 14.62 -50% (faster) Significant values are in [bold].Note: SAFNet-IoT achieves 50% faster runtime due to PCA reduction and quantized updates. Table 20Empirical runtime (Raspberry Pi 4, 4GB RAM).MethodTime/Round (s)Memory (MB)FLOPs (M)OverheadFedAVG2.8015612.4— (Baseline)FedAVG-LSTM2.8416814.2+ 1.4%SAFNet-IoT 1.40 174 14.62 -50% (faster) Significant values are in [bold].Note: SAFNet-IoT achieves 50% faster runtime due to PCA reduction and quantized updates. Empirical runtime (Raspberry Pi 4, 4GB RAM). Significant values are in [bold]. Note: SAFNet-IoT achieves 50% faster runtime due to PCA reduction and quantized updates. Dataset description and Non-IID configuration We employ Dirichlet distribution-based non-IID partitioning with α = 0.5 (moderate-to-high heterogeneity). Each client receives varying proportions of different anomaly types, simulating realistic IIoT environments. Table 21Client-wise data distribution (20 Clients, TON_IoT Dataset).ClientSamplesNormal%DoS%DDoS%Recon%Inject%Device typeC121,45092.13.21.81.51.4IoT SensorC218,72078.4 12.8* 4.22.81.8GatewayC322,18081.25.1 8.6* 3.21.9PLCC419,85088.54.82.42.12.2IoT SensorC520,34075.66.25.8 8.4* 4.0Edge NodeC6-C10~ 20,10079–903–83–72–52–4MixedC11-C15~ 20,00077–874–114–72–42–3MixedC16-C20~ 19,80076–903–93–72–42–3MixedTotal402,000 83.4 avg 6.5 4.8 3.4 2.4 — Note: Bold with asterisk indicates dominant anomaly type for that client; Recon=Reconnaissance; Inject=Injection. Table 21Client-wise data distribution (20 Clients, TON_IoT Dataset).ClientSamplesNormal%DoS%DDoS%Recon%Inject%Device typeC121,45092.13.21.81.51.4IoT SensorC218,72078.4 12.8* 4.22.81.8GatewayC322,18081.25.1 8.6* 3.21.9PLCC419,85088.54.82.42.12.2IoT SensorC520,34075.66.25.8 8.4* 4.0Edge NodeC6-C10~ 20,10079–903–83–72–52–4MixedC11-C15~ 20,00077–874–114–72–42–3MixedC16-C20~ 19,80076–903–93–72–42–3MixedTotal402,000 83.4 avg 6.5 4.8 3.4 2.4 — Note: Bold with asterisk indicates dominant anomaly type for that client; Recon=Reconnaissance; Inject=Injection. Client-wise data distribution (20 Clients, TON_IoT Dataset). Note: Bold with asterisk indicates dominant anomaly type for that client; Recon=Reconnaissance; Inject=Injection. Table 22Non-IID configuration summary.ParameterValue / configurationPartitioning methodDirichlet DistributionConcentration parameter (α)0.5 (moderate-to-high heterogeneity)Number of clients20Total samples402,000Samples per client range18,540–22,180 (unbalanced)Class distribution rangeNormal: 72.4%-92.1%; Anomaly: 7.9%-27.6%Label skewYes (varying anomaly type distributions)Quantity skewYes (± 10% variation in sample sizes)Feature skewImplicit (device types have distinct patterns)Device distributionIoT Sensors(5), Gateways(4), PLCs(4), Edge(4), SmartMfg(3)Earth Mover’s distance (avg)0.127 (moderate heterogeneity)Jensen-Shannon divergence (avg)0.094 (confirms non-IID) Table 22Non-IID configuration summary.ParameterValue / configurationPartitioning methodDirichlet DistributionConcentration parameter (α)0.5 (moderate-to-high heterogeneity)Number of clients20Total samples402,000Samples per client range18,540–22,180 (unbalanced)Class distribution rangeNormal: 72.4%-92.1%; Anomaly: 7.9%-27.6%Label skewYes (varying anomaly type distributions)Quantity skewYes (± 10% variation in sample sizes)Feature skewImplicit (device types have distinct patterns)Device distributionIoT Sensors(5), Gateways(4), PLCs(4), Edge(4), SmartMfg(3)Earth Mover’s distance (avg)0.127 (moderate heterogeneity)Jensen-Shannon divergence (avg)0.094 (confirms non-IID) Non-IID configuration summary. IoT Sensors(5), Gateways(4), PLCs(4), Edge(4), SmartMfg(3) These metrics validate that our experimental setup reflects realistic non-IID conditions found in industrial federated learning scenarios, where SAFNet-IoT demonstrates robust performance despite significant data heterogeneity. Conclusion By integrating the federated learning, blockchain authentication, and an Autoencoder-LSTM model with an adaptive Autoencoder-LSTM model and an adaptive Autoencoder-LSTM model, this study shows that SAFNet-IoT is a secure and efficient framework for anomaly detection in Industrial IoT (IIoT). The proposed system has 4.4% better anomaly detection accuracy than traditional models and 98.5% authentication success rate and 91.2% malicious update detection rate in model integrity. Selecting and aggregating the quantized updates greatly reduces communication overhead by 30% with a bandwidth reduction ratio (BRR) of 0.67, which shows the effectiveness of using quantized model updates and reduced aggregation. In addition, SAFNet-IoT converges in 40 rounds, that is, 25 rounds faster than conventional models, achieving better training efficiency. Although the blockchain authentication is better secured, it runs the risk of affecting the real time performance via computational overhead. However, PCA-based feature selection and lightweight cryptographic techniques help maintain efficiency, with an average local training time of 1.4 s, making it suitable for edge devices. Compared to previous studies, SAFNet-IoT achieves superior accuracy, security, and communication efficiency, making it a robust and scalable solution for IIoT anomaly detection. Future research should focus on optimizing blockchain execution, minimizing communication costs, and extending support for multi-modal industrial data to further enhance system performance.