Beyond Semantic Noise: Diagnosing and Correcting Structural Bias in Code-Mixed Script Detection via XAI-Driven Hybridization
Preprint
- 18 December 2025
- preprint
- Published by MDPI AG in Preprints.org
Abstract
In the contemporary cybersecurity landscape, the detection of code-mixed malicious scripts embedded within high-trust domains (e.g., governmental and academic websites) constitutes a critical defensive challenge. Traditional Transformer-based models, while effective in natural language processing, often exhibit "Structural Bias," where they erroneously interpret the benign complexity of legacy HTML structures as malicious obfuscation, resulting in elevated false positive rates. To address this limitation, this study proposes an XAI-Driven Hybrid Architecture that synergizes context-aware semantic embeddings from WangChanBERTa with outlier-robust structural features. Validated on a rigorously curated high-fidelity corpus of 5,000 samples, our model achieves a state-of-the-art F1-Score of 0.9908. Beyond standard metrics, Explainable AI (XAI) diagnosis reveals a critical "Dual-Validation" mechanism: structural features effectively veto semantic hallucinations triggered by benign complexity, acting as a crucial safety net. Crucially, the proposed architecture functions as a 'Dual-Validation' mechanism, where structural features effectively veto semantic hallucinations triggered by benign complexity. The integration of these components leads to a 50% reduction in the False Positive Rate (FPR), decreasing from 0.024 in baseline scenarios to 0.012, thereby confirming the operational significance of Selective Integration. This method effectively reduces 'alert fatigue,' providing a scalable solution for SOC analysts tasked with protecting critical infrastructure from advanced code-mixed threats.Keywords
All Related Versions
- Version 1, 2025-12-18, Preprints
- Published version: Journal of Cybersecurity and Privacy, 6 (2), 51.
This publication has 13 references indexed in Scilit:
- PhayaThaiBERT: Enhancing a Pretrained Thai Language Model with Unassimilated LoanwordsACM Transactions on Asian and Low-Resource Language Information Processing, 2025
- A Fusion-Based Approach with Bayes and DeBERTa for Efficient and Robust Spam DetectionAlgorithms, 2025
- From Static to AI-Driven Detection: A Comprehensive Review of Obfuscated Malware TechniquesIEEE Access, 2025
- Proactive Detection of Malicious Webpages Using Hybrid Natural Language Processing and Ensemble Learning TechniquesJournal of information and organizational sciences, 2024
- Detection of malicious URLs using Temporal Convolutional Network and Multi-Head Self-Attention mechanismApplied Soft Computing, 2024
- Handling imbalanced data in intrusion detection using time weighted Adaboost support vector machine classifier and crossover boosted Dwarf Mongoose Optimization algorithmApplied Soft Computing, 2024
- TransURL: Improving malicious URL detection with multi-layer Transformer encoding and multi-scale pyramid featuresComputer Networks, 2024
- Detecting Hidden Illegal Online Gambling on .go.id Domains Using Web Scraping AlgorithmsMATRIK : Jurnal Manajemen, Teknik Informatika dan Rekayasa Komputer, 2024
- A Discriminant Information Theoretic Learning Framework for Multi-modal Feature RepresentationACM Transactions on Intelligent Systems and Technology, 2023
- Phishing Detection System Through Hybrid Machine Learning Based on URLIEEE Access, 2023