ORCA: Evaluating LLMs on Data Science Code Translation

📄 arXiv: 2609.30749v1 📥 PDF

作者: Xiaolong Li, Jinyang Li, Bowen Qin, Ge Qu, Nan Huo, Xiaohan Xu, Shipei Lin, Reynold Cheng

分类: cs.AI

发布日期: 2026-09-25

备注: 36 pages, 15 figures, 24 tables


💡 一句话要点

提出ORCA基准以评估LLMs在数据科学代码翻译中的表现

🎯 匹配领域: 支柱一:机器人控制 (Robot Control) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 数据科学 代码翻译 大型语言模型 意图增强 基准评估 功能等价性 互操作性

📋 核心要点

  1. 现有LLMs在数据科学代码翻译(DSCT)中的表现不足,尤其是在复杂任务上。
  2. 论文提出ORCA基准,通过两个设置评估LLMs在数据科学代码翻译中的能力,并引入意图增强方法以提高翻译效果。
  3. 实验表明,尽管当前LLMs的成功率较低,但通过意图增强方法,成功率在ORCA-MAIN和ORCA-PROJECT上分别提升了4.80%和5.33%。

📝 摘要(中文)

数据科学代码翻译(DSCT)是将代码在数据科学库之间转换的过程,同时保持功能等价性并实现数据科学生态系统之间的互操作性。尽管大型语言模型(LLMs)在数据科学代码生成(DSCG)方面取得了显著进展,但它们在DSCT中的表现仍然研究不足。为了解决这一问题,我们提出了ORCA,一个全面的基准,包含两个互补的设置:ORCA-MAIN和ORCA-PROJECT。实验结果显示,尽管前沿LLMs的表现有限,但通过引入意图增强方法,模型在翻译任务中的成功率得到了显著提升。

🔬 方法详解

问题定义:本论文旨在解决大型语言模型在数据科学代码翻译(DSCT)中的表现不足问题,尤其是在复杂的代码转换任务中,现有方法的有效性和可靠性尚未得到充分验证。

核心思路:论文提出了ORCA基准,包含ORCA-MAIN和ORCA-PROJECT两个设置,旨在全面评估LLMs在DSCT中的能力,并通过引入意图增强方法来提高翻译的准确性和有效性。

技术框架:ORCA基准包括1,600个基础任务和200个完整项目翻译任务,配有注释参考翻译和测试用例,采用多阶段质量验证过程确保任务的正确性和测试用例的鲁棒性。

关键创新:最重要的创新在于引入意图增强方法,模型首先推断源代码的意图,然后将其作为额外上下文用于翻译,这一设计显著提升了翻译的成功率。

关键设计:在实验中,使用了多阶段的质量验证流程,确保每个任务的正确性,关键参数和损失函数的设置经过精心设计,以提高模型的翻译能力。实验结果表明,当前前沿LLMs在ORCA-MAIN和ORCA-PROJECT上的成功率分别为56.92%和33.67%。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,当前前沿LLMs在ORCA-MAIN和ORCA-PROJECT上的成功率分别为56.92%和33.67%,表明在DSCT领域仍有显著改进空间。引入的意图增强方法使得成功率分别提升了4.80%和5.33%,显示出其有效性。

🎯 应用场景

该研究的潜在应用领域包括数据科学工具的开发、代码自动化转换以及跨平台数据科学项目的互操作性。通过提高LLMs在数据科学代码翻译中的表现,能够促进数据科学家在不同库和框架之间的工作效率,推动数据科学技术的进一步发展。

📄 摘要(原文)

Data Science Code Translation (DSCT) is the process of converting code between data science libraries while preserving functional equivalence and enabling interoperability across data science ecosystems. While Large Language Models (LLMs) have demonstrated considerable progress in Data Science Code Generation (DSCG), their performance in DSCT remains insufficiently studied. To address this gap, we introduce ORCA, a comprehensive benchmark with two complementary settings: ORCA-MAIN, which comprises 1,600 carefully curated grounding-level tasks across 3 representative domains: Data Querying, Data Manipulation, and Deep Learning; and ORCA-PROJECT, which contains 200 translation tasks over complete data science projects across 7 data science task types. Each task is accompanied by annotated reference translations and test cases for validating functional equivalence. We further incorporate a multi-stage quality verification process that thoroughly verifies task correctness and test case robustness. Experimental results demonstrate challenges in DSCT, with even frontier LLMs showing limited performance. Specifically, Claude-Opus-4.6 achieves a success rate of 56.92% on ORCA-MAIN and 33.67% on ORCA-PROJECT, indicating considerable room for improvement in DSCT. We also observe a clear directional preference in DSCT, where translation is consistently easier when the source code expresses the task through more explicit, fine-grained operations. Motivated by this, we propose an intent-augmented method, in which the model first infers source-code intent and then uses it as additional context for translation, achieving average absolute success-rate gains of 4.80% and 5.33% on ORCA-MAIN and ORCA-PROJECT, respectively.