LatentRefusal: Latent-Signal Refusal for Unanswerable Text-to-SQL Queries

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Ren, Xuancheng, Hu, Shijing, Lu, Zhihui, Huang, Jiangqi, Duan, Qiang
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910127113633792
author Ren, Xuancheng
Hu, Shijing
Lu, Zhihui
Huang, Jiangqi
Duan, Qiang
author_facet Ren, Xuancheng
Hu, Shijing
Lu, Zhihui
Huang, Jiangqi
Duan, Qiang
contents In LLM-based text-to-SQL systems, unanswerable and underspecified user queries may generate not only incorrect text but also executable programs that yield misleading results or violate safety constraints, posing a major barrier to safe deployment. Existing refusal strategies for such queries either rely on output-level instruction following, which is brittle due to model hallucinations, or estimate output uncertainty, which adds complexity and overhead. To address this challenge, we formalize safe refusal in text-to-SQL systems as an answerability-gating problem and propose LatentRefusal, a latent-signal refusal mechanism that predicts query answerability from intermediate hidden activations of a large language model. We introduce the Tri-Residual Gated Encoder, a lightweight probing architecture, to suppress schema noise and amplify sparse, localized cues of question-schema mismatch that indicate unanswerability. Extensive empirical evaluations across diverse ambiguous and unanswerable settings, together with ablation studies and interpretability analyses, demonstrate the effectiveness of the proposed approach and show that LatentRefusal provides an attachable and efficient safety layer for text-to-SQL systems. Across four benchmarks, LatentRefusal improves average F1 to 88.5 percent on both backbones while adding approximately 2 milliseconds of probe overhead.
format Preprint
id arxiv_https___arxiv_org_abs_2601_10398
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle LatentRefusal: Latent-Signal Refusal for Unanswerable Text-to-SQL Queries
Ren, Xuancheng
Hu, Shijing
Lu, Zhihui
Huang, Jiangqi
Duan, Qiang
Artificial Intelligence
In LLM-based text-to-SQL systems, unanswerable and underspecified user queries may generate not only incorrect text but also executable programs that yield misleading results or violate safety constraints, posing a major barrier to safe deployment. Existing refusal strategies for such queries either rely on output-level instruction following, which is brittle due to model hallucinations, or estimate output uncertainty, which adds complexity and overhead. To address this challenge, we formalize safe refusal in text-to-SQL systems as an answerability-gating problem and propose LatentRefusal, a latent-signal refusal mechanism that predicts query answerability from intermediate hidden activations of a large language model. We introduce the Tri-Residual Gated Encoder, a lightweight probing architecture, to suppress schema noise and amplify sparse, localized cues of question-schema mismatch that indicate unanswerability. Extensive empirical evaluations across diverse ambiguous and unanswerable settings, together with ablation studies and interpretability analyses, demonstrate the effectiveness of the proposed approach and show that LatentRefusal provides an attachable and efficient safety layer for text-to-SQL systems. Across four benchmarks, LatentRefusal improves average F1 to 88.5 percent on both backbones while adding approximately 2 milliseconds of probe overhead.
title LatentRefusal: Latent-Signal Refusal for Unanswerable Text-to-SQL Queries
topic Artificial Intelligence
url https://arxiv.org/abs/2601.10398