Leveraging large language models for SQL behavior-based database intrusion detection
Not on the map. Why?
Abstract (arXiv)
Database systems are extensively used to store critical data across various domains. However, the frequency of abnormal database access behaviors, such as database intrusion by internal and external attacks, continues to rise. Internal masqueraders often have greater organizational knowledge, making it easier to mimic employee behavior effectively. In contrast, external masqueraders may behave differently due to their lack of familiarity with the organization. Current approaches lack the granularity needed to detect anomalies at the operational level, frequently misclassifying entire sequences of operations as anomalies, even though most operations are likely to represent normal behavior. On the other hand, some anomalous behaviors often resemble normal activities, making them difficult for existing detection methods to identify. This paper introduces a two-tiered anomaly detection approach for Structured Query Language (SQL) using the Bidirectional Encoder Representations from Transformers (BERT) model, specifically DistilBERT, a more efficient, pre-trained version. Our method combines both unsupervised and supervised machine learning techniques to accurately identify anomalous activities while minimizing the need for data labeling. First, the unsupervised method uses ensemble anomaly detectors that flag embedding vectors distant from learned normal patterns of typical user behavior across the database (out-of-scope queries). Second, the supervised method uses fine-tuned transformer-based models to detect internal attacks with high precision (in-scope queries), using role-labeled classification, even on limited labeled SQL data. Our findings make a significant contribution by providing an effective solution for safeguarding critical database systems from sophisticated threats.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 19 of its 48 references that are in the map. First posted on arXiv 6 Aug 2025.
Builds on
19 of 48 references.
References · 19
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
- 2018Deep Anomaly Detection with Outlier Exposurecited by 942
- 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 896
- 2020A Unifying Review of Deep and Shallow Anomaly Detectioncited by 425
- 2019Deep Learning for Anomaly Detection: A Surveycited by 358
- 2022Efficient Few-Shot Learning Without Promptscited by 137
- 2021LogBERT: Log Anomaly Detection via BERTcited by 118
- 2021Improving and Simplifying Pattern Exploiting Trainingcited by 97
- 2022PERFECT: Prompt-free and Efficient Few-shot Learning with Language Modelscited by 40
7 more
- 2017Deep Learning for Unsupervised Insider Threat Detection in Structured Cybersecurity Data Streamscited by 19
- 2020Deep Learning for Insider Threat Detection: Review, Challenges and Opportunitiescited by 18
- 2016Bidirectional LSTM-CRF for Clinical Concept Extractioncited by 9
- 2023Local Large Language Models for Complex Structured Medical Taskscited by 7
- 2019Insider Threat Detection via Hierarchical Neural Temporal Point Processescited by 6
- 2016An Investigation of Recurrent Neural Architectures for Drug Name Recognitioncited by 4
- 2020Database Intrusion Detection Systems (DIDs): Insider Threat Detection via Behavioural-based Anomaly Detection Systems -- A Brief Survey of Concepts and Approachescited by 1
Built on by
Not cited yet.