Uncovering the Impact of Chain-of-Thought Reasoning for Direct Preference Optimization: Lessons from Text-to-SQL

Hanbing Liu, Haoyang Li, Xiaokang Zhang, Ruotong Chen, Haiyong Xu +3 more
2/17/2025
cs.CLcs.DB

No official code found. Best implementation: RUCKBReasoning/DPO_Text2SQL (16 stars, last commit 2025-10-09).

Abstract

Direct Preference Optimization (DPO) has proven effective in complex reasoning tasks like math word problems and code generation. However, when applied to Text-to-SQL datasets, it often fails to improve performance and can even degrade it. Our investigation reveals the root cause: unlike math and code tasks, which naturally integrate Chain-of-Thought (CoT) reasoning with DPO, Text-to-SQL datasets typically include only final answers (gold SQL queries) without detailed CoT solutions. By augmenting Text-to-SQL datasets with synthetic CoT solutions, we achieve, for the first time, consistent and significant performance improvements using DPO. Our analysis shows that CoT reasoning is crucial for unlocking DPO's potential, as it mitigates reward hacking, strengthens discriminative capabilities, and improves scalability. These findings offer valuable insights for building more robust Text-to-SQL models. To support further research, we publicly release the code and CoT-enhanced datasets.

View on arXivView PDF

Code Implementations(1)

[ACL 2025] Uncovering the Impact of Chain-of-Thought Reasoning for Direct Preference Optimization: Lessons from Text-to-SQL

162Shell, PythonFeb 17, 20251 years ago
dponl2sqlpreference-optimizationtext-to-sqltext2sql

Similar Papers

Cite this paper

@article{liu2025uncovering,
  title  = {Uncovering the Impact of Chain-of-Thought Reasoning for Direct Preference Optimization: Lessons from Text-to-SQL},
  author = {Hanbing Liu and Haoyang Li and Xiaokang Zhang and Ruotong Chen and Haiyong Xu and Tian Tian and Qi Qi and Jing Zhang},
  year   = {2025},
  eprint = {2502.11656},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.11656v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.11656.svg)](https://codeofpaper.com/paper/2502.11656)

Discussion