Q-ID: A Reinforcement Learning Framework for Adaptive Intrusion Detection

Maisha Maliha, Mohammed Atiquzzaman · Annals of Computer Science and Information Systems · 2025

The growing sophistication and frequency of cyber threats in communication networks demand Intrusion Detection Systems (IDS) that adapt to evolving attack patterns.Traditional approaches, based on static rules or purely supervised models, often fail to recognize novel attacks, leaving critical infrastructures exposed.Reinforcement Learning (RL) provides a dynamic alternative by enabling agents to refine detection policies through continuous feedback.In this work, we propose a Qlearning-based Intrusion Detection (Q-ID) system and train it on the CICIDS2017 dataset.The RL formulation defines the state as the flow's feature vector, the action as the classification decision, and the reward as +1 for correct predictions and -1 otherwise.To ensure stable convergence, the reward is integrated with cross-entropy loss in a hybrid objective, allowing continued improvement even after the supervised component has plateaued.Unlike prior IDS methods that rely solely on offline supervised training, our approach fuses reinforcement feedback with supervised optimization to support adaptive and robust detection.Experimental results, conducted under class imbalance and realistic evaluation splits, show that the proposed system achieves 99.3% accuracy, outperforming strong baselines including deep neural networks and traditional classifiers.Moreover, the RL agent demonstrates robustness under skewed traffic distributions and adaptability to previously unseen attack types.These results highlight reinforcement learning as a promising paradigm for building resilient IDS in critical communication environments.

Read the paper · More papers on PaperTik