arXiv:2509.06085cs.SEcs.AI2025-09被引 2

研究开源项目如何使用预训练模型作为新型软件依赖。

Software Dependencies 2.0: An Empirical Study of Reuse and Integration of Pre-Trained Models in Open-Source Projects

  • 分析401个仓库,发现预训练模型集成有特定流程和组织模式。
  • 揭示模型间在流水线中存在复杂交互关系,影响系统可靠性。
  • 适合关注AI工程化与代码可维护性的开发者阅读。

预训练模型(PTMs)是预先训练好的机器学习模型,通常基于大规模数据,可复用于新任务,降低从零训练的成本。其广泛应用催生了一类新型软件依赖——软件依赖2.0,超越传统库范畴,涵盖训练好的模型及其相关产物。然而,实际项目中将PTMs作为依赖的整合方式尚不明确,可能威胁现代依赖这些模型的软件系统的可维护性与可靠性。本研究通过混合方法分析来自PeaTMOSS数据集的401个随机抽样GitHub仓库(共28,575个使用Hugging Face与PyTorch Hub模型的仓库),探究开源项目中对PTMs的复用情况。重点回答:(1) 开源项目如何结构化并记录其PTM依赖;(2) PTM复用流程中的阶段划分与组织模式;(3) 不同阶段中模型与其他学习组件的交互关系。定量分析识别出复用模式,定性分析开发者实际集成与管理方式。

原文摘要 · Abstract (English)

Pre-trained models (PTMs) are machine learning models that have been trained in advance, often on large-scale data, and can be reused for new tasks, thereby reducing the need for costly training from scratch. Their widespread adoption introduces a new class of software dependency, which we term Software Dependencies 2.0, extending beyond conventional libraries to learned behaviors embodied in trained models and their associated artifacts. The integration of PTMs as software dependencies in real projects remains unclear, potentially threatening maintainability and reliability of modern software systems that increasingly rely on them. Objective: In this study, we investigate Software Dependencies 2.0 in open-source software (OSS) projects by examining the reuse of PTMs, with a focus on how developers manage and integrate these models. Specifically, we seek to understand: (1) how OSS projects structure and document their PTM dependencies; (2) what stages and organizational patterns emerge in the reuse pipelines of PTMs within these projects; and (3) the interactions among PTMs and other learned components across pipeline stages. We conduct a mixed-methods analysis of a statistically significant random sample of 401 GitHub repositories from the PeaTMOSS dataset (28,575 repositories reusing PTMs from Hugging Face and PyTorch Hub). We quantitatively examine PTM reuse by identifying patterns and qualitatively investigate how developers integrate and manage these models in practice.

预训练模型软件依赖开源项目AI工程

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