Netinfo Security ›› 2026, Vol. 26 ›› Issue (1): 150-167.doi: 10.3969/j.issn.1671-1122.2026.01.013

Previous Articles     Next Articles

A SQL Injection Attack Detection Model Integrating GAT and Interpretable DQN

DENG Yuyang1, LU Tianliang1(), LI Zhihao1, MENG Haoyang1, MA Yuansheng2   

  1. 1. School of Information Network Security, People’s Public Security University of China, Beijing 100038, China
    2. Cyber Security Corps of the Beijing Municipal Public Security Bureau, Beijing 102611, China
  • Received:2025-08-25 Online:2026-01-10 Published:2026-02-13

Abstract:

With the continuous evolution of web applications and widespread deployment of database-driven systems, SQL injection attacks remain a critical research focus in web security defense due to their highly covert and destructive nature. To address challenges posed by structural complexity, semantic diversity, and scarcity of attack samples in SQL injection attack statements, this paper proposed a novel detection method integrating graph structure modeling with reinforcement learning mechanisms. The proposed approach models SQL statements as graph structures and leverages an enhanced Graph Attention Network (GAT) to fuse syntactic features from nodes and edges. A multi-agent reinforcement learning framework incorporating four specialized detection experts was constructed to enable dynamic ensemble decision-making. Additionally, an adversarial sample generation module specifically designed for SQL injection obfuscation characteristics enhanced the model’s capability in identifying complex mutation attacks. Furthermore, explainability analysis using LIME and SHAP methods improved system transparency and practical applicability. Experimental results demonstrate that the proposed method effectively mitigates detection bias caused by sample imbalance and attack pattern diversification while maintaining low computational resource consumption. The method achieves 0.955 detection accuracy and 0.978 AUC on comprehensive SQL injection datasets, significantly outperforming existing baseline methods and providing an effective solution for intelligent SQL injection attack detection.

Key words: SQL injection detection, graph attention network, multi-agent, DQN, interpretable reinforcement learning

CLC Number: