{'fraction_non_alphanumeric': 0.024052478134110787, 'fraction_numerical': 0.0029154518950437317, 'mean_word_length': 5.538095238095238, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Lightweight Models for Traffic Classification: A Two-Step Distillation Approach

Traffic classification task is to identify different types of Internet traffic or applications. Classical traffic classification methods have the limitation that they need to predefine the features. The emergence of new applications reduces their accuracy due to the inaccurate feature design. The deep learning-based methods could extract features from raw traffic data and achieve high accuracy, but accordingly, leading to more complex models and heavier computations. The above deep models are hard to be deployed on edge nodes or resource-limited IoT devices. Therefore, in this paper, we adopt novel compressed models based on a two-step distillation approach for traffic classification. To address the trade-off problem between classification accuracy and model complexity, we first design lightweight models and then propose a novel training procedure to enhance their classification accuracy. Specifically, the response, relationship, and feature map-based knowledge of different traffic are distilled to train the small models. Experiment results demonstrate that compared to the state-of-the-art model, the minimum model using the proposed method can achieve higher accuracy, F1 scores, and reduce nearly 99.7% computation overhead, thus verifying the effectiveness of our method.