arXiv:2611.07550cs.NINov 2026

Manuscript Offprint

arXiv:2611.07550

SEROA: Stable Encrypted-Traffic Representation and Online Adaptation for Service-Aware Networks

Zongxi Liu, Shuai Mao, Jie Chuai, Hongyang Du

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Zongxi Liu, Shuai Mao, Jie Chuai, and Hongyang Du*

Abstract—Mobile networks are evolving toward service-aware operation to support heterogeneous applications with diverse quality-of-service (QoS) and quality-of-experience (QoE) requirements. In practice, however, the widespread use of encryption makes service types difficult to observe directly, which limits the deployment of service-aware optimization in operational networks. Recent raw-byte representation learning methods have improved offline encrypted-traffic classification, but their robustness in realistic deployment remains limited due to temporal drift and the lack of explicit labels for online adaptation. This paper proposes Stable Encrypted-Traffic Representation and Online Adaptation (SEROA), a deployment-oriented framework for encrypted-traffic classification in service-aware mobile networks. In the offline stage, SEROA exploits protocol structure to learn temporally stable representations by applying masked modeling to stable fields, protocol-aware transformations and contrastive learning to unstable fields, and time-adversarial learning to suppress time-specific cues. In the online stage, SEROA uses feedback records containing QoE measurements, wireless states, and allocation decisions to update the deployed classifier through contextual-bandit learning. Experiments show that SEROA consistently outperforms representative pretrained baselines under both random and time-based evaluation protocols, and remains effective under QoE-driven online adaptation. These results demonstrate the value of stable representation learning and online adaptation for practical service-aware mobile networks.

Index Terms—Encrypted traffic classification, online learning, temporal drift, representation learning.

1 INTRODUCTION

MOBILE networks are evolving from the traditional best-effort service model toward a service-aware paradigm, driven by the rapid growth of latency-sensitive and experience-driven applications such as artificial intelligence (AI) agents, eExtended Reality (XR), cloud gaming, and live streaming [1]–[4]. To meet these heterogeneous requirements, 5G and the emerging 5G-Advanced/6G architectures introduce fine-grained quality-of-service (QoS) management mechanisms, including QoS Flows, the 5G QoS Identifier (5QI), and the QoS Flow Identifier (QFI) [5], [6]. The core network can configure QoS parameters according to the service type, and the radio access network (RAN) can

in turn exploit this information for base station (BS) radio resource scheduling, thereby improving the user-perceived quality-of-experience (QoE) [7]–[10].

In practice, however, obtaining such service-type information has become increasingly difficult because most operational traffic is now encrypted. The widespread deployment of transport layer security (TLS) has made encrypted traffic increasingly ubiquitous in operational networks [11]. Encryption hides application-layer payloads and most protocol semantics, rendering traditional deep packet inspection (DPI) methods that rely on plaintext content largely ineffective [12]. As a result, the service-type information assumed by many service-aware optimization studies is not directly observable in encrypted mobile networks, which limits the practical deployability of service-aware resource management [10]. Consequently, accurately and robustly identifying the service type of each flow under encryption has become a central problem in service-aware mobile networking [10].

To infer service types from encrypted traffic, recent encrypted-traffic classification studies have shifted from manual inspection and hand-crafted features to representation learning from observable packet bytes. Representative methods such as ET-BERT [13], YaTC [14], and Net-Mamba [15] adapt masked modeling from natural language processing (NLP) and computer vision (CV) to encrypted traffic, and achieve strong performance on offline classification benchmarks. These results suggest that raw-byte traffic contains exploitable signals for service identification, while removing the dependence on hand-crafted features. Despite this progress, existing raw-byte-based pretraining approaches remain largely confined to idealized offline evaluation, and their robustness in real mobile-network deployment remains limited [16]–[18]. In deployment, a classifier is pretrained and fine-tuned on historical traffic, and then applied to future flows whose distribution shifts as applications and protocols evolve over time. This temporal drift can substantially degrade the accuracy of encrypted-traffic classifiers [16], [19], [20]. If the pretrained encoder encodes time-specific shortcuts, fine-tuning has limited ability to remove them, and temporal drift can induce larger performance degradation [17], [18].

We argue that this limitation mainly comes from two causes. The first is field-agnostic pretraining. Existing meth-

Zongxi Liu and Hongyang Du are with the Department of Electrical and Computer Engineering, The University of Hong Kong, Hong Kong SAR, China (e-mail: duhy@hku.hk). Shuai Mao and Jie Chuai are with Noah's Ark Lab, Huawei Technologies Ltd., Hong Kong SAR, China.

ods directly transplant NLP or CV objectives to encrypted traffic and treat all bytes as homogeneous tokens or patches [13], [14], [21], [22]. Encrypted traffic contains protocol-structural fields, environment-dependent statistical fields, and session-specific or cryptographically opaque fields, whose semantics and temporal stability differ substantially. In particular, IP, TCP, and TLS fields can have different stability properties. A uniform pretraining objective can spend capacity reconstructing random content or memorizing environment-specific patterns, yielding representations that generalize poorly across time. The second cause is insufficient support for online adaptation. When the deployment distribution drifts substantially, historical offline training alone cannot ensure accurate prediction for current traffic, and the classifier must adapt to the new distribution. Existing raw-byte pretraining studies largely stop at offline evaluation and do not specify how a deployed model should learn online in a mobile network. Such learning is difficult because ground-truth service labels are usually unavailable after deployment. The network can only log weak deployment signals, such as radio conditions, scheduling outcomes, and QoE measurements, which are noisy and indirectly related to class labels. Offline pretraining must therefore produce representations robust enough to support lightweight online updates under noisy weak feedback.

Motivated by these observations, we propose Stable Encrypted-Traffic Representation and Online Adaptation (SEROA), a deployment-oriented framework for encrypted-traffic classification in service-aware mobile networks. SEROA first learns temporally stable traffic representations by exploiting protocol structure and reducing the influence of time-sensitive fields. It then supports lightweight online adaptation after deployment by using feedback records containing QoE, wireless-state, and allocation information. This design connects robust offline pretraining with online service-aware resource allocation under temporal drift.

Our main contributions are summarized as follows.

  • We conduct a deployment-aware empirical analysis of representative raw-byte pretrained classifiers, showing that their strong random-split performance does not directly transfer to time-based testing or frozen-encoder adaptation. This performance gap motivates stable representations and online adaptation for practical deployment.
  • We propose a protocol-aware offline pretraining framework that combines stable-field masked modeling, protocol-aware transformations, contrastive learning, and time-adversarial learning to learn representations that remain robust across time and effective under lightweight adaptation.
  • We design a joint online feedback framework between the core network and the RAN, which uses classification-assisted resource allocation and feedback records containing QoE, wireless-state, and allocation information to update the deployed classifier through online contextual-bandit learning.
  • We conduct extensive offline and online experiments on public CSTNET datasets. The results show consistent gains over representative pretrained baselines in both offline evaluation settings and under QoE-driven online adaptation.

The remainder of this paper is organized as follows. Section 2 reviews related work. Section 3 formalizes the deployment pipeline and the service-aware allocation model. Section 4 presents the deployment gap analysis. Section 5 introduces the proposed pretraining method. Section 6 develops the online adaptation mechanism, and Section 7 reports the experimental results.

References (59)