Skip to main content
QUICK REVIEW

[论文解读] An Empirical Study of Library Usage and Dependency in Deep Learning Frameworks

Mohamed Raed El aoun, Lionel Nganyewou Tidjon|arXiv (Cornell University)|Nov 28, 2022
Machine Learning and Data Classification被引用 7
一句话总结

本实证研究分析了1,484个开源深度学习项目,以了解库的使用模式、依赖关系及工作流集成情况。通过在Python代码上进行静态分析,研究发现PyTorch与scikit-learn,以及Keras与TensorFlow是使用最频繁的库组合,开发者倾向于在工作流中使用简单函数和多个库,为库和硬件优化提供了洞见。

ABSTRACT

Recent advances in deep learning (dl) have led to the release of several dl software libraries such as pytorch, Caffe, and TensorFlow, in order to assist machine learning (ml) practitioners in developing and deploying state-of-the-art deep neural networks (DNN), but they are not able to properly cope with limitations in the dl libraries such as testing or data processing. In this paper, we present a qualitative and quantitative analysis of the most frequent dl libraries combination, the distribution of dl library dependencies across the ml workflow, and formulate a set of recommendations to (i) hardware builders for more optimized accelerators and (ii) library builder for more refined future releases. Our study is based on 1,484 open-source dl projects with 46,110 contributors selected based on their reputation. First, we found an increasing trend in the usage of deep learning libraries. Second, we highlight several usage patterns of deep learning libraries. In addition, we identify dependencies between dl libraries and the most frequent combination where we discover that pytorch and Scikit-learn and, Keras and TensorFlow are the most frequent combination in 18% and 14% of the projects. The developer uses two or three dl libraries in the same projects and tends to use different multiple dl libraries in both the same function and the same files. The developer shows patterns in using various deep-learning libraries and prefers simple functions with fewer arguments and straightforward goals. Finally, we present the implications of our findings for researchers, library maintainers, and hardware vendors.

研究动机与目标

  • 理解深度学习库随时间推移的使用趋势演变。
  • 识别真实项目中深度学习库之间的常见组合与依赖模式。
  • 分析多个深度学习库在机器学习工作流不同阶段的使用方式。
  • 为库维护者、硬件厂商和研究人员提供可操作的洞见,以改进工具链与系统设计。
  • 弥补关于多库工作流与依赖结构方面,深度学习库使用实证研究的不足。

提出的方法

  • 从GitHub收集并分析了1,484个至少包含两个深度学习库的开源深度学习项目。
  • 使用Python的抽象语法树(AST)解析器进行静态分析,以提取库使用情况与函数调用信息。
  • 利用带版本的仓库数据,从2015年到2019年追踪库的流行度与演变趋势。
  • 通过人工标注并达成共识,将函数调用分类至机器学习工作流的各个阶段(如数据预处理、模型训练、评估等)。
  • 在文件和函数级别上,识别跨多个库的依赖模式。
  • 通过单元测试与端到端测试验证结果,并通过双人及三人作者评审确保人工标注的可靠性。

实验结果

研究问题

  • RQ1深度学习库的使用随时间如何演变?
  • RQ2在相同项目中,最频繁使用的深度学习库组合是什么?
  • RQ3深度学习库在机器学习工作流的不同阶段如何分布?
  • RQ4在多个库之间,函数使用(如参数数量、功能目的)的常见模式是什么?
  • RQ5这些发现对库维护者和硬件厂商有何影响?

主要发现

  • 从2015年到2019年,深度学习库的使用呈现快速增长趋势,多库采用现象尤为显著。
  • TensorFlow是最受欢迎的库,但在2019年后使用率开始下降,尤其在TensorFlow 2.0发布后更为明显。
  • PyTorch与scikit-learn是使用最频繁的库组合,出现在18%的项目中,其次是Keras与TensorFlow,占比14%。
  • 开发者通常在同一项目中使用两到三个深度学习库,且常在同一文件和函数中使用。
  • 实践者更倾向于使用参数较少、目标明确的简单函数,尤其是在使用scikit-learn进行预处理和评估时。
  • Keras对单元测试的支持有限,表明某些库在可测试性方面存在缺口,可能影响其可维护性与可靠性。

更好的研究,从现在开始

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

无需绑定信用卡

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