Requirements Engineering for Machine Learning: A Review and Reflection

Zhongyi Pei, Lin Liu, Chen Wang, Jianmin Wang

Introduction

Building machine learning (ML) systems involves more than just writing code; it requires bridging a significant "semantic gap" between business objectives, domain-specific expertise, and data science. Unlike traditional software engineering, where logic is explicitly defined through deterministic rules, ML systems derive their logic from data. This fundamental shift makes system behavior probabilistic and often opaque, creating unique challenges for Requirements Engineering (RE).

This paper presents a comprehensive review of 163 research articles published between 2016 and 2022. The authors propose a collaborative RE framework designed to handle the uncertainties inherent in data-driven intelligence, moving beyond traditional specifications to a more iterative, interdisciplinary approach.

The Challenge of Cross-Domain Collaboration

A central hurdle in ML development is the lack of a shared language among stakeholders. Business experts focus on Return on Investment (ROI), domain experts (such as mechanical engineers) rely on deep physical models, and data scientists prioritize optimizing loss functions. These groups often operate in silos, leading to a lack of structure when deciding how to embed ML into business workflows while ensuring fairness, explainability, and technical viability.

To address this, the authors synthesized a Role-Concern Matrix, which maps the priorities of five key stakeholders: Business Experts, Requirements Engineers, Software Engineers, Domain Experts, and Data Scientists. This matrix serves as the foundation for a nine-stage collaborative process model that emphasizes iterative feedback loops between model evaluation and data preparation.

Key Insights in ML Requirements

The 80% Rule of Data RE

While it is a common industry adage that 80% of ML project time is spent on data, this paper argues that this effort is not merely "data cleaning." Instead, it is a complex RE task. It involves defining rigorous annotation rules, ensuring that data represents the intended operational environment, and verifying that "independent and identically distributed" (iid) assumptions hold true for the problem at hand.

Metric Translation

There is frequently a disconnect between technical performance metrics and business success criteria. For instance, a computer vision model might achieve a high "Intersection over Union" (IoU) score for bounding boxes, yet fail to provide the specific business value required—such as accurately counting the number of cycles an excavator completes. Translating technical metrics into "Risk Criteria" (Safety, Security, and Accountability) is essential for project success.

Physics-Informed ML and Prior Knowledge

A significant trend identified in the review is the integration of prior knowledge. Rather than treating ML as a black box, modern RE should specify how to incorporate physical laws or domain-specific logic (e.g., algebraic equations) into the model's structure or loss functions. This ensures the model adheres to known constraints of the physical world.

The Collaborative Requirements Analysis Process

The authors propose a five-step roadmap to formalize ML requirements:

  1. Problem Formalization: Bridging the gap between business needs and ML paradigms.
  2. Context Mining: Understanding the environment where the model will operate, often requiring interdisciplinary coordination.
  3. Data Requirements Elicitation: Defining the characteristics of "good" data and establishing labeling protocols.
  4. Metric Transformation: Converting technical performance into actionable business risk assessments.
  5. Goals Identification: Finalizing the intended business value.

Case Study: Virtual Excavator Supervisor

To illustrate these concepts, the paper examines a "Virtual Excavator Supervisor" project. While computer vision could successfully identify an excavator in a video feed, the system struggled to distinguish between "digging" and "discharging" actions based on pixels alone. By integrating sensor data and domain-specific movement rules, the team was able to create a functional system. This case study highlights that pure data-driven approaches often fail without domain-led requirements.

Limitations and Future Directions

Despite the progress in the field, several areas remain immature:

  • Dynamic Adaptation: Current RE models are largely static and struggle to adapt when data shifts occur in real-time post-deployment.
  • Cost Estimation: Providing reliable cost estimates for ML projects remains difficult due to the inherent uncertainty of data quality and the iterative nature of model training.
  • Simulation-based Prototyping: There is a growing need for tools that simulate environments, allowing ML requirements to be verified in situ before embarking on expensive real-world data collection.

By formalizing these collaborative processes, the research provides a roadmap for organizations to move from experimental ML prototypes to robust, value-driven industrial systems.

Summary updated

BibTeX
@inproceedings{pei2022requirements,
  author = {Zhongyi Pei and Lin Liu and Chen Wang and Jianmin Wang},
  title = {{Requirements Engineering for Machine Learning: A Review and Reflection}},
  booktitle = {RE Workshops},
  year = {2022},
  doi = {10.1109/rew56159.2022.00039},
}
Figure