1. INTRODUCTION
recognizing unknown threats, adapting to changing network conditions, and responding dynamically [2, 3].
Over the last few years, cyberattacks of greater sophistication have made longstanding methods of network security inadequate. The growing interconnectivity of digital systems has enabled cybercriminals to develop advanced strategies that bypass conventional defences [1]. Enterprises, individuals, and platform-as-a-service providers increasingly regard network security as a critical issue because attacks such as Distributed Denial of Service (DDoS), data exfiltration, and malware infection occur with greater frequency and impact. Traditional intrusion detection systems (IDS) based on static rules and signature-based methods are increasingly ineffective at detecting modern adaptive attack techniques. Consequently, demand has arisen for intelligent security systems capable of
Machine learning (ML) has substantially increased the capability of cybersecurity systems to detect cyber threats. ML models can analyze historical and real-time network traffic data to identify patterns and anomalies associated with malicious activities [4, 5, 6]. These models can learn and relearn continuously with limited human intervention. However, existing ML-based systems still face challenges such as high false-positive rates, delayed detection time, and limited flexibility under unforeseen threat conditions, indicating the need for improved modern cybersecurity solutions [7, 8].
In this paper, we propose an adaptive machine-learning-based real-time cyber threat detection framework. The system integrates supervised and unsupervised learning, continuously refines its detection process, and identifies future attack patterns with low latency. In contrast to traditional IDS methods based on static signatures, the proposed system evolves dynamically by analyzing features extracted from network traffic, including packet size, flow duration, source and destination IP addresses, and transmission protocols. This adaptability allows the system to deploy rules online and detect anomalies in real time without manual intervention or frequent rule updates.
The goal of this research is to create a robust system capable of detecting potential cyber threats while adapting to emerging network attacks. The proposed solution combines state-of-the-art machine learning and real-time network traffic analysis to provide a scalable and efficient approach to modern cybersecurity challenges. Experimental results show that the proposed system provides better detection accuracy, lower false-positive rates, and faster response times than stateof-the-art IDS solutions.
The remainder of this paper is organized as follows: Section 2 reviews existing work in network traffic analysis and machinelearning-based cyber threat detection. Section 3 describes the proposed methodology, architecture, and system design. Section 4 discusses the experimental results. Section 5 concludes the paper, and Section 6 outlines future research directions.
2. RELATED WORK
With the increasing complexity and sophistication of cyber threats, advanced detection methods using adaptive ML models are required [9, 10]. Traditional static IDS approaches are ineffective against dynamic cyber threats. Aminu et al. [11] suggested a real-time threat-intelligence-integrated adaptive defence mechanism for improving detection capacity against cyber threats. Ofoegbu et al. [12] proposed a comprehensive approach for real-time cybersecurity threat detection by integrating ML and big data analytics, emphasizing ensemble learning models. Villegas-Ch et al. [13] compared deep-learning-based IDS models for detecting complex network attacks and showed the effectiveness of convolutional neural networks in malicious traffic classification.
Paramesh et al. [14] formulated an adaptive security framework for dynamic threat detection in cloud-network scenarios, combining behavioural analytics with ML to improve anomaly detection in distributed systems. Fenjan et al. [15] proposed deep learning for adaptive intrusion detection systems and showed that recurrent neural networks and long short-term memory models capture sequential attack patterns effectively. Gonaygunta et al. [16] explored adaptive ML methods for cybersecurity, focusing on hybrid supervised and unsupervised models for real-time anomaly detection.
Ajala et al. [17] reviewed AI and ML applications for predicting and combating cyberattacks, including deep-learning architectures for proactive threat detection. Rajathi et al. [18] introduced a reinforcement-learning-based autoencoder for adaptive intrusion detection in cyber-physical systems, showing automatic adaptation to novel attack vectors. PM and Soumya [19] discussed AI- and ML-based anomaly detection in network traffic, emphasizing unsupervised learning for hidden threats. Rao et al. [20] used a hybrid CNN–GAN model for anomaly detection in network traffic and reported reduced false-positive rates compared with existing ML-based methods.
Changala et al. [21] investigated GANs for anomaly detection in network traffic and found improved detection accuracy against adversarial attacks. Rookard and Khojandi [22] contrasted supervised and unsupervised ML techniques for anomaly detection in traditional and software-defined networking environments. Talaei Khoei and Kaabouch [23] compared supervised and unsupervised models for intrusion detection and emphasized the strength of unsupervised learning for zero-day attacks. Mvula et al. [24] surveyed semi-supervised learning applications in cybersecurity, showing how limited labelled data can be combined with large unlabelled traffic logs. These studies demonstrate that hybrid adaptive learning remains one of the most promising directions for robust real-time cyber threat detection.
3. METHODOLOGY
The proposed system is designed to identify malicious traffic in real time by combining network traffic monitoring, feature extraction, supervised learning, unsupervised anomaly detection, adaptive model updating, and threat-response mechanisms. The workflow begins with live traffic collection and ends with actionable alerts and mitigation responses.
3.1 Network Traffic Collection
Network packets and flow-level records are collected continuously from routers, firewalls, and monitoring points. The collected traffic includes benign and malicious samples and is converted into a structured format suitable for machine learning. This stage ensures that the model receives timely information about packet behaviour, communication frequency, protocol use, and host interaction patterns.
3.2 Feature Extraction
Feature extraction is central to the accuracy of the threat detection system. Key features include packet size, flow duration, source and destination IP addresses, protocol type, number of packets offered and received, packet transmission rates, inter-arrival times, and variations in communication patterns. These statistical and temporal features allow the system to detect disturbances such as DDoS attacks or malware infections without relying exclusively on prior knowledge of attack signatures.
3.3 Model Selection and Training
The system core is a machine-learning model for detecting and classifying anomalous network traffic. Supervised learning models recognize known threats using labelled datasets, while unsupervised learning models identify novel or previously unknown attacks by detecting patterns that differ from normal behaviour. Techniques such as K-means clustering support anomaly discovery without labels. By integrating supervised and unsupervised models, the system forms a hybrid structure capable of detecting both known and emerging threats.
3.4 Model Evaluation and Performance Metrics
After training, models are evaluated using accuracy, precision, recall, and F1-score. Each metric indicates how well the system classifies threats while minimizing false positives and false negatives. Detection latency is also measured because low response time is essential in real-time security monitoring.
3.5 Adaptive Learning and Model Updates
One of the most innovative aspects of the proposed system is its adaptivity to new threats over time. Unlike static machinelearning models that require periodic manual updates, the system employs adaptive learning. As new network data becomes available, the model is retrained with the latest attack patterns. Emerging anomalies can be identified and classified as novel threats, ensuring that the system remains current and responsive to evolving attacks.
3.6 Real-Time Implementation and Deployment
The trained models are integrated with real-time network environments for continuous monitoring and threat detection. The system works with existing network monitoring tools such as IDS platforms and firewalls to classify incoming traffic as benign or malicious. Figure 1 shows the overall architecture of the proposed system.
3.8 Threat Response and Mitigation
When the system detects a possible cyber threat, it generates actionable alerts for investigation and mitigation. It can operate within existing security infrastructures, including firewalls and automated response systems, to quarantine infected devices, block suspicious IP addresses, or apply other defensive actions. A user interface supports real-time threat monitoring and manual intervention where necessary, keeping humans in the loop and improving flexibility across cybersecurity scenarios.
4. RESULTS AND DISCUSSION
This section presents the results of the proposed adaptivemachine-learning-based system for real-time cyber threat detection. The evaluation considers accuracy, precision, recall, F1-score, and detection latency.
4.1 Evaluation Metrics
The following metrics were used to evaluate system effectiveness:
- Accuracy: percentage of correctly classified benign and malicious instances.
- Precision: ratio of true positives to all traffic classified as malicious.
- Recall: ratio of correctly identified malicious traffic to all actual malicious instances.
- F1-score: harmonic mean of precision and recall, providing a balanced detection measure.
- Detection latency: time required to identify and classify a threat after it enters the network.
4.2 Performance Results
3.7 Optimization and False-Positive Reduction
A key challenge for any intrusion detection system is reducing false positives. The proposed system uses advanced filtering techniques and dynamic thresholds that adjust system sensitivity according to the network environment. Model optimization methods, including hyperparameter tuning, pruning, and ensemble techniques, are applied to achieve high performance while maintaining computational efficiency. The system is continuously monitored for reliability and responsiveness under different network environments.
4.3 Detection of Novel Threats
An important contribution of the proposed system is its ability to identify novel, previously unseen threats using unsupervised learning techniques. The system correctly detected a
new DDoS attack and achieved a recall rate of 91.5% and precision of 89.2%, despite the absence of this attack in the training data. This capability gives a critical advantage over traditional IDS, which rely on predictable attack signatures and cannot reliably discern unknown threats.
4.4 Real-Time Performance
Detection latency was measured to evaluate real-time performance. The latency of the proposed system is approximately 120 milliseconds, much faster than the 500 milliseconds observed in typical IDS methods. This shortened latency supports rapid threat detection and response, minimizing exposure to cyberattacks.
4.5 False Positives and Optimization
Intrusion detection systems still suffer from large numbers of false positives that can clutter security-team reporting systems and generate unnecessary alerts. The proposed system addresses this problem using advanced filtering and dynamic thresholding techniques to minimize false positives while maintaining detection accuracy. A comparison of falsepositive rates over a 24-hour monitoring period demonstrates the effectiveness of this approach.
4.6 Output
Figure 4 shows the real-time detection output of the proposed system.
4.7 Discussion
The experimental results confirm that the proposed scheme significantly improves accuracy, adaptability, and real-time performance compared with conventional IDS. Unsupervised learning enables robust detection of novel attacks without frequent manual updates. The system balances detection accuracy and computational efficiency, although deep-learning models and high traffic volume can increase complexity. Further optimization techniques, including hyperparameter tuning, model pruning, and lightweight architectures, can improve scalability and responsiveness. Although the system detects various cyber threats effectively, additional research is needed to strengthen robustness in large-scale dynamic network environments.
5. CONCLUSION
An adaptive-machine-learning-based system for enhanced real-time cyber threat detection through network traffic analysis constitutes a substantial step toward addressing current cybersecurity challenges. The proposed system uses both supervised and unsupervised learning techniques to overcome key limitations of traditional IDS methods, including high false-positive rates, detection delays, and limited ability to adapt to changing threats. Experimental results show that the system detects both known and novel threats more efficiently than traditional methods while achieving higher accuracy, lower detection latency, and increased precision and recall.
The adaptive learning approach enables the system to change behaviour as attack patterns emerge, eliminating the need for frequent manual updates and keeping the system relevant in changing network environments. By integrating critical network traffic attributes and detecting threats in real time with minimal latency, the system provides a robust and efficient tool for modern cybersecurity. The proposed framework also provides a solid foundation for next-generation network security, although further enhancements are needed for scalability and refined detection features.
6. FUTURE SCOPE
Future work will improve scalability, adaptability, and interpretability to meet the challenges of increasingly complex cyber environments. Advanced deep-learning models, including convolutional neural networks and long short-term memory networks, can be incorporated to enhance detection of subtle attack patterns and anomalies. Scaling the system for high-throughput networks such as cloud computing and IoT ecosystems requires robust performance under increasing network demand. Transfer learning and federated learning can also allow the system to learn from decentralized data without frequent centralized retraining. Real-time threat intelligence feeds and explainable AI techniques can further refine the system and increase transparency, helping security analysts understand model decisions. Collectively, these advancements seek to provide a more scalable, flexible, and trustworthy cybersecurity framework that both detects and adapts to emerging threats.