Lexical Phishing URL Detection: Random Forest versus SVM with SHAP Explanations

Phishing remains a persistent threat, and lexical analysis of the Uniform Resource Locator (URL) can block suspicious addresses before any page content is downloaded. This study compares Random Forest, linear Support Vector Machine (SVM), and radial basis function (RBF) SVM for phishing URL detection on the public PhiUSIIL dataset, using two main feature scenarios: all 50 numeric features and 18 purely lexical features computed from the URL string. After 808 duplicate feature vectors were removed, 234,987 URLs were split once into stratified training and test sets (80:20), the models were tuned by five-fold cross-validation, and their predictions were explained with SHapley Additive exPlanations (SHAP). With all features, Random Forest made no test errors, but one derived similarity feature supplied 57.1% of its explanation, so this scenario is not a realistic upper bound. With lexical features only, F1-scores reached 0.9970 for Random Forest, 0.9976 for linear SVM, and 0.9977 for RBF SVM. Random Forest made significantly more errors than both SVMs, which did not differ from each other. Linear SVM was the most practical model, with no false positives and a prediction time of 0.17 ms per 1,000 URLs. However, a one-line rule that labels bare HTTPS addresses as legitimate reached an F1-score of 0.9956, because every legitimate URL in the dataset shares that structure. Lexical detection therefore appears easier on this benchmark than it probably is in practice, and cross-dataset validation is needed before deployment.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-29
DOI
https://doi.org/10.5281/zenodo.24642837
Primary Topic
Spam and Phishing Detection
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Lexical Phishing URL Detection: Random Forest versus SVM with SHAP Explanations

Tukiyat Tukiyat, Febriyansyah
Zenodo (CERN European Organization for Nuclear Research)
Spam and Phishing Detection
preprint

Lexical Phishing URL Detection: Random Forest versus SVM with SHAP Explanations

Tukiyat Tukiyat, Febriyansyah
preprint en

Abstract

Phishing remains a persistent threat, and lexical analysis of the Uniform Resource Locator (URL) can block suspicious addresses before any page content is downloaded. This study compares Random Forest, linear Support Vector Machine (SVM), and radial basis function (RBF) SVM for phishing URL detection on the public PhiUSIIL dataset, using two main feature scenarios: all 50 numeric features and 18 purely lexical features computed from the URL string. After 808 duplicate feature vectors were removed, 234,987 URLs were split once into stratified training and test sets (80:20), the models were tuned by five-fold cross-validation, and their predictions were explained with SHapley Additive exPlanations (SHAP). With all features, Random Forest made no test errors, but one derived similarity feature supplied 57.1% of its explanation, so this scenario is not a realistic upper bound. With lexical features only, F1-scores reached 0.9970 for Random Forest, 0.9976 for linear SVM, and 0.9977 for RBF SVM. Random Forest made significantly more errors than both SVMs, which did not differ from each other. Linear SVM was the most practical model, with no false positives and a prediction time of 0.17 ms per 1,000 URLs. However, a one-line rule that labels bare HTTPS addresses as legitimate reached an F1-score of 0.9956, because every legitimate URL in the dataset shares that structure. Lexical detection therefore appears easier on this benchmark than it probably is in practice, and cross-dataset validation is needed before deployment.

Zenodo (CERN European Organization for Nuclear Research)
Universitas Pamulang (ID)
Spam and Phishing Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon