Skip to main content
Log in

MTT: an efficient model for encrypted network traffic classification using multi-task transformer

  • Published:
Applied Intelligence Aims and scope Submit manuscript

Abstract

Network traffic classification aims to associate the network traffic with a class of traffic characterization (e.g., Streaming) or applications (e.g., Facebook). This ability plays an important role in advanced network management. The tasks of traffic characterization and application identification are usually implemented by individual models. However, when multiple models are deployed in the online environment, this causes a dramatic increase in the complexity, resource demand and maintenance costs. In this paper, an efficient multi-task learning method named multi-task transformer (MTT) is proposed. It simultaneously classifies the traffic characterization and application identification tasks. The proposed model considers the input packet as a sequence of bytes and applies a multi-head attention mechanism to extract features. Experiments are conducted on the ISCX VPN-nonVPN dataset to demonstrate the effectiveness of MTT. \(F_1\) scores of 98.75% and 99.35% have been achieved for application identification and traffic characterization, respectively. To the best of our knowledge, the results are better than the state-of-the-art results. The MTT model outputs the two results simultaneously in \(\sim\) 0.1 milliseconds (per packet), which satisfies the requirement of online traffic classification. Compared with the 1D-CNN and 2D-CNN models, the proposed MTT model is more stable, presents higher classification performance and requires less storage space. Finally, the selection strategies of input length for different neural networks are suggested and the related principles are investigated.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

References

  1. Aceto G, Ciuonzo D, Montieri A, Pescapé A (2019) Mobile encrypted traffic using deep learning: Experimental evaluation, lessons learned, and challenges. IEEE Transactions on Network and Service Management 16(2):445–458

    Article  Google Scholar 

  2. Yao H, Liu C, Zhang P, Wu S, Jiang C, Yu S (2019) Identification of encrypted traffic through attention mechanism based long short term memory. IEEE Trans Big Data

  3. Lotfollahi M, Siavoshani MJ, Zade RSH, Saberian M (2020) Deep packet: A novel approach for encrypted traffic classification using deep learning. Soft Computing 24(3):1999–2012

    Article  Google Scholar 

  4. Wang M, Zheng K, Luo D, Yang Y, Wang X (2020a) An encrypted traffic classification framework based on convolutional neural networks and stacked autoencoders. In: 2020 IEEE 6th international conference on computer and communications (ICCC). IEEE, pp 634–641

  5. Shapira T, Shavitt Y (2019) Flowpic: Encrypted internet traffic classification is as easy as image recognition. In: IEEE INFOCOM 2019-IEEE conference on computer communications workshops (INFOCOM WKSHPS). IEEE, pp 680–687

  6. Hu C, Wang Y, Gu J (2020) Cross-domain intelligent fault classification of bearings based on tensor-aligned invariant subspace learning and two-dimensional convolutional neural networks. Knowledge-Based Systems 209:106214

    Article  Google Scholar 

  7. Cui S, Jiang B, Cai Z, Lu Z, Liu S, Liu J (2019) A session-packets-based encrypted traffic classification using capsule neural networks. In: 2019 IEEE 21st international conference on high performance computing and communications; IEEE 17th international conference on smart city; IEEE 5th international conference on data science and systems (HPCC/SmartCity/DSS). IEEE, pp 429–436

  8. Bu Z, Zhou B, Cheng P, Zhang K, Ling ZH (2020) Encrypted network traffic classification using deep and parallel network-in-network models. IEEE Access 8:132950–132959

    Article  Google Scholar 

  9. Ma Q, Huang W, Jin Y, Mao J (2021) Encrypted traffic classification based on traffic reconstruction. In: 2021 4th International conference on artificial intelligence and big data (ICAIBD). IEEE, pp 572–576

  10. Sun B, Yang W, Yan M, Wu D, Zhu Y, Bai Z (2020) An encrypted traffic classification method combining graph convolutional network and autoencoder. In: 2020 IEEE 39th international performance computing and communications conference (IPCCC). IEEE, pp 1–8

  11. Vu L, Thuy HV, Nguyen QU, Ngoc TN, Nguyen DN, Hoang DT, Dutkiewicz E (2018) Time series analysis for encrypted traffic classification: A deep learning approach. In: 2018 18th international symposium on communications and information technologies (ISCIT). IEEE, pp 121–126

  12. Lu CN, Huang CY, Lin YD, Lai YC (2012) Session level flow classification by packet size distribution and session grouping. Computer Networks 56(1):260–272

    Article  Google Scholar 

  13. Crotti M, Dusi M, Gringoli F, Salgarelli L (2007) Traffic classification through simple statistical fingerprinting. ACM SIGCOMM Computer Communication Review 37(1):5–16

    Article  Google Scholar 

  14. Shim KS, Ham JH, Sija BD, Kim MS (2017) Application traffic classification using payload size sequence signature. International Journal of Network Management 27(5):1981

    Article  Google Scholar 

  15. Lin T, Wang Y, Liu X, Qiu X (2021) A survey of transformers. arXiv:21060 4554. Accessed 8 June 2021

  16. Zou Z, Ge J, Zheng H, Wu Y, Han C, Yao Z (2018) Encrypted traffic classification with a convolutional long short-term memory neural network. In: 2018 IEEE 20th international conference on high performance computing and communications; IEEE 16th International conference on smart city; IEEE 4th International Conference on Data Science and Systems (HPCC/SmartCity/DSS). IEEE, pp 329–334

  17. Rezaei S, Liu X (2020) Multitask learning for network traffic classification. In: 2020 29th International conference on computer communications and networks (ICCCN). IEEE, pp 1–9

  18. Rago A, Piro G, Boggia G, Dini P (2020) Multi-task learning at the mobile edge: An effective way to combine traffic classification and prediction. IEEE Transactions on Vehicular Technology 69(9):10362–10374

    Article  Google Scholar 

  19. Cheng J, He R, Yuepeng E, Wu Y, You J, Li T (2020) Real-time encrypted traffic classification via lightweight neural networks. In: GLOBECOM 2020-2020 IEEE global communications conference. IEEE, pp 1–6

  20. Ren X, Gu H, Wei W (2021) Tree-rnn: Tree structural recurrent neural network for network traffic classification. Expert Systems with Applications 167:114363

    Article  Google Scholar 

  21. Xie G, Li Q, Jiang Y (2021) Self-attentive deep learning method for online traffic classification and its interpretability. Computer Networks 196:108267

    Article  Google Scholar 

  22. Guo L, Wu Q, Liu S, Duan M, Li H, Sun J (2020) Deep learning-based real-time vpn encrypted traffic identification methods. Journal of Real-Time Image Processing 17(1):103–114

    Article  Google Scholar 

  23. Dong C, Zhang C, Lu Z, Liu B, Jiang B (2020) Cetanalytics: Comprehensive effective traffic information analytics for encrypted traffic classification. Computer Networks 176:107258

    Article  Google Scholar 

  24. Zhang J, Xiang Y, Wang Y, Zhou W, Xiang Y, Guan Y (2012) Network traffic classification using correlation information. IEEE Transactions on Parallel and Distributed systems 24(1):104–117

    Article  Google Scholar 

  25. Johnson JM, Khoshgoftaar TM (2019) Survey on deep learning with class imbalance. Journal of Big Data 6(1):1–54

    Article  Google Scholar 

  26. Wang P, Li S, Ye F, Wang Z, Zhang M (2020b) Packetcgan: Exploratory study of class imbalance for encrypted traffic classification using cgan. In: ICC 2020-2020 IEEE international conference on communications (ICC). IEEE, pp 1–7

  27. Soleymanpour S, Sadr H, Soleimandarabi MN (2021) Cscnn: Cost-sensitive convolutional neural network for encrypted traffic classification. Neural Process Lett :1–27

  28. Draper-Gil G, Lashkari AH, Mamun MSI, Ghorbani AA (2016) Characterization of encrypted and vpn traffic using time-related. In: Proceedings of the 2nd international conference on information systems security and privacy (ICISSP), pp 407–414

  29. Caruana R (1997) Multitask learning. Machine Learning 28(1):41–75

    Article  MathSciNet  Google Scholar 

  30. Vu L, Bui CT, Nguyen QU (2017) A deep learning based method for handling imbalanced problem in network traffic classification. In: Proceedings of the eighth international symposium on information and communication technology, pp 333–339

  31. Gómez SE, Hernández-Callejo L, Martínez BC, Sánchez-Esguevillas AJ (2019) Exploratory study on class imbalance and solutions for network traffic classification. Neurocomputing 343:100–119

    Article  Google Scholar 

  32. Ba JL, Kiros JR, Hinton GE (2016) Layer normalization. arXiv:16070 6450. Accessed 21 July 2016

  33. Guo M, Haque A, Huang DA, Yeung S, Fei-Fei L (2018) Dynamic task prioritization for multitask learning. In: Proceedings of the european conference on computer vision (ECCV), pp 270–287

  34. Liu S, Johns E, Davison AJ (2019) End-to-end multi-task learning with attention. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp 1871–1880

  35. Hu C, He S, Wang Y (2021) A classification method to detect faults in a rotating machinery based on kernelled support tensor machine and multilinear principal component analysis. Applied Intelligence 51(4):2609–2621

    Article  Google Scholar 

Download references

Acknowledgements

This work was partially supported by the National Key Research and Development Program under Grant 2019YFB1804003.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Weiping Zheng.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Zheng, W., Zhong, J., Zhang, Q. et al. MTT: an efficient model for encrypted network traffic classification using multi-task transformer. Appl Intell 52, 10741–10756 (2022). https://doi.org/10.1007/s10489-021-03032-8

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10489-021-03032-8

Keywords

Navigation