LLMs are one-shot URL classifiers and explainers

IF 4.6 2区 计算机科学 Q1 COMPUTER SCIENCE, HARDWARE & ARCHITECTURE Computer Networks Pub Date : 2025-02-01 DOI:10.1016/j.comnet.2024.111004
Fariza Rashid , Nishavi Ranaweera , Ben Doyle , Suranga Seneviratne
{"title":"LLMs are one-shot URL classifiers and explainers","authors":"Fariza Rashid ,&nbsp;Nishavi Ranaweera ,&nbsp;Ben Doyle ,&nbsp;Suranga Seneviratne","doi":"10.1016/j.comnet.2024.111004","DOIUrl":null,"url":null,"abstract":"<div><div>Malicious URL classification represents a crucial aspect of cybersecurity. Although existing work comprises numerous machine learning and deep learning-based URL classification models, most suffer from generalisation and domain-adaptation issues arising from the lack of representative training datasets. Furthermore, these models fail to provide explanations for a given URL classification in natural human language. In this work, we investigate and demonstrate the use of Large Language Models (LLMs) to address this issue. Specifically, we propose an LLM-based one-shot learning framework to predict whether a given URL is benign or phishing. Inspired by work done in the area of Chain-of-Thought reasoning, our framework draws on LLMs’ reasoning capabilities to produce more accurate predictions. We evaluate our framework using three URL datasets and five state-of-the-art LLMs, and show that one-shot LLM prompting indeed provides performances close to supervised models, with GPT 4-Turbo being the best model returning an average F1 score of 0.92 in the one-shot setting. We conduct a quantitative analysis of the LLM explanations and show that most of the explanations provided by LLMs align with the post-hoc explanations of the supervised classifiers, and the explanations have high readability, coherency, and informativeness.</div></div>","PeriodicalId":50637,"journal":{"name":"Computer Networks","volume":"258 ","pages":"Article 111004"},"PeriodicalIF":4.6000,"publicationDate":"2025-02-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Networks","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S1389128624008363","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, HARDWARE & ARCHITECTURE","Score":null,"Total":0}
引用次数: 0

Abstract

Malicious URL classification represents a crucial aspect of cybersecurity. Although existing work comprises numerous machine learning and deep learning-based URL classification models, most suffer from generalisation and domain-adaptation issues arising from the lack of representative training datasets. Furthermore, these models fail to provide explanations for a given URL classification in natural human language. In this work, we investigate and demonstrate the use of Large Language Models (LLMs) to address this issue. Specifically, we propose an LLM-based one-shot learning framework to predict whether a given URL is benign or phishing. Inspired by work done in the area of Chain-of-Thought reasoning, our framework draws on LLMs’ reasoning capabilities to produce more accurate predictions. We evaluate our framework using three URL datasets and five state-of-the-art LLMs, and show that one-shot LLM prompting indeed provides performances close to supervised models, with GPT 4-Turbo being the best model returning an average F1 score of 0.92 in the one-shot setting. We conduct a quantitative analysis of the LLM explanations and show that most of the explanations provided by LLMs align with the post-hoc explanations of the supervised classifiers, and the explanations have high readability, coherency, and informativeness.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
llm是一次性的URL分类器和解释器
恶意URL分类是网络安全的一个重要方面。尽管现有的工作包括许多基于机器学习和深度学习的URL分类模型,但大多数都存在由于缺乏代表性训练数据集而产生的泛化和领域适应问题。此外,这些模型无法用自然的人类语言为给定的URL分类提供解释。在这项工作中,我们调查并演示了大型语言模型(llm)的使用来解决这个问题。具体来说,我们提出了一个基于法学的一次性学习框架来预测给定的URL是良性的还是网络钓鱼的。受思维链推理领域工作的启发,我们的框架利用法学硕士的推理能力来产生更准确的预测。我们使用三个URL数据集和五个最先进的LLM来评估我们的框架,并表明一次性LLM提示确实提供了接近监督模型的性能,GPT 4-Turbo是最好的模型,在一次性设置中平均F1得分为0.92。我们对LLM解释进行了定量分析,结果表明LLM提供的大多数解释与监督分类器的事后解释一致,并且解释具有较高的可读性、连贯性和信息性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Computer Networks
Computer Networks 工程技术-电信学
CiteScore
10.80
自引率
3.60%
发文量
434
审稿时长
8.6 months
期刊介绍: Computer Networks is an international, archival journal providing a publication vehicle for complete coverage of all topics of interest to those involved in the computer communications networking area. The audience includes researchers, managers and operators of networks as well as designers and implementors. The Editorial Board will consider any material for publication that is of interest to those groups.
期刊最新文献
A multimodal and perturbation-aware learning approach for robust traffic classification DACC: Discerning and adaptive offloading for coarse-grained content-aware video analytics Preemption-aware online AoI scheduling over two-state Markov channels Secure by design: Merging network and security bootstrapping for IoT systems through NDN Privacy-preserving multi-agent bitrate allocation for 360° video streaming
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1