Traffic classification (TC) plays a critical role in cybersecurity, particularly in IoT and embedded contexts, where inspection must often occur locally under tight hardware constraints. We use hardware-aware neural architecture search (HW-NAS) to derive lightweight TC models that are accurate, efficient, and deployable on edge platforms. Two input formats are considered: a flattened byte sequence and a 2D packet-wise time series; we examine how input structure affects adversarial vulnerability when using resource-constrained models. Robustness is assessed against white-box attacks, specifically Fast Gradient Sign Method (FGSM) and Projected Gradient Descent (PGD). On USTC-TFC2016, both HW-NAS models achieve over 99% clean-data accuracy while remaining within 65k parameters and 2M FLOPs. Yet under perturbations of strength 0.1, their robustness diverges: the flat model retains over 85% accuracy, while the time-series variant drops below 35%. Adversarial fine-tuning delivers robust gains, with flat-input accuracy exceeding 96% and the time-series variant recovering over 60 percentage points in robustness, all without compromising efficiency. The results underscore how input structure influences adversarial vulnerability, and show that even compact, resource-efficient models can attain strong robustness, supporting their practical deployment in secure edge-based TC.
翻译:流量分类(TC)在网络安全中扮演着关键角色,尤其在物联网和嵌入式场景中,检测通常需要在严格的硬件约束下本地进行。我们采用硬件感知的神经架构搜索(HW-NAS)来构建轻量级TC模型,这些模型兼具准确性、高效性,并可部署于边缘平台。研究考虑了两种输入格式:扁平化的字节序列和二维包级时间序列;我们探讨了在使用资源受限模型时,输入结构如何影响对抗脆弱性。鲁棒性评估基于白盒攻击,具体采用快速梯度符号法(FGSM)和投影梯度下降法(PGD)。在USTC-TFC2016数据集上,两个HW-NAS模型在保持参数量低于65k、计算量低于2M FLOPs的同时,均实现了超过99%的干净数据准确率。然而在强度为0.1的扰动下,它们的鲁棒性出现显著分化:扁平模型保持超过85%的准确率,而时间序列变体则下降至35%以下。对抗性微调带来了显著的鲁棒性提升,扁平输入模型的准确率超过96%,时间序列变体的鲁棒性恢复了超过60个百分点,且均未牺牲效率。这些结果凸显了输入结构对对抗脆弱性的影响,并表明即使是紧凑、资源高效的模型也能获得强鲁棒性,这支持了它们在实际安全边缘流量分类部署中的应用。