HYBRID TRANSFORMER-BASED CLASSIFICATION FOR WEB-BASED INJECTION ATTACK DETECTION: A NOVEL ROBERTA-XLNET APPROACH

Web-based injection attacks such as SQL Injection (SQLi) and Cross-Site Scripting (XSS) remain significant cybersecurity threats, enabling adversaries to manipulate databases, execute unauthorized commands, and compromise sensitive data. Traditional detection mechanisms—including rule-based and anomaly-based intrusion detection systems—struggle with high false positive rates and limited adaptability to evolving attack vectors. This research introduces a novel hybrid transformer-based classification model, integrating RoBERTa and XLNet architectures to enhance web-based injection attack detection. The hybrid model capitalizes on RoBERTa’s dynamic contextual embeddings and XLNet’s permutation-based language understanding to provide a robust and generalized detection mechanism capable of handling obfuscated and zero-day payloads. The study utilizes two labeled datasets: 43,135 SQLi and 16,985 XSS payloads, preprocessed through standardized cleaning, tokenization, and padding techniques. The hybrid architecture extracts [CLS] and finaltoken embeddings from RoBERTa and XLNet respectively, concatenates them into a 1536-dimensional feature vector, and classifies through a three-layer dense neural network. Evaluation metrics include Accuracy, Precision, Recall, F1 Score, False Positive Rate, and Computational Cost.Results reveal that the hybrid model outperforms standalone BERT, RoBERTa, and XLNet implementations, achieving 97.66% accuracy, 98% precision, and 97% recall, while maintaining efficient computational performance via frozen transformer layers. The model demonstrates superior robustness against complex payloads, reduced overfitting, and scalable potential for Security Operations Centers (SOCs). This approach offers a novel and effective solution for intelligent, real-time web-based threat detection.

Authors

Publication Details

Journal
International Journal of Computer Science and Information Technology
Published
2025-06-28
DOI
https://doi.org/10.5121/ijcsit.2025.17301
Primary Topic
Anomaly Detection Techniques and Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

HYBRID TRANSFORMER-BASED CLASSIFICATION FOR WEB-BASED INJECTION ATTACK DETECTION: A NOVEL ROBERTA-XLNET APPROACH

H. J. S. Fernando, Ayesha Wijesooriya, Ranuja Seethawaka, Chathurya Nambuwasam et al.
International Journal of Computer Science and Information Technology
Anomaly Detection Techniques and Applications
article

HYBRID TRANSFORMER-BASED CLASSIFICATION FOR WEB-BASED INJECTION ATTACK DETECTION: A NOVEL ROBERTA-XLNET APPROACH

H. J. S. Fernando, Ayesha Wijesooriya, Ranuja Seethawaka, Chathurya Nambuwasam, D.K.W.G.G.T. Chandrasiri, K.A.S. Kavithma
article en

Abstract

Web-based injection attacks such as SQL Injection (SQLi) and Cross-Site Scripting (XSS) remain significant cybersecurity threats, enabling adversaries to manipulate databases, execute unauthorized commands, and compromise sensitive data. Traditional detection mechanisms—including rule-based and anomaly-based intrusion detection systems—struggle with high false positive rates and limited adaptability to evolving attack vectors. This research introduces a novel hybrid transformer-based classification model, integrating RoBERTa and XLNet architectures to enhance web-based injection attack detection. The hybrid model capitalizes on RoBERTa’s dynamic contextual embeddings and XLNet’s permutation-based language understanding to provide a robust and generalized detection mechanism capable of handling obfuscated and zero-day payloads. The study utilizes two labeled datasets: 43,135 SQLi and 16,985 XSS payloads, preprocessed through standardized cleaning, tokenization, and padding techniques. The hybrid architecture extracts [CLS] and finaltoken embeddings from RoBERTa and XLNet respectively, concatenates them into a 1536-dimensional feature vector, and classifies through a three-layer dense neural network. Evaluation metrics include Accuracy, Precision, Recall, F1 Score, False Positive Rate, and Computational Cost.Results reveal that the hybrid model outperforms standalone BERT, RoBERTa, and XLNet implementations, achieving 97.66% accuracy, 98% precision, and 97% recall, while maintaining efficient computational performance via frozen transformer layers. The model demonstrates superior robustness against complex payloads, reduced overfitting, and scalable potential for Security Operations Centers (SOCs). This approach offers a novel and effective solution for intelligent, real-time web-based threat detection.

International Journal of Computer Science and Information TechnologyVol. 17(3)
Openalex Percentile: Top 92%
Anomaly Detection Techniques and Applications
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.

HYBRID TRANSFORMER-BASED CLASSIFICATION FOR WEB-BASED INJECTION ATTACK DETECTION: A NOVEL ROBERTA-XLNET APPROACH — H. J. S. Fernando, Ayesha Wijesooriya, et al. · International Journal of Computer Science and Information Technology (2025) | TGRS Research Map | TGRS