Lesson 1 of 4 Responsible AI

Applying the Dimensions of Responsible AI and Reducing Bias

This lesson explains responsible AI, designing, building and operating AI systems that are fair, safe, accurate, transparent and accountable, and the core dimensions through which AWS describes it.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the dimensions of responsible AI.
  • Distinguish statistical bias from unfair bias.
  • Identify the measures that reduce unfair bias.
  • Identify the legal and business risks of generative AI and the sustainability considerations in model selection.

The dimensions of responsible AI

Responsible AI is described by a set of qualities that an AI system should have. Fairness means treating groups of people equitably, and inclusivity means working well for diverse users. Robustness means working reliably even with unexpected or unusual inputs, safety means avoiding harmful output, and veracity means producing truthful, accurate output.

Explainability means being able to understand how outputs are produced. Privacy and security means protecting data and systems. Controllability means being able to monitor and steer the system's behaviour, and transparency means being open about how and when AI is used. Governance means the processes and accountability that ensure all the others. The following table summarises the dimensions.

DimensionMeaning
FairnessTreating groups equitably
InclusivityWorking for diverse users
RobustnessWorking reliably even with unexpected inputs
SafetyAvoiding harmful output
VeracityProducing truthful, accurate output
ExplainabilityUnderstanding how outputs are produced
Privacy and securityProtecting data and systems
ControllabilityMonitoring and steering the system's behaviour
TransparencyBeing open about how and when AI is used
GovernanceProcesses and accountability around it all
Match the pairs

Dimensions of responsible AI

Exam skills 4.1.1

Match each concern raised in a design review with the dimension of responsible AI it concerns.

Log in to try this activity Interactive activities are free with an account.

Two meanings of bias

"Bias" has two different meanings in machine learning, and exam questions use both. In the statistical sense, bias is a systematic error that comes from a model too simple to capture the pattern in the data, which is underfitting. It is paired with variance, a model's sensitivity to the particular training data, which leads to overfitting. The bias-variance trade-off seeks a model complex enough to learn the real pattern but not the random noise.

In the fairness sense, bias means outcomes that are unfair to groups of people. It often comes from training data that does not represent everyone, such as a hiring model trained mostly on past male hires, from historical or labelling bias, or from proxy features, such as a postcode that stands in for ethnicity. The context of a question shows which meaning is intended. The following table summarises the two senses.

SenseMeaning
StatisticalBias is systematic error from a model that is too simple (underfitting); variance is sensitivity to the training data, so the model does not generalise (overfitting). The bias-variance trade-off seeks a model complex enough for the pattern but not the noise
FairnessOutcomes that are unfair to groups of people, often from unrepresentative data (a hiring model trained mostly on past male hires), historical or labelling bias, or proxy features such as postcode standing in for ethnicity
Sort into groups

Which kind of bias?

Exam skills 4.1.6

Decide whether each statement uses "bias" in the statistical sense or the fairness sense.

Log in to try this activity Interactive activities are free with an account.

Reducing unfair bias

Unfair bias in a model can be reduced through measures applied to data, training and evaluation. The following list describes these measures.

  • Use inclusive, diverse, balanced and curated data sets.
  • Remove or test proxy features.
  • Measure fairness for each subgroup (subgroup analysis).
  • Detect bias before and after training with SageMaker Clarify.
  • Analyse label quality, and run human audits and reviews.
  • Monitor bias drift in production with Model Monitor.
Select all that apply

Reducing bias in lending

Exam skills 4.1.5 · 4.1.7

A bank's credit model approves fewer applicants from rural areas, although their repayment rates are similar.

Log in to try this activity Interactive activities are free with an account.

Risks and sustainability

Generative AI carries legal and business risks: intellectual property infringement, biased output, loss of customer trust, harm to end users, hallucinated facts used in decisions, and privacy violations. Responsible model selection also considers sustainability: smaller, efficient models and hardware such as AWS Inferentia and Trainium reduce energy use.

Scenario questions

Responsible model selection

Exam skills 4.1.3

Apply sustainability to the choice of a model.

Log in to try this activity Interactive activities are free with an account.
Worked example

Finding bias in a hiring model

A company trains a model to shortlist job applicants, using ten years of past hiring decisions. SageMaker Clarify reports that the model shortlists women at half the rate of men with similar qualifications.

Cause foundResponsible AI dimensionAction
Past hiring favoured men, so the labels themselves are biasedFairnessRebalance and review labels; remove gender and obvious proxies
A hobby field acts as a proxy for genderFairnessRemove or test the feature
Candidates are not told AI is usedTransparencyDisclose AI use and explain how to request human review
Nobody owns the model's outcomesGovernanceAssign an owner; record the model in a Model Card
Fairness may change over timeControllabilityMonitor bias drift with Model Monitor

The example also shows why "bias" has two meanings. This is fairness bias in outcomes. The separate statistical idea of bias, a model too simple to fit the data (underfitting), would show up as poor accuracy for everyone, not unequal treatment of groups.

Check yourself

What is the difference between bias in the statistical sense and unfair bias?

Show answer

Statistical bias is error from a model too simple to fit the data, which causes underfitting. Unfair bias means results that disadvantage groups of people, often learned from biased data.

Exam Tips

Remember for the exam

  • Know the dimensions: fairness, inclusivity, robustness, safety, veracity, explainability, privacy and security, controllability, transparency and governance.
  • Overfitting means high variance; underfitting means high bias.
  • Unfair outcomes often come from unrepresentative training data.
  • To detect bias before and after training, use SageMaker Clarify.
  • To monitor bias drift in production, use SageMaker Model Monitor.
  • Energy-efficient AI uses smaller models and hardware such as Inferentia and Trainium.