mlsanityData to 14 Oct 2026

SAFENLIDB: A Privacy-Preserving Safety Alignment Framework for LLM-based Natural Language Database Interfaces

arXiv 2511.06778 ↗First posted 10 Nov 2025cs.CLcited by 4

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

  1. 2025MPO: Multilingual Safety Alignment via Reward Gap Optimization22 May
  2. 2024Safety Alignment Should Be Made More Than Just a Few Tokens Deep10 Jun

Other references · 32

  1. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  2. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  3. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  4. 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,464
  5. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
  6. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
  7. 2022Binding Language Models in Symbolic Languagescited by 228
  8. 2024Rainbow Teaming: Open-Ended Generation of Diverse Adversarial Promptscited by 205
  9. 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 187
  10. 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 164
  11. 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 138
  12. 2020Semantic Evaluation for Text-to-SQL with Distilled Test Suitescited by 126
20 more
  1. 2024Meta-Prompting: Enhancing Language Models with Task-Agnostic Scaffoldingcited by 117
  2. 2024A Comprehensive Survey of Hallucination in Large Language, Image, Video and Audio Foundation Modelscited by 100
  3. 2024Aligner: Efficient Alignment by Learning to Correctcited by 98
  4. 2024On Protecting the Data Privacy of Large Language Models (LLMs): A Surveycited by 96
  5. 2024Chain of Preference Optimization: Improving Chain-of-Thought Reasoning in LLMscited by 96
  6. 2025OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scalecited by 91
  7. 2024SafetyPrompts: a Systematic Review of Open Datasets for Evaluating and Improving Large Language Model Safetycited by 77
  8. 2024Large Language Model Safety: A Holistic Surveycited by 59
  9. 2024A Preview of XiYan-SQL: A Multi-Generator Ensemble Framework for Text-to-SQLcited by 46
  10. 2024Preference Optimization for Reasoning with Pseudo Feedbackcited by 39
  11. 2024An Engorgio Prompt Makes Large Language Model Babble oncited by 30
  12. 2024TrustSQL: Benchmarking Text-to-SQL Reliability with Penalty-Based Scoringcited by 17
  13. 2024CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editionscited by 13
  14. 2024ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQLcited by 13
  15. 2024PrimeGuard: Safe and Helpful LLMs through Tuning-Free Routingcited by 10
  16. 2025Uncovering the Impact of Chain-of-Thought Reasoning for Direct Preference Optimization: Lessons from Text-to-SQLcited by 9
  17. 2025CoT-based Synthesizer: Enhancing LLM Performance through Answer Synthesiscited by 7
  18. 2023Uncovering and Categorizing Social Biases in Text-to-SQLcited by 5
  19. 2023Federated Learning for Semantic Parsing: Task Formulation, Evaluation Setup, New Algorithmscited by 4
  20. 2024Filling Memory Gaps: Enhancing Continual Semantic Parsing via SQL Syntax Variance-Guided LLMs without Real Data Replaycited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 4.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024SecureLLM: Using Compositionality to Build Provably Secure Language Models for Private, Sensitive, and Secret Data
  2. 2025QueryAttack: Jailbreaking Aligned Large Language Models Using Structured Non-natural Query Language
  3. 2025SaRO: Enhancing LLM Safety through Reasoning-based Alignment
  4. 2025STAIR: Improving Safety Alignment with Introspective Reasoning
  5. 2023DB-GPT: Empowering Database Interactions with Private Large Language Models
  6. 2023A Survey on Large Language Model (LLM) Security and Privacy: The Good, the Bad, and the Ugly
  7. 2025A Survey on Privacy Risks and Protection in Large Language Models
  8. 2026aiXamine: Unified Black-Box Evaluation of Cross-Dimensional Trade-offs in LLM Safety, Security, and Privacy