Software engineering for Responsible AI: An empirical study and operationalised patterns

Qinghua Lu, Liming Zhu, Xiwei Xu, Jon Whittle, David Douglas, Conrad SandersonICSE (SEIP) 2021 · DOI

Abstract

Although artificial intelligence (AI) is solving real-world challenges and transforming industries, there are serious concerns about its ability to behave and make decisions in a responsible way. Many AI ethics principles and guidelines for responsible AI have been recently issued by governments, organisations, and enterprises. However, these AI ethics principles and guidelines are typically high-level and do not provide concrete guidance on how to design and develop responsible AI systems. To address this shortcoming, we first present an empirical study where we interviewed 21 scientists and engineers to understand the practitioners' perceptions on AI ethics principles and their implementation. We then propose a template that enables AI ethics principles to be operationalised in the form of concrete patterns and suggest a list of patterns using the newly created template. These patterns provide concrete, operationalised guidance that facilitate the development of responsible AI systems.

The "AI Ethics Gap"

Governments and organizations have published dozens of high-level AI ethics frameworks, yet a significant gap remains between these abstract principles and the daily realities of software engineering. Current AI development often treats ethics as a static "check-the-box" exercise performed at the project's inception. However, because AI systems are dynamic—learning from new data and operating in uncertain environments—they require continuous ethical oversight. This research addresses the lack of concrete, system-level guidance for integrating ethical requirements into the entire software engineering lifecycle, from requirement engineering to MLOps and deployment.

Research Methodology

The researchers employed a two-part approach to bridge this gap, as illustrated in the methodology workflow below.

Overview of the research methodology, from interview protocol development to the identification of assurance patterns.
  1. Empirical Study: Semi-structured interviews were conducted with 21 AI scientists and engineers across diverse domains such as health and biosecurity. Using theoretical thematic analysis, the team mapped practitioner experiences against eight recognized AI ethics principles.
  2. Pattern Language Design: By synthesizing interview findings with a literature review of existing Software Engineering (SE) and SE for AI (SE4AI) practices, the authors developed a Pattern Template. This template transforms abstract principles into reusable engineering patterns categorized by scope, mechanisms, and trade-offs.

The AI System Development Lifecycle

A core insight from the study is the "Done-Once-and-Forget" fallacy. Most teams treat ethical risk assessment as a static milestone, whereas the "continual learning" nature of AI necessitates a continuous process. Responsible AI is not merely a feature but a cross-cutting non-functional requirement—similar to security or scalability—that affects the entire system architecture.

The AI system development process, highlighting the integration of AI and non-AI components and the necessity of continuous feedback loops.

As shown in the development process diagram, AI systems involve the simultaneous evolution of code, data, and models. The study highlights that current tools often lack the end-to-end traceability needed to audit ethical failures back to specific dataset versions or model configurations. Furthermore, the process must account for both objective trustworthiness (meeting ethical standards) and subjective trust (user perception).

Operationalised Patterns for Responsible AI

The study identified 13 major findings regarding the current state of AI development, including the struggle to balance trade-offs like privacy versus accuracy. To address these, the authors propose a collection of operationalised patterns:

  • Process Patterns: These include ethical credentials, Bill of Materials (BOM) for AI supply chains, and standardized documentation such as Model Cards.
  • Architectural Patterns: Solutions like federated learners for privacy, system-level simulation for ethics testing, and "Audit Black Boxes" for accountability. A key finding is the need for "AI Mode Switchers" or "Kill Switches" that allow a system to revert to a human-controlled or non-AI state if ethical bounds are violated.
  • Governance Patterns: Implementing continuous validators and acceptance testing specifically tailored for ethical requirements.

Limitations and Future Work

While the study provides a robust framework, it is limited by a single-organization bias, as all interviewees were from a national science agency. Future research should explore automated tools to support these patterns throughout the MLOps pipeline and conduct longitudinal studies to evaluate how these patterns perform in large-scale industrial settings. The current list of patterns is not exhaustive and serves as a foundation for an evolving library of responsible AI engineering practices.

Summary updated

BibTeX
@inproceedings{lu2021software,
  author = {Qinghua Lu and Liming Zhu and Xiwei Xu and Jon Whittle and David Douglas and Conrad Sanderson},
  title = {{Software engineering for Responsible AI: An empirical study and operationalised patterns}},
  booktitle = {ICSE (SEIP)},
  year = {2021},
  doi = {10.1109/icse-seip55303.2022.9793864},
}
Figure