# MTC1 **Repository Path**: xbystudy/mtc1 ## Basic Information - **Project Name**: MTC1 - **Description**: K. Wang、J. Gao 和 X. Lei,“Mtc:基于 Transformer 和 1D-CNN 的加密网络流量分类的多任务模型”,《智能自动化与软计算》,第 37 卷,第 1 期,第 619–638 页,2023 年。 实验 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-16 - **Last Updated**: 2024-07-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

MTC

Implementation of a multi-task model for encrypted network traffic classification based on transformer and 1D-CNN.
[Paper] [W&B Report]

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. License
  6. Acknowledgments
  7. Experiments
## About The Project This is a development project based on an existing work. Following the model architecture, parameters, and utilizing some datasets mentioned in the original paper, the goal is to implement the experimental results. However, performance matching the paper cannot be guaranteed. For simplicity in development, this project exclusively utilizes the ISCX VPN-non VPN dataset and follows the preprocessing methods outlined in the paper. Finally, the model is trained according to the parameters specified in the paper. ### Built With [![PyTorch][pytorch-shield]][pytorch-url] [![W&B][wandb-shield]][wandb-url] ## Getting Started Build the Python environment on either cloud or on-premises machines. To facilitate model training, please follow these simple example steps. ### Prerequisites * Install python packages ```sh pip install requirements.txt ``` * Download ISCX VPN-non VPN dataset from [here](https://www.unb.ca/cic/datasets/vpn.html). ## Usage * Preprocess ISCX VPN-non VPN data through a `Makefile` * Several pickle files would be generated in `data/` ```shell make preprocess ``` * To execute various model training tasks through a `Makefile`, follow the step below: * Execute all training jobs for each model ```shell make train-all ```

(back to top)

## Features - Multi-task model Implementation - [x] 1D-CNN model - [x] Transformer model - [x] MTC - 1D-CNN + transformer + fusion blocks

(back to top)

## License Distributed under the MIT License. See `LICENSE` for more information. ## Acknowledgments * [K. Wang, J. Gao and X. Lei, "Mtc: a multi-task model for encrypted network traffic classification based on transformer and 1d-cnn," Intelligent Automation & Soft Computing, vol. 37, no.1, pp. 619–638, 2023. ](https://www.techscience.com/iasc/v37n1/52667/html) [license-shield]: https://img.shields.io/github/license/github_username/repo_name.svg?style=for-the-badge [license-url]: https://github.com/yuchengml/MTC/blob/main/LICENSE [pytorch-shield]: https://img.shields.io/badge/PyTorch-EE4C2C?style=for-the-badge&logo=pytorch&logoColor=white [pytorch-url]: https://pytorch.org/ [wandb-shield]: https://img.shields.io/badge/Weights_&_Biases-FFBE00?style=for-the-badge&logo=WeightsAndBiases&logoColor=white [wandb-url]: https://wandb.ai/site ## Experiments - [W&B Report](https://wandb.ai/yuchengml/MTC/reports/Implementation-of-a-multi-task-model-for-encrypted-network-traffic-classification-based-on-transformer-and-1D-CNN---Vmlldzo2MzQyNjU5) ### Dataset info - ISCX VPE-non VPN - After filtering by application type | Application | Amount | | ------------ | --------- | | aim_chat | 2366 | | email | 19705 | | facebook | 2472071 | | ftps | 4378 | | gmail | 5242 | | hangouts | 4419276 | | icq | 2490 | | netflix | 474 | | scp | 19270 | | sftp | 1351 | | skype | 3727604 | | spotify | 939 | | torrent | 6885 | | vimeo | 611 | | voipbuster | 1559956 | | youtube | 2230 |