Contextual request-response data boosts SQL injection detection accuracy by over 40%
Including request-response context in training data improves SQL injection detection accuracy by more than 40% versus payload-only data
Security & privacy arXiv 3 Mar 2026 Benchmark Prototype evidence
Published as “Multi-Agent Honeypot-Based Request-Response Context Dataset for Improved SQL Injection Detection Performance”
Why it matters
Adding request-response context can substantially boost detection rates of SQL injection, making lightweight models more viable for real-time deployment.
Summary
The authors show that training SQL injection detectors on a request-response context dataset yields large accuracy gains over payload-only data, e.g., CNN improves by 41.3% on a binary task. They built a multi-agent honeypot to generate 140,973 labeled request-response pairs and evaluated lightweight CNN, RNN, LSTM and BiLSTM models, as well as knowledge-distilled versions. The evidence is based on controlled experiments comparing the same models on context versus payload datasets, but the absolute accuracies of the lightweight models remain modest.
What they found 2
- Contextual data yields large accuracy improvements for lightweight models
“CNN showed a 41.3% improvement in 2-class classification task and a 14.6% improvement in 7-class classification task, and BiLSTM improved by 10.8% in 2-class and 7.8% in 7class.”
- Knowledge distillation further amplifies the benefit of context data
“BiLSTM achieved a 53.1% improvement, LSTM a 48.8% improvement, and RNN a 24.4% improvement.”
Caveats 3
- Even with contextual information, limited-capacity models struggle to fully capture the complexity of SQLi patterns.
- However, the absolute accuracy of lightweight models on the Context dataset remains unsatisfactory.
- only the RNN has a slight deviation in the 2-class classification task.
What’s new here 4
- Construction of a large (140,973 pairs) request-response dataset using a multi-agent honeypot system
- Inclusion of server response metadata (status codes, error messages, latency) as features for SQLi detection
- Empirical demonstration that contextual data improves lightweight neural models and distilled models
- Evaluation of both 2-class and 7-class classification tasks with and without context