HCAN: a hierarchical CNN–attention network for multi-class malicious URL detection using dual-input feature fusion
Year: 2026
Type: article
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.
Source: Scientific Reports
Authors: S. Devika, Arshpreet Kaur
Institutions: Amity University Bengaluru, Manipal University Jaipur
Language: English
Topic: Spam and Phishing Detection
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: gold
Estimated APC paid: $2,690
OpenAlex ID: W7235722852
