Architecture Decisions in AI-based Systems Development: An Empirical Study

Beiqi Zhang, Tianyang Liu, Peng Liang, Chong Wang, Mojtaba Shahin, Jiaxin Yu · DOI

The Architectural Gap in AI

Building an AI-based system is significantly more complex than traditional software development. It is not merely a matter of "dropping a model into a codebase"; these systems involve unique stakeholders—such as data scientists and ethics experts—high levels of uncertainty, and heavy data dependencies. Despite the rapid growth of the field, most software architecture research has historically focused on traditional, deterministic systems.

This empirical study addresses a critical knowledge gap: What are the actual architectural choices developers face in the wild when building AI systems? By investigating the types of decisions made, the quality attributes prioritized, and the common "pain points," this research provides a roadmap for developing tools and architectural patterns specifically tailored for the AI era.

Research Methodology

The authors conducted a qualitative empirical study using a Goal-Question-Metric (GQM) approach. The research followed a systematic pipeline to ensure the reliability of the findings.

Overview of the research process for identifying and analyzing architectural decisions.

As shown in the process diagram above, the methodology involved five primary steps:

  1. Identify Search Terms: Systematically selecting keywords like "AI architect" and "deep learning architect."
  2. Filter Candidate Posts: Manually screening Stack Overflow (SO) posts and GitHub issues to ensure relevance.
  3. Crawl Selected Data: Extracting the full context of the filtered discussions.
  4. Extract Data: Identifying specific data items related to decision descriptions and code data.
  5. Analyze Data: Using Linguistic Pattern Analysis to study communication styles and the Constant Comparison Method to categorize decision types, domains, and challenges.

Data Sources

The study utilized a custom-curated dataset derived from two major developer hubs:

  • Stack Overflow: 174 posts identified through keyword-based mining.
  • GitHub: 128 issues from 32 popular AI-based projects, including high-profile libraries like OpenCV, spaCy, and MLflow.

The authors have released their labeled dataset online to support further research in the community.

Key Insights: Data, Performance, and Domains

The analysis revealed several core pillars of AI architecture that differ from traditional software engineering:

  • The Rise of "Data Decisions": In traditional software, data is often treated as an implementation detail. In AI systems, "Data Decisions" (13.3% of cases) emerge as a primary architectural concern, involving choices on how data is transmitted, stored, and processed to feed models.
  • Performance as the North Star: Nearly 40% of architectural discussions centered on Performance. In the AI context, this extends beyond simple latency to include the massive computing time required for training and the resource utilization of deep learning models.
  • Games as a Leading Frontier: Surprisingly, the Game domain was the most common application area (31%) for these architectural discussions. AI in games requires complex interactions between AI-driven characters and non-AI game logic, leading to frequent and complex "Component Decisions."

Communication and Linguistic Patterns

How developers discuss architecture is as telling as the decisions themselves. The study found that developers primarily express architecture through Solution Proposals and Information Giving.

Linguistic patterns used by developers when discussing AI architecture.

As detailed in the table above, Solution Proposals account for 31.8% of the discussions, while Opinion Asking was relatively rare (6.3%). This suggests that when developers turn to public forums like Stack Overflow or GitHub for architectural advice, they are often already proposing a specific path or documenting hard-won lessons rather than seeking open-ended opinions.

Challenges and Future Outlook

The study identified significant hurdles for practitioners:

  • Top Decision Types: Technology Decisions (21.3%) and Component Decisions (20.6%) lead the pack.
  • Major Challenges: Design Issues (59.2%)—specifically how to decouple AI components from the rest of the system—and Data Issues (32.7%) are the primary hurdles.
  • Quality Attributes: Beyond Performance, developers prioritize Maintainability (13.9%) and Ease of Implementation (9.5%).

While this study provides a deep dive into public developer discourse, it is limited by its sample size (302 items) and the potential bias of public forums. Architectural decisions in closed-source corporate environments might prioritize different attributes, such as security or cost. Future research should explore how developers navigate trade-offs—such as sacrificing accuracy for performance—and develop specific architectural styles for dominant domains like AI-based gaming.

Summary updated

BibTeX
@inproceedings{zhang2023architecture,
  author = {Beiqi Zhang and Tianyang Liu and Peng Liang and Chong Wang and Mojtaba Shahin and Jiaxin Yu},
  title = {{Architecture Decisions in AI-based Systems Development: An Empirical Study}},
  booktitle = {SANER},
  year = {2023},
  doi = {10.1109/saner56733.2023.00063},
}
Figure