DS-Agent: Automated Data Science by Empowering Large Language Models with Case-Based Reasoning
作者: Siyuan Guo, Cheng Deng, Ying Wen, Hechang Chen, Yi Chang, Jun Wang
分类: cs.LG
发布日期: 2024-02-27 (更新: 2024-05-28)
备注: Accepted by ICML 2024
🔗 代码/项目: GITHUB
💡 一句话要点
提出DS-Agent以自动化数据科学任务
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 案例推理 自动化数据科学 机器学习 实验设计 性能提升
📋 核心要点
- 现有的LLM代理在生成实验计划时常常不合理,限制了其在数据科学任务中的应用效果。
- DS-Agent通过结合案例推理(CBR)与LLM,构建了一个自动化的迭代管道,能够有效利用专家知识并提升模型性能。
- 实验结果显示,DS-Agent在开发阶段成功率达到100%,在部署阶段相比其他LLM平均提升了36%的通过率。
📝 摘要(中文)
本研究探讨了大型语言模型(LLMs)代理在自动化数据科学任务中的潜力,旨在理解任务需求并构建和训练最佳的机器学习模型。现有的LLM代理在生成实验计划时存在不合理的问题。为此,我们提出了DS-Agent,一个新颖的自动化框架,结合了LLM代理和案例推理(CBR)。在开发阶段,DS-Agent遵循CBR框架构建自动迭代管道,灵活利用Kaggle的专家知识,并通过反馈机制促进一致的性能提升。此外,DS-Agent在低资源部署阶段实现了简化的CBR范式,以适应开发阶段的成功解决方案进行直接代码生成,显著降低了对LLMs基础能力的需求。实验证明,DS-Agent在开发阶段的成功率达到100%,而在部署阶段的平均一次通过率提升了36%。
🔬 方法详解
问题定义:本论文旨在解决现有LLM代理在数据科学任务中生成不合理实验计划的问题。这一缺陷限制了其在实际应用中的有效性和可靠性。
核心思路:DS-Agent的核心思路是结合案例推理(CBR)与大型语言模型,通过结构化的自动迭代管道来优化数据科学任务的执行,利用历史成功案例来指导当前任务的解决方案。
技术框架:DS-Agent的整体架构分为两个主要阶段:开发阶段和部署阶段。在开发阶段,系统通过CBR框架构建自动迭代管道,利用Kaggle的专家知识进行模型构建和训练;在部署阶段,采用简化的CBR范式进行直接代码生成,以适应过去成功的解决方案。
关键创新:DS-Agent的关键创新在于将案例推理与LLM结合,形成了一种新的自动化框架,显著提高了数据科学任务的执行效率和成功率。这一方法与传统的LLM应用有本质区别,后者往往缺乏有效的知识利用机制。
关键设计:在设计上,DS-Agent采用了反馈机制来持续改进模型性能,并在低资源环境下优化了代码生成过程,减少了对LLMs基础能力的依赖。
🖼️ 关键图片
📊 实验亮点
DS-Agent在开发阶段实现了100%的成功率,而在部署阶段相比其他大型语言模型平均提升了36%的通过率。使用GPT-4时,每次运行的成本分别为1.60美元和0.13美元,展现了其在性能和经济性上的优势。
🎯 应用场景
DS-Agent的研究成果在多个领域具有广泛的应用潜力,包括数据分析、机器学习模型开发和自动化实验设计等。其能够有效提升数据科学任务的效率和准确性,未来可能在商业智能、科研和教育等领域产生深远影响。
📄 摘要(原文)
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.