An encrypted traffic classification method based on autoencoders and convolutional neural networks

S Shengwei Xu J Jijie Han J Jianbo Wang Y Yijie Bai

Abstract

To solve the problems of existing encrypted traffic classification methods, such as the need for large-scale training data, high computational costs, and poor generalization ability, an encrypted traffic classification method based on autoencoders and convolutional neural networks was proposed. This method first utilizes an autoencoder to recon-struct the dataset, enabling it to work with smaller-scale datasets. The autoencoder allows shorter traffic flows to learn abstract feature representations from longer traffic flows of the same type, replacing zeros and mitigating the negative effects of zero-padding on traffic classification when using uniform flow lengths. After reconstruction, a convolutional neural network is used to classify the traffic. Due to its characteristics of parameter sharing and local connectivity, the CNN exhibits strong generalization ability when handling tasks, allowing it to better adapt to samples outside of the training data. Experimental results show that, compared to existing advanced methods, this method can achieve a classi-fication accuracy improvement of 2.86% to 18.13%, while also demonstrating greater robustness compared to other advanced methods. The code is available at https://github.com/han20011019/AECCN.

Article Details

Journal PLoS ONE
Volume / Issue Vol. 20, Issue 9
Published September 24, 2025
Pages e0333276
ISSN 1932-6203
Publisher Public Library of Science

Journal Info

PLoS ONE

Public Library of Science

ISSN: 1932-6203 Open Access Health Sciences

Authors (4)

S

Shengwei Xu

J

Jijie Han

J

Jianbo Wang

Y

Yijie Bai