Skip to main content
QUICK REVIEW

[论文解读] DS-Agent: Automated Data Science by Empowering Large Language Models with Case-Based Reasoning

Siyuan Guo, Cheng Deng|arXiv (Cornell University)|Feb 27, 2024
Topic ModelingComputer Science被引用 6
一句话总结

DS-Agent 将一个大型语言模型代理与基于案例的推理结合起来,以自动化数据科学任务,在开发阶段取得高成功率,部署阶段一次通过表现也很高,资源成本低。

ABSTRACT

In this work, we investigate the potential of large language models (LLMs) based agents to automate data science tasks, with the goal of comprehending task requirements, then building and training the best-fit machine learning models. Despite their widespread success, existing LLM agents are hindered by generating unreasonable experiment plans within this scenario. To this end, we present DS-Agent, a novel automatic framework that harnesses LLM agent and case-based reasoning (CBR). In the development stage, DS-Agent follows the CBR framework to structure an automatic iteration pipeline, which can flexibly capitalize on the expert knowledge from Kaggle, and facilitate consistent performance improvement through the feedback mechanism. Moreover, DS-Agent implements a low-resource deployment stage with a simplified CBR paradigm to adapt past successful solutions from the development stage for direct code generation, significantly reducing the demand on foundational capabilities of LLMs. Empirically, DS-Agent with GPT-4 achieves 100\% success rate in the development stage, while attaining 36\% improvement on average one pass rate across alternative LLMs in the deployment stage. In both stages, DS-Agent achieves the best rank in performance, costing \$1.60 and \$0.13 per run with GPT-4, respectively. Our data and code are open-sourced at https://github.com/guosyjlu/DS-Agent.

研究动机与目标

  • 通过使 LLM 代理能够理解任务需求并在数据驱动的指引下构建/训练模型,从而民主化自动化数据科学。
  • 通过基于案例的推理利用 Kaggle 专家洞察来构建一个自动化的、迭代的解决方案管线。
  • 通过重复使用过去的成功解决方案来生成代码,从而实现低资源的部署路径,而无需大量再训练。

提出的方法

  • 提出一个两阶段的 DS-Agent 框架:开发阶段具备完整的基于案例检索的迭代循环,部署阶段具备简化的基于案例检索的适应。
  • 从 Kaggle 报告与顶级获奖代码中收集和整理人类洞察案例库;将其存储到可检索和重复使用的案例库中。
  • 实现一个检索、修订排序、复用、执行和保留的循环,根据执行反馈逐步改进实验计划。
  • 使用检索器通过任务嵌入的余弦相似度提取最相似的前k个案例;使用 ReviseRanker 根据执行反馈对案例重新排序;Planner 和 Programmer 重写计划并生成 Python 代码;Debugger 修复运行时错误;Logger 记录执行日志。
  • 在开发阶段,将成功的任务计划和脚本同时保留到人类洞察和代理人案例库中以便未来重复使用;在部署阶段,从代理人库中适配过去的案例,以尽量减少对大型语言模型的工作量来生成代码。

实验结果

研究问题

  • RQ1如何将基于案例的推理(CBR)与 LLM 代理集成,以提高自动化数据科学任务的可靠性和规划?
  • RQ2一个两阶段的 DS-Agent 框架(开发阶段带有迭代的 CBR 修订,部署阶段以过去案例适配)是否能够在不同数据模态下实现高任务成功率和低成本?
  • RQ3以反馈驱动的案例修订(ReviseRank)和基于案例的复用对总体性能和效率的影响是什么?

主要发现

  • 使用 GPT-4 的 DS-Agent 在12个任务上实现开发阶段100%的成功率。
  • 在部署阶段,使用 GPT-3.5 和 GPT-4 的 DS-Agent 在18个部署任务上分别达到85%和99%的一次通过率,优于基线。
  • 消融实验表明如果没有 ReviseRank 或 CBR,将显著下降,这强调了反馈驱动的案例修订和专家知识整合的重要性。
  • DS-Agent 将开发阶段每次运行成本大幅降低到 $0.06(GPT-3.5)和 $1.60(GPT-4),部署阶段降至 $0.0045 和 $0.1350,使实际应用成为可能。
  • 部署阶段通过过去的案例实现近零-shot 或少量样本的有效性,包括对开源大语言模型(Mixtral-8x7b-Instruct)的改进。
  • DS-Agent 在多项任务中显示出较强的排序性能,GPT-4 往往取得最佳的平均分/最佳排名。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。