English

Improving DNS Exfiltration Detection via Transformer Pretraining

Cryptography and Security 2026-04-14 v1 Machine Learning

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.

Keywords

Cite

@article{arxiv.2604.09849,
  title  = {Improving DNS Exfiltration Detection via Transformer Pretraining},
  author = {Miloš Tomić and Aleksa Cvetanović and Predrag Tadić},
  journal= {arXiv preprint arXiv:2604.09849},
  year   = {2026}
}

Comments

This is the preprint version of the paper. The final version of the paper has been presented at the TELFOR 2025 conference. The paper has 4 pages, 1 figure and 3 tables

R2 v1 2026-07-01T12:03:46.214Z