arXiv(opens in a new tab)cs.CRAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.27172

X-WAD: eXplainable Web Anomaly Detection

Matteo Bitussi, Roberto Doriguzzi-Corin

This is the author's version of an article accepted for publication at the 2026 International Conference on Artificial Intelligence Models and Systems (iAIMS 2026). The source code associated with this project is available at https://github.com/mattebit/x-wad.

X-WAD: eXplainable Web Anomaly Detection

Matteo Bitussi, Roberto Doriguzzi-Corin

Center for Cybersecurity, Fondazione Bruno Kessler, Italy

Abstract—The rapid growth of web-based services, particularly API-driven architectures, reflects an increasing reliance on distributed systems, exposing sensitive data to security risks and making the adoption of automated defensive mechanisms essential. In this context, where benign traffic predominates in real-world settings, modern defenses increasingly model normal behavior, relying on semi-supervised approaches trained on only normal data. However, ensuring the complete absence of anomalous instances in such training data is inherently difficult in practice, and mislabeled or contaminated attack samples can introduce backdoors into the learned defense, causing the model to silently misclassify certain attack patterns as normal behavior. This paper investigates the effectiveness of Transformer-based Language Models (TLMs) in detecting anomalies in HTTP requests, focusing on providing detailed explanations for the detected anomalies. The study employs token-level logit-based surprisal mapping to provide both an anomaly score and a direct, detailed explanation via a heatmap-like highlighting. The effectiveness of the proposed explainability approach is demonstrated by the discovery of labeling inconsistencies in a popular public dataset, revealing how anomalous contamination in the training data had induced backdoor-like failures in the detection models.

Index Terms—Explainability, Anomaly Detection, Web Security, Transformer Language Models

References (26)

  • Digital fortresses under siege: Threats to modern application architectures
  • Sec2vec: Anomaly Detection in HTTP Traffic and Malicious URLs
  • An attack detection framework based on bert and deep learning
  • Logbert: Log anomaly detection via bert
  • AnoLLM: Large Language Models for Tabular Anomaly Detection
  • Interpretable online log analysis using large language models with prompt strategies
  • SmolLM2: When Smol Goes Big – Data-Centric Training of a Small Language Model (opens arXiv in a new tab)
  • Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference
  • SR-BH 2020 multi-label dataset
  • Capturing the security expert knowledge in feature selection for web application attack detection
  • Deep Learning in NLP for Anomalous HTTP Requests Detection
  • IncWAD: An Incremental Learning Approach for Web Attack Detection using MLOps
  • Zero Trust: Deep Learning and NLP for HTTP Anomaly Detection in IDS
  • E-webguard: Enhanced neural architectures for precision web attack detection
  • An effective unsupervised cyber attack detection on web applications using gaussian mixture model
  • X-wad: explainable web anomaly detection
  • On behalf of the stakeholders: Trends in nlp model interpretability in the era of llms
  • A comparative analysis of model agnostic techniques for explainable artificial intelligence
  • Feature selection strategies: a comparative analysis of shap-value and importance-based methods
  • Problems with shapley-value-based explanations as feature importance measures
  • The inadequacy of shapley values for explainability (opens arXiv in a new tab)
  • Attention is not explanation
  • Chain-of-thought is not explainability
  • M. Gniewkowski et al., “HTTP2vec: Embedding of HTTP Requests for Detection of Anomalous Traffic,” preprint arXiv:2108.01763, 2021. (opens arXiv in a new tab)
  • ADALog: Adaptive Unsupervised Anomaly detection in Logs with Self-attention Masked Language Model
  • Bert: Pre-training of deep bidirectional transformers for language understanding