Software Engineering for Pre-Trained Models
What changes about software engineering when the reused component is a learned model?
Developers have been reusing software components for decades; pre-trained models inherit many of the same engineering problems, but also introduce new ones, because their identity, behavior, provenance, and interfaces are less explicit than those of conventional software packages.
We study pre-trained model reuse as a software-engineering practice. Our work asks which lessons from conventional component reuse still apply, where learned artifacts break those assumptions, and what new engineering methods are needed for selecting, integrating, validating, securing, and evolving models obtained from public registries.
Pre-trained models are a distinct kind of software dependency
Early work in this programme established that reusing a pre-trained model is not simply a machine-learning convenience. Engineers must discover, interpret, adapt, validate, and maintain artifacts whose interfaces and provenance are less explicit than those of conventional software packages.
- Reusing Deep Learning Models: Challenges and Directions in Software Engineering
Proceedings of the IEEE John Vincent Atanasoff S · 2023
Framed model reuse as a software-engineering problem with its own challenges, rather than a machine-learning convenience. - An Empirical Study of Pre-Trained Model Reuse in the Hugging Face Deep Learning Model Registry
ICSE · 2023
The empirical study of Hugging Face reuse that established how engineers select and adapt pre-trained models at ecosystem scale. - Software Dependencies 2.0: An Empirical Study of Reuse and Integration of Pre-Trained Models in Open-Source Projects
arXiv · 2025
Generalizes dependency thinking to model artifacts: what a dependency is, when the dependency learns. - 'I see models being a whole other thing': An Empirical Study of Pre-Trained Model Naming Conventions and A Tool for Enhancing Naming Consistency
EMSE · 2025
Interview study of how engineers reason about pre-trained models as components, including where model naming misleads them.
The model ecosystem must be measured
Pre-trained model ecosystems change quickly: registries grow, conventions shift, new model families and formats appear, and downstream reuse practices evolve with them. Engineering guidance therefore cannot rest on a static picture of how models are produced or reused. We build datasets and conduct ecosystem-scale studies so that emerging practices, failure modes, and developer needs can be measured as they change.
- PTMTorrent: A Dataset for Mining Open-source Pre-trained Model Packages
Annual Conference on Mining Software Repositorie · 2023
PTMTorrent made the model ecosystem minable, so claims about it could be measured instead of asserted. - PeaTMOSS: A Dataset and Initial Analysis of Pre-Trained Models in Open-Source Software
MSR · 2024
PeaTMOSS extends that to models as they appear inside open-source projects, linking the registry to the systems that depend on it. - What do we know about Hugging Face? A systematic literature review and quantitative validation of qualitative claims
ESEM · 2024
A systematic review and quantitative study of what is known about Hugging Face, consolidating a fast-moving literature. - An Empirical Investigation of Pre-Trained Deep Learning Model Reuse in the Scientific Process
An early empirical look at pre-trained model reuse in the wild.
Model identity and interoperability cannot be assumed
Conventional dependency management assumes a named artifact can be identified, and that declared interfaces delimit how it composes with the rest of a system. Pre-trained models weaken both assumptions. Nominally equivalent models can differ, names can be inconsistent, and supposedly portable representations can fail when moved across tools and frameworks.
- Discrepancies among Pre-trained Deep Neural Networks: A New Threat to Model Zoo Reliability
ESEC/FSE-IVR · 2022
Found that nominally identical pre-trained models from model zoos differ, which makes a model zoo a supply chain rather than a catalogue. - Interoperability in Deep Learning: A User Survey and Failure Analysis of ONNX Model Converters
ISSTA · 2024
Tested whether ONNX interoperability holds. Conversion failures show that a portability claim is an engineering obligation, not a property. - A method for identifying naming mismatches in neural networks based on their architectural properties
US provisional patent application, held by Purdu · 2025
Identifies naming mismatches from a network's architecture, making the naming problem detectable rather than only observable.
Reuse shifts substantial engineering work downstream
Reusing a trained model does not eliminate engineering work; it relocates it. Downstream developers often have to reproduce results, adapt artifacts across frameworks and hardware, reconstruct missing assumptions, and determine whether the model remains valid for a new use.
- Challenges and Practices of Deep Learning Model Reengineering: A Case Study on Computer Vision
EMSE · 2024
Model reengineering — reimplementing and extending published models — is a distinct and costly engineering activity; this documents what it involves. - An Experience Report on Machine Learning Reproducibility: Guidance for Practitioners and TensorFlow Model Garden Contributors
arXiv · 2021
Turned the reproducibility problem into guidance practitioners could apply. - Improving the Reproducibility of Deep Learning Software: An Initial Investigation through a Case Study Analysis. https://arxiv.org/pdf/2505.03165. 2025
An early look at why deep-learning results are hard to reproduce, before reuse became the dominant mode. - A Partial Replication of MaskFormer in TensorFlow on TPUs for the TensorFlow Model Garden
arXiv · 2024
A partial replication across frameworks, which is where interoperability claims are tested rather than stated. - Recommending Pre-Trained Models for IoT Devices
SERP4IoT · 2025
Recommending models for constrained devices, where the reuse decision is bounded by the hardware it has to run on.
Security is part of the reuse contract
A reused model is not only a learned function. It arrives as a software artifact with provenance, serialization formats, dependencies, and assumptions about how it will be loaded and executed. Those properties make security part of the reuse contract.
- An Empirical Study of Artifacts and Security Practices in the Pre-trained Model Supply Chain
SCORED · 2022
Characterized what is actually published alongside pre-trained models and what security practices accompany them. - “If security is required”: Engineering and Security Practices for Machine Learning-based IoT Devices
SERP4IoT · 2022
Asks what security practices ML-based IoT engineering uses in practice, and finds them conditional on someone requiring them. - PickleBall: Secure Deserialization of Pickle-based Machine Learning Models best artifact
CCS · 2025
Model serialization is an integration property. A format that executes code when loaded makes deserialization part of the reuse contract. - AI Safety in the Eyes of the Downstream Developer: A First Look at Concerns, Practices, and Challenges
arXiv · 2025
Looks at AI safety from the downstream developer's position — the engineer integrating a model, not the organization training it.
Funding and support
This work has been supported by:
- US National Science Foundation — CAREER: PTM-SEER: Software Engineering Foundations for Re-Using Pre-Trained Neural Models (#2541917)
- US National Science Foundation — Collaborative Research: SaTC 2.0: RES: AIGIS: Securing the Deep Learning Model Supply Chain (#2526621)
- Cisco — Trustworthy Re-use of Pre-Trained Neural Networks
- Google, LLC — Unrestricted Gift: Machine Learning Reproducibility
- Google, LLC — Unrestricted Gift: Research on Machine Learning Reproducibility
