Detecting and Optimizing Flawed Queries in Triplestore-Based Knowledge Systems Using Reinforcement Learning

Reinforcement Learning for Secure SPARQL Query Optimization

Authors

  • S. M. Emdad Hossain College of Economics, Management and Information Systems, University of Nizwa, Nizwa, Oman
  • Mourad M. H. Henchiri College of Economics, Management and Information Systems, University of Nizwa, Nizwa, Oman
Volume: 16 | Issue: 1 | Pages: 32175-32185 | February 2026 | https://doi.org/10.48084/etasr.13036

Abstract

This study uses Reinforcement Learning (RL) to predict flawed SPARQL Protocol and Resource Description Framework Query Language (SPARQL) queries and optimize them by suggesting structural modifications and tuning execution parameters in triplestore-based knowledge systems, verified on smart car parking and medical datasets. The RL agent is trained not only to detect poorly performing queries but also to recommend query rewrites that improve completeness and efficiency. Applied to a medical knowledge base focused on Fahr's disease, the system achieved an 89% detection accuracy and significantly reduced average query time and timeout rates, demonstrating the potential of Artificial Intelligence (AI) to enhance both the quality and speed of query processing in sensitive semantic web databases.

Keywords:

triplestore, SPARQL, AI, RL, DO, Cybersecurity

Downloads

Download data is not yet available.

References

I. Al Agha and O. El-Radie, "Towards Verbalizing SPARQL Queries in Arabic," Engineering, Technology & Applied Science Research, vol. 6, no. 2, pp. 937–944, Apr. 2016. DOI: https://doi.org/10.48084/etasr.630

J. Piñero et al., "The DisGeNET knowledge platform for disease genomics: 2019 update," Nucleic Acids Research, vol. 48, no. D1, pp. D845–D855, Jan. 2020.

J. Piñero et al., "DisGeNET: a discovery platform for the dynamical exploration of human diseases and their genes," Database, vol. 2015, Jan. 2015, Art. no. bav028. DOI: https://doi.org/10.1093/database/bav028

A. Mavridis, S. Tegos, C. Anastasiou, M. Papoutsoglou, and G. Meditskos, "Large language models for intelligent RDF knowledge graph construction: results from medical ontology mapping," Frontiers in Artificial Intelligence, vol. 8, Apr. 2025, Art. no. 1546179. DOI: https://doi.org/10.3389/frai.2025.1546179

G. Singh, S. Bhatia, and R. Mutharaju, "Chapter 2. Neuro-Symbolic RDF and Description Logic Reasoners: The State-Of-The-Art and Challenges," in Frontiers in Artificial Intelligence and Applications, P. Hitzler, M. K. Sarker, and A. Eberhart, Eds. IOS Press, 2023. DOI: https://doi.org/10.3233/FAIA230134

"The Linked Open Data Cloud." https://lod-cloud.net/.

"DISGENET: Genomics Platform for Precision Medicine." https://www.disgenet.com.

C. J. C. H. Watkins and P. Dayan, "Q-learning," Machine Learning, vol. 8, no. 3, pp. 279–292, May 1992. DOI: https://doi.org/10.1023/A:1022676722315

G. A. Rummery and M. Niranjan, "On‐line Q‐learning using connectionist systems," Technical Report CUED/F-INFENF/TR, 1994.

R. S. Sutton, D. McAllester, S. Singh, and Y. Mansour, "Policy Gradient Methods for Reinforcement Learning with Function Approximation," in Advances in Neural Information Processing Systems, 1999, vol. 12.

V. Mnih et al., "Playing Atari with Deep Reinforcement Learning." arXiv, Dec. 19, 2013.

D. Silver, G. Lever, N. Heess, T. Degris, D. Wierstra, and M. Riedmiller, "Deterministic Policy Gradient Algorithms," in Proceedings of the 31st International Conference on Machine Learning, Jan. 2014, pp. 387–395.

"SmartSantander." https://smartsantander.eu/.

S. Krishnan, Z. Yang, K. Goldberg, J. Hellerstein, and I. Stoica, "Learning to Optimize Join Queries With Deep Reinforcement Learning." arXiv, Jan. 10, 2019.

R. Marcus and O. Papaemmanouil, "Deep Reinforcement Learning for Join Order Enumeration," in Proceedings of the First International Workshop on Exploiting Artificial Intelligence Techniques for Data Management, Houston, TX, USA, Mar. 2018, pp. 1–4. DOI: https://doi.org/10.1145/3211954.3211957

G. Li, X. Zhou, S. Li, and B. Gao, "QTune: a query-aware database tuning system with deep reinforcement learning," Proceedings of the VLDB Endowment, vol. 12, no. 12, pp. 2118–2130, May 2019. DOI: https://doi.org/10.14778/3352063.3352129

J. Zhang et al., "An End-to-End Automatic Cloud Database Tuning System Using Deep Reinforcement Learning," in Proceedings of the 2019 International Conference on Management of Data, New York, NY, USA, Mar. 2019, Amsterdam, Netherlands, pp. 415–4320. DOI: https://doi.org/10.1145/3299869.3300085

Downloads

How to Cite

[1]
S. M. E. Hossain and M. M. H. Henchiri, “Detecting and Optimizing Flawed Queries in Triplestore-Based Knowledge Systems Using Reinforcement Learning: Reinforcement Learning for Secure SPARQL Query Optimization”, Eng. Technol. Appl. Sci. Res., vol. 16, no. 1, pp. 32175–32185, Feb. 2026.

Metrics

Abstract Views: 81
PDF Downloads: 68

Metrics Information