Saved in:
Bibliographic Details
Main Authors: Wang, Tongze, Xie, Xiaohui, Wang, Wenduo, Wang, Chuyi, Cui, Yong
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2605.17575
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914575669002240
author Wang, Tongze
Xie, Xiaohui
Wang, Wenduo
Wang, Chuyi
Cui, Yong
author_facet Wang, Tongze
Xie, Xiaohui
Wang, Wenduo
Wang, Chuyi
Cui, Yong
contents Network traffic classification (NTC) models often suffer severe performance degradation when deployed in real-world environments due to distribution shifts caused by changing network conditions. Existing robustness-enhancing approaches are commonly coupled to specific model architectures or data settings, fail to generalize to state-of-the-art raw-byte-based NTC models, or incur significant training overhead. In this paper, we propose UniAlign, a novel model-agnostic framework that improves the robustness of deep learning-based NTC models under distribution shifts. UniAlign combines \emph{domain alignment fine-tuning}, which encourages the learning of domain-invariant traffic representations across heterogeneous network conditions, with \emph{stable model ensembling}, which enhances inference robustness by aggregating checkpoints within a flat loss region. The framework can be seamlessly integrated into existing supervised NTC models without requiring specific feature modalities or introducing non-constant additional training costs. We evaluate UniAlign on three public datasets covering diverse distribution shifts, including encryption schemes, data collection devices, and attack behaviors. Experimental results on two representative NTC models demonstrate that, compared with standard training, UniAlign improves average classification accuracy by 2.51\% and average F1 score by 2.71\%, outperforming the strongest baseline by 1.45\% in accuracy and 1.69\% in F1 score, while requiring only 12.4\%--53.9\% of the training time of all NTC-specific baselines.
format Preprint
id arxiv_https___arxiv_org_abs_2605_17575
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle UniAlign: A Model-Agnostic Framework for Robust Network Traffic Classification under Distribution Shifts
Wang, Tongze
Xie, Xiaohui
Wang, Wenduo
Wang, Chuyi
Cui, Yong
Machine Learning
Artificial Intelligence
Network traffic classification (NTC) models often suffer severe performance degradation when deployed in real-world environments due to distribution shifts caused by changing network conditions. Existing robustness-enhancing approaches are commonly coupled to specific model architectures or data settings, fail to generalize to state-of-the-art raw-byte-based NTC models, or incur significant training overhead. In this paper, we propose UniAlign, a novel model-agnostic framework that improves the robustness of deep learning-based NTC models under distribution shifts. UniAlign combines \emph{domain alignment fine-tuning}, which encourages the learning of domain-invariant traffic representations across heterogeneous network conditions, with \emph{stable model ensembling}, which enhances inference robustness by aggregating checkpoints within a flat loss region. The framework can be seamlessly integrated into existing supervised NTC models without requiring specific feature modalities or introducing non-constant additional training costs. We evaluate UniAlign on three public datasets covering diverse distribution shifts, including encryption schemes, data collection devices, and attack behaviors. Experimental results on two representative NTC models demonstrate that, compared with standard training, UniAlign improves average classification accuracy by 2.51\% and average F1 score by 2.71\%, outperforming the strongest baseline by 1.45\% in accuracy and 1.69\% in F1 score, while requiring only 12.4\%--53.9\% of the training time of all NTC-specific baselines.
title UniAlign: A Model-Agnostic Framework for Robust Network Traffic Classification under Distribution Shifts
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2605.17575