arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.11495cs.CRcs.LG
收藏

恶意URL检测与网页分类的连续多任务预训练

Continuous Multi-Task Pre-training for Malicious URL Detection and Webpage Classification

The State Key Laboratory of Blockchain and Data Security, Zhejiang University(区块链与数据安全国家重点实验室,浙江大学);Hangzhou Research Institute of Xidian University(西安电子科技大学杭州研究院);Defence Industry Secrecy Examination and Certification Center(国防工业保密审查与认证中心);Shenzhen MSU-BIT University(深圳MSU-BIT大学);Yantai Research Institute, Harbin Engineering University(哈尔滨工程大学烟台研究院)

Yujie Li, Yiwei Liu, Peiyue Li, Yifan Jia, Yanbin Wang

AI总结:

针对恶意URL检测与网页分类,提出urlBERT预训练编码器,采用5个无监督任务和分组顺序学习捕获URL多级信息,并通过两阶段微调及多任务模式,在三个下游任务上超越标准预训练模型。

摘要:

恶意URL检测和网页分类是网络安全和信息管理中的关键任务。近年来,大量研究探索使用BERT或类似的语言模型来替代传统的机器学习方法,用于检测恶意URL和分类网页。虽然先前的研究显示出有前景的结果,但它们通常将现有的语言模型直接应用于这些任务,而没有考虑领域数据的固有差异(例如,与文本相比,URL结构松散且语义稀疏),从而留下了性能提升的空间。此外,当前的方法专注于单一任务,尚未在多任务场景中进行测试。为了解决这些挑战,我们提出了urlBERT,一个预训练的URL编码器,利用Transformer从数十亿个未标记的URL中编码基础知识。为了实现这一目标,我们提出使用5个无监督预训练任务来捕获URL词汇、语法和语义的多层次信息,并生成对比性和对抗性表示。此外,为了避免预训练任务之间的竞争和干扰,我们提出了一种分组顺序学习方法,以确保多任务间的有效训练。最后,我们利用两阶段微调方法来提高任务模型的训练稳定性和效率。为了评估urlBERT的多任务潜力,我们在单任务和多任务模式下对任务模型进行微调。前者为单一任务创建分类模型,而后者构建能够处理多个任务的分类模型。我们在三个下游任务上评估urlBERT:钓鱼URL检测、广告URL检测和网页分类。结果表明,urlBERT优于标准的预训练模型,其多任务模式能够满足现实世界中多任务处理的需求。

英文摘要:

Malicious URL detection and webpage classification are critical tasks in cybersecurity and information management. In recent years, extensive research has explored using BERT or similar language models to replace traditional machine learning methods for detecting malicious URLs and classifying webpages. While previous studies show promising results, they often apply existing language models to these tasks without accounting for the inherent differences in domain data (e.g., URLs being loosely structured and semantically sparse compared to text), leaving room for performance improvement. Furthermore, current approaches focus on single tasks and have not been tested in multi-task scenarios. To address these challenges, we propose urlBERT, a pre-trained URL encoder leveraging Transformer to encode foundational knowledge from billions of unlabeled URLs. To achieve it, we propose to use 5 unsupervised pretraining tasks to capture multi-level information of URL lexical, syntax, and semantics, and generate contrastive and adversarial representations. Furthermore, to avoid inter-pre-training competition and interference, we proposed a grouped sequential learning method to ensure effective training across multi-tasks. Finally, we leverage a two-stage fine-tuning approach to improve the training stability and efficiency of the task model. To assess the multitasking potential of urlBERT, we fine-tune the task model in both single-task and multi-task modes. The former creates a classification model for a single task, while the latter builds a classification model capable of handling multiple tasks. We evaluate urlBERT on three downstream tasks: phishing URL detection, advertising URL detection, and webpage classification. The results demonstrate that urlBERT outperforms standard pre-trained models, and its multi-task mode is capable of addressing the real-world demands of multitasking.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑