IP-Augmented Multi-Modal Malicious URL Detection Via Token-Contrastive Representation Enhancement and Multi-Granularity Fusion
Ye Tian, Yanqiu Yu, Liangliang Song, Zhiquan Liu, Yanbin Wang, Jianguo Sun
TL;DR
CURL-IP tackles malicious URL detection by fusing URL content with IP-context signals through a token-aware Transformer (TACL-BERT), a cross-layer multi-scale aggregator (CLMSA), and a blockwise multimodal coupler (BMMC). The approach preserves fine-grained lexical cues, models hierarchical semantic structure, and enables fine-grained cross-modal interactions to enhance robustness against obfuscation and adversarial perturbations. Across binary and multi-class tasks, with adversarial testing and real-world validation, CURL-IP achieves state-of-the-art performance in F1 and AUC and demonstrates strong resilience to evasion tactics. The framework offers practical deployment advantages, including efficiency and compatibility with production security stacks, indicating strong potential for real-world cybersecurity deployments.
Abstract
Malicious URL detection remains a critical cybersecurity challenge as adversaries increasingly employ sophisticated evasion techniques including obfuscation, character-level perturbations, and adversarial attacks. Although pre-trained language models (PLMs) like BERT have shown potential for URL analysis tasks, three limitations persist in current implementations: (1) inability to effectively model the non-natural hierarchical structure of URLs, (2) insufficient sensitivity to character-level obfuscation, and (3) lack of mechanisms to incorporate auxiliary network-level signals such as IP addresses-all essential for robust detection. To address these challenges, we propose CURL-IP, an advanced multi-modal detection framework incorporating three key innovations: (1) Token-Contrastive Representation Enhancer, which enhances subword token representations through token-aware contrastive learning to produce more discriminative and isotropic embeddings; (2) Cross-Layer Multi-Scale Aggregator, employing hierarchical aggregation of Transformer outputs via convolutional operations and gated MLPs to capture both local and global semantic patterns across layers; and (3) Blockwise Multi-Modal Coupler that decomposes URL-IP features into localized block units and computes cross-modal attention weights at the block level, enabling fine-grained inter-modal interaction. This architecture enables simultaneous preservation of fine-grained lexical cues, contextual semantics, and integration of network-level signals. Our evaluation on large-scale real-world datasets shows the framework significantly outperforms state-of-the-art baselines across binary and multi-class classification tasks.
