ABSTRACT Wireless sensor networks (WSNs) require routing mechanisms that are both energy‐efficient and resilient to security threats. While numerous studies have explored trust‐based routing, optimization algorithms, and intrusion detection individually, their integration has often remained loosely coupled. This paper presents an adaptive secure routing framework that tightly integrates Learning Dynamic Deterministic Finite Automata (LDDFA), trust‐based routing, and a hybrid Moth Flame–Firefly optimization (MFO–FA) algorithm under a unified decision layer. Unlike traditional hybrid models, the proposed framework enables bidirectional interaction: Trust metrics and KNN‐based intrusion detection feedback dynamically influence route learning and optimization parameters. This co‐adaptive design enhances both the security responsiveness and the energy efficiency of WSNs. Simulation results on various network scales demonstrate that the proposed model achieves superior performance in energy consumption, network lifetime, packet delivery ratio, and end‐to‐end delay, outperforming recent metaheuristic and trust‐based routing protocols. The study thus contributes a novel cross‐coupled optimization–security framework for WSNs.
Kennady et al. (2026) studied this question.