arXiv:2603.11200cs.CRcs.LG2026-03

用图注意力模型学习域名序列的嵌入表示,提升网络入侵检测效果

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

  • 基于Transformer构建图结构模型,捕捉域名查询间的上下文关系
  • 在真实数据上实现域名分类与僵尸网络检测优于基线方法
  • 适合关注DNS安全分析与大规模语言模型应用的研究者

网络入侵检测系统在组织网络安全策略中至关重要,通常结合模式匹配签名与机器学习驱动的异常检测技术。然而,现有机器学习方法存在对标注数据依赖过强、泛化能力有限等问题。为此,基于嵌入的方法被提出,利用大量可获取的DNS流量数据学习通用表示,适用于多种下游任务。但当前方法未能充分考虑查询间的上下文信息。本文提出DNS-GT,一种新型基于Transformer的图模型,从域名查询序列中学习域名嵌入表示。模型首先在自监督模式下预训练,以捕获DNS活动的一般行为;随后可在具体下游任务中微调,利用序列内查询间的交互关系。在真实世界DNS数据上的实验表明,该方法能有效学习域名表示。定量评估显示,在域名分类与僵尸网络检测任务中优于相关基线,为大规模语言模型在入侵检测系统中的进一步探索提供了可能。代码已开源:https://github.com/m-altieri/DNS-GT。

原文摘要 · Abstract (English)

Network intrusion detection systems play a crucial role in the security strategy employed by organisations to detect and prevent cyberattacks. Such systems usually combine pattern detection signatures with anomaly detection techniques powered by machine learning methods. However, the commonly proposed machine learning methods present drawbacks such as over-reliance on labeled data and limited generalization capabilities. To address these issues, embedding-based methods have been introduced to learn representations from network data, such as DNS traffic, mainly due to its large availability, that generalise effectively to many downstream tasks. However, current approaches do not properly consider contextual information among DNS queries. In this paper, we tackle this issue by proposing DNS-GT, a novel Transformer-based model that learns embeddings for domain names from sequences of DNS queries. The model is first pre-trained in a self-supervised fashion in order to learn the general behavior of DNS activity. Then, it can be finetuned on specific downstream tasks, exploiting interactions with other relevant queries in a given sequence. Our experiments with real-world DNS data showcase the ability of our method to learn effective domain name representations. A quantitative evaluation on domain name classification and botnet detection tasks shows that our approach achieves better results compared to relevant baselines, creating opportunities for further exploration of large-scale language models for intrusion detection systems. Our code is available at: https://github.com/m-altieri/DNS-GT.

DNS安全图神经网络嵌入学习入侵检测

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。