SAFENLIDB: A Privacy-Preserving Safety Alignment Framework for LLM-based Natural Language Database Interfaces
On the map: LLM alignment / RLHF / preference optimisation → Safety alignment and jailbreak attacks
also in 1 more
Abstract (arXiv)
The rapid advancement of Large Language Models (LLMs) has driven significant progress in Natural Language Interface to Database (NLIDB). However, the widespread adoption of LLMs has raised critical privacy and security concerns. During interactions, LLMs may unintentionally expose confidential database contents or be manipulated by attackers to exfiltrate data through seemingly benign queries. While current efforts typically rely on rule-based heuristics or LLM agents to mitigate this leakage risk, these methods still struggle with complex inference-based attacks, suffer from high false positive rates, and often compromise the reliability of SQL queries. To address these challenges, we propose textscSafeNlidb, a novel privacy-security alignment framework for LLM-based NLIDB. The framework features an automated pipeline that generates hybrid chain-of-thought interaction data from scratch, seamlessly combining implicit security reasoning with SQL generation. Additionally, we introduce reasoning warm-up and alternating preference optimization to overcome the multi-preference oscillations of Direct Preference Optimization (DPO), enabling LLMs to produce security-aware SQL through fine-grained reasoning without the need for human-annotated preference data. Extensive experiments demonstrate that our method outperforms both larger-scale LLMs and ideal-setting baselines, achieving significant security improvements while preserving high utility. WARNING: This work may contain content that is offensive and harmful!
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in Safety alignment and jailbreak attacks, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 34 of its 51 references that are in the map. First posted on arXiv 10 Nov 2025.
Builds on
34 of 51 references.
Closest ancestors · 2
Same direction, newest first
- 2025MPO: Multilingual Safety Alignment via Reward Gap Optimization22 May
- 2024Safety Alignment Should Be Made More Than Just a Few Tokens Deep10 Jun
Other references · 32
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,464
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
- 2022Binding Language Models in Symbolic Languagescited by 228
- 2024Rainbow Teaming: Open-Ended Generation of Diverse Adversarial Promptscited by 205
- 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 187
- 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 164
- 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 138
- 2020Semantic Evaluation for Text-to-SQL with Distilled Test Suitescited by 126
20 more
- 2024Meta-Prompting: Enhancing Language Models with Task-Agnostic Scaffoldingcited by 117
- 2024A Comprehensive Survey of Hallucination in Large Language, Image, Video and Audio Foundation Modelscited by 100
- 2024Aligner: Efficient Alignment by Learning to Correctcited by 98
- 2024On Protecting the Data Privacy of Large Language Models (LLMs): A Surveycited by 96
- 2024Chain of Preference Optimization: Improving Chain-of-Thought Reasoning in LLMscited by 96
- 2025OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scalecited by 91
- 2024SafetyPrompts: a Systematic Review of Open Datasets for Evaluating and Improving Large Language Model Safetycited by 77
- 2024Large Language Model Safety: A Holistic Surveycited by 59
- 2024A Preview of XiYan-SQL: A Multi-Generator Ensemble Framework for Text-to-SQLcited by 46
- 2024Preference Optimization for Reasoning with Pseudo Feedbackcited by 39
- 2024An Engorgio Prompt Makes Large Language Model Babble oncited by 30
- 2024TrustSQL: Benchmarking Text-to-SQL Reliability with Penalty-Based Scoringcited by 17
- 2024CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editionscited by 13
- 2024ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQLcited by 13
- 2024PrimeGuard: Safe and Helpful LLMs through Tuning-Free Routingcited by 10
- 2025Uncovering the Impact of Chain-of-Thought Reasoning for Direct Preference Optimization: Lessons from Text-to-SQLcited by 9
- 2025CoT-based Synthesizer: Enhancing LLM Performance through Answer Synthesiscited by 7
- 2023Uncovering and Categorizing Social Biases in Text-to-SQLcited by 5
- 2023Federated Learning for Semantic Parsing: Task Formulation, Evaluation Setup, New Algorithmscited by 4
- 2024Filling Memory Gaps: Enhancing Continual Semantic Parsing via SQL Syntax Variance-Guided LLMs without Real Data Replaycited by 3
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026Natural Language Interfaces for Spatial and Temporal Databases: A Comprehensive Overview of Methods, Taxonomy, and Future Directionscited by 0
- 2026Agents That Know Too Much: A Data-Centric Survey of Privacy in LLM Agentscited by 0
- 2026Policy-Conditioned Constrained Decoding for Column-Level Access Control in Text-to-SQLcited by 0
- 2026TrustDABench: Benchmarking Reliability and Robustness of LLMs for Structured Data Analysiscited by 0
- 2026TrustDABench: Benchmarking Reliability and Robustness of LLMs for Structured Data Analysis25 Aug 2026
- 2026Policy-Conditioned Constrained Decoding for Column-Level Access Control in Text-to-SQL14 Jul 2026
- 2026Agents That Know Too Much: A Data-Centric Survey of Privacy in LLM Agents25 Jun 2026
- 2026Natural Language Interfaces for Spatial and Temporal Databases: A Comprehensive Overview of Methods, Taxonomy, and Future Directions24 Mar 2026
Similar, not cited
Close in wording, no citation either way
- 2024SecureLLM: Using Compositionality to Build Provably Secure Language Models for Private, Sensitive, and Secret Data
- 2025QueryAttack: Jailbreaking Aligned Large Language Models Using Structured Non-natural Query Language
- 2025SaRO: Enhancing LLM Safety through Reasoning-based Alignment
- 2025STAIR: Improving Safety Alignment with Introspective Reasoning
- 2023DB-GPT: Empowering Database Interactions with Private Large Language Models
- 2023A Survey on Large Language Model (LLM) Security and Privacy: The Good, the Bad, and the Ugly
- 2025A Survey on Privacy Risks and Protection in Large Language Models
- 2026aiXamine: Unified Black-Box Evaluation of Cross-Dimensional Trade-offs in LLM Safety, Security, and Privacy