## **10** **Future Research Directions**  
* **Enhancing the LOA's Adaptability for Complex IoT Environments:** While the LOA demonstrates strong capabilities in balancing exploration and exploitation, future research could focus on improving its adaptability to more complex, multi-modal attack scenarios. Enhancing the LOA's ability to adjust its exploration parameters dynamically based on the characteristics of the evolving network environment could further improve the accuracy of attack detection. Incorporating adaptive or self-tuning parameters within the LOA could be a significant improvement in achieving optimal performance in dynamic IoT environments. * **Integration of Real-Time Constraints and Resource Optimization:** IoT-based WSNs often operate in resource-constrained environments where energy efficiency, memory, and computational power are limited. Future work could focus on optimizing the combination of the LOA and Cb-C to function effectively within these constraints. This may involve integrating energy-aware strategies, low-power communication protocols, or lightweight versions of the algorithm that minimize resource consumption while maintaining high detection accuracy. * **Expanding Detection to a Wider Range of Attack Types and Datasets:** The current approach is primarily designed for detecting DoS attacks; however, future research could explore expanding the detection capabilities to cover a broader spectrum of IoT-based WSN attack types, such as routing attacks, Sybil attacks, and blackhole attacks. Testing the LOA-Cb-C framework on more diverse datasets and real-world environments could further validate its generalizability and effectiveness. Moreover, integrating multi-class classification approaches within CatBoost for more granular identification of attack subtypes could lead to deeper insights into network vulnerabilities. * **Hybrid Approaches and Deep Learning Integration:** To further improve detection performance, combining LOA with deep learning techniques or other advanced optimization methods (e.g., particle swarm optimization, genetic algorithms) could be explored. Hybrid approaches could capitalize on the strengths of different algorithms and lead to more robust and accurate IDS. Additionally, real-time learning and adaptation, such as online learning techniques, could be integrated to continuously improve the classifier's performance as new threats emerge. By addressing these research directions, the combination of the LOA and Cb-C could evolve into an even more powerful tool for securing IoT-based WSNs against a wide array of cyber threats. **Author Contributions:** Conceptualization, S.S.A. and P.A. ; Methodology, P.A. ; Software, D.B.M. ; Validation, P.A., A.R. and A.L. ; Formal analysis, S.S.A. ; Investigation, D.B.M. ; Resources, P.A. ; Data curation, D.B.M. ; Writing--original draft preparation, S.S.A. ; Writing--review and editing, A.R. ; Visualization, B.W. ; Supervision, P.A. ; Project administration, J.M.G. ; Funding acquisition, J.M.G. All authors have read and agreed to the published version of the manuscript. **Funding:** This research received no external funding. **Data Availability Statement:** The original data presented in the study are openly available in kaggle at [[https://www.kaggle.com/datasets/bassamkasabeh1/wsnds](https://www.kaggle.com/datasets/bassamkasabeh1/wsnds)]([https://www.kaggle.com/datasets/bassamkasabeh1/wsnds](https://www.kaggle.com/datasets/bassamkasabeh1/wsnds)), accessed on 15 October 2024. **Conflicts of Interest:** The authors declare no conflict of interest.