All guides
BeginnerSelf-pacedFree GuideSection 6/50

Ethics and Algorithmic Bias

Explore generative AI through prompts, assistants, multimedia and response checking. Work through sections and exercises at your own pace.

πŸ’‘

Free content, available without an account. Tools and models change: use the current model guide to check their versions. Models and sources

Section 10.1.6 : Ethics and Algorithmic Bias

🎯 Learning Objective

Understand algorithmic biases in AI systems, their sources, their consequences, and methods to detect and mitigate them. Develop a systematic critical stance toward AI results.


Biases: The Distorted Mirror of Our Data

AI models learn from data created by humans. If that data contains biases β€” and it inevitably does β€” the model will reproduce them, or even amplify them. This isn't a technical bug: it's a systemic reflection of our societies.

The problem is all the more serious because AI biases have a scale effect. A biased human recruiter affects a few dozen candidates per year. A biased AI recruitment system affects millions of candidates in seconds, with an appearance of objectivity that makes the bias harder to detect and challenge.

Types of Bias in AI

Selection Bias β€” Training data doesn't represent the target population.

Concrete example: a facial recognition system trained primarily on Caucasian faces had an error rate of 34% on dark-skinned faces vs 0.8% on light-skinned faces (MIT Gender Shades study, Joy Buolamwini, 2018). This bias has direct consequences: in 2020, an African-American man was wrongfully arrested in Detroit after a false facial recognition identification.

Historical Bias β€” Data reflects past inequalities and perpetuates them.

Concrete example: credit scoring models using zip code as a feature perpetuate historical redlining β€” a discriminatory practice from the 1960s where banks denied loans in certain neighborhoods (predominantly African-American). The AI reproduces discrimination without needing to know the applicant's race.

Confirmation Bias β€” The model reinforces existing patterns in a feedback loop.

Concrete example: a predictive policing system (like COMPAS, used in the USA) identifies more crime in the most patrolled neighborhoods (where there are mechanically more arrests). It recommends more patrols β†’ more arrests β†’ more "crime" detected β†’ more patrols. The bias self-amplifies.

Measurement Bias β€” The proxies used to measure a concept are themselves biased.

Concrete example: using "number of publications" as a measure of researcher quality favors researchers from English-speaking countries and prestigious universities. Using "time spent online" as an engagement measure favors addictive content, not quality content.

Anchoring Bias β€” The model is overly influenced by the most frequent data.

Concrete example: a medical AI model trained primarily on urban hospital patients will be less effective at diagnosing rural patients, whose symptoms and comorbidities differ.

Bias TypeSourceExampleConsequence
SelectionNon-representative dataRacist facial recognitionIdentification errors
HistoricalPast inequalities in dataDiscriminatory credit scoringPerpetuation of inequalities
ConfirmationFeedback loopPredictive policingSelf-amplification of bias
MeasurementBiased proxiesPublications = qualityUnfair evaluation
AnchoringOverrepresentationUrban-centric medical AIUnderperformance on minorities

Biases Specific to LLMs

Large language models (GPT-5, Claude 4.6, Gemini 3.1, etc.) have characteristic biases:

Linguistic biases: better performance in English than in minority languages. An identical prompt in English and Wolof (spoken by 20 million people) produces radically different results in quality and accuracy.

Cultural biases: dominant Western perspective. Ask "Who are the greatest philosophers in history?" β€” the response will almost systematically cite Socrates, Plato, Aristotle, Descartes, before mentioning Confucius, Ibn Khaldun, or Nagarjuna.

Gender biases: persistent stereotyped associations. Ask AI to describe a "CEO" β€” it will more often use male pronouns. Ask to describe a "nurse" β€” the female form dominates. Recent models (Claude 4.6, GPT-5) are much more balanced thanks to RLHF, but subtle biases persist.

Recency bias: overrepresentation of recent and popular content. AI has better knowledge of Taylor Swift than of most Nobel Prize winners in physics.

Sycophancy bias: RLHF-aligned LLMs tend to agree with the user rather than contradict them, even when they're wrong. If you say "2+2=5, right?", some models will confirm to please you. It's a paradoxical alignment bias: in trying to be "helpful," the model becomes "sycophantic."

Loading diagram…

How to Detect and Mitigate Biases: 6 Levers

1. Data auditing: verify the representativeness of training data before and during development. Analyze distribution by gender, age, ethnicity, geography, language. Correct imbalances through oversampling, undersampling, or synthetic data.

2. Subgroup testing (fairness testing): evaluate model performance by demographic group (gender, age, ethnicity, language, geography). A "fair" model should have similar performance across all subgroups. Specific metrics exist: Equalized Odds, Demographic Parity, Individual Fairness.

3. Red teaming: actively test the model to identify biases with dedicated teams (Anthropic, OpenAI, Google, xAI employ hundreds of red teamers). In 2025, Grok (xAI) was the subject of major controversies for antisemitic responses and dissemination of deepfake images of public figures, illustrating the crucial importance of this step.

4. Team diversity: diverse teams spot more biases. Companies with diverse development teams detect 30% more biases (Stanford HAI, 2024). This includes diversity of gender, ethnicity, culture, discipline, and socioeconomic experience.

5. Transparency and Model Cards: document the model's known limitations in an open "model card" β€” a practice adopted by Anthropic (Claude Model Card), Meta (Llama 4 Model Card), and Google (Gemini Technical Report). These documents describe the datasets, bias evaluations, and known limitations.

6. Alignment and RLHF: RLHF and RLAIF techniques align models with human values, but no method is perfect. DeepSeek innovated with GRPO, but the model remains censored on certain Chinese political topics β€” illustrating how alignment can also be instrumentalized to control information rather than eliminate biases.

Practical Reflex: The Inversion Test

To detect bias in an AI response, invert a sensitive variable and compare. Ask "Write a recommendation letter for Marie, an engineer" then "Write a recommendation letter for Thomas, an engineer." If the tone, adjectives, or structure differ significantly, there's a bias.

Other useful inversion tests:

  • β†’Change the country: "Recommend a treatment for a patient in France" vs "...in Senegal"
  • β†’Change the age: "Career advice for a 25-year-old developer" vs "...for a 55-year-old"
  • β†’Change the socioeconomic context: "Financial plan for an executive" vs "...for a factory worker"

Responsibility: Who Is at Fault When AI Gets It Wrong?

A fundamental question emerges: who is responsible when an AI system produces a biased or harmful result?

  • β†’The model developer (OpenAI, Anthropic, Google)? They provide the tool.
  • β†’The company deploying the AI system? They choose how to use it.
  • β†’The end user who accepts the recommendation without verifying?

The EU AI Act (Section 10.1.7) begins to clarify these questions, but the legal and ethical debate is far from resolved. In the meantime, the practical rule is simple: if you use AI to make decisions affecting people, you are responsible for verifying the results.

Practical Exercise: Test Your AI Tools

Duration: 15 minutes

  1. β†’Choose your preferred AI (ChatGPT, Claude, Gemini)
  2. β†’Perform 3 inversion tests on a professional topic:
    • β†’Change a person's gender in a scenario
    • β†’Change the nationality
    • β†’Change the age
  3. β†’Note the observed differences (or absence of differences)
  4. β†’Reflect: are these differences justified by context, or are they biases?
Quick Check

Why did Amazon have to abandon its AI recruitment tool in 2018?

Quick Check

What is sycophancy bias in LLMs?

Your progress

Progress is self-reported and stored in your browser. The final completion record is not a qualification or an independent assessment.

View progress and completion record

Learn AI, from prompts to agents

15 free guidesQuizzes, diagrams and workshopsNo account needed

One practical AI workflow in your inbox

Methods, resources and new exercises. Free, unsubscribe at any time.