cs.CRApr 9, 2026

Improving DNS Exfiltration Detection via Transformer Pretraining

Authors: Miloš Tomić, Aleksa Cvetanović, Predrag Tadić

Organizations: School of Electrical Engineering, University of Belgrade, Serbia

Abstract

We study whether in-domain pretraining of Bidirectional Encoder Representations from Transformer (BERT) model improves subdomain-level detection of exfiltration at low false positive rates. While previous work mostly examines fine-tuned generic Transformers, it does not aim to isolate the effect of pretraining on the downstream task of classification. To address this gap, we develop a controlled pipeline where we freeze operating points on validation and transfer them to the test set, thus enabling clean ablations across different label and pretraining budgets. Our results show significant improvements in the left tail of the Receiver Operating Characteristic (ROC) curve, especially against randomly initialized baseline. Additionally, within pretrained model variants, increasing the number of pretraining steps helps the most when more labeled data are available for fine-tuning.

Figures & tables

Explore similar work

CardsList
  1. DNS-GT: A Graph-based Transformer Approach to Learn Embeddings of Domain Names from DNS Queries

    Mar 11, 2026Massimiliano Altieri, Ronan Hamon, Roberto Corizzo +2Network Intrusion Detection

  2. Do Transformers Actually Help Intrusion Detection? A Temporal Sequence Evaluation on CIC-IDS2017

    Jun 9, 2026Zach Moczkodan, Hany RagabData LeakageNetwork Intrusion Detection