Transformers
network-traffic
traffic-generation
synthetic-traffic
foundation-model
t5

Lens — Fine-tuned Generation Checkpoints

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).

Layout

<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.

  • datasets: vpn, tor, ustc-tfc2016, crossplatform_ios, crossplatform_android, dohbrw, iot
  • fields: source_ip, destination_ip, source_port, destination_port, packet_length

Reported results (paper Table 6, reproduced exactly)

Lower 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

Reproduce a result

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_ipSource_IP_Generation, destination_ipDestination_IP_Generation, source_portSource_Port_Generation, destination_portDestination_Port_Generation, packet_lengthPacket_Length_Generation.

Related

License

CC-BY-NC-4.0. Derived from academic datasets via NetBench (Qian et al., 2024); their original terms also apply.

Citation

@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}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Charles59/lens-finetuned-generation

Finetuned
(59)
this model

Dataset used to train Charles59/lens-finetuned-generation

Paper for Charles59/lens-finetuned-generation