DOI: 10.3390/electronics15163514 ISSN: 2079-9292

A Federated Pyramid Swin Vision Transformer Framework with Generative AI for Sybil-Resilient Routing Optimization and Energy-Efficient Communication in Wireless Sensor Networks

Bammidi Pradeep Kumar, M. R. Ebenezar Jebarani

Mobile Ad Hoc Networks (MANETs) or Wireless Sensor Networks (WSNs) have a “decentralized” architecture and are very susceptible to sophisticated attacks, such as identity forgery attacks using deep learning (DL) methods. Secure routing and intrusion detection systems have been developed but they are usually not scalable, consume too much power, introduce too much communication overhead and do not provide enough privacy protection, or are not resilient to changes in adversarial behavior. This paper introduces a Federated Pyramid Swin Vision Transformer (FPSViT) framework that enhances the routing optimization and energy-efficient communication for MANET–WSN networks with the support of Generative AI (GAI), addressing these challenges. The proposed framework incorporates three modules: federated averaging for privacy-preserving distributed learning, Pyramid Swin Vision Transformer (PSViT) for extracting Sybil attack characteristics at multiple scales, and a GAI-based adversarial pattern generation module to boost the robustness of the detection process in the presence of evolving attack patterns. Energy-aware routing optimization: It takes into account the energy level of the nodes, power consumption of the links, link reliability and trust values to optimize the routing for minimum power consumption with secure communication. Results of experimental evaluations on various Sybil attack scenarios show that the proposed FPSViT is able to achieve 98.84%, 98.52%, 98.21%, and 98.36% detection accuracy, precision, recall, and F1-score, respectively, and consume 0.381 J/node on average and increase the lifetime of the network to 2876 rounds. The power consumption analysis demonstrates that FPSViT consumes 12–21% less energy than other methods such as Federated CNN, FL-LSTM, Lightweight Standalone Swin Detector, and RL-based Secure Routing, thanks to optimized routing decisions and avoiding unnecessary transmissions, as well as adaptive trust-based communication. Moreover, the proposed framework achieves an improvement in the packet delivery ratio to 98.24%, decreases communication overhead by 9–17% and increases network lifetime by 10–19%. The results have also validated that FPSViT is a scalable, privacy-preserving, and power-saving security solution for dynamic MANET–WSN environments and is able to successfully resist advanced DL-driven Sybil attacks.

More from our Archive