XAI-Enabled Deep Residual MLP Model for Detecting Cross-Site Scripting (XSS) Attacks

Cross-site scripting (XSS) remains one of the most prevalent web application vulnerabilities, with over 8,500 XSS vulnerabilities reported in 2025 alone, accounting for nearly 20% of all reported security vulnerabilities. Deep learning approaches show promise for XSS detection, but existing models struggle with high dimensionality, sparsity, class imbalance, and lack of interpretability. To address these gaps, we propose a novel XAI-driven Deep Residual MLP framework that integrates rigorous feature selection, SHAP-based explainability, and comprehensive class imbalance handling. Evaluated on a large-scale dataset of 138,569 samples with 167 features, our framework employs a multi-stage feature selection pipeline (variance thresholding + ANOVA F-test) that reduces features to 50 informative inputs, combined with a deep residual MLP architecture with batch normalization, residual connections, and progressive dropout. We systematically compare four class balancing strategies: unbalanced baseline with class weights, SMOTE, SMOTE-Tomek, and SMOTE-ENN. Counter-intuitively, the unbalanced baseline with class weights achieves the highest minority recall (0.99), accuracy (0.9900), AUC-ROC (0.9994), and lowest false negatives (58, 1.0% FNR), outperforming all SMOTE variants on recall. SMOTE-Tomek achieves the best precision for malicious payloads (0.9938) and overall accuracy (0.9920), while SMOTE-ENN achieves the best recall among SMOTE variants (0.9811). SHAP analysis reveals statistical entropy, special character frequency, and JavaScript keyword presence as the most important features, with local explanations providing transparent justifications for each prediction. Our framework bridges the gap between detection effectiveness and interpretability, offering security analysts actionable insights for trust, forensic investigation, and regulatory compliance.

Authors

Institutions

Publication Details

Journal
Journal of Transformative Technologies and Sustainable Development
Published
2026-11-17
DOI
https://doi.org/10.1007/s41314-026-00101-z
Primary Topic
Web Application Security Vulnerabilities
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

XAI-Enabled Deep Residual MLP Model for Detecting Cross-Site Scripting (XSS) Attacks

Sudhir Kumar Mohapatra, Kibreab Adane, Aliazar Deneke, Durga Prasad Sharma
5 links
Journal of Transformative Technologies and Sustainable Development
Web Application Security Vulnerabilities
article

XAI-Enabled Deep Residual MLP Model for Detecting Cross-Site Scripting (XSS) Attacks

Sudhir Kumar Mohapatra, Kibreab Adane, Aliazar Deneke, Durga Prasad Sharma
article en

Abstract

Cross-site scripting (XSS) remains one of the most prevalent web application vulnerabilities, with over 8,500 XSS vulnerabilities reported in 2025 alone, accounting for nearly 20% of all reported security vulnerabilities. Deep learning approaches show promise for XSS detection, but existing models struggle with high dimensionality, sparsity, class imbalance, and lack of interpretability. To address these gaps, we propose a novel XAI-driven Deep Residual MLP framework that integrates rigorous feature selection, SHAP-based explainability, and comprehensive class imbalance handling. Evaluated on a large-scale dataset of 138,569 samples with 167 features, our framework employs a multi-stage feature selection pipeline (variance thresholding + ANOVA F-test) that reduces features to 50 informative inputs, combined with a deep residual MLP architecture with batch normalization, residual connections, and progressive dropout. We systematically compare four class balancing strategies: unbalanced baseline with class weights, SMOTE, SMOTE-Tomek, and SMOTE-ENN. Counter-intuitively, the unbalanced baseline with class weights achieves the highest minority recall (0.99), accuracy (0.9900), AUC-ROC (0.9994), and lowest false negatives (58, 1.0% FNR), outperforming all SMOTE variants on recall. SMOTE-Tomek achieves the best precision for malicious payloads (0.9938) and overall accuracy (0.9920), while SMOTE-ENN achieves the best recall among SMOTE variants (0.9811). SHAP analysis reveals statistical entropy, special character frequency, and JavaScript keyword presence as the most important features, with local explanations providing transparent justifications for each prediction. Our framework bridges the gap between detection effectiveness and interpretability, offering security analysts actionable insights for trust, forensic investigation, and regulatory compliance.

Journal of Transformative Technologies and Sustainable Development
Sri Sri University (IN), Arba Minch University (ET)
Web Application Security Vulnerabilities
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