arXiv:2505.18220cs.CYcs.AI2025-05被引 2

评测大模型在机器学习编程教育中的纠错能力,发现其对早期数据泄露等问题识别不足。

Navigating Pitfalls: Evaluating LLMs in Machine Learning Programming Education

  • 用代码样本测试四款大模型的错误识别能力,聚焦常见实践陷阱。
  • 模型对早期数据泄露、模型选择等关键问题识别率低,影响教学效果。
  • 小模型表现接近大模型,适合教育场景定制化部署,降低成本与数据风险。

大型语言模型(LLMs)在教育领域的应用迅速发展。本研究考察了LLMs在机器学习教育中支持学习的能力,重点关注其识别机器学习代码中常见错误(陷阱)以及提供指导性反馈的能力。通过一组代码样本,评估了四种不同模型:一款闭源模型和三款开源模型。尽管所有模型都能识别基础错误,但对许多常见陷阱识别效果不佳,尤其在机器学习流程早期阶段的问题,如可能导致信息泄露的错误,这是实际项目失败的主要原因。此外,模型在识别模型选择相关的错误方面也表现有限,而这是学生从理论转向实践时普遍困惑的领域。这质疑了当前LLMs在机器学习教育中的适用性,并引发关于新手从业者使用这些模型的担忧。然而,当模型成功识别错误时,通常能提供后续操作建议,展现出引导学习的潜力。我们还比较了闭源与开源模型的能力,发现尽管模型规模差异显著,但性能差距较小,表明可在教育中部署并定制更小、更高效的模型,避免商业模型带来的成本与数据共享风险。

原文摘要 · Abstract (English)

The rapid advancement of Large Language Models (LLMs) has opened new avenues in education. This study examines the use of LLMs in supporting learning in machine learning education; in particular, it focuses on the ability of LLMs to identify common errors of practice (pitfalls) in machine learning code, and their ability to provide feedback that can guide learning. Using a portfolio of code samples, we consider four different LLMs: one closed model and three open models. Whilst the most basic pitfalls are readily identified by all models, many common pitfalls are not. They particularly struggle to identify pitfalls in the early stages of the ML pipeline, especially those which can lead to information leaks, a major source of failure within applied ML projects. They also exhibit limited success at identifying pitfalls around model selection, which is a concept that students often struggle with when first transitioning from theory to practice. This questions the use of current LLMs to support machine learning education, and also raises important questions about their use by novice practitioners. Nevertheless, when LLMs successfully identify pitfalls in code, they do provide feedback that includes advice on how to proceed, emphasising their potential role in guiding learners. We also compare the capability of closed and open LLM models, and find that the gap is relatively small given the large difference in model sizes. This presents an opportunity to deploy, and potentially customise, smaller more efficient LLM models within education, avoiding risks around cost and data sharing associated with commercial models.

大模型机器学习教育代码纠错教育智能

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。