[論文レビュー] An Empirical Study of Library Usage and Dependency in Deep Learning Frameworks
本研究では、1,484件のオープンソースのディープラーニングプロジェクトを対象に、ライブラリ使用パターン、依存関係、ワークフロー統合を理解することを目的としている。Pythonコードに対する静的解析を用いた結果、PyTorchとscikit-learn、KerasとTensorFlowが最も頻繁に使用されるライブラリの組み合わせであることが判明した。開発者はワークフロー全体で単純な関数と複数のライブラリを好む傾向にあり、これによりライブラリおよびハードウェア最適化のための知見が得られた。
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.
研究の動機と目的
- 時間経過に伴うディープラーニングライブラリの使用傾向の変化を理解すること。
- 実世界のプロジェクトにおけるディープラーニングライブラリ間の一般的な組み合わせと依存関係のパターンを特定すること。
- 複数のDLライブラリが機械学習ワークフローの異なる段階でどのように使用されているかを分析すること。
- ライブラリメンテナーやハードウェアベンダーや研究者らがツールチェーンやシステム設計を改善するための実用的知見を提供すること。
- とりわけマルチライブラリワークフローと依存構造に関する、ディープラーニングライブラリ使用に関する実証的研究の不足に応えること。
提案手法
- GitHubから、少なくとも2つのディープラーニングライブラリを含む1,484件のオープンソースディープラーニングプロジェクトを収集・分析した。
- Pythonの抽象構文木(AST)パーサーを用いた静的解析により、ライブラリ使用状況と関数呼び出しを抽出した。
- バージョン管理済みのリポジトリデータを用いて、2015年から2019年までの間におけるライブラリの人気度と進化を追跡した。
- 複数の研究者による合意形成によるマニュアルラベル付けを通じて、関数呼び出しをMLワークフローの段階(例:データ前処理、モデル学習、評価)に分類した。
- 複数のライブラリにまたがるファイルレベルおよび関数レベルでの依存関係のパターンを同定した。
- 単体テストおよびエンドツーエンドテストによる結果の妥当性を検証し、マニュアルラベル付けの信頼性を確保するため、二重および三重の著者レビューを実施した。
実験結果
リサーチクエスチョン
- RQ1ディープラーニングライブラリの使用は、どのように時間経過とともに変化してきたか?
- RQ2同じプロジェクト内で最も頻繁に使用されるディープラーニングライブラリの組み合わせは何か?
- RQ3ディープラーニングライブラリは、機械学習ワークフローのどの段階にどのように分散しているか?
- RQ4複数のライブラリにまたがる関数使用の一般的なパターン(例:引数の数、目的)は何か?
- RQ5これらの発見は、ライブラリメンテナーやハードウェアベンダーデザイナーにどのようなインパクトを与えるか?
主な発見
- 2015年から2019年にかけて、ディープラーニングライブラリの使用は急激に増加しており、とりわけマルチライブラリの採用が顕著に増加した。
- TensorFlowが最も人気のライブラリであったが、2019年以降、特にTensorFlow 2.0のリリース以降、使用頻度が低下し始めた。
- PyTorchとscikit-learnの組み合わせが最も頻繁に使用されており、18%のプロジェクトで利用されている。次にKerasとTensorFlowの組み合わせが14%で、続く。
- 開発者は、同じプロジェクト内で2〜3つのディープラーニングライブラリをよく使用しており、しばしば同じファイルや関数内で使用されている。
- 実務家は、引数が少なく、目的が明確な単純な関数を好む傾向にあり、特にscikit-learnを用いた前処理や評価の際には顕著である。
- Kerasはユニットテストへの対応が限定的であることが判明し、一部のライブラリにおいてテスト性に欠陥がある可能性があり、保守性や信頼性に影響を及える可能性がある。
より良い研究を、今すぐ始めましょう
論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。