Research map / Large language models / Instruction and fine-tuning
DACO: Towards Application-Driven and Comprehensive Data Analysis via Code Generation
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Builds DACO, a dataset of 440 real-world databases with ~2k GPT-4 code-generated data analysis answers plus a human-refined test set, and trains CodeGeeX2-6B with SFT and fine-grained RLHF using contribution and regularization reward models.
Problem
Existing table QA work focuses on simple factual lookup or arithmetic, while real-world application-driven data analysis requires diverse mathematical, logical and strategic reasoning over databases.
Approach
Generate application-driven queries and multi-turn Python code-execution analyses with GPT-4 as weak supervision, refine a test subset by humans, and apply fine-grained RLHF with dense step-level contribution reward and a regularization reward model to address sparse reward for code steps.
Key results
- GPT-4 with code generation reaches 43.92 helpfulness on Test^H versus 50 for human annotations, and wins only 41.88% against human refinements in LLM evaluation.
- FG-RLHF (6B CodeGeeX2) reaches 19.42 helpfulness on Test^A, outperforming SFT by about 7 points (SFT with code: 13.73 on Test^A, not directly the same as 19.42 vs 18.96 without code).
- Human evaluation shows FG-RLHF wins 57.72% of pairwise comparisons against SFT.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add code generation to GPT-4 (ablation) | GPT-4 · DACO Test^A | helpfulness: 30.43 -> 50.79 | Helped |
| Add code generation to GPT-4 (ablation) | GPT-4 · DACO Test^H | helpfulness: 20.50 -> 43.92 | Helped |
| Add code generation to ChatGPT (ablation) | ChatGPT · DACO Test^A | helpfulness: 19.31 -> 26.51 | Helped |
| Add code generation to ChatGPT (ablation) | ChatGPT · DACO Test^H | helpfulness: 13.50 -> 21.38 | Helped |
| Train SFT using code-generation trajectories as well as final answers (ablation) | CodeGeeX2-6B SFT · DACO Test^A | helpfulness: 18.96 -> 13.73 | Hurt |
| Train SFT using code-generation trajectories as well as final answers (ablation) | CodeGeeX2-6B SFT · DACO Test^H | helpfulness: 11.33 -> 9.83 | Hurt |
| Apply standard RLHF to the code-generation SFT model (ablation) | CodeGeeX2-6B · DACO Test^A | helpfulness: 13.73 -> 10.64 | Hurt |
| Apply standard RLHF to the code-generation SFT model (ablation) | CodeGeeX2-6B · DACO Test^H | helpfulness: 9.83 -> 7.51 | Hurt |
| Use fine-grained RLHF with dense contribution and regularization rewards instead of SFT (ablation) | CodeGeeX2-6B · DACO Test^A | helpfulness: 13.73 -> 19.42 | Helped |
| Use fine-grained RLHF with dense contribution and regularization rewards instead of SFT (ablation) | CodeGeeX2-6B · DACO Test^H | helpfulness: 9.83 -> 12.50 | Helped |
| Use FG-RLHF instead of SFT (ablation) | CodeGeeX2-6B · Human pairwise comparison on DACO | win rate: 57.72 | Helped |
| Use FG-RLHF instead of SFT (ablation) | CodeGeeX2-6B · InfiAgent-DA | accuracy: 12.92 -> 14.61 | Helped |
Surprising findings
- Standard RLHF with only final-answer reward degrades helpfulness below SFT, attributed to sparse reward for code steps.
- The contribution reward model strongly rewards print calls, a sign of reward hacking that the regularization RM is meant to counter.
Limitations
- Training annotations are generated by GPT-4 and their quality is not fully guaranteed; the human-refined test set starts from GPT-4 outputs, which may bias annotators.
- Evaluation relies on LLM judges and an NLI model that only partially align with human preference and correctness.
Experimental setup
Datasets: Spider Kaggle databases DACO train split InfiAgent-DA FeTaQA
Benchmarks: DACO Test^A DACO Test^H InfiAgent-DA FeTaQA
Metrics: helpfulness win rate entailment probability BLEU Rouge-L BERTScore point-wise helpfulness
Baselines: TAPAS TAPEX ChatGPT GPT-4 SFT
Builds on: ReAct RLHF fine-grained RLHF TAPAS TAPEX
Closest papers by meaning
- TACT: Advancing Complex Aggregative Reasoning with Information Extraction Tools (NeurIPS 2024 · similarity 0.87)
- Text2Analysis: A Benchmark of Table Question Answering with Advanced Data Analysis and Unclear Queries (AAAI 2024 · similarity 0.86)
- ORACLE: Optimizing Reasoning Abilities of Large Language Models via Constraint-Led Synthetic Data Elicitation (AAAI 2026 · similarity 0.86)
- Scaling Code-Assisted Chain-of-Thoughts and Instructions for Model Reasoning (NeurIPS 2025 · similarity 0.86)
- Procedural Knowledge in Pretraining Drives Reasoning in Large Language Models (ICLR 2025 · similarity 0.86)
- The Quest for Efficient Reasoning: A Data-Centric Benchmark to CoT Distillation (ICLR 2026 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
