[Paper Review] Software Engineering Practices for Machine Learning
This paper proposes adapting software engineering practices—particularly the OSGi Requirements/Capability model—to machine learning (ML) by formalizing ML models as modular artifacts with machine-readable metadata for capabilities (e.g., input/output specs, dataset) and requirements (e.g., runtime, hardware). By treating ML models like software libraries, the approach enables automated, reliable composition and deployment of ML components, reducing manual integration errors and streamlining production pipelines.
In the last couple of years we have witnessed an enormous increase of machine learning (ML) applications. More and more program functions are no longer written in code, but learnt from a huge amount of data samples using an ML algorithm. However, what is often overlooked is the complexity of managing the resulting ML models as well as bringing these into a real production system. In software engineering, we have spent decades on developing tools and methodologies to create, manage and assemble complex software modules. We present an overview of current techniques to manage complex software, and how this applies to ML models.
Motivation & Objective
- Address the growing complexity of deploying and maintaining ML models in production systems.
- Identify that ML model deployment is often treated as an afterthought, leading to anti-patterns like 'glue code' and 'pipeline jungles'.
- Bridge the gap between software engineering best practices and ML model lifecycle management.
- Enable automated, tool-driven composition of ML components through formalized metadata.
- Improve reliability, reusability, and maintainability of ML systems by modeling them as modular software artifacts.
Proposed method
- Adopt the OSGi Requirements/Capability model as a foundation for describing ML models as reusable software modules.
- Define model capabilities using structured metadata: input format (e.g., 28x28 images), output type (e.g., 10-class digit classification), dataset (e.g., MNIST), and version.
- Specify model requirements such as required libraries, hardware (e.g., GPU), and runtime dependencies.
- Use OSGi Resolver to automatically assemble compatible ML models and their execution environments based on consumer-defined requirements.
- Represent model metadata in a standardized, machine-readable format (e.g., .jar file with embedded metadata), analogous to software libraries.
- Apply the model to real-world ML workflows, demonstrating automatic resolution of models trained on MNIST or SVHN for digit classification tasks.
Experimental results
Research questions
- RQ1How can software engineering principles like modularity and dependency management be applied to machine learning models?
- RQ2What metadata structure enables reliable, automated composition of ML models in complex production pipelines?
- RQ3Can formalized capabilities and requirements reduce human error and manual effort in ML deployment?
- RQ4How can ML models be packaged and versioned in a way that supports backward compatibility and interoperability?
- RQ5To what extent can existing software engineering tooling (e.g., OSGi) be extended to support ML model lifecycle management?
Key findings
- Formalizing ML models with capabilities (e.g., input size, output type, dataset) and requirements (e.g., libraries, hardware) enables automated, tool-driven model composition.
- The OSGi Resolver can automatically select compatible ML models based on consumer requirements, such as accepting images of at least 28x28 pixels for digit classification.
- ML models trained on MNIST or SVHN can be automatically discovered and composed when their metadata matches consumer-defined filters.
- The use of standardized metadata reduces the risk of deployment failures by validating compatibility across development, testing, and production stages.
- Applying semantic versioning and machine-readable metadata to ML models significantly reduces the prevalence of 'glue code' and 'pipeline jungles'.
- The approach enables a shift from ad-hoc, manual ML deployment to a systematic, scalable, and maintainable software engineering model for ML systems.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.