Transformer language models detect HTTP anomalies and expose training data backdoors
Transformer-based language models can accurately detect anomalous HTTP requests and reveal mislabeled or contaminated training samples
Security & privacy arXiv 27 Aug 2026 Method Simulation evidence
Published as “X-WAD: eXplainable Web Anomaly Detection”
Why it matters
Ensuring high-quality labeling of web traffic datasets is critical, as even modest contamination can severely degrade anomaly detection and introduce stealthy backdoor-like failures.
Summary
Fixing labeling contamination in the SR-BH2020 HTTP request dataset dramatically improves anomaly detection: F1 scores rise to 98.29% (ModernBERT-large) and 98.84% (SmolLM2-360M) and false-negative rates drop to 3.02% and 2.12% respectively. The paper shows that the original models suffered high false-negative rates (23.96% and 14.82%) due to mislabeled attack patterns. X-WAD provides token-level surprisal explanations that expose these mislabeled patterns and enable dataset correction. Evidence is based on experiments with two transformer language models on a public benchmark; no abstract was provided, so details beyond the given sections are unavailable.
What they found 1
- Both models exhibit high false-negative rates on the original dataset.
“Both models show an unexpectedly high FNR: 23.96% for ModernBERT-large and 14.82% for SmolLM2-360M.”
Caveats 4
- some benign samples may have been incorrectly relabeled as anomalous. This may increase the number of false positives produced by the anomaly detector;
- the availability of a labeled test set allowed us to explicitly quantify performance metrics such as FNR and FPR, a condition that is not always met in real-world deployments.
- due to the large scale of the dataset, exhaustive verification was not feasible.
- the only exception is the “Protocol Manipulation” class, whose residual FNR suggests that some attack patterns within this class may not have been fully captured during the dataset refinement process.
What’s new here 4
- Introduces X-WAD, a tool that maps language model logits to token-level surprisal scores for fine-grained explanations of HTTP anomalies.
- Uses the explainability analysis to discover and quantify labeling inconsistencies in the SR-BH2020 dataset.
- Provides a corrected version of the dataset (SR-BH2020-fix) and demonstrates substantial performance gains after cleaning.
- Shows that training-data contamination can cause backdoor-like misclassifications in semi-supervised web anomaly detectors.