Optimization of the Recurrent Neural Network (RNN) Model for SQL Injection Intrusion Detection In Databases

Authors

  • Turmuzi Master Informatics Engineering, Amikom Yogyakarta University, 55283, Indonesia Author
  • Kusrini Master Informatics Engineering, Amikom Yogyakarta University, 55283, Indonesia Author https://orcid.org/0000-0001-9573-3909

DOI:

https://doi.org/10.51747/energy.v15i2.15201

Keywords:

LSTM, RNN, Intrusion Detection, SQL Injection

Abstract

This study aims to optimize the Recurrent Neural Network (RNN) model, particularly using Long Short-Term Memory (LSTM) layers, for detecting SQL injection attacks in database systems. SQL injection remains a critical cybersecurity threat, capable of compromising sensitive data and damaging organizational integrity. Using a dataset sourced from Kaggle, the research explores various hyperparameter combinations, including activation functions (Softmax, Tanh, ReLU, PReLU, and LReLU), optimizers (Adam, SGD), learning rates (0.001, 0.0001), and regularization methods (Dropout and L2). Experimental results show that the highest model performance was achieved using the Tanh activation function, Adam optimizer, a learning rate of 0.001, and 100 epochs—resulting in an accuracy of 98.17% and a loss value of 0.4084. Tanh also performed well with slightly lower accuracy. The findings demonstrate that using adaptive optimizers like Adam and non-saturating activation functions significantly improves model performance. The study also addresses challenges such as class imbalance and emphasizes the importance of comprehensive evaluation metrics beyond accuracy. These results confirm that an optimized RNN-LSTM model offers high detection accuracy with low false positive rates, suitable for real-time intrusion detection systems. This research contributes to strengthening database security and serves as a foundation for further development in intelligent threat detection models.

Downloads

Published

2025-08-22

How to Cite

Optimization of the Recurrent Neural Network (RNN) Model for SQL Injection Intrusion Detection In Databases. (2025). ENERGY: JURNAL ILMIAH ILMU-ILMU TEKNIK, 15(2), 121-134. https://doi.org/10.51747/energy.v15i2.15201