Skip to main content
QUICK REVIEW

[Paper Review] Extensible Machine Learning for Encrypted Network Traffic Application Labeling via Uncertainty Quantification

Steven M. Jorgensen, John T. Holodnak|arXiv (Cornell University)|May 11, 2022
Internet Traffic Analysis and Secure E-votingComputer Science5 citations
TL;DR

This paper presents a novel machine learning framework for classifying encrypted network traffic using uncertainty quantification to detect out-of-distribution (OOD) traffic. By combining wavelet-based features, a prototypical network with relative Mahalanobis distance, and calibrated p-values for OOD detection, the model achieves 0.98 F1 score on a new public dataset of 10 applications across 5 categories, while effectively flagging novel traffic for retraining.

ABSTRACT

With the increasing prevalence of encrypted network traffic, cyber security analysts have been turning to machine learning (ML) techniques to elucidate the traffic on their networks. However, ML models can become stale as new traffic emerges that is outside of the distribution of the training set. In order to reliably adapt in this dynamic environment, ML models must additionally provide contextualized uncertainty quantification to their predictions, which has received little attention in the cyber security domain. Uncertainty quantification is necessary both to signal when the model is uncertain about which class to choose in its label assignment and when the traffic is not likely to belong to any pre-trained classes. We present a new, public dataset of network traffic that includes labeled, Virtual Private Network (VPN)-encrypted network traffic generated by 10 applications and corresponding to 5 application categories. We also present an ML framework that is designed to rapidly train with modest data requirements and provide both calibrated, predictive probabilities as well as an interpretable "out-of-distribution" (OOD) score to flag novel traffic samples. We describe calibrating OOD scores using p-values of the relative Mahalanobis distance. We demonstrate that our framework achieves an F1 score of 0.98 on our dataset and that it can extend to an enterprise network by testing the model: (1) on data from similar applications, (2) on dissimilar application traffic from an existing category, and (3) on application traffic from a new category. The model correctly flags uncertain traffic and, upon retraining, accurately incorporates the new data.

Motivation & Objective

  • To address the challenge of classifying encrypted, VPN-protected network traffic from unknown or novel applications.
  • To develop a machine learning model that provides calibrated predictive probabilities and interpretable uncertainty scores for both in-distribution and out-of-distribution traffic.
  • To create a public, labeled dataset of 10 applications and 5 categories to support research in encrypted traffic classification.
  • To enable rapid model adaptation by flagging uncertain predictions and supporting incremental retraining on new data.
  • To integrate feature engineering, model architecture, and uncertainty quantification into a unified, robust pipeline for cybersecurity applications.

Proposed method

  • The framework uses a prototypical network that computes class probabilities based on distances to learned class prototypes in an embedding space.
  • It applies discrete wavelet transform (DWT) to forward and backward connection sizes, extracting features including relative wavelet energy, Shannon entropy, and absolute mean and standard deviation of detail coefficients.
  • The relative Mahalanobis distance is used to measure the distance of a sample from class prototypes, with p-values derived from its distribution to quantify uncertainty.
  • Uncertainty is quantified via p-values of the relative Mahalanobis distance, enabling calibrated OOD detection.
  • The model is trained on a new public dataset of 10 applications (e.g., Netflix, SSH, VoIP) with 5 categories, using time-binned packet statistics and wavelet features.
  • The pipeline includes signal reflection to ensure vector length is a power of two, and features are computed over a 40.96-second window with 10ms time bins.

Experimental results

Research questions

  • RQ1Can a machine learning model achieve high accuracy in classifying encrypted network traffic while simultaneously providing reliable uncertainty estimates for novel or out-of-distribution samples?
  • RQ2How effective is relative Mahalanobis distance with p-value calibration in detecting out-of-distribution traffic in encrypted network flows?
  • RQ3To what extent can a model trained on a limited, labeled dataset generalize to similar, dissimilar, or entirely new application categories in enterprise environments?
  • RQ4How do wavelet-based features and time-binned packet statistics compare in capturing discriminative patterns in encrypted traffic?
  • RQ5Can the model’s uncertainty scores guide effective retraining when new traffic categories emerge?

Key findings

  • The model achieves an F1 score of 0.98 on the proposed public dataset of 10 applications across 5 categories, demonstrating high classification accuracy.
  • The model successfully flags out-of-distribution traffic with calibrated uncertainty scores, enabling detection of novel applications not in the training set.
  • When tested on similar applications, dissimilar traffic from existing categories, and entirely new categories, the model correctly identifies uncertainty and adapts upon retraining.
  • The selected configuration of ∆t = 0.01s and T = 40.96s provides near-maximum accuracy with manageable feature vector length.
  • The use of wavelet-based features, particularly relative wavelet energy and Shannon entropy, significantly enhances discriminative power for encrypted traffic.
  • The integration of uncertainty quantification via p-values of the relative Mahalanobis distance enables reliable detection of low-confidence predictions and novel traffic.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.