一句话:通过构建并分析 TensorFlow 与 PyTorch 供应链,揭示其结构、演化与漏洞特征。
深度学习框架通过软件依赖形成以框架为核心、下游项目为外围的多层供应链,但其结构与演化规律尚不清楚。本文对 TensorFlow 和 PyTorch 两个深度学习供应链开展实证研究,构建依赖网络并分析结构、应用领域和演化因素。研究发现二者均呈短而稀疏的层级结构;新项目相对增长逐月上升,项目发布包后短期内吸引下游,随后增长加快并趋于稳定。作者提出三项漏洞识别准则,识别出 51 类包和 26 类项目。比较显示 TensorFlow 供应链在实验结果分析方面包更丰富,PyTorch 供应链含更多特定框架包。GAM 拟合表明依赖包数量与下游项目数显著负相关,与作者数关系非线性。
Deep learning becomes the driving force behind many contemporary technologies and has been successfully applied in many fields. Through software dependencies, a multi-layer supply chain (SC) with a deep learning framework as the core and substantial down-stream projects as the periphery has gradually formed and is constantly developing. However, basic knowledge about the structure and characteristics of the SC is lacking, which hinders effective support for its sustainable development. Previous studies on software SC usually focus on the packages in different registries without paying attention to the SCs derived from a single project. We present an empirical study on two deep learning SCs: TensorFlow and PyTorch SCs. By constructing and analyzing their SCs, we aim to understand their structure, application domains, and evolutionary factors. We find that both SCs exhibit a short and sparse hierarchy structure. Overall, the relative growth of new projects increases month by month. Projects have a tendency to attract downstream projects shortly after the release of their packages, later the growth becomes faster and tends to stabilize. We propose three criteria to identify vulnerabilities and identify 51 types of packages and 26 types of projects involved in the two SCs. A comparison reveals their similarities and differences, e.g., TensorFlow SC provides a wealth of packages in experiment result analysis, while PyTorch SC contains more specific framework packages. By fitting the GAM model, we find that the number of dependent packages is significantly negatively associated with the number of downstream projects, but the relationship with the number of authors is nonlinear. Our findings can help further open the "black box" of deep learning SCs and provide insights for their healthy and sustainable development.