Home » Machine Learning » Ethical Machine Learning

Ethical Machine Learning


Ethics is one of the topics in machine learning and artificial intelligence to attain technological maturity. Ethics need to be taken seriously for anyone building machine learning systems.

Although it might seem like edge cases, if poorly done artificial intelligence can develop theoretical bias and discriminatory outcomes, for instance, Amazon’s AI tool showing significant bias against female applicants. Another scenario is that algorithms built to detect bias online has developed a bias for black people. Everyone needs to be responsible when building machine learning systems.

According to European Union’s General Data Protection Regulation and United Stated Fair Credit Reporting Act, data should be processed in a way that is unbiased and also fair. With a deep focus on ethics when building machine learning systems, engineers will come up with better systems that have better outcomes and are more robust.

Machine Learning Bias and Ethics

We cannot mention ethics in machine learning without coming across the word bias. Understanding how bias can affect machine learning systems and its ethical implications, identifying or making changes or stopping issues before they appear will be seamless.

Types of Machine Learning and Algorithm Bias

There may be many types of bias you might have read about elsewhere, but for the sake of talking about ethics, there are two types of bias related to this:

Pre-existing and data set biases

These are biases connected to data, data can never be complete therefore bias will always be there based on the data we choose to train the algorithm. Having in mind what consequences the bias can cause is a good place to start. Other biases that result from pre-existing bias are prejudice bias, sampling bias and exclusion bias. 

Technical and contextual bias

Technical bias is about how the algorithm is programmed. These arise when algorithms in machine learning are built to perform in a very specific way, especially when the programmed elements of an algorithm fail to account for the context it is used for.

A good example is a plagiarism checker which checks errors in English. It prioritizes checking written content for non-native speakers over native English speakers who can change the context to avoid detection.

Another instance is an AI that helps banks determine the viability of a business when giving bank loans. Based on the clients’ history the bank might deny the loan even though the project is lucrative. A human would check other options but AI will deny the loan based on the algorithm set to check historical data.

Importance of Context in Machine Learning

The only thing you use when turning a mathematical formula into a decision is context. When working with machine learning and artificial intelligence, context is a very sensitive matter and understanding it and its implications is important.

When doing data collection a few of key pointers you need to know are:

  • What you are trying to achieve – what are you training the algorithm to the top do
  • Reason for doing this – efficiency, speed having in mind ethical issues
  • Internalizing the data set – how does your data set fits with the and why?

Context can also be seen from the perspective of how it’s working. Is it performing according to the expectations?
A good example is a Chabot twitter put in place to learn interactions; the Chabot became racist in a few days because of the racist nature of most Twitter users. An algorithm reacts according to the language and attitudes of the environment.

Ethical Dilemmas in Machine Learning

Machine learning and AI are now playing the role of a typical human being and are responsible for making the right decision in every instance. Sometimes the choice between right and wrong is a big dilemma if the data used to train the machine was not sufficient. Here are examples of possible dilemmas in the real world:

An autonomous vehicle needs to sense its surroundings using sensors, it understands its driving surrounding from the enormous data that it was trained with and uses it to make the most accurate decision in an imaginable traffic situation

In an instance where the vehicle with broken breaks is going at a high speed and it comes across a grandmother and a child crossing, its autonomous decision to choose between a grandmother and the child is an ethical dilemma and by deviating to either side, one can be saved. 

This example shows the importance of ethics in machine learning.

The use of machine learning in judicial service is increasingly becoming a trend. Artificial intelligence evaluates the case presented and applies justice in a more efficient and accurate way better than a judge. Existing software can be enhanced and complement through machine learning tools to aid in drafting new rules. The ethical challenge arises when there is a lack of transparency of machine learning tools and lack of neutral ground due to the inaccuracies and biases, 

Algorithm Impact Assessment

As you have seen machine learning is becoming popular in many areas like justice departments, public service and major functions of governments. Consequently, measuring the impacts of machine learning is important. There is no specific way to assess the impacts of algorithms in machine learning. 

The Canadian government, for instance, uses questionnaires to which is intended to assess and mitigate risks associated with automated decision making

Tools for Assessing Bias and Supporting Ethical Engineering

It is important to understand which algorithm is causing bias and prejudices. Here are a few tools that can come in handy:

ToolHow It Helps?
FairMLHelps engineers understand the extent of harm caused by algorithm or bias
LIME (local interpreted model agnostic’s explanations)It interrogates algorithms by disturbing inputs to check how it affects outputs.
DeonIt assesses algorithm impact and allows users to add checklists to their projects.

How to Prevent Bias

Good governance awareness is a way to go forward in the implementation of machine learning. Recognizing the potential bias can cause harm will help many organizations address bias. Here are a few ways to combat bias:

  • Use of additional resources and tools like IBM’s AI Fairness 360 source or Google’s What-if Tool to check on models. 
  • Having a well representative training data to and robust enough to counteract machine learning biases. 
  • Monitor machines and as they learn to avoid bias developing along the way.
  • Continuous testing and validation to ensure biases don’t appear.

Guiding Principles for Ethical Machine Learning

Machine learning should be an asset to help in running day to day business. Bias should be a thing of the past and governments should encourage ethical machine learning.

Here are five guiding principles for machine learning.

AccountabilityBy ensuring that systems are in place in a bid to continuously evaluate the model implementations results and assesses the way impacts change over time, and this is for fairness, outcomes and social welfare.
EngagementBearing in mind that ‘fair’ is subjective, considering people who will be most affected and the people who know the context best should be involved in the decision making process. This means including all stakeholders throughout the process.
PrivacySeeking consent to collect and use data is the best approach and storing, security, access and disposal of data is a way of showing good stewardship.
Rigorous ReviewTo achieve the best outcome, a rigorous review in every stage from the collection, the methods used and evaluation are necessary. Resources should be developed in every stage to ensure teams do it in a very critical manner.
Being up to date with new data is also helpful. Tracking information from news, research paper and latest articles. Rigorous testing is also recommended to ascertain that the standards have been met.
TransparencyShare the well-documented decision making in every process and outcome with stakeholders will help gather input in efforts to get more understandable results where possible.


Machine learning and Artificial intelligence have been incubation labs for years now and have been transformed to making impacts in remarkable ways. With its great power comes greater responsibility. The question of ethics has to be carefully put into consideration.

To have a transformative impact on the world, we have to get the ethics of machine learning right. Otherwise, we will never truly understand the full benefits and great impacts of machine learning.

Topics in Machine Learning

Hits: 55