揭示思维链推理对直接偏好优化的影响:来自 Text-to-SQL 的经验
Uncovering the Impact of Chain-of-Thought Reasoning for Direct Preference Optimization: Lessons from Text-to-SQL
AI总结:
该研究针对 DPO 在 Text-to-SQL 上效果不佳的问题,发现缺失 CoT 是关键原因,并通过合成 CoT 增强数据首次使 DPO 获得稳定显著提升。
摘要:
直接偏好优化(DPO)已在数学应用题和代码生成等复杂推理任务中被证明有效。然而,当应用于 Text-to-SQL 数据集时,它往往无法提升性能,甚至可能使性能下降。我们的研究揭示了根本原因:与自然将思维链(CoT)推理与 DPO 结合的数学和代码任务不同,Text-to-SQL 数据集通常只包含最终答案(标准 SQL 查询),而没有详细的 CoT 解决方案。通过用合成 CoT 解决方案增强 Text-to-SQL 数据集,我们首次利用 DPO 实现了持续且显著的性能提升。分析表明,CoT 推理对于释放 DPO 的潜力至关重要,因为它能缓解奖励作弊、增强判别能力并提高可扩展性。这些发现为构建更鲁棒的 Text-to-SQL 模型提供了宝贵见解。为支持进一步研究,我们公开发布了代码和经 CoT 增强的数据集。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。