LLMs are One-Shot URL Classifiers and Explainers

Fariza Rashid, Nishavi Ranaweera, Ben Doyle, Suranga Seneviratne
9/22/2024
cs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Malicious URL classification represents a crucial aspect of cyber security. 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 that uses Chain-of-Thought (CoT) reasoning to predict whether a given URL is benign or phishing. 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, followed by Claude 3 Opus. 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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{rashid2024llms,
  title  = {LLMs are One-Shot URL Classifiers and Explainers},
  author = {Fariza Rashid and Nishavi Ranaweera and Ben Doyle and Suranga Seneviratne},
  year   = {2024},
  eprint = {2409.14306},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.14306v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.14306.svg)](https://codeofpaper.com/paper/2409.14306)

Discussion