Source code for KDD'22 paper: "Packet Representation Learning for Traffic Classification".
- python: 3.8
- pytorch: 1.8.1
- numpy: 1.19.5
- scikit-learn: 0.24.2
- tensorboard: 2.6.0
- protobuf <= 3.20.0
- Download preprocessed data from here, and unzip it to
./data/
. You can also use your own data with the same format, and change the data path by--data_dir
. An example of preprocessing can be found in./data/pre_exp
andpreprocess_exp.py
. - Run the code
python3 run_train.py
- Results can be found in
./log/sample.log
- Download the trained model. Save the
.bin
in./saved_model/
, and save the.pth
in./saved_model/sample/
- Run the code
python3 run_train.py --breakpoint 650
- Results can be found in
./log/sample.log
Please cite our paper if you use this code in your own work:
@inproceedings{MengWMLLZ22,
title = {Packet Representation Learning for Traffic Classification},
author = {Xuying Meng and Yequan Wang and Runxin Ma and Haitong Luo and Xiang Li and Yujun Zhang},
booktitle = {The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
pages = {3546--3554},
year = {2022}
}