Skip to main content
QUICK REVIEW

[论文解读] Julearn: an easy-to-use library for leakage-free evaluation and inspection of ML models

Sami Hamdan, Shammi More|arXiv (Cornell University)|Oct 19, 2023
Explainable Artificial Intelligence (XAI)被引用 5
一句话总结

Julearn 是一个开源的 Python 库,通过嵌套交叉验证和共变量回归,强制实现无泄漏的评估,从而简化研究人员的机器学习流程开发。它使非专家能够以极低的过拟合或数据泄漏风险构建、验证和检查可泛化的模型,这在使用真实神经影像数据的三个神经科学案例研究中得到了验证。

ABSTRACT

The fast-paced development of machine learning (ML) methods coupled with its increasing adoption in research poses challenges for researchers without extensive training in ML. In neuroscience, for example, ML can help understand brain-behavior relationships, diagnose diseases, and develop biomarkers using various data sources like magnetic resonance imaging and electroencephalography. The primary objective of ML is to build models that can make accurate predictions on unseen data. Researchers aim to prove the existence of such generalizable models by evaluating performance using techniques such as cross-validation (CV), which uses systematic subsampling to estimate the generalization performance. Choosing a CV scheme and evaluating an ML pipeline can be challenging and, if used improperly, can lead to overestimated results and incorrect interpretations. We created julearn, an open-source Python library, that allow researchers to design and evaluate complex ML pipelines without encountering in common pitfalls. In this manuscript, we present the rationale behind julearn's design, its core features, and showcase three examples of previously-published research projects that can be easily implemented using this novel library. Julearn aims to simplify the entry into the ML world by providing an easy-to-use environment with built in guards against some of the most common ML pitfalls. With its design, unique features and simple interface, it poses as a useful Python-based library for research projects.

研究动机与目标

  • 解决神经科学研究中机器学习评估不当的问题,因为数据泄漏和错误的交叉验证可能导致模型性能被高估。
  • 为缺乏深入机器学习训练的领域专家提供一个用户友好且易于访问的工具,用于设计和验证机器学习流程。
  • 将嵌套交叉验证和共变量回归等防护机制直接嵌入库中,以防止模型评估中的常见陷阱。
  • 使研究人员能够使用 ADNI、HCP-YA 和 IXI 等真实世界神经影像数据集构建并检查可泛化的模型。
  • 提供一种轻量级、透明的替代方案,以替代 AutoML 工具,优先考虑可解释性和控制权,而非自动化超参数调优。

提出的方法

  • 该库实现了与 scikit-learn 兼容的估计器接口,可无缝集成到现有的机器学习工作流中。
  • 默认强制使用嵌套交叉验证,将超参数搜索与最终性能评估分离,以防止数据泄漏。
  • 内置共变量回归模块,可从预测变量中去除虚假相关性,尤其在神经影像数据中至关重要。
  • 支持广泛的机器学习模型,包括 SVM、随机森林、GPR 和 XGBoost,并提供一致的评估接口。
  • 提供简单、高层级的 API,可在一个链式结构中定义包含预处理、特征选择和模型训练的完整流程。
  • 设计强调透明度和可解释性,避免黑箱自动化,优先保障用户控制权和可审计性。
Figure 1: Implementation of a simple \ac CV pipeline using julearn (A) in contrast to scikit-learn (B). The julearn pipeline needs only one import, while scikit-learn needs multiple. Furthermore, scikit-learn needs to import the Support Vector Machine differently depending on the problem type, while
Figure 1: Implementation of a simple \ac CV pipeline using julearn (A) in contrast to scikit-learn (B). The julearn pipeline needs only one import, while scikit-learn needs multiple. Furthermore, scikit-learn needs to import the Support Vector Machine differently depending on the problem type, while

实验结果

研究问题

  • RQ1一个用户友好的机器学习库是否能在不依赖深度机器学习专业知识的情况下,降低神经科学研究中数据泄漏和过拟合的风险?
  • RQ2julearn 在多大程度上能够复制并简化先前神经科学研究中发表的复杂、符合出版标准的机器学习流程?
  • RQ3与标准交叉验证实践相比,julearn 中的嵌套交叉验证在多大程度上提高了泛化性能估计的可靠性?
  • RQ4julearn 是否能够在保持模型可解释性和性能的同时,支持神经影像数据中的共变量回归?
  • RQ5在可用性、控制权和生物医学研究中的安全性方面,julearn 与现有 AutoML 和领域专用机器学习库相比如何?

主要发现

  • Julearn 使用真实数据集(ADNI、HCP-YA、IXI)成功复制了三项先前发表的神经科学研究,证明其能以极少代码重现已发表结果。
  • 该库默认采用嵌套交叉验证,与标准交叉验证实践相比,显著降低了性能估计过于乐观的风险。
  • 通过 julearn 内置的共变量回归模块,全局信号和头部运动等混淆变量被有效去除,提升了模型的鲁棒性。
  • 该库使研究人员能够通过单一、直观的 API 构建和评估复杂的机器学习流程,从而降低实现错误的可能性。
  • Julearn 的设计支持完全透明和可审计,使其适用于神经科学研究中的可重现和可发表的研究。
  • 该库已被神经科学和神经影像学社区的早期用户采纳,验证了其在真实研究工作流中的可用性和实际价值。
Figure 2: Example of julearn (A) and scikit-learn (B) training a typical \ac ML pipeline in a \ac CV consistent way. Both use a grid search to find optimal hyperparameters. Note that julearn is able to specify the hyperparameters at the same time as it defines each step. On the other hand, scikit-le
Figure 2: Example of julearn (A) and scikit-learn (B) training a typical \ac ML pipeline in a \ac CV consistent way. Both use a grid search to find optimal hyperparameters. Note that julearn is able to specify the hyperparameters at the same time as it defines each step. On the other hand, scikit-le

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。