Downloads · 30 days
0
Charles59/lens-finetuned
lens-finetuned 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 12 downstream classification tasks (paper Tables 2 & 3). Each checkpoint reproduces the paper's reported…
Downloads · 30 days
0
Access
Public
Updated Jun 29, 2026
Repo size
11.9 GB
Likes
1
Public
Click a slice to open those files.
.bin11.9 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 12 downstream classification tasks (paper Tables 2 & 3). Each checkpoint reproduces the paper's reported Accuracy / Macro-F1.
One subfolder per task, each a standalone HuggingFace model (pytorch_model.bin + config.json
T5ForConditionalGeneration.| Task | Config / subfolder | #Cls | Acc | Macro-F1 | Decode |
|---|---|---|---|---|---|
| 1 | vpn_detection | 2 | 0.9942 | 0.9870 | text |
| 2 | vpn_service_classification | 6 | 0.8979 | 0.8893 | text |
| 3 | vpn_application_classification | 16 | 0.8406 | 0.8137 | text |
| 4 | tor_service_detection | 7 | 0.9692 | 0.8120 | text |
| 5 | ustc-tfc2016_app_detection | 16 | 0.9538 | 0.9676 | text |
| 6 | crossplatform_android_app_classification | 209 | 0.9660 | 0.8847 | digit |
| 7 | crossplatform_android_app_country_detection | 3 | 0.9960 | 0.9898 | text |
| 8 | crossplatform_ios_app_classification | 196 | 0.9752 | 0.9492 | digit |
| 9 | crossplatform_ios_app_country_detection | 3 | 0.9951 | 0.9951 | text |
| 10 | dohbrw_query_generator_detection | 5 | 0.9963 | 0.9610 | text |
| 11 | iot_malicious_detection | 2 | 0.9877 | 0.9870 | text |
| 12 | iot_method_detection | 7 | 0.9878 | 0.6802 | text |
Decode column: all tasks use the single script finetune_classification.py. text tasks generate the
class-name string (label_format: label_string, config cls); digit tasks (≥100 classes) generate the
numeric class index (label_format: digit, config cls_digit), as described in the paper. Every checkpoint
was verified to reproduce its row via the test commands below.
from huggingface_hub import hf_hub_download
ckpt = hf_hub_download("Charles59/lens-finetuned", "vpn_detection/pytorch_model.bin")
Text tasks (all except Tasks 6 & 8):
python scripts/finetune_classification.py \
mode=finetune_test \
data.hf_repo=Charles59/lens-network-traffic data.hf_config=vpn_detection \
task_args.name=VPN_Detection \
model_args.pretrained_checkpoint=<ckpt>
# -> accuracy: 0.9942, macro-f1: 0.9870
Digit tasks (Task 6 crossplatform_android_app_classification, Task 8 crossplatform_ios_app_classification)
use the same script with --config-name=cls_digit:
python scripts/finetune_classification.py --config-name=cls_digit \
mode=finetune_test \
data.hf_repo=Charles59/lens-network-traffic data.hf_config=crossplatform_android_app_classification \
task_args.name=CrossPlatform_Android_APP_Classification \
model_args.pretrained_checkpoint=<ckpt>
data.hf_config = the subfolder name; task_args.name = the original task name (see the table; e.g.
vpn_detection ↔ VPN_Detection).
iot_method_detection) was re-finetuned (30 epochs) to recover a lost checkpoint; it
reproduces the paper (Acc 0.9897 / Macro-F1 0.6813 vs. paper 0.9878 / 0.6802).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}
}