[论文解读] Large Language Models for Automated Data Science: Introducing CAAFE for Context-Aware Automated Feature Engineering
本文提出 CAAFE(上下文感知自动化特征工程),一种利用大语言模型(LLMs)基于数据集描述迭代生成语义上具有意义的特征的方法,适用于表格型数据集。通过生成可执行的 Python 代码和人类可读的解释,CAAFE 提升了下游模型的性能——在 14 个数据集上将平均 ROC AUC 从 0.798 提升至 0.822,同时增强了可解释性,并实现了半自动化的、上下文感知的数据科学工作流。
As the field of automated machine learning (AutoML) advances, it becomes increasingly important to incorporate domain knowledge into these systems. We present an approach for doing so by harnessing the power of large language models (LLMs). Specifically, we introduce Context-Aware Automated Feature Engineering (CAAFE), a feature engineering method for tabular datasets that utilizes an LLM to iteratively generate additional semantically meaningful features for tabular datasets based on the description of the dataset. The method produces both Python code for creating new features and explanations for the utility of the generated features. Despite being methodologically simple, CAAFE improves performance on 11 out of 14 datasets -- boosting mean ROC AUC performance from 0.798 to 0.822 across all dataset - similar to the improvement achieved by using a random forest instead of logistic regression on our datasets. Furthermore, CAAFE is interpretable by providing a textual explanation for each generated feature. CAAFE paves the way for more extensive semi-automation in data science tasks and emphasizes the significance of context-aware solutions that can extend the scope of AutoML systems to semantic AutoML. We release our $\href{https://github.com/automl/CAAFE}{code}$, a simple $\href{https://colab.research.google.com/drive/1mCA8xOAJZ4MaB_alZvyARTMjhl6RZf0a}{demo}$ and a $\href{https://pypi.org/project/caafe/}{python\ package}$.
研究动机与目标
- 解决当前自动化机器学习(AutoML)系统中忽视数据工程与领域知识整合的空白。
- 实现利用大语言模型(LLMs)中嵌入的广泛领域知识进行自动化特征工程。
- 通过语义上合理且上下文感知的特征生成,提升表格型数据集上的模型性能。
- 通过为每个生成的特征提供自然语言解释,确保可解释性,从而增强信任度与可用性。
- 通过将代码作为 LLM 与经典机器学习之间的接口,弥合 LLM 与经典机器学习之间的鸿沟,结合 LLM 的创造力与经典机器学习的鲁棒性。
提出的方法
- CAFE 使用用户指定的数据集描述和上下文,引导 LLM 生成用于新特征的 Python 代码。
- 该系统以迭代方式运行:LLM 提出特征工程操作,通过交叉验证在下游预测模型上执行并评估其效果。
- 通过比较添加特征前后预测模型的 AUC 来验证性能提升。
- 仅保留能提升性能的特征,确保算法反馈驱动整个过程。
- 每个生成的特征均附带自然语言注释,说明其用途,从而实现可解释性。
- 该方法将代码作为 LLM 与经典机器学习模型之间的接口,实现可重现且可验证的自动化。
实验结果
研究问题
- RQ1LLM 是否能有效用于生成上下文感知、语义上有意义的特征,从而提升表格型预测性能?
- RQ2CAAFE 的性能与逻辑回归和随机森林等传统基线模型相比如何?
- RQ3LLM 生成的特征在多大程度上可以通过自然语言解释进行可解释性和验证?
- RQ4使用 LLM 进行迭代式、反馈驱动的特征生成,是否能带来一致且可重现的性能提升?
- RQ5CAFE 在具有不同领域上下文的多样化表格型数据集上扩展性如何?
主要发现
- 在 14 个多样化表格型数据集上,CAFE 将平均 ROC AUC 从 0.798 提升至 0.822,绝对提升 0.024。
- 该性能提升与在同一数据集上从逻辑回归升级到随机森林的性能增益相当。
- 该方法在 14 个数据集中的 11 个上成功生成了特征,展示了持续改进的潜力。
- 每个生成的特征均附带自然语言解释,实现了可解释性并增强了用户信任。
- 通过使用可执行代码作为 LLM 与经典机器学习模型之间的接口,系统实现了可重现性。
- CAFE 展示了通过 LLM 将领域知识整合到 AutoML 中的可行性,推动 AutoML 向语义化 AutoML 发展。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。