Every click on a link is a small act of trust, and cybercriminals have learned to exploit it with remarkable sophistication. Phishing pages, malware distribution servers, and defaced websites all announce themselves through their web addresses, yet the signals are subtle, constantly shifting, and often deliberately disguised. A team of researchers from Vietnam and India has now built a detection system that reads URLs the way a linguist reads an unfamiliar sentence, character by character, while keeping every step of its reasoning open to inspection. The framework, called X-URL, is described in the journal Discover Artificial Intelligence and tackles one of the most persistent problems in cybersecurity: how to make a highly accurate classifier that does not behave like a black box.
The scale of the challenge is easy to underestimate. Traditional defenses against malicious links relied on blacklists and reputation systems, which are essentially reactive catalogs of known bad addresses. These tools are computationally cheap, but they suffer from update latency and can be sidestepped entirely by techniques such as Domain Generation Algorithms, which churn out endless streams of random domains, or short-URL services that obscure the true destination. Early machine learning approaches moved beyond blacklists by analyzing lexical features such as string length, character distributions, and host metadata, but they depended on labor-intensive manual feature engineering that struggled to keep pace with zero-day attacks.
Deep learning changed the calculus by learning representations directly from raw character sequences. Convolutional neural networks proved adept at capturing local character patterns, while recurrent architectures, particularly Long Short-Term Memory networks, could model the longer-range dependencies that matter in URLs, where the significance of a character often depends on its position within a path or query string. X-URL builds on this lineage with a character-level Bidirectional LSTM, but its real contribution is architectural discipline rather than a novel network. The researchers explicitly separate the statistical analysis, the predictive model, the hyperparameter search, and the explanation layer, so that no component silently contaminates another.
That separation begins with a Quantitative Feature Analysis branch, which computes four interpretable statistics for every URL: string length, digit density, special-character frequency, and character-level Shannon entropy, a measure of how randomized the character distribution is. The branch then evaluates how much each feature helps distinguish the four target classes, namely benign, defacement, malware, and phishing, using Information Gain, and normalizes those gains into Priority Coefficients that sum to one. Crucially, these coefficients are computed from training data only and are never fed into the neural network itself. They serve as an independent statistical audit, not as inputs, attention gates, or loss modifiers, a deliberate choice that prevents ambiguity about what the model is actually learning from.
The predictive path is strikingly clean. Each URL is tokenized into a sequence of up to 200 characters drawn from a vocabulary of 95 printable ASCII symbols, mapped to 128-dimensional trainable embeddings, and passed through a 128-unit bidirectional LSTM. Global average pooling and dropout precede a four-class softmax output. Because the underlying dataset is heavily imbalanced, with benign URLs dominating and malware samples scarce, the network trains with a class-frequency weighted cross-entropy loss that penalizes errors on rare, high-risk categories more severely. The resulting weights are approximately 0.37 for benign URLs but 6.78 for malware, a more than eighteenfold difference that reflects how badly a model can fail if it simply learns to predict the majority class.
Hyperparameter selection was handled by Bayesian optimization, which searched over learning rate, batch size, hidden units, and dropout while maximizing validation macro-F1. On the cleaned training partition, stratified five-fold cross-validation gave the optimized weighted BiLSTM a mean accuracy of 98.53 percent with a standard deviation of just 0.03, outperforming a raw BiLSTM at 97.74 percent, BiLSTM-Random Forest at 98.16 percent, BiLSTM-XGBoost at 97.93 percent, and a character-level CNN at 96.03 percent. A separate hold-out snapshot of 130,236 URLs reached 97.73 percent accuracy and 97.72 percent weighted F1, confirming that the gains were not an artifact of a single split.
The statistical branch produced findings that are genuinely revealing about the anatomy of malicious links. Digit density carried the largest Priority Coefficient at 0.439, followed by Shannon entropy at 0.334 and special-character frequency at 0.223, while URL length contributed a negligible 0.003. Class-wise averages tell an even sharper story: malware URLs showed the highest digit density at 0.2608, consistent with the obfuscated, machine-generated addresses used by automated distribution infrastructure, while defacement URLs exhibited the highest special-character frequency and entropy, reflecting structural chaos. Phishing URLs, by contrast, had the lowest entropy and special-character frequency, exactly what one would expect from addresses crafted to look human-readable and trustworthy. All four features showed statistically significant differences across classes, with an F-statistic above 30,000 for digit density.
Where the model stumbled is as informative as where it excelled. In the hold-out analysis, defacement detection was nearly perfect at 99.75 percent recall, but phishing remained the weakest class, with 90.94 percent recall and 92.46 percent F1. The single largest error category involved 1,319 phishing URLs predicted as benign, a failure mode with obvious security consequences, since a missed phishing link is precisely the threat most likely to reach an end user. The authors are careful not to speculate beyond the evidence, noting that without a controlled perturbation study they cannot determine whether these errors stem from HTTPS tokens, common top-level domains, homoglyph tricks, or shortened URLs. A SHAP DeepExplainer was applied after training to attribute predictions to individual character positions, but strictly as a qualitative post-hoc audit, with no feedback into training or optimization.
What makes the paper unusual, and arguably a model for the field, is its candor about limits. The evaluation protocol removed exact duplicates but did not group URLs by registered domain, cluster near-duplicate paths, or split data chronologically, meaning structurally related URLs may straddle the training and test partitions. The reported scores therefore describe within-distribution random-split performance, not proven generalization to unseen domains or future attack campaigns. The team also notes that no same-split Transformer baseline, repeated independent seeds, or formal significance tests were available, that SHAP fidelity and stability were not quantitatively validated, and that production throughput, latency, adversarial robustness, and analyst validation were never measured. The word explainable was even removed from the title in response to these constraints.
That honesty does not diminish the achievement; it sharpens it. X-URL demonstrates that a compact recurrent network, trained with imbalance-aware loss and selected through principled validation, can classify malicious URLs across four threat categories with state-of-the-art-adjacent accuracy while every analytical claim is auditable and every untested claim is flagged as such. The roadmap the authors propose, including domain-disjoint and temporal testing, adversarial URL perturbations, calibrated probability metrics, and measured deployment benchmarks, reads like a checklist for what credible AI security research should look like. In a domain where a single misclassified link can cost a company its credentials, knowing exactly what a model knows, and what it merely appears to know, may prove to be the most valuable feature of all.
Subject of Research: Explainable deep learning for multi-class malicious URL classification using character-level BiLSTM and priority-coefficient feature analysis
Article Title: An explainable deep learning framework for multi-class malicious URL classification using priority-coefficient analysis
Article References: An explainable deep learning framework for multi-class malicious URL classification using priority-coefficient analysis. (n.d.). https://doi.org/10.1007/s44163-026-02458-8
Image Credits: AI Generated
DOI: 10.1007/s44163-026-02458-8
Keywords: malicious URL detection, deep learning, BiLSTM, explainable AI, SHAP, cybersecurity, phishing, malware, class imbalance, Bayesian optimization, Shannon entropy, multi-class classification
News Source: Blake Davidson. (October 14, 2026). AI Learns to Read Dangerous URLs Character by Character While Showing Its Work. Scienmag.



