← Lab /Software

SiamXBERT boosts unknown attack detection F1 by up to 78.8% in IoT datasets

SiamXBERT achieves up to 78.8% improvement in unknown attack F1-score compared to baselines

Software arXiv 12 Feb 2026 Method Simulation evidence

Published as “Unknown Attack Detection in IoT Networks using Large Language Models: A Robust, Data-efficient Approach”

Why it matters

The method enables practical, data-efficient detection of previously unseen IoT attacks without needing payload inspection, which is valuable for deployments with encrypted traffic and limited labeling resources.

Summary

SiamXBERT outperforms prior unknown-attack detectors, achieving a within-dataset U-F1 of 0.388 (vs. 0.217 for the strongest baseline) and a cross-dataset U-F1 of 0.816 when trained on IoT-23 and tested on CICIoT2023, despite being trained on only 100 samples per class. The evidence comes from two public IoT intrusion datasets (CICIoT2023, IoT-23) and comparisons against four SOTA baselines, but performance drops markedly in the opposite cross-dataset direction (U-F1 0.192) and SAFE-NID matches or exceeds SiamXBERT on some metrics.

What they found 4

  1. SiamXBERT achieves the highest average U-F1 of 0.388, beating the strongest baseline IDS-Agent (U-F1 = 0.217) by ~78.8%

    “SiamXBERT achieves the highest average U-F1 score of 0.388, outperforming the strongest baseline IDS-Agent (U-F1 = 0.217) by approximately 78.8%”

  2. In the IoT-23 → CICIoT2023 cross-dataset setting, SiamXBERT attains a U-F1 of 0.816

    “SiamXBERT achieves the best overall performance among all methods, with a U-F1 of 0.816”

  3. SiamXBERT is trained on only 100 samples per class, whereas baselines use 10% of the original data per class

    “SiamXBERT is trained on only 100 samples per class, whereas all four baseline models are trained on 10% of the original dataset per class.”

  4. The best within-dataset configuration (flow+packet features with feature-importance selection, token length 512) yields the highest U-F1 of 0.388

    “On the CICIoT2023 dataset, the best performance is achieved by combining flow-level and packet-level features with feature importance selection (threshold 0.01) at a token length of 512. This configuration attains the highest average unknown F1score (U-F1) of 0.388”

Caveats 4

  • When trained on CICIoT2023 and tested on IoT-23, SiamXBERT's U-F1 falls to 0.192, comparable to or lower than several baselines.
  • SAFE-NID achieves a higher overall W-F1 (0.939) and comparable unknown detection (U-F1 = 0.550) on IoT-23, narrowing the advantage of SiamXBERT.
  • In future work, we plan to evaluate our approach on a broader range of IoT datasets, including larger-scale, more diverse, and real-world traffic traces, to gain deeper insights into its robustness under realistic network conditions and evolving attack behaviors.
  • We will also extend SiamXBERT with additional modalities, such as temporal traffic dynamics, protocol semantics, and device-level context, to enhance representation learning and further improve the performance of unknown attack detection in heterogeneous IoT environments.

What’s new here 4

  • Applies a Siamese architecture with a SecBERT backbone to learn similarity-based embeddings for unknown attack detection.
  • Operates solely on flow-level and packet-header features, making it compatible with encrypted traffic.
  • Uses meta-learning to achieve strong few-shot performance, training on only 100 labeled samples per class.
  • Demonstrates cross-dataset robustness, outperforming baselines when trained on one IoT dataset and tested on another.