DSEffi-Bench: Demystifying Large Language Models’ Capability in Efficient Data Science Code Generation

Zhihao Gong, Junzhe Yu, Dong Huang, Zeyu Sun, Jie M. Zhang, Dan Hao


Abstract
Current data science (DS) code generation benchmarks equate correctness with quality, overlooking execution time differences that span orders of magnitude between correct solutions. We introduce DSEffi-Bench, the first benchmark specifically targeting execution efficiency in LLM-generated DS code, comprising 1,000 instances across 10+ DS libraries with stress-testing harnesses and human-validated references. Evaluating 16 models across 3 tiers, we find that correctness alone fails to characterize efficiency: GPT-5.4 leads in correctness (Pass, 66.9%) but its efficiency score (B|P, 71.7%) nearly matches GPT-5.4-mini (71.6%), which solves 47 fewer tasks; Kimi-K2.5 ranks lowest in correctness among frontier models (40.2%) yet achieves the highest efficiency score (73.6%) across all 16 models. A human-annotated five-category taxonomy reveals that 79.1% of efficiency deficits extend beyond algorithmic complexity to domain-specific root causes, with distinct failure profiles across model tiers and libraries. Two exploratory experiments provide initial evidence that these diagnostics can guide improvement, yielding up to +14.7% efficiency gains via taxonomy-guided optimization and approaching Claude-Opus-4.6 Best@3 in efficiency at 13.0× lower cost via library-conditioned routing. Code and data are available at https://github.com/Albert-Gong/DSEffi-Bench.
Anthology ID:
2026.emnlp-main.318
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
7337–7372
Language:
URL:
https://aclanthology.org/2026.emnlp-main.318/
DOI:
Bibkey:
Cite (ACL):
Zhihao Gong, Junzhe Yu, Dong Huang, Zeyu Sun, Jie M. Zhang, and Dan Hao. 2026. DSEffi-Bench: Demystifying Large Language Models’ Capability in Efficient Data Science Code Generation. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 7337–7372, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
DSEffi-Bench: Demystifying Large Language Models’ Capability in Efficient Data Science Code Generation (Gong et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.318.pdf