DualGuard: An Adaptive Detection Framework for Concurrent Malicious and Normality Drifts in Network Traffic
Abstract
Machine learning-based malware detection systems face a critical challenge from concept drift in dynamic environments where network traffic patterns constantly evolve. While existing research predominantly focuses on isolated drift types, real-world deployments must contend with a dual-drift scenario: the simultaneous evolution of both malicious mutational drift (MMD) from new malware families and normality drift (ND) from changing normal network traffic. Through a comprehensive decade-long empirical analysis, we reveal that spatial ND degrades detection performance more severely than temporal ND, and that multi-class classification and binary anomaly detection paradigms exhibit distinct vulnerabilities to these drifts. We introduce DualGuard, the first framework to explicitly disentangle and jointly adapt to MMD and spatial ND within a unified, sample-level gating pipeline, instantiated through scenario-specific workflows. At its core is a unified drift detection engine, powered by Hierarchical Contrastive Learning and robust Median Absolute Deviation (MAD)-based statistics, that provides explicit, sample-level gating for MMD and ND signals. A value-aware adaptation mechanism, powered by fine-grained clustering to identify novel threat structures, minimizes expert labeling requirements by $200\times $ . Extensive experiments validate its effectiveness across challenging dual-drift scenarios: for classification, it boosts F1 scores by up to 33.74%; for anomaly detection, it improves F1 scores by 21.64% while slashing false positives by 42.78%. An evaluation on real-world ISP traffic further demonstrated DualGuard’s practical value: it achieved a 96.87% F1 score and outperformed the best adaptive baseline by 8.73%.