用自然语言定义数据操作,让大模型自动生成可优化的代码。
SemPiper: Interactive Code Synthesis for Semantic Operators in Machine Learning Pipelines

- 通过自然语言描述数据操作,由大模型生成专用实现
- 在训练时根据数据特征和上下文合成代码,支持迭代优化
- 交互式界面可视化计算图与代码生成过程,适合数据科学家
机器学习流水线需要大量数据准备、特征工程及异构数据源整合,开发过程繁琐且易出错。尽管大型语言模型(LLMs)在编程辅助方面展现出潜力,但基于聊天的接口对流水线行为控制有限,生成的代码往往难以优化或集成到生产系统中。本文提出SemPipes,一种扩展机器学习流水线的新型编程模型,引入声明式、由大模型驱动的语义数据操作符。开发者可通过自然语言指令指定以数据为中心的操作,同时无缝结合标准数据科学库中的任意Python代码。对于语义操作符,系统在流水线训练时根据数据特征和上下文条件合成专用实现,实现大模型能力的灵活而可控集成。我们通过SemPiper展示该模型,这是一个交互式界面,可可视化流水线的计算图、合成的操作符实现以及进化搜索产生的优化轨迹。用户可探索三个端到端场景,修改流水线,检查生成代码,并观察语义操作符如何被合成与迭代优化。演示表明,声明式语义操作符能实现可控、可优化且实用的大模型集成。
原文摘要 · Abstract (English)
Machine learning (ML) pipelines require extensive data preparation, feature engineering, and integration across heterogeneous sources, making them tedious and error-prone to develop. While large language models (LLMs) have recently shown promise for assisting programming tasks, chat-based interfaces provide limited control over pipeline behavior and often produce code that is difficult to optimize or integrate into production systems. We demonstrate SemPipes, a novel programming model that extends ML pipelines with declarative, LLM-powered semantic data operators. SemPipes allows developers to specify high-level natural language instructions for data-centric operations, while seamlessly combining these operators with arbitrary Python code from standard data science libraries. For the semantic operators, it synthesizes specialized implementations at pipeline training time, conditioned on dataset characteristics and pipeline context, enabling the flexible yet controlled integration of LLM capabilities. We demonstrate SemPipes through SemPiper, an interactive interface that visualizes computational graphs of the pipelines, synthesized operator implementations, and optimization trajectories produced by an evolutionary search procedure. Attendees can explore three end-to-end scenarios, modify pipelines, inspect generated code, and observe how semantic operators are synthesized and iteratively optimized. The demonstration highlights how declarative semantic operators enable controllable, optimizable, and practical integration of LLMs into ML pipeline development.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。