Studying Software Engineering Patterns for Designing Machine Learning Systems

Studying Software Engineering Patterns for Designing Machine Learning Systems

Studying Software Engineering Patterns for Designing Machine Learning Systems Hironori Washizaki Hiromu Uchida Foutse Khomh Yann-Gael¨ Gueh´ eneuc´ Waseda University Waseda University Polytechnique Montreal´ Concordia University Tokyo, Japan Tokyo, Japan Montreal,´ QC, Canada Montreal,´ QC, Canada [email protected] eagle [email protected] [email protected] [email protected] Abstract—Machine-learning (ML) techniques have become problems within given contexts in ML application systems and popular in the recent years. ML techniques rely on mathematics software design. and on software engineering. Researchers and practitioners There are also many resources available on the Internet studying best practices for designing ML application systems and software to address the software complexity and quality discussing various ML techniques and their concrete uses, of ML techniques. Such design practices are often formalized from putting together a pipeline to implementing a Markov as architecture patterns and design patterns by encapsulating Decision Process. These pieces of gray literature are useful to reusable solutions to commonly occurring problems within given developers putting together a ML systems by providing many contexts. However, to the best of our knowledge, there has been examples and discussing many good/bad design patterns. no work collecting, classifying, and discussing these software- engineering (SE) design patterns for ML techniques systemati- However, to the best of our knowledge, there has been no cally. Thus, we set out to collect good/bad SE design patterns work collecting, classifying, and discussing these software- for ML techniques to provide developers with a comprehensive engineering (SE) design patterns for ML techniques system- and ordered classification of such patterns. We report here atically although such patterns could greatly help software preliminary results of a systematic-literature review (SLR) of developers in putting in place ML techniques for their users. good/bad design patterns for ML. Thus, we set out to collect good/bad SE design patterns for Index Terms—Software Engineering, Machine Learning, Pat- terns, Anti-patterns ML techniques to provide developers with a comprehensive and ordered classification of such patterns. We report here preliminary results of a systematic-literature review (SLR) of I. INTRODUCTION good/bad design patterns for ML. We focus in this paper on Machine-learning (ML) techniques have become popular (1) our method, (2) architecture and design (anti-)patterns, and in the recent years. They are being used in many domains, (3) preliminary, quantitative results. We also report on ML including cyber security, bioinformatics, IoT and autonomous developers’ understanding of the techniques implementations. cars. ML techniques rely on mathematics and on software We thus answer the following research questions: engineering. They rely on mathematics for their algorithms RQ1. How do ML developers perceive and tackle the design and their capabilities to learn from input data and produce of ML application systems and software? We conducted representative models. They also rely on software engineering a questionnaire-based survey to understand. This survey for their implementations and their performances. shows that ML engineers have little knowledge of the archi- While there have been many works on the mathematics and tecture and design patterns that could help them developing computer science on which ML techniques are built, there have their ML application systems and software. been fewer works on their implementations, which raises many RQ2. How do academic and gray literatures address the de- arXiv:1910.04736v2 [cs.SE] 11 Oct 2019 concerns. First, users are concerned by the software com- sign of ML application systems and software? We conducted plexity of using the techniques. Second, they are concerned a SLR of both academic and gray literature and identified 10 about the quality of the available implementations, including academic papers and 28 gray documents, which we analysed performance and reliability. Finally, users are concerned about to extract patterns. the quality of the models that could be negatively impacted RQ3. How can ML architecture and design patterns be by a software bug. classified? We distinguish SE patterns for ML (such as These concerns could be alleviated if developers could patterns for designing ML application software) and non- convince their users of the software quality of their implemen- SE patterns for ML (such as patterns for designing ML tations of the ML techniques. Consequently, researchers and models) by analysing the content of the found documents. practitioners studying best practices for designing ML applica- We classify these SE patterns with respect to two processes: tion systems and software to address the software complexity the typical ML pipeline process and the typical SE process and quality of ML techniques. Such design practices are from ISO/IEC/IEEE 12207. often formalized as architecture patterns and design patterns RQ4. What software-engineering architecture and design pat- by encapsulating reusable solutions to commonly occurring terns for ML application systems and software exist? From our collection of patterns, we show that SE patterns for Table I summarises the results of the surveys. The number ML do exist and related to different phases of the software- of answer per columns differ because some participants only development process and ML pipeline. We also give some answered one or two of the three questions. It shows that examples of such patterns. most of the developers use ad-hoc practices. When they use The rest of this paper is as follows: Section II summarises patterns, developers mention that they use general patterns, the related work. Section III describes our survey and answers like the design patterns by Gamma et al. [7] rather than RQ1. Section IV presents our SLR and a subset of its results. patterns dedicated to ML development. Section V discusses our results. Section VI concludes. Thus, we conclude the survey as follows: RQ1. How do ML developers perceive and tackle the design of II. RELATED WORK ML application systems and software? Developers use either There are surveys on general architecture and design pat- general patterns or ad-hoc patterns and need patterns terns, e.g., [1]–[3], mostly for object-oriented design. Surveys dedicated to SE design of ML application systems and on architecture and design patterns exist for specific domains, software. e.g., multi-agent systems [4], IoT [5], or security [6]. IV. SYSTEMATIC LITERATURE REVIEW For the domain of software engineering for ML applications, case studies, practices, and patterns are available as indepen- A. Queries dent documents. To the best of our knowledge, this is the first We perform a systematic-literature review of both academic comprehensive survey on ML architecture and design patterns. and gray literatures to collect software-engineering good/bad design patterns for ML application systems and software. For III. SURVEY the academic literature, we choose Engineering Village as meta-search engine and, on August 14th, 2019, with the query: Machine-learning techniques are concrete solutions to prac- tical problems. Hence, ML developers may already have built ((((system) OR (software)) AND (machine a body of knowledge on the good/bad design practices of ML learning) AND ((implementation pattern) OR (pattern) OR (architecture pattern) OR ( development. We ask RQ1. How do ML developers perceive design pattern) OR (anti-pattern) OR ( and tackle the design of ML application systems and software? recipe) OR (workflow) OR (practice) OR ( To answer RQ1, we asked 760+ developers at Japanese issue) OR (template))) WN ALL) + ((cpx OR companies through Japan-wide mailing lists to developers and ins OR kna) WN DB) AND (({ca} OR {ja} OR { direct contact with developers during a workshop on software ip} OR {ch}) WN DT) engineering. Developers answered anonymously the following For the gray literature, we use the Google search engine, three question regarding SE patterns for ML systems. In on August 16th, 2019, with the queries: these questions, we distinguish between “patterns”, which we define as some “formal practices” in any structured form, (system OR software) "Machine learning" ( pattern OR "implementation pattern" OR " and ah-hoc practice that are suggestions or lore suggested by architecture pattern" OR "design pattern" some developers but without any kind of formal form, e.g., OR anti-pattern OR recipe OR workflow OR suggestions extracted from a blog text. practice OR issue OR template) SQ1. Do you refer to existing reference architectures or and: architectural patterns to design your own ML systems? "machine implementation pattern" OR " SQ2. How did you acquire and elicit requirements on ML architecture pattern" OR "design pattern" systems? Patterns or practices? Any template or process? OR anti-pattern OR recipe OR workflow OR Or ad-hoc? practice OR issue OR template SQ3. How did you ensure non-functional features of ML systems? Patterns or practices? Any process? Or ad-hoc? We thus retrieved 23 academic scholarly papers (S). Then, we performed a snowballing and obtained 9 additional schol- Out of the 760+ contacted participants, nine answered at arly documents (A). We searched the Internet using Google least the first question for a response rate of 1%. We expected Search Engine and obtained 48 gray literature documents.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us