TL;DR
This paper introduces the concept of Software Dependencies 2.0, arguing that pre-trained models (PTMs) represent a fundamentally new class of dependency that differs from traditional code libraries. Through an empirical study of 401 GitHub projects, the authors reveal that PTM reuse is rarely "plug-and-play," suffering instead from fragmented documentation, versioning "debt," and complex multi-model interactions that challenge existing software engineering practices.
What Problem Does This Paper Address?
In traditional software engineering (Software Dependencies 1.0), we manage dependencies like logging libraries or web frameworks. These are code-centric: their behavior is explicitly programmed and managed through mature package managers (like npm or PyPI) using manifest files.
However, modern software increasingly relies on Pre-Trained Models (PTMs) from hubs like Hugging Face. These dependencies are model-centric; their behavior is determined by learned parameters rather than human-written code. The authors argue that we lack a systematic understanding of how developers actually integrate these models into real-world projects. This "blind spot" leads to technical debt, where model versions are untracked, documentation is scattered, and the complex pipelines required to make these models work are poorly understood, threatening the maintainability of AI-enabled systems.
Methods
The researchers conducted a mixed-methods analysis using a multi-step pipeline:
- Sampling: They started with the PeaTMOSS dataset (containing over 28,000 GitHub repos) and extracted a statistically significant sample of 650 popular projects.
- Manual Curation: They narrowed this down to 401 "Functional Applications"—projects where PTMs implement core features rather than just being part of a tutorial.
- Traceability Analysis: They developed a lightweight tracing procedure using static analysis and
git grepto identify how models are loaded and where they sit in the codebase. - Qualitative Coding: The authors manually reviewed READMEs, configuration files, and source code to build taxonomies for PTM reuse pipelines and multi-model interaction types.
Datasets
The study primarily utilizes the PeaTMOSS dataset, which tracks GitHub repositories that employ models from Hugging Face and PyTorch Hub. The final analyzed sample included 401 unique projects spanning domains like NLP (44.4%), computer vision (35.7%), and multi-modal systems.
Key Insights and Ideas
- The "2.0" Distinction: The core "aha moment" is the formal definition of Software Dependencies 2.0. Unlike 1.0 dependencies, 2.0 dependencies have probabilistic behavior, involve model artifacts (weights/tokenizers) alongside code APIs, and exhibit interchangeability at the model-family level (e.g., swapping one BERT variant for another).
- Interchangeable vs. Complementary: The authors found that multi-model reuse is the norm (52.6% of projects). They distinguish between interchangeable structures (where models can be swapped for performance/resource reasons) and complementary structures (where different models handle distinct sub-tasks, like one for vision and one for text).
- The Reuse Pipeline: PTM reuse isn't a single function call. It follows structured organizations: Feature Extraction-Oriented (59%), Discriminative-Oriented (21%), and Generative-Oriented (20%).
- Documentation Fragmentation: A major insight is the "traceability gap." Only 21.2% of projects declare all their PTMs in a centralized file outside of the source code. Most model references are "hidden" deep in the logic, making them invisible to traditional dependency scanners.
Key Results
- Multi-Model Prevalence: Over half (52.6%) of the studied projects use more than one PTM.
- Versioning Debt: Only 12% of projects specify a specific model version (e.g., using a Git commit hash or version tag). Most simply pull the "latest," which can lead to silent failures if the upstream model is updated or changed.
- Adaptation is Mandatory: PTMs are rarely used "as-is." Developers frequently perform "head addition" (adding new layers), "layer deletion," or "fine-tuning" to align the model with their specific task.
- Interaction Taxonomy: The paper identifies four ways models collaborate:
- Feature Handoff (42%): One model's output is the input for another.
- Feedback Guidance (45%): One model evaluates or guides the training of another.
- Evaluation (9%): A model is used solely to calculate metrics for another.
- Post-Processing Refinement (4%): A model "cleans up" or filters the output of another (e.g., a safety checker).
Limitations and Future Work
The authors acknowledge that their study is limited to open-source hubs (Hugging Face and PyTorch Hub). It does not capture the reuse of models accessed via commercial APIs (like OpenAI's GPT-4) or models hosted in private registries.
Future Work directions include:
- Developing Software Bill of Materials (SBOM) standards specifically for models to track provenance and versions.
- Building automated tools to generate documentation for PTM pipelines.
- Investigating "data-model-code entanglement," where changes in data formats silently break model-centric dependencies.
Summary updated