The Zen of ML is a set of design principles that helps ML educators and self-learners prioritise responsible machine learning practices. The principles consider the end-to-end machine learning development cycle, from data collection to model evaluation and continuous deployment. Inspired by the Zen of Python, the Zen of ML can be viewed as a culture code that promotes the responsible development of ML products and projects. It is not binding or enforceable, but is intended to shape industry norms and offer a practical guide to building trustworthy AI.
Machine learning (ML) tools are freely and widely available, and can be accessed with simple API calls and standard development pipelines. This has made it possible for anybody who wants to use ML to learn the skills and access the tools to do so. When using ML as a code component, the data-dependent and probabilistic nature of its outputs is hidden and often overlooked. This can have undesirable and even harmful consequences. Thus, while democratising ML tools has increased the inclusiveness of ML, it has created a new challenge as the responsible use of ML tools cannot be guaranteed or controlled. This presents a particular risk for people that are adversely affected by the outcomes of decisions backed by ML predictions.
Many of the ethical AI challenges that are hard to solve from a scientific point of view can be addressed more readily when using the language of design. Design understands that knowledge is contextual, that stakeholders are important and that utility, in its broadest possible meaning, matters. Any AI system that gets built and released into the world leaves the scientific realm and becomes a designed artifact. When we speak about AI systems as designed artifacts, and clearly lay out the requirements we want a particular design to meet, then we can start drawing a distinction between interesting scientific discoveries and "good design". This starts to give us a language to distinguish good science, which can exist in its own right, from good design, which doesn't follow naturally from good science.
Design principles are a set of considerations that form the basis of any good product. They help teams with making decisions by guiding them through appropriate choices*.
* definitions taken from https://principles.design/Python is one of the most popular coding languages used for machine learning. The Zen of Python is an example of design principles that guide coders on how to write good python code. In an environment where anybody can learn to code and where there is no clear right or wrong, having a set of guiding principles that clearly state the types of decisions that lead to good code is an invaluable barometer. Despite its simplicity, its humor and its informality, The Zen of Python wields tremendous soft power, as it clearly states what's in and what's out within the community of pythonistas.
The Zen of Python
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
The project speaks directly to the Working Group’s (WG) objective 1 of fostering new industry norms. The process of creating then Zen of ML must take the WG’s objective 2, including diverse stakeholders, into account. The outcomes of the project will support objective 3 of developing new technologies as building blocks for developers. The MozFest and greater Mozilla communities will be instrumental to providing input into the process of creating the Zen of ML.