Integrating LLM and GenAI for CyberSecure and Adaptive Resource Management in Large-Scale Wireless Sensor Networks
摘要
The increasing complexity and scale of wireless sensor networks (WSNs), particularly in the context of 6G and intelligent edge computing, call for adaptive, secure, and cyber-resilient resource optimization solutions. Traditional heuristic and rule-based methods often fall short in dynamic environments due to limited generalization, lack of real-time adaptability, and vulnerability to cyber threats. In this work, we propose a novel framework that leverages Large Language Models (LLMs) and Generative AI techniques to address the dual objectives of cybersecurity and efficiency in resource allocation. Specifically, we develop a Retrieval-Augmented Generation (RAG)-based architecture that integrates LLMs with contextual network knowledge to perform intelligent, data-driven resource allocation while ensuring resilience against cyberattacks. To strengthen security, we incorporate a Generative Adversarial Network (GAN)-based detection mechanism that identifies and mitigates adversarial cyber threats, such as data spoofing, injection, or model poisoning, thereby enhancing system robustness. We evaluate three LLM variants—CodeLLaMA, LLaMA-2-Instruct, and base LLaMA-2—under multiple network conditions and adversarial scenarios. Two allocation schemes are examined: an LLM-only strategy and a hybrid LLM + binary power control model. Comparative analysis against baselines such as exhaustive search, random allocation, and standalone control demonstrates that our RAG-GAN framework achieves up to 95.2% of optimal energy efficiency, maintains strong spectral efficiency, and detects cyberattacks with over 93% accuracy. These results highlight the potential of GenAI-driven methods to enable cybersecure, adaptive, and efficient wireless resource management in future-generation sensor networks.