Elamur Research⌕
☰
home / papers / 2026 / LatentRefusal: Latent-Signal Refusal for Unanswerable Text-to-SQL Queries

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

Paper · 2026 · Xuancheng Ren, Shijing Hu, Zhihui Lu et al.

Summary

LLM-based Text-to-SQL systems can answer unanswerable or underspecified questions with SQL that runs but answers the wrong question. Such questions include missing schema elements, out-of-scope requests, subjective criteria and ambiguity. This is a serious risk in areas like finance. Prompting the model to abstain fails exactly when it hallucinates. Sampling-based uncertainty is slow and may require executing dubious SQL. The authors frame safe refusal as an answerability gate that must decide before any SQL is generated or executed. Their method, LatentRefusal, keeps the base LLM frozen and reads hidden states from a single intermediate layer in one forward pass. A small probe, the Tri-Residual Gated Encoder (TRGE), adds a SwiGLU-gated residual branch to Transformer blocks. This branch dampens schema noise and highlights sparse question–schema mismatches. If the predicted answerability falls below a calibrated threshold, the system refuses. Across four benchmarks, it reaches an average F1 of 88.5% on Llama-3.1-8B and 88.8% on Qwen-3-8B, adding roughly 2 ms. This makes it a cheap, attachable safety layer for locally deployed models with white-box access.

Key points

  • The gate is single-pass, pre-generation and execution-free. It needs access to intermediate activations but no updates to the base LLM.
  • In ablations on Qwen-3-8B / TriageSQL, full TRGE reaches 87.1% F1. Variants score lower:
    • without the gating branch: 85.4%
    • with an MLP instead of SwiGLU: 83.0%
    • with a linear probe: 70.4%
  • SwiGLU also outperformed the GLU and GeGLU gates.
  • The best signal comes from the middle layer (−16 of 32), with 87.1% F1 and 99.8% recall. The authors suggest later layers may collapse uncertainty into confident hallucinations.
  • A 4-layer probe (19.0M parameters, about 2.6 ms) is optimal; deeper probes overfit the 300-sample training set. Training takes about 10 minutes on one A100-80G.
  • Limitations:
    • The probe needs re-tuning for new domains.
    • The MD-Enterprise dataset cannot be released for privacy reasons.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

Cite

Cite as Xuancheng Ren, Shijing Hu, Zhihui Lu, Jiangqi Huang and Qiang Duan. 2026. LatentRefusal: Latent-Signal Refusal for Unanswerable Text-to-SQL Queries. Findings of the Association for Computational Linguistics: ACL 2026.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2026.findings-acl.1007

@inproceedings{ren2026latentrefusal,
  title = {{LatentRefusal: Latent-Signal Refusal for Unanswerable Text-to-SQL Queries}},
  author = {Xuancheng Ren, Shijing Hu, Zhihui Lu, Jiangqi Huang and Qiang Duan},
  booktitle = {Findings of the Association for Computational Linguistics: ACL 2026},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.1007},
  url = {https://doi.org/10.18653/v1/2026.findings-acl.1007}
}

References

39 references, 18 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Amos Azaria and Tom Mitchell. 2023. The internal state of an LLM knows when it’s lying. arXiv preprint arXiv:2304.13734.
  2. Collin Burns, Haotian Ye, Dan Klein, and Jacob Steinhardt. 2023. Discovering Latent Knowledge in Language Models without Supervision. In International Conference on Learning Representations (ICLR). find
  3. Chen Chen, Kexin Liu, Zepu Chen, Yanzhe Gu, Yijie Wu, Ming Tao, Zhaowei Fu, and Jieping Ye. 2024. INSIDE: LLMs’ internal states retain the power of hallucination detection. arXiv preprint arXiv:2402.03744.
  4. Qian Cheng, Ting Sun, Xin Liu, Wenge Zhang, Zhibin Yin, Si Li, Lizhen Li, Zhilin He, Kai Chen, and Xipeng Qiu. 2024. Can AI assistants know what they don’t know? arXiv preprint arXiv:2401.13275. — [arXiv:2401.13275](https://arxiv.org/abs/2401.13275) find
  5. C. K. Chow. 1970. On optimum recognition error and reject tradeoff. IEEE Transactions on Information Theory, 16(1):41–46. find
  6. Mingwen Dong, N. Anand Kumar, Yushi Hu, Saurabh Kaushik, Dongmei Song, Cho-Jui Hsieh, and Jinyang Li. 2024. PRACTIQ: A practical conversational text-to-SQL dataset with ambiguous and unanswerable queries. arXiv preprint arXiv:2410.11076.
  7. Xiang Du, Chen Xiao, and Yang Li. 2024. HaloScope: Harnessing Unlabeled LLM Generations for Hallucination Detection. arXiv preprint arXiv:2409.17504. — [arXiv:2409.17504](https://arxiv.org/abs/2409.17504) find
  8. Lei Huang, Weijiang Yu, Weitao Ma, Weihua Zhong, Zhenxin Feng, Haotian Wang, Qianglong Chen, Weihua Peng, Xiaocheng He, Sakit Li, Tianyun Zhu, and Binghuai Lin. 2023. A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questions. arXiv preprint arXiv:2311.0…
  9. Ziwei Ji, Nayeon Lee, Rita Frieske, Tiezheng Yu, Dan Su, Yan Xu, Etsuko Ishii, Yejin Bang, Andrea Madotto, and Pascale Fung. 2023. Survey of Hallucination in Natural Language Generation. ACM Computing Surveys, 55(12):1–38.
  10. Saurav Kadavath, Thomas Conerly, Amanda Askell, Tom Henighan, Dawn Drain, Ethan Perez, Nicholas Schiefer, Zac Hatfield-Dodds, Nova DasSarma, Eli Tran-Johnson, Scott Johnston, Sheer El-Showk, Andy Jones, Nelson Elhage, Tristan Hume, Anna Chen, Yuntao Bai, Sam Bowman, Stanislav Fort, and 17 others. 20… find
  11. Jannik Kossen, Jiarui Han, Mohammed Razzak, Lisa Schut, Shreshth A Malik, and Yarin Gal. 2024. Semantic Entropy Probes: Robust and Cheap Hallucination Detection in LLMs. arXiv preprint arXiv:2406.15927. — [arXiv:2406.15927](https://arxiv.org/abs/2406.15927) find
  12. Lennart Kuhn, Yarin Gal, and Sebastian Farquhar. 2023. Semantic Uncertainty: Linguistic Invariances for Uncertainty Estimation in Natural Language Generation. In International Conference on Learning Representations (ICLR).
  13. Ran El-Yaniv and Yair Wiener. 2010. On the Foundations of Noise-free Selective Classification. Journal of Machine Learning Research, 11:1605–1641. find
  14. Stephanie Lin, Jacob Hilton, and Owain Evans. 2022. Teaching Models to Express Their Uncertainty in Words. Transactions on Machine Learning Research. find
  15. Sebastian Farquhar, Jannik Kossen, Lennart Kuhn, and Yarin Gal. 2024. Detecting Hallucinations in Large Language Models Using Semantic Entropy. Nature, 630(8017):625–630. find
  16. Aiwei Liu, Xuming Hu, Lijie Wen, and Philip S. Yu. 2024. A survey of Text-to-SQL in the era of LLMs. arXiv preprint arXiv:2408.05109. — [arXiv:2408.05109](https://arxiv.org/abs/2408.05109) find
  17. Jing Gao, Biye Wang, Yuchen Li, Youtao Zhang, and Rui Wang. 2024. Text-to-SQL empowered by large language models: A benchmark evaluation. Proceedings of the VLDB Endowment, 17(11):2842–2855.
  18. Potsawee Manakul, Adian Liusie, and Mark J. F. Gales. 2023. SelfCheckGPT: Zero-resource black-box hallucination detection for generative large language models. arXiv preprint arXiv:2303.08896. find
  19. Yonatan Geifman and Ran El-Yaniv. 2017. Selective Classification for Deep Neural Networks. In Advances in Neural Information Processing Systems. find
  20. Samuel Marks and Max Tegmark. 2024. The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasets. In Conference on Language Modeling (COLM).
  21. Yonatan Geifman and Ran El-Yaniv. 2019. SelectiveNet: A Deep Neural Network with an Integrated Reject Option. In International Conference on Machine Learning. find
  22. Alexandre Grattafiori, Ayush Dubey, Ayush Jauhri, Ayush Pandey, Ayush Kadian, Alex Letman, Ankit Mathur, Armen Schelten, Arthur Vaughan, Bowen Yang, Angela Fan, Ankit Goyal, Asa Hartshorn, and Zheng Ma. 2024. The Llama 3 herd of models. arXiv preprint arXiv:2407.21783.
  23. Sung-Min Park, Xue-Ying Du, Ming-Chang Yeh, Hsin-Wei Wang, and Yu-Chiang Li. 2025. Steer LLM Latents for Hallucination Detection. arXiv preprint arXiv:2503.01917. — [arXiv:2503.01917](https://arxiv.org/abs/2503.01917) find
  24. Bing Qin, Binyuan Hui, Lihan Wang, Min Yang, Jinyang Li, Binyi Li, Ruiying Geng, Rong Cao, Jian Sun, Luo Si, Fei Huang, and Yongbin Li. 2022. A survey on Text-to-SQL parsing: Concepts, methods, and future directions. arXiv preprint arXiv:2208.13629. — [arXiv:2208.13629](https://arxiv.org/abs/2208.13629) find
  25. Pranav Rajpurkar, Robin Jia, and Percy Liang. 2018. Know What You Don’t Know: Unanswerable Questions for SQuAD. arXiv preprint arXiv:1806.03822.
  26. Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. SQuAD: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing.
  27. Jie Ren, Jing Luo, Yuxin Zhao, Kalpesh Krishna, Mohammad Saleh, Balaji Lakshminarayanan, and Peter J. Liu. 2023. Out-of-Distribution Detection and Selective Generation for Conditional Language Models. In International Conference on Learning Representations (ICLR).
  28. P. Sahoo, A. K. Singh, S. Saha, V. Jain, S. Mondal, and A. Chadha. 2024. A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications. arXiv preprint arXiv:2402.07927.
  29. Irina Saparina and Mirella Lapata. 2024. AMBROSIA: A benchmark for parsing ambiguous questions into database queries. arXiv preprint arXiv:2406.19073. — [arXiv:2406.19073](https://arxiv.org/abs/2406.19073) find
  30. An Yang, An Li, Bin Yang, Botao Zhang, Binyuan Hui, Bosheng Zheng, Bowen Yu, Chao Gao, Chen Huang, Cheng Lv, Chuan Zheng, Dai Liu, Feng Zhou, Fei Huang, Fu Hu, Hao Ge, Hong Wei, Hongyi Lin, Jian Tang, and Zhaoye Qiu. 2025. Qwen3 technical report. arXiv preprint arXiv:2505.09388.
  31. Yutao Zhang, Xinyi Dong, Shuaichen Chang, Tao Yu, Peng Shi, and Rui Zhang. 2020. Did You Ask a Good Question? A Cross-Domain Question Intention Classification Benchmark for Text-to-SQL. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings. find
  32. Andy Zou, Long Phan, Sarah Chen, James Campbell, Phillip Guo, Richard Ren, Alexander Pan, Xinyang Yin, Mantas Mazeika, Ann-Kathrin Dombrowski, Shubhangi Goel, Nathaniel Li, Michael J. Byun, Zifan Wang, Alex Mallen, Steven Basart, Sanmi Koyejo, Dawn Song, Matt Fredrikson, and Dan Hendrycks. 2023. Rep… — Representation Engineering: A Top-Down Approach to AI Transparency
  33. O. Skean, M. R. Arefin, D. Zhao, N. Patel, J. Naghiyev, and Y. LeCun. 2025. Layer by Layer: Uncovering Hidden Representations in Language Models. arXiv preprint arXiv:2502.02013.
  34. Ruoxi Sun, Soumya Sanyal, Raymond Cheng, Li Bo, and Xifeng Yan. 2024. SQL-PaLM: Improved large language model for Text-to-SQL. Transactions on Machine Learning Research. find
  35. Y. M. Tsai, T. Cojean, and H. Anzt. 2020. Evaluating the performance of NVIDIA’s A100 Ampere GPU for sparse linear algebra computations. arXiv preprint arXiv:2008.08478. find
  36. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is All you Need. In Advances in Neural Information Processing Systems.
  37. Bowen Wang, Yuxuan Gao, Zhen Li, and Jian-Guang Lou. 2022. Know What I don’t know: Handling Ambiguous and Unanswerable Questions for Text-to-SQL. arXiv preprint arXiv:2212.08902. — [arXiv:2212.08902](https://arxiv.org/abs/2212.08902) find
  38. Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. 2023. Self-Consistency Improves Chain of Thought Reasoning in Language Models. In International Conference on Learning Representations (ICLR).
  39. Miao Xiong, Zhiyuan Hu, Xinyang Lu, Yifei Li, Jie Fu, Junxian He, and Bryan Hooi. 2024. Can LLMs express their uncertainty? an empirical evaluation of confidence elicitation in LLMs. In International Conference on Learning Representations (ICLR). find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/ren-2026-latentrefusal-latent-signal-refusal-unanswerable/