Downloads · 30 days
0
Charles59/lens-finetuned-generation
lens-finetuned-generation is a machine learning model from Charles59. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
Per-task fine-tuned checkpoints of Lens (a knowledge-guided foundation model for network traffic, TMLR) for the network-traffic generation tasks. Each checkpoint reproduces the corresponding cell of Table 6 in the pap…
Downloads · 30 days
0
Access
Public
Updated Jun 29, 2026
Repo size
34.7 GB
Likes
1
Public
Click a slice to open those files.
.bin34.7 GB · 100%
From the Hugging Face model README
Per-task fine-tuned checkpoints of Lens (a knowledge-guided foundation model for network traffic, TMLR) for the network-traffic generation tasks. Each checkpoint reproduces the corresponding cell of Table 6 in the paper (JSD / TVD).
<dataset>/<field>/ — 35 checkpoints = 7 datasets × 5 header fields. Each folder is a
standalone HuggingFace model (pytorch_model.bin + config.json + tokenizer), loadable with
T5ForConditionalGeneration.
vpn, tor, ustc-tfc2016, crossplatform_ios, crossplatform_android, dohbrw, iotsource_ip, destination_ip, source_port, destination_port, packet_lengthLower is better. Every checkpoint here was verified to reproduce these values via mode=generation_test.
| Dataset | Metric | Src IP | Dst IP | Src Port | Dst Port | Len |
|---|---|---|---|---|---|---|
| ISCX-VPN | JSD↓ | 0.0974 | 0.0905 | 0.5574 | 0.0271 | 0.0338 |
(vpn) | TVD↓ | 0.1719 | 0.1245 | 0.5789 | 0.0343 | 0.0469 |
| ISCX-Tor | JSD↓ | 0.0022 | 0.4842 | 0.5826 | 0.1337 | 0.0398 |
(tor) | TVD↓ | 0.0038 | 0.5620 | 0.6133 | 0.1877 | 0.0560 |
| USTC-TFC-2016 | JSD↓ | 0.3783 | 0.4361 | 0.3864 | 0.2685 | 0.0143 |
(ustc-tfc2016) | TVD↓ | 0.3910 | 0.4748 | 0.4076 | 0.2901 | 0.0203 |
| Cross Platform (iOS) | JSD↓ | 0.0003 | 0.3241 | 0.6508 | 0.0083 | 0.0608 |
(crossplatform_ios) | TVD↓ | 0.0006 | 0.4523 | 0.6746 | 0.0132 | 0.0780 |
| Cross Platform (Android) | JSD↓ | 0.0003 | 0.2809 | 0.6531 | 0.0046 | 0.0690 |
(crossplatform_android) | TVD↓ | 0.0041 | 0.4166 | 0.6796 | 0.0130 | 0.0872 |
| CIRA-CIC-DoHBrw-2020 | JSD↓ | 0.0041 | 0.4105 | 0.6915 | 0.0001 | 0.0481 |
(dohbrw) | TVD↓ | 0.0246 | 0.4896 | 0.7065 | 0.0003 | 0.0728 |
| CIC-IoT-2023 | JSD↓ | 0.0146 | 0.0098 | 0.0179 | 0.0262 | 0.0039 |
(iot) | TVD↓ | 0.0779 | 0.0325 | 0.0217 | 0.0295 | 0.0058 |
from huggingface_hub import hf_hub_download
ckpt = hf_hub_download("Charles59/lens-finetuned-generation", "iot/destination_port/pytorch_model.bin")
# from the Lens code repo (uses the released generation data)
python scripts/finetune_generation.py \
mode=generation_test \
data.hf_repo=Charles59/lens-network-traffic-generation data.hf_config=iot \
data.name=IoT task_args.name=Destination_Port_Generation \
model_args.pretrained_checkpoint=<ckpt>
# -> Test-DST-PORT-JSD: 0.0262 Test-DST-PORT-TVD: 0.0295
Mapping for the command:
| subfolder dataset | data.name | data.hf_config |
|---|---|---|
vpn | VPN | vpn |
tor | Tor | tor |
ustc-tfc2016 | USTC-TFC2016 | ustc-tfc2016 |
crossplatform_ios | CrossPlatform_IOS | crossplatform_ios |
crossplatform_android | CrossPlatform_Android | crossplatform_android |
dohbrw | DoHBrw | dohbrw |
iot | IoT | iot |
Field subfolder → task_args.name: source_ip→Source_IP_Generation, destination_ip→Destination_IP_Generation,
source_port→Source_Port_Generation, destination_port→Destination_Port_Generation,
packet_length→Packet_Length_Generation.
CC-BY-NC-4.0. Derived from academic datasets via NetBench (Qian et al., 2024); their original terms also apply.
@article{li2026lens,
title = {Lens: A Knowledge-Guided Foundation Model for Network Traffic},
author = {Li, Xiaochang and Qian, Chen and Wang, Qineng and Kong, Jiangtao and Wang, Yuchen and Yao, Ziyu and Ji, Bo and Cheng, Long and Zhou, Gang and Shao, Huajie},
journal = {Transactions on Machine Learning Research},
issn = {2835-8856},
year = {2026},
url = {https://openreview.net/forum?id=cGDwTgnJIR},
note = {arXiv:2402.03646}
}