HCAN: a hierarchical CNN–attention network for multi-class malicious URL detection using dual-input feature fusion

Abstract Malicious URL detection is a challenging task due to the lexical ambiguity between different threat classes and lack of URL representation learning in previous works, which motivates us to design HCAN (Hierarchical CNN–Attention Network) for classifying benign, phishing, defacement, and malware URLs given their raw character sequences and handcrafted structured features. The presented approach utilizes hierarchical convolutional neural networks with multi-scale convolution, residual convolution, and multi-head self-attention modules to learn sequential patterns in the character-sequence input at different levels of abstraction. The character-based representation is combined with another sub-network processing 64 handcrafted lexical, statistical, entropy, IP, HTTPS and phishing keyword features to yield a joint embedding for downstream classification. Experiments were carried out on 629,822 pre-processed URLs from the Malicious-Phish dataset, employing leakage-aware pre-processing and five-fold out-of-fold validation. On the main dataset, HCAN achieved 92.56% accuracy, 90.61% macro-F1 and 93% weighted-F1, with phishing URLs being the hardest class with an F1 of 79%. An independent performance evaluation on external URL dataset without any re-training or fine-tuning demonstrated that our approach achieved 87.43% accuracy and 82.48% macro-F1, highlighting the ability of our approach to generalize across different URL datasets, while also uncovering some performance gaps in the face of distribution shifts. The results show the potential of the hierarchical architecture using dual-branch design for four-class malicious URL identification.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-11-17
DOI
https://doi.org/10.1038/s41598-026-77772-3
Primary Topic
Spam and Phishing Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

HCAN: a hierarchical CNN–attention network for multi-class malicious URL detection using dual-input feature fusion

Arshpreet Kaur, S. Devika
5 links
Scientific Reports
Spam and Phishing Detection
article

HCAN: a hierarchical CNN–attention network for multi-class malicious URL detection using dual-input feature fusion

Arshpreet Kaur, S. Devika
article en

Abstract

Abstract Malicious URL detection is a challenging task due to the lexical ambiguity between different threat classes and lack of URL representation learning in previous works, which motivates us to design HCAN (Hierarchical CNN–Attention Network) for classifying benign, phishing, defacement, and malware URLs given their raw character sequences and handcrafted structured features. The presented approach utilizes hierarchical convolutional neural networks with multi-scale convolution, residual convolution, and multi-head self-attention modules to learn sequential patterns in the character-sequence input at different levels of abstraction. The character-based representation is combined with another sub-network processing 64 handcrafted lexical, statistical, entropy, IP, HTTPS and phishing keyword features to yield a joint embedding for downstream classification. Experiments were carried out on 629,822 pre-processed URLs from the Malicious-Phish dataset, employing leakage-aware pre-processing and five-fold out-of-fold validation. On the main dataset, HCAN achieved 92.56% accuracy, 90.61% macro-F1 and 93% weighted-F1, with phishing URLs being the hardest class with an F1 of 79%. An independent performance evaluation on external URL dataset without any re-training or fine-tuning demonstrated that our approach achieved 87.43% accuracy and 82.48% macro-F1, highlighting the ability of our approach to generalize across different URL datasets, while also uncovering some performance gaps in the face of distribution shifts. The results show the potential of the hierarchical architecture using dual-branch design for four-class malicious URL identification.

Scientific Reports
Amity University Bengaluru (IN), Manipal University Jaipur (IN)
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