Abstract
Com o aumento do armazenamento de dados empresariais no ambiente digital, cibercriminosos são atraídos e podem causar sérios prejuízos. Nesse contexto, Sistemas de Detecção de Intrusão são ferramentas utilizadas para detecção de ataques cibernéticos. Atualmente, esses sistemas têm empregado modelos tradicionais de aprendizado de máquina. No entanto, tais modelos exigem retreinamento periódico com toda base de dados, permitindo a detecção de novas técnicas de intrusão. Neste trabalho, propõe-se o uso de aprendizagem incremental para incluir o conhecimento de novos padrões de ataque sem a necessidade de retreinar o modelo do início e não sofrer com o esquecimento catastrófico. Para este fim, foi desenvolvida uma metodologia de aprendizagem incremental, do tratamento dos dados à construção e avaliação dos modelos finais. Os resultados experimentais demonstram que o modelo construído aprendeu novos ataques sem esquecer o que já havia aprendido. As métricas finais obtidas de precisão, revocação e F1-score foram acima de 87% e uma acurácia de 98,89% foi alcançada.
Introduction
In the rapidly evolving landscape of cybersecurity, Network Intrusion Detection Systems (NIDS) serve as a critical line of defense. However, the static nature of traditional Machine Learning (ML) models presents a significant bottleneck. As attackers develop new techniques, these models must be updated. The conventional approach involves retraining the model from scratch using the entire historical dataset combined with new data—a process that is both computationally expensive and time-consuming.
Simply "fine-tuning" a standard model on new data often leads to catastrophic forgetting, where the model loses its ability to recognize previously learned threats while mastering new ones. This paper proposes an incremental learning framework designed to learn continuously from data streams, maintaining high performance across all known attack types without the need for full retraining.
Proposed Methodology
The researchers developed a comprehensive pipeline for incremental learning, spanning from raw data ingestion to final model analysis.
As illustrated in the methodology diagram, the process is divided into several key stages:
- Data Pre-processing: This stage involves rigorous cleaning, including outlier removal and feature selection (renaming and removing columns). A critical step here is the union of similar classes and data balancing through random undersampling of the majority "Benign" class to prevent the model from being biased toward normal traffic.
- Train/Test Split: The data is partitioned to ensure robust evaluation.
- Incremental Model Creation and Training: Utilizing the River library, the system builds a model that evolves through successive phases. Each phase introduces new data, simulating the real-world arrival of novel cyber threats.
- Analysis: The final model is evaluated on its ability to detect both new and old attack patterns.
Experimental Setup and Datasets
The study utilized the CIC-IDS2017 dataset, a comprehensive collection of network traffic containing over 2.8 million records and 80 features. To simulate a streaming environment, the researchers organized the data into three distinct incremental phases.
As shown in the table above:
- Phase 1 focuses on FTP, DDoS, and PortScan attacks.
- Phase 2 introduces Benign traffic, DoS, and SSH attacks.
- Phase 3 adds Botnet and Web Attacks (Brute Force and XSS).
This phased approach allows for a clear measurement of how well the model retains knowledge from Phase 1 while learning the specifics of Phase 3.
Key Insights and Results
The core of the experimentation compared stream-native algorithms—Adaptive Random Forest (ARF) and Hoeffding Adaptive Tree (HAT)—against a batch-native benchmark, Gaussian Naive Bayes (GNB).
The "Zero-Performance" Trap
The benchmark GNB model clearly demonstrated the danger of catastrophic forgetting. By the time the training reached Phase 3, its ability to detect Phase 1 attacks like FTP dropped to zero. In contrast, the ARF model maintained consistent performance across all phases, proving its effectiveness for long-term deployment in dynamic environments.
Performance Metrics
The Adaptive Random Forest (ARF) emerged as the superior algorithm:
- Accuracy: Achieved a remarkable 98.89% on balanced data.
- Robustness: Maintained F1-scores, Precision, and Recall averages above 87%.
- Statistical Validation: Using the Autorank package, the authors confirmed that ARF's performance was statistically superior to both HAT and GNB.
The success of the ARF model is attributed to its design for data streams, allowing it to update its internal structure as new samples arrive without discarding previously learned weights.
Conclusion and Future Work
This research demonstrates that incremental learning is a viable and efficient solution for modern NIDS. By utilizing specialized libraries like River and stream-optimized algorithms like ARF, organizations can maintain up-to-date defenses without the overhead of constant full-scale retraining.
Future work will explore the integration of Incremental Deep Learning to capture even more complex network patterns and the application of automated hyperparameter optimization to further refine detection accuracy. Expanding the evaluation to more diverse datasets will also be a priority to ensure the framework's generalizability across different network architectures.
Summary updated