Source-linked AI summary
A Software Engineering Perspective on Engineering Machine Learning Systems: State of the Art and Challenges
Görkem Giray
TL;DR
Engineering ML systems poses challenges because their interconnected components and learned decision logic do not fit mature traditional software-engineering techniques. This study systematically synthesizes SE research, finding growing interest but many unanswered questions and a need for more real-world evidence.
Problem
Engineers lack mature solution patterns for ML systems, whose interconnected components complicate traditional approaches to reducing coupling.
Method
The study systematically identifies, analyzes, summarizes, and synthesizes SE research using database searches, Google Scholar, snowballing, and manual search.
Results
The number of SE studies on engineering ML systems approximately doubled annually since 2018, while many research questions remain unanswered.
Takeaways & Limitations
More industry–academia cooperation and real-world experiments can extend knowledge, while the review can inform research questions and SE curricula.
Takeaways & Limitations
The review covers peer-reviewed studies published through 31 December 2020 and selects studies from SE venues, excluding grey literature and other relevant venue perspectives.
Abstract
from arXiv · showhide
Context: Advancements in machine learning (ML) lead to a shift from the traditional view of software development, where algorithms are hard-coded by humans, to ML systems materialized through learning from data. Therefore, we need to revisit our ways of developing software systems and consider the particularities required by these new types of systems. Objective: The purpose of this study is to systematically identify, analyze, summarize, and synthesize the current state of software engineering (SE) research for engineering ML systems. Method: I performed a systematic literature review (SLR). I systematically selected a pool of 141 studies from SE venues and then conducted a quantitative and qualitative analysis using the data extracted from these studies. Results: The non-deterministic nature of ML systems complicates all SE aspects of engineering ML systems. Despite increasing interest from 2018 onwards, the results reveal that none of the SE aspects have a mature set of tools and techniques. Testing is by far the most popular area among researchers. Even for testing ML systems, engineers have only some tool prototypes and solution proposals with weak experimental proof. Many of the challenges of ML systems engineering were identified through surveys and interviews. Researchers should conduct experiments and case studies, ideally in industrial environments, to further understand these challenges and propose solutions. Conclusion: The results may benefit (1) practitioners in foreseeing the challenges of ML systems engineering; (2) researchers and academicians in identifying potential research questions; and (3) educators in designing or updating SE courses to cover ML systems engineering.
1 INTRODUCTION
ML capabilities are increasingly embedded in software-intensive systems, creating engineering challenges that differ from traditional software development. This study addresses the need for a holistic SE view by reviewing the state of SE research on ML systems.
- ML algorithms increasingly empower software-intensive systems across domains including autonomous driving, healthcare, finance, language processing, image recognition, and recommendation.
- Engineering ML systems in real-world settings adds complexity to traditional software engineering and requires integrating ML and SE knowledge.
- A holistic view is needed because ML capabilities commonly operate as parts of larger software-intensive systems.
- SEMLA discussions focused on incorporating ML activities into existing processes and identifying the new roles, artifacts, and activities needed for ML systems.
- The study presents the state of the art and identifies challenges in SE research for engineering ML systems.
2 BACKGROUND
ML systems differ from traditional software because behavior is learned from data rather than fully specified through hand-written code. The paper defines its terminology and frames its focus as SE for ML rather than ML for SE.
- The section establishes foundational concepts and vocabulary for discussing ML systems engineering.
- Traditional software and ML systems: Traditional software uses hand-designed programs, whereas ML systems search candidate programs through training experiments driven by data.
- ML and DL systems: Traditional ML relies on hand-designed features, while deep learning reduces the need for manual feature selection by learning representations from data.
- Terminology: The paper uses “ML system” for frameworks, tools, libraries, components, or software systems that provide or include ML functionality.
- SE for ML and ML for SE: SE for ML addresses designing, developing, and maintaining ML-enabled software, whereas ML for SE applies ML to software engineering tasks.
- SE for ML and ML for SE: The paper focuses on SE for ML through a systematic review of SE literature on engineering ML systems.
3 RELATED WORK
Prior research has examined specific SE aspects of ML systems, especially quality, security, safety, testing, and industrial development. This review broadens and updates that work through a larger SE-focused study pool and mapped research directions.
- Existing reviews: Earlier reviews addressed ML-system quality, security, safety, testing, development practices, and design patterns through distinct focused studies.
- This review: 141 studies were analyzed, compared with 115, 72, and 55 studies in three cited related reviews.
- This review: The review covers studies through the end of 2020, whereas the cited earlier SE-focused reviews did not cover papers published in 2020.
- This review: The review distinguishes itself by mapping ML-system challenges and proposed solutions to SE knowledge areas.
- Industrial context: Industry and practitioner discussions increasingly frame ML-system engineering as requiring new methods, tools, frameworks, and tutorials.
4 RESEARCH OBJECTIVES AND METHOD
The study uses a systematic literature review to synthesize SE knowledge about engineering ML systems. Its protocol follows established SLR guidance and specifies the search, selection, and synthesis procedures.
- Research method: An SLR was adopted to synthesize knowledge about engineering ML systems from an SE perspective.
- Research method: The method follows established guidelines, prior SLR examples, and the author’s previous experience conducting systematic literature reviews.
- SLR protocol: The protocol summary specifies the study’s search string and search strategy.
- SLR protocol: The protocol includes inclusion and exclusion criteria for selecting primary studies.
4.1 GOAL AND REVIEW QUESTIONS
The study analyzes the state of the art in engineering machine learning systems from a software engineering perspective. It examines reported challenges, proposed solutions, research intensity, methods, and application scenarios or datasets.
- The study analyzes the state of the art in engineering machine learning systems from a software engineering perspective.
- The review examines reported challenges, proposed solutions, research intensity, and research methods.
- The review asks which research methods were used in studies of engineering machine learning systems.
- It asks which application scenarios and datasets were used in experiments and case studies.
- It specifically investigates challenges and solutions raised by software engineering researchers.
4.2 PRIMARY STUDY SELECTION
The review selected primary studies from software engineering venues using database searches, snowballing, and manual searches, then removed duplicates and assessed study quality. The final pool contained 141 individual results.
- 4.2.1 Inclusion and exclusion criteria: The review included papers about machine learning systems or components that addressed at least one software engineering challenge.Eligible areas included requirements engineering, design, development and tools, testing and quality, maintenance, process and management, and organizational aspects.
- 4.2.1 Inclusion and exclusion criteria: The search excluded papers focused on machine learning internals without a software-intensive engineering context and excluded secondary studies.
- 4.2.2 Database search: 90 primary studies were obtained from database searches conducted in January 2020 and March 2021.
- 4.2.3 Snowballing and 4.2.4 Manual search: 68 primary studies came from backward and forward snowballing, while 58 came from manual searches of selected software engineering venues and workshops.
- 4.2.5 Duplicate removal: 74 duplicate studies were removed, and extended versions were retained when substantially overlapping shorter papers.
- 4.2.6 Quality assessment and 4.2.7 Finalization of primary study pool: After one study failed the quality threshold, the final primary study pool contained 141 individual results.The pool comprised results from database search, snowballing, and manual search, with 77 found by one method and 64 by multiple methods.
4.3 DATA EXTRACTION
Data extraction recorded study metadata, research methods, software engineering knowledge areas, and application scenarios or datasets. The extracted fields were organized to support the review questions.
- The data extraction form recorded metadata such as title, abstract, keywords, publication year, venue, and author affiliation type.
- It categorized studies by software engineering knowledge areas, including requirements, design, development and tools, testing, maintenance, process, and organizational aspects.
- Research methods were classified as experiments, interviews, surveys, thematic analysis, case studies, statistical analysis, or opinion/no research method.
- Application scenarios included machine learning frameworks or libraries, autonomous driving, classification, image classification, and mountain-car tasks.
4.4 DATA SYNTHESIS AND REPORTING
The study synthesized categorized extraction data quantitatively and analyzed challenges and proposed solutions qualitatively. Frequencies and percentages summarized most research questions, while open coding addressed the qualitative question.
- Frequencies and percentages were reported for each identified category when the extracted data could be categorized.
- Challenges and proposed solutions were analyzed qualitatively through open coding.Open coding was conducted in cycles to identify patterns of similarity or contradiction and then refine the codes.
5 RESULTS
The abstract-term analysis shows which concepts dominate the primary studies and frames the concentration of research on ML systems and software.
- Term frequencies: The 50-term abstract analysis used unigrams, bigrams, and trigrams, with lemmatization and stopword removal for unigrams.The resulting frequent terms included “system,” “software,” “application,” “DL software,” “ML system,” and “program.”
- Term frequencies: “System,” “software,” “application,” “DL software,” “ML system,” and “program” were among the most frequently used abstract terms.
5.1 WHAT RESEARCH METHODS WERE USED?
Experiments were the predominant research method, while interviews and surveys were used to identify engineering challenges, especially across testing, quality, and other SE areas.
- Overall methods: Most empirical studies employed experiments to investigate SE challenges in engineering ML systems.Fifteen papers gave author opinions or insufficient methodological detail.
- Overall methods: Interviews and surveys were used to learn about experts’ engineering challenges, and two studies combined both methods.The challenges identified through these methods covered all aspects of engineering ML systems.
- Overall methods: Case studies collected data on industrial ML-system activities, while thematic analysis and statistical analysis were additional research approaches.
- Methods by SE area: Experiments were used primarily in testing and quality studies, and also in development and tools and maintenance and configuration management.
5.2 WHAT APPLICATION SCENARIOS AND DATASETS WERE USED FOR IN EXPERIMENTS AND CASE STUDIES?
Experiments and case studies covered diverse ML application scenarios and datasets, but image classification dominated the evidence base and deep learning was widely used.
- Application scenarios: Image classification was the most popular application scenario, appearing in 57 primary studies.Its prevalence may reflect the availability of many public datasets.
- Application scenarios: Other scenarios included object detection, non-image classification, regression, natural language processing, ranking, and reinforcement-learning mountain car problems.The cited studies included numerical prediction, machine translation, device-failure ranking, and neuron-coverage evaluation for deep reinforcement learning.
- Application scenarios: Autonomous driving was the third most popular application scenario, used in 13 studies and involving tasks such as image classification, object detection, and steering-angle prediction.
- Frameworks and libraries: Five studies examined testing and maintenance problems in ML frameworks or libraries, including technical debt and performance bugs.
- Algorithms: 65 of 93 studies, or 70%, used only deep-learning algorithms; 19 used traditional ML, four used both, and five did not report the algorithms.
- Algorithms: Deep-learning algorithms were used in all autonomous-driving, continuous-value-prediction, object-detection, and mountain-car scenarios.Nearly all image-classification scenarios also used deep learning, which requires large labelled datasets for training.
- Datasets: 184 datasets were reported across 93 studies, with most studies using two datasets on average.Twenty-nine datasets were used only once, while repeatedly used datasets included MNIST, CIFAR-10, ImageNet, Fashion-MNIST, SVHN, and IMDB-WIKI.
5.3 WHICH CHALLENGES AND SOLUTIONS FOR ENGINEERING ML SYSTEMS WERE RAISED BY SE RESEARCHERS?
SE researchers identify challenges across requirements, design, development, testing, and maintenance because ML systems introduce data-, model-, and nondeterminism-related concerns. Proposed solutions include new requirement practices, design patterns, data-pipeline controls, and model-analysis tools, but several areas remain immature.
- Requirements Engineering: Quantitative ML requirements such as accuracy, precision, recall, and F measure can be difficult to map to business objectives.Researchers also propose extending requirements engineering practices to model dynamic goals and defining new quality metrics for completeness and consistency.
- Requirements Engineering: ML requirements must address explainability, freshness, robustness, data quality, privacy, and customer expectations alongside functional and non-functional requirements.Explainability supports trust, freshness specifies model updates, robustness can use human performance as a baseline, and data quality affects model performance.
- Design: ML systems lack mature solution patterns because dependencies among application code, glue code, libraries, and external data make local changes affect the broader system.Researchers therefore document anti-patterns and propose catalogs and architectural or design patterns dedicated to ML-specific problems.
- Software Development and Tools: Data engineering requires integrating heterogeneous sources and treating data pipelines as version-controlled, tested, deployed, and maintained artifacts.Data bugs, exception handling, semantic heterogeneity, and imbalanced datasets can undermine model development and prediction accuracy.
- Software Development and Tools: Developers struggle to understand ML algorithms, libraries, and model behavior, especially for deep learning systems.Proposed responses include model and parameter recommendation tools, better documentation, visualization environments, and verification of compressed models.
5.4 DEMOGRAPHICS
The literature on engineering ML systems increased sharply from 2018 onward, with studies concentrated in conferences and workshops and predominantly authored by academia. Testing and quality received the greatest attention across affiliation types.
- From 2018 onward, the number of primary studies increased sharply after only zero or one paper per year through 2016 and three papers in 2017.
- 91% of the studies were presented in conferences and workshops, comprising 129 papers versus 12 journal papers.
- 72% of papers were authored solely by academic researchers, while 20% involved university–industry collaboration and 8% came solely from industry or research organizations.
- Testing and Quality was the most focused knowledge area across academia and industry and had the most researcher collaboration.Development & tools and requirements engineering ranked second and third for collaboration.
6 DISCUSSION
The literature shows rapidly increasing SE interest in ML systems, but unresolved challenges span requirements, architecture, tooling, testing, maintenance, and process. Testing dominates the research, yet mature industrial techniques remain unavailable.
- Since 2018, the number of primary SE studies on engineering ML systems has approximately doubled annually, while the topic remains in its infancy.
- Requirements engineering: Requirements engineering must address behaviors that are difficult to characterize fully, along with explainability, fairness, freshness, privacy, and integration with traditional components.
- Design and tooling: ML-system design requires architectural support for production performance degradation, high-volume data processing, heterogeneous tools, and cross-platform integration.
- Testing: Testing is the most studied area, but industrially mature techniques and tools are still lacking across test design, data preparation, execution, coverage, oracle handling, and result assessment.
- Future research: Further work should address ML-library technical debt and establish harmonized ML-SE practices through industrial experiments and case studies.
- Proposed solutions: Researchers have proposed tools for ML-library documentation, model development, data augmentation, fairness mitigation, environment consistency, and test automation, but many remain prototypes or conceptual solutions.
7 CONCLUSIONS AND FUTURE WORK
The study frames ML systems as a shift from hard-coded software toward systems materialized through learning from data, requiring software engineering practices to be reconsidered. It synthesizes the state of SE research and identifies unresolved questions and a need for stronger industry-linked evidence.
- ML systems materialized through learning from data require reconsideration of conventional software development practices.
- The study systematically identifies, analyzes, summarizes, and synthesizes the current state of SE research on engineering ML systems.
- Research interest has increased since 2018, but many research questions remain unanswered.
- Future work should increase cooperation between industry and academia and conduct more experiments using real-world settings.
- The planned future work includes a multi-vocal literature review, broader venue coverage, additional researchers, and focused studies of specific dimensions.
8 APPENDIX: DISTRIBUTION OF THE PRIMARY STUDIES PER VENUE
The appendix distributes reviewed primary studies across a broad range of software engineering venues. The listed venues include major conferences, journals, workshops, and symposiums spanning testing, requirements, architecture, maintenance, reliability, and empirical software engineering.
- The primary studies span major SE venues including ICSE, ASE, ICST, ICSME, ISSRE, and ESEM.
- The distribution includes journals such as IEEE Access, IEEE Software, IEEE Transactions on Software Engineering, and TOSEM.
- Studies appear in venues focused on software quality, reliability, testing, and automated software engineering.
- Additional studies are distributed across specialized venues including APSEC, SBQS, SEAA, SANER, PROFES, and SEAMS.
- The appendix also lists venues covering requirements engineering, program comprehension, software architecture, and software processes.
9.1 PRIMARY STUDIES (SOURCES REVIEWED IN THE SLR)
The reviewed primary studies address diverse software engineering challenges in ML systems, with substantial representation from testing, deployment, development processes, fairness, requirements, and assurance. The sources include empirical studies, testing techniques, analysis methods, and engineering frameworks.
- Testing and assurance: The sources address testing ML code, deep neural networks, image classifiers, flaky tests, fault localization, and test prioritization.
- Deployment and operation: Several studies examine deployment and operation challenges for machine learning and deep-learning-based software.
- Model analysis: The collection includes work on robustness, out-of-distribution awareness, model-based analysis, and efficient deep neural network testing.
- Quality and requirements: Other studies investigate fairness, explanations, data quality, requirements, and assurance for ML software.
- Development processes: The reviewed literature includes studies of machine learning development processes, developer challenges, and software engineering practices.