Manuscript Offprint

arXiv:2609.31141

Unknown-Traffic Detection, Calibration and Shortcut Reliance in Distilled Encrypted-Traffic Classifiers over One Year

Mahmoud Abbasi

Mahmoud Abbasi, Member, IEEE

Abstract—Knowledge distillation is the standard way to compress encrypted-traffic classifiers for the edge, and almost all such work judges students by accuracy alone. We ask what else a student inherits: unknown-traffic detection, calibration, shortcut reliance, and whether any survives a year of drift. Resemblance proves little on its own, since soft targets also regularise. We therefore distil one 101k-parameter student from two teachers of equal accuracy but different construction, a five-member ensemble and a single wider model, so that following one rather than the other is attributable to it. The design was pre-registered before any test result was seen. We tested ten hypotheses on CESNET-TLS-Year22, a year of real TLS traffic, across 18 test windows over 35 weeks. Two are supported: a student's per-flow unknown-scores shift toward its own teacher, but only at a conventional temperature, not the accuracy-optimal one; and a shortcut-reliant teacher passes its over-confidence to a student that never sees the feature. The drift prediction is reversed under both scores, the gap narrowing rather than widening and the student overtaking under the energy score in two of three replicates, as is the prediction that such a teacher harms its student's detection, which improves slightly. Shortcut reliance is set by model size, not distillation. Under the logit-based scores nothing else transfers: distillation beats neither a temperature-scaled direct student nor label smoothing. Exploratory analysis shows this turns on the scoring rule: with a feature-space detector the teacher detects unknown traffic 0.073 AUROC better than the direct student, where the energy score sees 0.000, and the conventional-temperature student inherits most of it. Label smoothing, with no teacher, recovers more. Distillation transfers the teacher's habits; what looks like an inherited ability is available without one.

Index Terms—Encrypted traffic classification, knowledge distillation, open-set recognition, calibration, concept drift, shortcut learning, pre-registration.

I. INTRODUCTION

Encrypted-traffic classifiers are getting larger and their deployment targets are not. The models that set the state of the art on public benchmarks are multimodal CNNs, transformers and pre-trained “traffic foundation models” with millions to hundreds of millions of parameters [1], [2], [3], [4], while the places they must run, such as line-rate probes, edge gateways and customer-premises equipment, offer a fraction of a CPU core per flow. Knowledge distillation [5] is the standard answer to this mismatch, and a growing body of work applies it to traffic classification [6], [7], [8], [9], [10]. Almost without exception, that work reports only one thing about the student, its accuracy on a held-out split of the same dataset.

Accuracy is not what makes a traffic classifier deployable. Traffic changes, and the year-long CESNET-TLS-Year22 capture shows classifiers losing tens of points of macro-F1 within months of training [1], [11]. It also contains things the classifier has never seen, and a model that confidently assigns a new service to an old label is worse than one that abstains [12]. And traffic datasets are full of shortcuts (features that predict the label in the capture but not in the world), which a model may learn instead of the intended signal [13]. A large model earns its keep by handling these problems, not by its accuracy alone. Whether a small model distilled from it inherits that handling is the question this paper asks.

The question has a sharper form than “does the student inherit?”. Soft targets are a regulariser [14], [15], so much of what distillation appears to transfer could be produced by smoothing the labels, with no teacher involved. To claim that a student inherited something from its teacher, one needs a control in which the teacher changes and nothing else does.

We build that control with two teachers that reach the same accuracy by different means: a five-member ensemble and a single wider model of the same family. Each is distilled into the same student. We then test whether each student's per-flow unknown-scores follow its own teacher more closely than they follow the other teacher. The comparison is made against a directly trained student, because the two teachers are not equally "central". Any student, distilled or not, correlates more with the ensemble. Subtracting the undistilled student's preference isolates the part attributable to distillation. We apply the same test to the properties operators care about, and we repeat it over a year, because a property inherited at deployment time may not still be inherited three months later.

The teachers studied here sit at the small end of the range just described. They have 2.3M parameters each, 11.3M as an ensemble, and are distilled into a 101k-parameter student. That is the 112-fold compression an operator faces when moving a dataset-scale classifier onto a probe, and it is the regime in which the question can be answered at all, because a teacher-swap control requires training several teachers to equal accuracy and repeating the whole grid at three points in the year. Whether the same conclusions hold when the teacher is

M. Abbasi was with the University of Salamanca, Salamanca, Spain. He is now with the AIR Institute, Salamanca, Spain (e-mail: mahmoud.abbasi@ieee.org; ORCID 0000-0002-1886-8284).

Preprint, September 2026. Pre-registration: OSF https://osf.io/rts6n.

a hundred-million-parameter foundation model is a separate question that this design cannot settle.

We pre-registered the design, froze it after a pilot and a validation-only design phase, registered it publicly, and only then computed results on 18 test windows spanning 35 weeks (OSF https://osf.io/rts6n). Ten hypotheses were tested with Holm correction; two were supported, three came out reversed, and five were not supported.

Contributions:

  1. A teacher-swap protocol for measuring inheritance. A distilled student's per-flow unknown-score pattern shifts measurably toward the specific teacher it was distilled from, relative to a directly trained student, and this shift exists only at a conventional distillation temperature. The accuracy-optimal temperature transmits nothing teacher-specific.

  2. A negative result on what inheritance buys. Against the cheapest control (the same student trained directly and temperature-scaled), distillation improves no unknown-detection outcome we measured; against label smoothing it buys calibration at the cost of detection. What the T = 4 student does take from its teacher includes the teacher's poorer detection of near unknowns.

  3. Drift in the wrong direction for the usual worry. Over 35 weeks, the 11.3M-parameter teacher ensemble loses unknown-detection ability faster than the 101k student. In two of the three replicates the student becomes the better detector after about three months; in the third the teacher keeps a small lead throughout.

  4. Shortcuts are a capacity problem, not a distillation problem. Below full shortcut reliability, small students rely on a planted shortcut about twice as much as the teacher regardless of how they are trained, and distillation does not increase that reliance. A shortcut-reliant teacher does, however, pass its over-confidence through the soft targets alone, to a student that never encounters the feature.

  5. A released, pre-registered benchmark on public data: frozen service split, per-flow scores for every model and window, and analysis code with a cluster bootstrap that respects the day × service dependence structure of traffic data.

The rest of the paper is organised as follows. Section II places the study among work on distillation in traffic classification and on what distillation transfers. Section III describes the design: the data, the teachers and students, the training conditions and the ten pre-registered hypotheses. Section IV reports the confirmatory results by research question. Section V reports the analyses added once those results were in hand, which test the scoring rule, the composition of the teacher swap, the ageing mechanism and the student's capacity. Section VI discusses what the results mean for an operator and where they disagree with the literature, and Section VII concludes.

References (51)