Cognitive Network Intrusion Detection Systems: Anomaly and Malware Detection for Zero-Day Attack Resilience
Abstract
1. Introduction
2. Literature Study
2.1. Continual Pre-Training (CPT)
2.2. Supervised Fine-Tuning (SFT)
2.3. Feedback-Driven Online Reinforcement (Human-in-the-Loop Reinforcement Signal)
2.4. Related Works and Research Gap
2.4.1. Gap 1: Limited Integration of Multimodal Learning with Domain-Specific Adaptation
2.4.2. Gap 2: Insufficient Human–AI Collaboration Frameworks for Real-Time Threat Response
3. Methodology and Experimental Setup
3.1. Overall Architecture
- Data acquisition and preprocessing;
- Unified vectorDB, which functions as a long-term episodic memory rather than a generative retriever;
- Cognitive learning core;
- Decision and response layer;
- Human-in-the-loop feedback layer.
3.2. Data Acquisition and Feature Representation
3.2.1. Data Preprocessing and Encoding
3.2.2. Feature Inclusion and Selection
3.2.3. Correlation Analysis Between Known and Zero-Day Samples
3.2.4. Implications for Zero-Day Detection
3.2.5. Experimental Validity
3.3. Unified Vector Database (VectorDB)
3.4. Foundational Cognitive Learning Framework
3.4.1. Unsupervised Continued Pre-Training (CPT)
3.4.2. Supervised Task-Specific Fine-Tuning (SFT)
3.4.3. Reinforcement Signal Acquisition via Human Feedback
3.5. Decision and Response Layer
3.6. Mathematical Model and Problem Formulation
3.6.1. Problem Definition
3.6.2. Anomaly Scoring Function
3.6.3. Zero-Day Detection Criterion
3.6.4. Unified Learning Objective
- Preprocessing and Feature Extraction: parsing and embedding of network flow features;
- ML-Enhanced Detection Engine: semantic reasoning for anomaly classification;
- Vector-Memory-Augmented IDS for Threat Intelligence Integration: context-aware augmentation using security feeds;
- Human-in-the-Loop Verification: Final confirmation to mitigate false-positive results.
3.7. Dataset Selection and Preprocessing
3.8. Implementation Details and Experimental Workflow
- The client sends a POST request to detect our pipeline with a JSON payload containing the features;
- In app.py, the request is handled by the detect or full_pipeline function;
- The function calls
- sft_engine.process_query() to obtain the SFT results;
- cpt_engine.predict() to get the CPT result.
- 4.
- The results are combined using calculate_ensemble_result();
- 5.
- If a zero-day is detected, the function triggers rhs_engine.process_feed() in the background;
- 6.
- The response is sent back to the client with the detection results;
- 7.
- In addition, the system can be trained, tested, and reported using the respective end points and scripts.
- Forward Flow: Request → Feature Extraction → Engine Processing → decision → response;
- Feedback Flow: Detection Results → Human Feedback → HRS Engine → Database Updates → Improved Detection;
- Training Flow: Data → Model Training → Model Storage → Deployment → Inference.
- Adaptability: Continuous retraining ensures resilience against concept drift and zero-day attacks;
- Explainability: Human feedback introduces interpretability and traceability;
- Scalability: Microservice separation enables the independent scaling of inference and training workloads;
- Dataset Agnosticism: Unified vector representation supports heterogeneous training sources;
- Operational Practicality: SQLite-backed vectorDB enables lightweight deployment while preserving auditability.
3.9. Zero-Day Simulation Protocol
- Semantic Distance from Dominant Attack Families: Withheld classes are chosen to be structurally and behaviorally distinct from the majority attack categories present in the training data. For example, volumetric attacks (e.g., DoS/DDoS) are separated from application-layer or privilege-escalation attacks (e.g., infiltration or backdoor activity). This ensures that zero-day samples occupy different regions in the feature space, making detection non-trivial.
- Low Class Frequency (Rarity Constraint): Attack categories with relatively low representation in the original dataset are prioritized for exclusion. This prevents the model from implicitly learning their characteristics during training and better reflects the rarity typically associated with zero-day threats in real-world environments.
- Real-World Plausibility: The selected classes correspond to attack types that are commonly observed as emerging or evolving threats in operational cybersecurity settings (e.g., infiltration, credential abuse, or backdoor activity), thereby enhancing the ecological validity of the evaluation.
3.9.1. Formal Definition of Class-Exclusion Protocol
3.9.2. Connection to Zero-Day Detection Criterion
4. Results
4.1. Baseline Performance
4.2. Zero-Day Detection Under Class-Exclusion

4.3. Impact of Human Feedback (HRS)
4.4. Ablation Analysis
- Removing CPT increased sensitivity to concept drift, with delayed adaptation to novel traffic patterns and reduced stability after feedback integration. This confirms that continual representation alignment is essential for dynamic environments.
- Removing vector memory limited the system’s ability to retain and reuse previously assimilated attack patterns, resulting in inconsistent responses to recurring zero-day instances and diminished instance-level explainability.
- Removing HRS caused the system to revert to static inference behavior, showing minimal improvement in zero-day handling and a higher incidence of ambiguous alerts.
4.5. Statistical Significance and Temporal Behavior
5. Discussion
6. Conclusions
- Ensemble Approach: combines rule-based (SFT) and ML-based (CPT) detection;
- Zero-day Focus: specialized algorithms for detecting novel attacks;
- Continuous Learning: HRS engine improves the system based on feedback;
- Comprehensive Testing: multiple testing strategies that ensure robustness;
- Detailed Reporting: automated and human-readable reports.
- Human-Aligned Adaptive IDS Architecture, a cognitive intrusion detection framework that integrates continual representation learning, supervised classification, and human feedback into a unified adaptive loop, explicitly designed to handle uncertainty arising from zero-day attacks;
- Vector-Memory-Augmented Detection, a unified vector database that acts as long-term episodic memory, enabling similarity-based reasoning, cross-dataset generalization, and explainable instance-level decisions across heterogeneous intrusion datasets;
- Feedback-Driven Zero-Day Assimilation, a Human-in-the-Loop Reinforcement mechanism that transforms ambiguous or low-confidence detections into structured learning signals, improving precision and reducing false positives without requiring full retraining;
- Learning Velocity as an Evaluation Perspective, an experimental analysis emphasizing adaptation speed, precision after feedback, and operational robustness, rather than relying solely on static zero-day detection rates;
- Deployment-Oriented Design, a modular microservice architecture with persistent model storage, standardized logging, and reproducible workflows, supporting realistic integration into operational security environments.
7. Patents
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| BOT | A bot attack is a type of cyberattack where automated scripts, known as bots, are used to perform malicious activities. |
| CICIDS2017 | Canadian Institute for Cybersecurity Intrusion Detection Systems 2017 |
| CNIDS | Cognitive Network Intrusion Detection Systems |
| CPT | Continual Pre-Training |
| DDoS | Distributed Denial of Service |
| DMZ | Demilitarized Zone |
| HRS | Human-in-the-Loop Reinforcement Signal |
| IDS | Intrusion Detection Systems |
| ML | Machine Learning |
| NSL-KDD | Refined version of the original KDD’99 dataset |
| PPO | Proximal Policy Optimization |
| SFT | Supervised Fine-Tuning |
| UNSW-NB15 | The dataset created by the IXIA PerfectStorm tool in the Cyber Range Lab of the Australian Centre for Cyber Security (ACCS) |
| UML | A standardized modeling language used to specify, visualize, construct, and document the artifacts of software systems. |
| VectorDB | A specialized database designed to store, index and search high-dimensional vector representations of data known as embeddings. Unlike traditional databases that rely on exact matches, vector databases use similarity search techniques such as cosine similarity or Euclidean distance to find items that are semantically or visually similar. |
References
- Saqib, M.; Mehta, D.; Yashu, F.; Malhotra, S. Adaptive Security Policy Management in Cloud Environments Using Reinforcement Learning. arXiv 2025. [Google Scholar] [CrossRef]
- Ali, G.; Shah, S.; ElAffendi, M. Enhancing cybersecurity incident response: AI-driven optimization for strengthened advanced persistent threat detection. Results Eng. 2025, 25, 104078. [Google Scholar] [CrossRef]
- Alhayan, F.; Alshuhail, A.; Ismail, A.; Alrusaini, O.; Alahmari, S.; Yahya, A.E.; Albouq, S.S.; Al Sadig, M. Enhanced anomaly network intrusion detection using an improved snow ablation optimizer with dimensionality reduction and hybrid deep learning model. Sci. Rep. 2025, 15, 13270. [Google Scholar] [CrossRef] [PubMed]
- Roshan, K.; Zafar, A.; Haque, S.B.U. A Novel Deep Learning based Model to Defend Network Intrusion Detection System against Adversarial Attacks. arXiv 2023. [Google Scholar] [CrossRef]
- Ahmed, U.; Nazir, M.; Sarwar, A.; Ali, T.; Aggoune, E.M.; Shahzad, T.; Khan, M.A. Signature-based intrusion detection using machine learning and deep learning approaches empowered with fuzzy clustering. Sci. Rep. 2025, 15, 1726. [Google Scholar] [CrossRef] [PubMed]
- Diana, L.; Dini, P.; Paolini, D. Overview on Intrusion Detection Systems for Computers Networking Security. Computers 2025, 14, 87. [Google Scholar] [CrossRef]
- Maseer, Z.K.; Kadhim, Q.K.; Al-Bander, B.; Yusof, R.; Saif, A. Meta-analysis and systematic review for anomaly network intrusion detection systems: Detection methods, dataset, validation methodology, and challenges. IET Netw. 2024, 13, 339. [Google Scholar] [CrossRef]
- Kheddar, H. Transformers and large language models for efficient intrusion detection systems: A comprehensive survey. Inf. Fusion 2025, 124, 103347. [Google Scholar] [CrossRef]
- Sowmya, T.; Anita, E.A.M. A comprehensive review of AI based intrusion detection system. Meas. Sens. 2023, 28, 100827. [Google Scholar] [CrossRef]
- Vanin, P.; Newe, T.; Dhirani, L.L.; O’Connell, E.; O’Shea, D.; Lee, B.; Rao, M. A Study of Network Intrusion Detection Systems Using Artificial Intelligence/Machine Learning. Appl. Sci. 2022, 12, 11752. [Google Scholar] [CrossRef]
- Corsini, A.; Yang, S.J. Are Existing Out-Of-Distribution Techniques Suitable for Network Intrusion Detection? In In Proceedings of the 2023 IEEE Conference on Communications and Network Security (CNS), Orlando, FL, USA, 2–5 October 2023; pp. 1–9. [Google Scholar] [CrossRef]
- Albasheer, H.; Siraj, M.M.; Mubarakali, A.; Tayfour, O.E.; Salih, S.; Hamdan, M.; Khan, S.; Zainal, A.; Kamarudeen, S. Cyber-Attack Prediction Based on Network Intrusion Detection Systems for Alert Correlation Techniques: A Survey. Sensors 2022, 22, 1494. [Google Scholar] [CrossRef] [PubMed]
- Layman, L.; Roden, W. A Controlled Experiment on the Impact of Intrusion Detection False Alarm Rate on Analyst Performance. Proc. Hum. Factors Ergon. Soc. Annu. Meet. 2023, 67, 220. [Google Scholar] [CrossRef]
- Ghadermazi, J.; Shah, A.; Jajodia, S. A Machine Learning and Optimization Framework for Efficient Alert Management in a Cybersecurity Operations Center. Digit. Threat. Res. Pract. 2024, 5, 19. [Google Scholar] [CrossRef]
- Olateju, O.O.; Okon, S.U.; Igwenagu, U.T.I.; Salami, A.A.; Oladoyinbo, T.O.; Olaniyi, O.O. Combating the Challenges of False Positives in AI-Driven Anomaly Detection Systems and Enhancing Data Security in the Cloud. Asian J. Res. Comput. Sci. 2024, 17, 264. [Google Scholar] [CrossRef]
- Yang, T.; Shen, J.; Su, Y.; Ren, X.; Yang, Y.; Lyu, M.R. Characterizing and Mitigating Anti-patterns of Alerts in Industrial Cloud Systems. In 2022 52nd Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN); IEEE: New York, NY, USA, 2022. [Google Scholar] [CrossRef]
- Zhu, G. Automated False Positive Filtering for esNetwork Alerts. arXiv 2022. [Google Scholar] [CrossRef]
- Wang, Z.; Thing, V.L.L. Feature mining for encrypted malicious traffic detection with deep learning and other machine learning algorithms. Comput. Secur. 2023, 128, 103143. [Google Scholar] [CrossRef]
- Chao, J.; Xie, T. Deep Learning-Based Network Security Threat Detection and Defense. Int. J. Adv. Comput. Sci. Appl. 2024, 15, 64. [Google Scholar] [CrossRef]
- Almahmoud, Z.; Yoo, P.D.; Alhussein, O.; Farhat, I.A.H.; Damiani, E. A holistic and proactive approach to forecasting cyber threats. Sci. Rep. 2023, 13, 8049. [Google Scholar] [CrossRef] [PubMed]
- Magán-Carrión, R.; Urda, D.; Díaz-Cano, I.; Dorronsoro, B. Improving the Reliability of Network Intrusion Detection Systems Through Dataset Integration. IEEE Trans. Emerg. Top. Comput. 2022, 10, 1717. [Google Scholar] [CrossRef]
- Ali, T.; Kostakos, P. HuntGPT: Integrating Machine Learning-Based Anomaly Detection and Explainable AI with Large Language Models (LLMs). arXiv 2023. [Google Scholar] [CrossRef]
- Sayduzzaman, M.; Tamanna, J.T.; Kundu, D.; Rahman, T. Interoperability and Explicable AI-based zero-day Attacks Detection Process in Smart Community. arXiv 2024. [Google Scholar] [CrossRef]
- Zhang, X.; Meng, H.; Li, Q.; Tan, Y.P.; Zhang, L. Large Language Models powered Malicious Traffic Detection: Architecture, Opportunities and Case Study. IEEE Netw. 2025, 39, 51–57. [Google Scholar] [CrossRef]
- Yang, S.; Zheng, X.; Zhang, X.; Xu, J.; Li, J.; Xie, D.; Long, W.; Ngai, E.C.H. Large Language Models for Network Intrusion Detection Systems: Foundations, Implementations, and Future Directions. arXiv 2025. [Google Scholar] [CrossRef]
- Roshanaei, M.; Khan, M.R.; Sylvester, N.N. Enhancing Cybersecurity through AI and ML: Strategies, Challenges, and Future Directions. J. Inf. Secur. 2024, 15, 320. [Google Scholar] [CrossRef]
- Kaur, R.; Klobucar, T.; Gabrijelcic, D. Harnessing the power of language models in cybersecurity: A comprehensive review. Int. J. Inf. Manag. Data Insights 2024, 5, 100315. [Google Scholar] [CrossRef]
- Tian, S.; Zhang, T.; Liu, J.; Wang, J.; Wu, X.; Zhu, X.; Zhang, R.; Zhang, W.; Yuan, Z.; Mao, S.; et al. Exploring the Role of Large Language Models in Cybersecurity: A Systematic Survey. arXiv 2025. [Google Scholar] [CrossRef]
- Jaffal, N.O.; Alkhanafseh, M.; Mohaisen, D. Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniques. arXiv 2025. [Google Scholar] [CrossRef]
- Ferrag, M.A.; Ndhlovu, M.; Tihanyi, N.; Cordeiro, L.C.; Debbah, M.; Lestable, T. Revolutionizing Cyber Threat Detection with Large Language Models. arXiv 2023. [Google Scholar] [CrossRef]
- Xu, H.; Wang, S.; Li, N.; Wang, K.C.; Zhao, Y.; Chen, K.; Yu, T.; Liu, Y.; Wang, H. Large Language Models for Cyber Security: A Systematic Literature Review. arXiv 2024. [Google Scholar] [CrossRef]
- Al-Hammouri, M.F.; Otoum, Y.; Atwa, R.; Nayak, A. Hybrid LLM-Enhanced Intrusion Detection for zero-day Threats in IoT Networks. arXiv 2025. [Google Scholar] [CrossRef]
- Zhang, J.; Bu, H.; Wen, H.; Liu, Y.; Fei, H.; Xi, R.; Li, L.; Yang, Y.; Zhu, H.; Meng, D. When LLMs meet cybersecurity: A systematic literature review. Cybersecurity 2025, 8, 55. [Google Scholar] [CrossRef]
- Mohammed, K. Harnessing the Speed and Accuracy of Machine Learning to Advance Cybersecurity. arXiv 2023. [Google Scholar] [CrossRef]
- Li, X.; Feng, B.; Zang, T.; Xu, X.; Zhao, S.; Ma, J. Facing Unknown: Open-World Encrypted Traffic Classification Based on Contrastive Pre-Training. In In Proceedings of the 2023 IEEE Symposium on Computers and Communications (ISCC), Gammarth, Tunisia, 9–12 July 2023; pp. 1255–1260. [Google Scholar] [CrossRef]
- Lin, C.; Zhang, W.; Zuo, T.; Zha, C.; Jiang, Y.; Meng, R.; Luo, H.; Meng, X.; Zhang, Y. Convolutions are Competitive with Transformers for Encrypted Traffic Classification with Pre-training. arXiv 2025. [Google Scholar] [CrossRef]
- Tulczyjew, L.; Jarrah, K.; Abondo, C.; Bennett, D.; Weill, N. LLMcap: Large Language Model for Unsupervised PCAP Failure Detection. In 2024 IEEE International Conference on Communications Workshops (ICC Workshops); IEEE: New York, NY, USA, 2024; p. 1559. [Google Scholar] [CrossRef]
- Cui, T.; Lin, X.; Li, S.; Chen, M.; Yin, Q.; Li, Q.; Xu, K. TrafficLLM: Enhancing Large Language Models for Network Traffic Analysis with Generic Traffic Representation. arXiv 2025. [Google Scholar] [CrossRef]
- Shi, Z.; Zhao, D.; Zhu, Y.; Xie, G.; Li, Q.; Jiang, Y. Helios: Learning and Adaptation of Matching Rules for Continual In-Network Malicious Traffic Detection. In Proceedings of the ACM on Web Conference 2025; ACM: New York, NY, USA, 2025. [Google Scholar]
- Bayer, M.; Frey, T.; Reuter, C. Multi-level fine-tuning, data augmentation, and few-shot learning for specialized cyber threat intelligence. Comput. Secur. 2023, 134, 103430. [Google Scholar] [CrossRef]
- Karlsen, E.; Luo, X.; Zincir-Heywood, A.N.; Heywood, M.I. Benchmarking Large Language Models for Log Analysis, Security, and Interpretation. J. Netw. Syst. Manag. 2024, 32, 59. [Google Scholar] [CrossRef]
- Sha, Z.; He, X.; Berrang, P.; Humbert, M.; Zhang, Y. Fine-Tuning Is All You Need to Mitigate Backdoor Attacks. arXiv 2022. [Google Scholar] [CrossRef]
- Al-Aamri, A.S.; Abdulghafor, R.; Turaev, S.; Alshaikhli, I.F.T.; Zeki, A.M.; Talib, S. Machine Learning for APT Detection. Sustainability 2023, 15, 13820. [Google Scholar] [CrossRef]
- Zheng, C.; Lu, C.; Li, C.; Zheng, Z.; Pan, L. CyberDualNER: A Dual-Stage Approach for Few-Shot Named Entity Recognition in Cybersecurity. Electronics 2025, 14, 1791. [Google Scholar] [CrossRef]
- Alam, T.; Bhusal, D.; Park, Y.; Rastogi, N. CyNER: A Python Library for Cybersecurity Named Entity Recognition. arXiv 2022. [Google Scholar] [CrossRef]
- Guo, Y.; Fu, J.; Zhang, H.; Zhao, D.; Shen, Y. Efficient Continual Pre-training by Mitigating the Stability Gap. arXiv 2024. [Google Scholar] [CrossRef]
- Zhang, H.; Dong, Y.; Xiao, C.; Oyamada, M. Large Language Models as Data Preprocessors. arXiv 2023. [Google Scholar] [CrossRef]
- Chen, J.; Wang, X.; Gao, A.; Jiang, F.; Chen, S.; Zhang, H.; Song, D.; Xie, W.; Kong, C.; Li, J.; et al. HuatuoGPT-II, One-stage Training for Medical Adaption of LLMs. arXiv 2023. [Google Scholar] [CrossRef]
- Manchanda, J.; Boettcher, L.; Westphalen, M.; Jasser, J. The Open Source Advantage in Large Language Models (LLMs). arXiv 2024. [Google Scholar] [CrossRef]
- Ruan, Y.; Lan, X.; Ma, J.; Dong, Y.; He, K.; Feng, M. Language Modeling on Tabular Data: A Survey of Foundations, Techniques and Evolution. arXiv 2024. [Google Scholar] [CrossRef]
- Bhatt, G.; Ross, J.; Sigal, L. Preventing Catastrophic Forgetting Through Memory Networks in Continuous Detection. In Computer Vision—ECCV 2024; Lecture Notes in Computer Science; Springer Science + Business Media: Cham, Switzerland, 2024; p. 442. [Google Scholar] [CrossRef]
- Li, X.; Tang, B.; Li, H. AdaER: An adaptive experience replay approach for continual lifelong learning. Neurocomputing 2023, 572, 127204. [Google Scholar] [CrossRef]
- Zhang, J.; Fu, Y.; Peng, Z.; Yao, D.; He, K. CORE: Mitigating Catastrophic Forgetting in Continual Learning through Cognitive Replay. arXiv 2024. [Google Scholar] [CrossRef]
- Ke, Z.; Shao, Y.; Lin, H.; Konishi, T.; Kim, G.; Liu, B. Continual Pre-training of Language Models. arXiv 2023. [Google Scholar] [CrossRef]
- Yildiz, Ç.; Ravichandran, N.K.; Sharma, N.; Bethge, M.; Ermis, B. Investigating Continual Pretraining in Large Language Models: Insights and Implications. arXiv 2024. [Google Scholar] [CrossRef]
- Weyssow, M.; Zhou, X.; Kim, K.; Lo, D.; Sahraoui, H. Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Models. arXiv 2023. [Google Scholar] [CrossRef]
- Gu, J.; Yang, Z.; Ding, C.; Zhao, R.; Tan, F. CMR Scaling Law: Predicting Critical Mixture Ratios for Continual Pre-training of Language Models. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing; ACL: Stroudsburg, PA, USA, 2024; p. 16143. [Google Scholar] [CrossRef]
- Wang, X.; Tissue, H.; Wang, L.; Li, L.; Zeng, D.D. Learning Dynamics in Continual Pre-Training for Large Language Models. arXiv 2025. [Google Scholar] [CrossRef]
- Gupta, S.; Nandwani, Y.; Yehudai, A.; Khandelwal, D.; Raghu, D.; Joshi, S. Selective Self-to-Supervised Fine-Tuning for Generalization in Large Language Models. In Findings of the Association for Computational Linguistics: NAACL 2025; ACL: Stroudsburg, PA, USA, 2025; p. 6240. [Google Scholar] [CrossRef]
- Xie, S.; Chen, H.; Yu, F.; Sun, Z.; Wu, X. Minor SFT loss for LLM fine-tune to increase performance and reduce model deviation. arXiv 2024. [Google Scholar] [CrossRef]
- Kim, G.; Thakur, S.S.; Park, S.M.; Wei, W.; Bao, Y. SFT-GO: Supervised Fine-Tuning with Group Optimization for Large Language Models. arXiv 2025. [Google Scholar] [CrossRef]
- Dong, A.; Li, P.; Chen, Y.; Gibson, S.; Zhao, L.; He, M. Human–AI Collaboration Across Decision Support, Autonomous Systems, and LLM Agents: A Systematic Review and Collaboration Convergence Framework. Sustainability 2026, 18, 5313. [Google Scholar] [CrossRef]
- Taheri, A.; Taban, A.; Ye, S.; Mirzaei, A.; Liu, T.; Han, B. Forgetting: A New Mechanism Towards Better Large Language Model Fine-tuning. arXiv 2025. [Google Scholar] [CrossRef]
- Luo, J.; Luo, X.; Ding, K.; Yuan, J.; Xiao, Z.; Zhang, M. RobustFT: Robust Supervised Fine-tuning for Large Language Models under Noisy Response. arXiv 2024. [Google Scholar] [CrossRef]
- Bhatt, G.; Chen, Y.; Das, A.; Zhang, J.; Truong, S.; Mussmann, S.; Zhu, Y.; Bilmes, J.; Du, S.S.; Jamieson, K.; et al. An Experimental Design Framework for Label-Efficient Supervised Fine-tuning of Large Language Models. arXiv 2024. [Google Scholar] [CrossRef]
- Lambert, N. Reinforcement Learning from Human Feedback. arXiv 2025. [Google Scholar] [CrossRef]
- Entezami, E.; Naseh, A. LLM Misalignment via Adversarial RLHF Platforms. arXiv 2025. [Google Scholar] [CrossRef]
- Kaufmann, T.; Weng, P.; Bengs, V.; Hüllermeier, E. A Survey of Reinforcement Learning from Human Feedback. arXiv 2023. [Google Scholar] [CrossRef]
- Wang, S.; Zhang, Z.J.; Zhao, R.; Tan, F.; Nguyen, C.T. Reward Difference Optimization for Sample Reweighting in Offline RLHF. arXiv 2024. [Google Scholar] [CrossRef]
- Liu, W.; Wang, X.; Wu, M.; Li, T.; Lv, C.; Ling, Z.; Zhu, J.; Zhang, C.; Zheng, X.; Huang, X. Aligning Large Language Models with Human Preferences through Representation Engineering. arXiv 2023. [Google Scholar] [CrossRef]
- Hu, J.; Liu, J.K.; Xu, H.; Shen, W. REINFORCE++: Stabilizing Critic-Free Policy Optimization with Global Advantage Normalization. arXiv 2025. [Google Scholar] [CrossRef]
- Iovane, G.; Iovane, G. Co-Creation by Human–AI Sophimatics Framework and Applications. Algorithms 2026, 19, 175. [Google Scholar] [CrossRef]
- Dam, H.; Knochelmann, J.; Joseph, V.; Gopalakrishnan, G. Derailing Non-Answers via Logit Suppression at Output Subspace Boundaries in RLHF-Aligned Language Models. arXiv 2025. [Google Scholar] [CrossRef]
- Dehghan, M.; Sadeghiyan, B.; Khosravian, E.; Moghaddam, A.S.; Nooshi, F. ProAPT: Projection of APT Threats with Deep Reinforcement Learning. arXiv 2022. [Google Scholar] [CrossRef]
- Aref, Z.; Wei, S.; Mandayam, N.B. Human-AI Collaboration in Cloud Security: Cognitive Hierarchy-Driven Deep Reinforcement Learning. arXiv 2025. [Google Scholar] [CrossRef]
- Sewak, M.; Sahay, S.K.; Rathore, H. Deep Reinforcement Learning for Cybersecurity Threat Detection and Protection: A Review. In Secure Knowledge Management in the Artificial Intelligence Era; Communications in Computer and Information Science; Springer: Cham, Switzerland, 2022; pp. 51–72. [Google Scholar] [CrossRef]
- Jalalvand, F.; Chhetri, M.B.; Nepal, S.; Paris, C. Adaptive alert prioritisation in security operations centres via learning to defer with human feedback. arXiv 2025. [Google Scholar] [CrossRef]
- Tellache, A.; Korba, A.A.; Mokhtari, A.; Moldovan, H.; Ghamri-Doudane, Y. Advancing Autonomous Incident Response: Leveraging LLMs and Cyber Threat Intelligence. arXiv 2025. [Google Scholar] [CrossRef]
- Castro, P.; Santos, F.; Lopes, P. Comparative Analysis of Supervised and Unsupervised Learning for Intrusion Detection in Network Logs. Computation 2026, 14, 92. [Google Scholar] [CrossRef]
- Chittepu, Y.; Metevier, B.; Schwarzer, W.; Hoag, A.; Niekum, S.; Thomas, P.S. Reinforcement Learning from Human Feedback with High-Confidence Safety Constraints. arXiv 2025. [Google Scholar] [CrossRef]







| Technique | Goal | Data Type Optimization |
|---|---|---|
| CPT | Domain adaptation | Unlabeled domain-specific text Continued pre-training |
| SFT | Task-specific tuning | Labeled input–output pairs Supervised learning |
| HRS | Human-aligned behavior | Human preference markings Human Reinforcement Feedback |
| Dataset Withheld Attack Classes | Samples Removed | Removed Dominant Training Classes | Selection Rationale |
|---|---|---|---|
| NSL-KDD: U2R (e.g., buffer_overflow, rootkit), R2L (e.g., guess_passwd, imap) | ~1100 | DoS, Probe | Privilege-escalation and credential attacks are semantically distinct from volumetric attacks and are low-frequency, making them suitable proxies for rare zero-day behavior. |
| UNSW-NB15: Analysis, Backdoor | ~2000 | Generic, Exploits, DoS | These classes represent stealthy and persistent attack patterns with lower frequency and different behavioral signatures compared to high-volume attacks. |
| CICIDS2017: Infiltration and Web Attack | ~3500 | DDoS, DoS, PortScan, Botnet | Multi-stage and application-layer attacks differ structurally from traffic-based attacks and reflect realistic emerging threats. |
| Metric | Known Attack Detection |
|---|---|
| Accuracy/F1 Score | 92.4% (±1.2%) |
| Precision | 89.7% (±1.5%) |
| Recall/Detection Rate (DR) | 94.1% (±0.9%) |
| False-Positive Rate (FPR) | 8.2% (±1.4%) |
| F1-Score | 91.8% (±1.1%) |
| Configuration | ZDR (%) | Precision (%) | FPR (%) |
|---|---|---|---|
| SFT only (supervised) | 0.0 | — | — |
| CNIDS without HRS | 10.1 | 40.8 | 2.6 |
| CNIDS with HRS (5 min feedback) | 18.2 | 82.9 | 2.6 |
| Model | Known Attack Accuracy (%) | Zero-Day Detection Rate (%) | FPR (%) |
|---|---|---|---|
| Random Forest | 89.2 | 2.3 | 11.8 |
| CNN (1D) | 91.5 | 4.1 | 9.2 |
| LSTM (Standalone) | 92.8 | 6.7 | 8.5 |
| Transformer (Small) | 93.1 | 7.2 | 7.9 |
| CNIDS (ours) | 94.2 | 18.2 | 2.6 |
| Configuration | CPT | Vector Memory | HRS | Expected Impact on Zero-Day Detection | Expected Impact on Precision | Operational Interpretation |
|---|---|---|---|---|---|---|
| Full CNIDS | ✓ | ✓ | ✓ | Moderate improvement over time | High (≥80%) | Adaptive system with rapid learning |
| No Human Feedback | ✓ | ✓ | ✗ | Near-zero detection of unseen attacks | Moderate | Static anomaly scoring, no adaptation |
| No Vector Memory | ✓ | ✗ | ✓ | Limited novelty generalization | Moderate–Low | Feedback lacks memory persistence |
| No CPT | ✗ | ✓ | ✓ | Slower adaptation, higher drift | Moderate | Memory present but representations stale |
| SFT Only (Baseline) | ✗ | ✗ | ✗ | 0% (by design) | High (for known attacks) | Conventional supervised IDS |
| Phase | Task | Tooling |
|---|---|---|
| Data Prep | Normalize CICIDS/UNSW/Real Logs datasets | Pandas, Scikit-learn |
| Modeling | Train ML classifiers | HuggingFace Transformers, Python Sklearn (SVM, neural network, random forest, gradient boosting), Python Keras LSTM |
| Evaluation | Benchmark metrics | MLFlow, Weights and Biases |
| Deployment | Containerize and monitor | Docker, Prometheus or Log Management |
| Pitfall | Issue | Impact Fix |
|---|---|---|
| Blind Spots in Network Visibility | IDS sensors are not placed at strategic choke points (e.g., inside/outside firewalls, DMZ). | Missed lateral movements or internal threats. Port mirroring, SPAN, or network taps are used to ensure complete traffic visibility. |
| Alert Fatigue and Neglected Monitoring | Although IDS generates alerts, these are not actively reviewed or triaged. | Critical threats go unnoticed, and IDSs become post-incident forensic tools. Integrate with SIEMs and automate alert prioritization using ML or HRS. |
| Overreliance on Signature-Based Detection | Static signatures fail to detect zero-day or polymorphic attacks. | Sophisticated threats can bypass detection. Combine signature-based anomaly detection and ML-based semantic analysis. |
| Poor Baseline Modeling | Inadequate profiling of “normal” traffic leads to a high number of false positives. | This wastes time for analysts and erodes trust in the system. Unsupervised learning or CPT can be used to adapt the baselines. |
| Generic Rule Sets in Specialized Environments | Applying IT-centric rules to OT or IoT networks. | Misses protocol-specific threats (e.g., Modbus, DNP3). Tailor rules to the environment and collaborate with domain experts. |
| Lack of Feedback Loop | IDS do not evolve based on analyst input or a changing threat landscape. | Static performance and increasing irrelevance. Implement HRS or active learning to refine detection and alert over time. |
| Resource Overload | An IDS consumes excessive CPU/memory, especially with deep packet inspection. | Network latency or dropped packets are also considered. Offload preprocessing to edge devices or use scalable cloud-native architectures. |
| Pitfall | Simulation Strategy | Mitigation Benchmark |
|---|---|---|
| Alert Fatigue | Inject excessive false positives | HRS-based alert ranking, analyst feedback loop |
| Blind Spots | Remove traffic from internal segments | Multi-sensor fusion, ML-based log correlation |
| Signature Overreliance | Use only static rules (Snort-like) | Hybrid detection: anomaly + ML semantic matching |
| Poor Baseline Modeling | Randomize benign traffic profiles | CPT on unlabeled traffic to adapt baseline |
| Resource Overload | Simulate high-throughput traffic | Benchmark latency with edge preprocessing |
| Semantic Drift in ML | Use outdated log formats | CPT with recent traffic logs, continual learning |
| Model Type | Use Case | Tooling |
|---|---|---|
| Random Forest, Gradient Boosting, SVM, ANN, LSTM, CNN | Fast baseline detection that is undetected with a supervised trained dataset | Scikit-learn, TensorFlow (in cpt_engine.py) |
| Supervised Dataset | Anomaly or normal detection (NSL_KDD style) | Sqlite3, Python Pickle (in sft_engine.py) |
| zero-day Detection | Semantic log analysis | Feedback Pattern (in hrs_engine.py) |
| Configuration | Protocol Effect | Result |
|---|---|---|
| Full CNIDS | Handles distributional shift | Adaptive zero-day detection |
| Without CPT | Poor feature alignment | Drift sensitivity |
| Without VectorDB | No similar reference | Boundary collapse |
| Without HRS | No learning from zero-day | Static performance |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Gunawan, J.A.; Singgih, M.L.; Ginardi, R.V.H. Cognitive Network Intrusion Detection Systems: Anomaly and Malware Detection for Zero-Day Attack Resilience. Network 2026, 6, 41. https://doi.org/10.3390/network6020041
Gunawan JA, Singgih ML, Ginardi RVH. Cognitive Network Intrusion Detection Systems: Anomaly and Malware Detection for Zero-Day Attack Resilience. Network. 2026; 6(2):41. https://doi.org/10.3390/network6020041
Chicago/Turabian StyleGunawan, Jimmy Agung, Moses Laksono Singgih, and Raden Venantius Hari Ginardi. 2026. "Cognitive Network Intrusion Detection Systems: Anomaly and Malware Detection for Zero-Day Attack Resilience" Network 6, no. 2: 41. https://doi.org/10.3390/network6020041
APA StyleGunawan, J. A., Singgih, M. L., & Ginardi, R. V. H. (2026). Cognitive Network Intrusion Detection Systems: Anomaly and Malware Detection for Zero-Day Attack Resilience. Network, 6(2), 41. https://doi.org/10.3390/network6020041

