Bias Flashcards
Bias can be the difference between an AI model that works well and one that doesn’t. In this section, you will learn all about bias, related terms, types of bias as well as case studies on the consequences of bias. You will then move on to explore mitigation strategies used to curtail bias as well as some examples of these strategies in real-world applications. Finally, you will learn about intentional bias and how to build a bias mitigation system.
Get started below by learning about what an AI algorithm should be.
Before learning more about bias, it’s important first to recap what an algorithm should be:
Valid and reliable: accurate to ground truth with low variance
Generalisable: reflect the target population
Fair: not exacerbate existing bias in the population.
These points are all undermined by bias.
- Bias and related concepts
Bias is a tendency to deviate from the truth. Bias undermines our ability to make an unprejudiced consideration of a question.
Bias is a part of all scientific investigation, and bias mitigation is an important part of the scientific process. Bias mitigation attempts to address the fundamental question of ‘Are the results of the investigation true or could there be an alternative explanation?’.
The terms below are all fundamental concepts related to bias. The definitions below cover error and types of error, bias being one of them. Error and bias are often confused but should be seen as distinct.
Error - Difference between model output and the truth
Bias - Systematic error favouring a particular outcome
Noise - Random error that may be irreducible
Variance - Oscillation from expected estimator caused by data sample.
- Types of bias
The graphic below will reveal different types of bias specific to AI research and how they are defined.
Note that the text in red (which appears on the pop-ups) highlights the source of the biases, which is almost always data. The quality of the dataset is the most important concept.
Selection bias (also called sampling bias)
Collecting data that is not representative of the target population.
Exclusion bias
Deleting valuable data that was thought to be unimportant.
Measurement bias
A measurement process is biased if it systematically overstates or understates the true value of the measurement.
Recall bias
Recall bias occurs when participants in a research study or clinical trial do not accurately remember a past event or experience or leave out details when reporting about them.
Algorithmic bias
Algorithmic bias describes systematic and repeatable errors in a computer system that creates incorrect outcomes. This bias may be used in the context of creating unfair outcomes to certain social groups.
Prejudice bias
Training data includes (human) biases containing implicit racial, gender, or ideological prejudices.
Observer bias (also called confirmation bias)
Favouring information that does not contradict the researcher’s desire or previous beliefs.
Survey Bias
- Case studies on the consequences of bias
As outlined above, bias most often occurs due to issues with the data the AI algorithm is based upon. Learn about two examples of bias by reading through the case studies detailed here.
Case study 1: racial bias
In the case study, ‘Dissecting racial bias in an algorithm used to manage the health of populations(opens in a new tab)’, researchers used an AI algorithm to estimate a number of health conditions in a population.
The representation of ethnic minorities in training and test data was different, resulting in a systematic underestimation of health measures (hypertension, anaemia, diabetes and chronic health conditions) in Black participants.1
Bias occurred in this study because the commercial algorithm used to guide health decisions deemed health costs to be a proxy for health needs. However, because less money was spent on Black patients with the same level of need as White patients, the algorithm falsely concluded that Black patients are healthier than equally sick White patients.
https://www.science.org/doi/10.1126/science.aax2342
Case study 2: skewed datasets
A team at Google developed an algorithm for the characterisation of dog species using an ImageNet database, made up of human-labelled images. The dataset used had a large number of dog images, which created a bias toward the algorithm recognising images that weren’t dogs as dogs.
When asked to reproduce an image of the famous Mona Lisa painting, the algorithm produced the image shown here, thus showing the consequence of non-representative training data on algorithm performance.2
Mitigation Strategies
Mitigation in data handling helps to reduce potential risks when working with data. A poor approach to data handling can lead to various issues with the performance of AI algorithms.
Step 1
Data collection
Issues can arise at this stage if you choose the wrong dataset for the AI algorithm, if you rely on just one dataset, or if there are issues (like low quality) with the dataset chosen.
Step 4
Feature engineering
If you remove certain features (an individual measurable characteristic, such as tumour size) without good analysis and reason for removing that feature, this will negatively impact the performance of the AI algorithm. Features most also be appropriately scaled so that AI algorithms aren’t skewed by certain data. You don’t want confounding features associated with large weights to skew the data. For example, you would want to scale the age of patients as well as the size of tumours so that the age of patients does not have too high a weight as compared to tumour size. Finally, it is paramount that missing data is handled appropriately. You can’t ignore missing data, so you need to decide whether to make estimates based on existing data, or whether to remove a variable containing missing data from analysis. This will depend on what data is missing, and how much.
Now that you have gained an understanding of improper data handling, take a look at some examples of this in practice.
Step 2
Data investigation
If Exploratory Data Analysis (EDA) is insufficient, it means the data has not been properly analysed in order to understand it’s characteristics. If you conduct the EDA without a good level of understanding concerning the subject area, this could also have a negative impact on the AI algorithm as you may struggle to accurately interpret the data. Finally, missing anomalies and outliers in the data could also cause you to reach the wrong conclusions in your analysis of the data.
Step 3
Data splitting
Data leakage (where information captured from test data impacts the training process) can have a negative impact upon an algorithm as it skews performance estimates by using the same data more than once. Datasets that do not accurately represent real-world data are also problematic. In addition to this, adjusting certain ‘settings’ in the algorithm too much can also lead to overfitting, whereby the algorithm only performs well in a very specific set of circumstances. You can refer to Module 1, Section 2 for a reminder of overfitting.
Example 1: Feature selection
Feature selection is a common process used to reduce the number of input variables. Essentially, the features that are not deemed as important for the algorithm are removed and only the necessary features kept.
It is used to reduce the computational cost and improve the performance of the model.
See the graphic below which illustrates this process.1
Example 2: Feature selection
The example below shows how improper feature removal from imaging data may lead to bias. If the cropped chest radiograph is fed to a subsequent classifier (a type of AI model) for detecting consolidations, the consolidation that is located behind the heart will be missed (see the red arrow on image A).
This occurs because primary feature removal using the segmentation model was not valid and unnecessarily removed the portion of the lung located behind the heart. The COVID-19 algorithm was trained on data segmented for lungs only.
What is the problem? How could this have been avoided?
Take a moment to reflect on these questions before selecting the ‘reveal answer’ button below.
- Mitigation in model training
Mitigation in model training helps to improve the accuracy of the data model. The information below highlights model training techniques used to optimise model training.
Step 1
Data sampling and augmentation
Data should be well balanced, meaning the data is not skewed toward one category over another. For instance, a dataset held on diseases might have far more data held on common diseases over rarer ones. Augmentation techniques may also be used (whereby, for example, using transformations like rotating or flipping images) in order to increase the size and diversity of a dataset.
Step 2
Model and loss function
Choosing the right AI model, as well as choosing one with the most appropriate architecture and structure, is paramount when it comes to its performance given specific circumstances. Dropout techniques are a type of regularisation technique (see the Bias and Variance lesson in Module 1 for a reminder) that prevent overfitting by randomly ignoring some neurons during training so that the model works well on a wide range of data. Loss functions measure how well a model performs when training and are useful in helping to gain an understanding of where the model can be improved. Regularisation, as previously covered in the Bias and Variance lesson in Module 1, prevents overfitting and helps models to perform well on new, unseen data.