AI Ethics and Safety
Bias in Training Data and Outputs
How societal biases get baked into AI systems
Garbage In, Bias Out
AI models learn from human-generated data. And human-generated data reflects human society — including its biases, stereotypes, and inequities. When a model trains on billions of pages of internet text, it doesn't just learn grammar and facts. It absorbs the patterns of bias embedded in that text.
This isn't a failure of the technology. It's the technology working exactly as designed — learning patterns from data. The problem is that some of those patterns are ones we'd rather not perpetuate.
How Bias Gets In
Training Data Reflects Society
If historical text disproportionately associates "doctor" with "he" and "nurse" with "she," the model learns those associations. If news articles more frequently describe certain ethnic groups in connection with crime, the model absorbs that pattern. If most technical content was written by one demographic, the model's "voice" will default to that demographic's perspective.
The model doesn't evaluate whether these patterns are fair or accurate. It simply learns that they're statistically common.
Representation Gaps
The internet isn't a balanced representation of humanity. English-language content dominates. Certain cultures, languages, and perspectives are dramatically underrepresented. A model trained primarily on English text from Western sources will naturally be better at serving English-speaking Western users and may misunderstand or misrepresent other contexts.
Real-World Examples
Hiring Algorithms
Amazon developed an AI recruiting tool that was trained on a decade of resumes submitted to the company. Since the tech industry historically hired more men, the model learned to penalize resumes that included the word "women's" (as in "women's chess club captain") and downgrade graduates of all-women's colleges. The tool was scrapped.
Criminal Justice
The COMPAS algorithm, used to predict recidivism in the U.S. criminal justice system, was found to be significantly more likely to falsely flag Black defendants as future criminals compared to white defendants. The training data reflected decades of biased policing and sentencing patterns.
Image Generation
Early image generation models, when asked to create pictures of "a CEO" or "a doctor," disproportionately generated images of white men. When asked for "a nurse" or "a housekeeper," results skewed toward women and people of color. The models had learned societal stereotypes from their training images and captions.
Language Models
Studies have shown that language models associate certain names with certain professions, certain religions with certain sentiments, and certain nationalities with certain stereotypes. Ask a model to complete "The Muslim man walked into the..." and compare it to "The Christian man walked into the..." — the completions can reveal stark differences.
Why This Is Hard to Fix
You might think: just remove the biased data. But it's not that simple.
- Bias is pervasive, not isolated. It's not in a few bad documents — it's woven throughout the statistical patterns of all human text.
- Debiasing can reduce capability. Aggressive filtering can remove useful information along with bias, making the model less knowledgeable.
- Defining "unbiased" is itself a judgment call. Whose definition of fairness do we use? Different cultures and philosophies define fairness differently.
- New biases can be introduced. Attempts to correct one bias can inadvertently create others.
Mitigation Approaches
Better Data Curation
Carefully selecting and balancing training data to represent diverse perspectives more equitably. This includes active effort to include underrepresented voices and languages.
Fine-Tuning and RLHF
Using human feedback to teach models to give more balanced, fair responses. Modern models are significantly less biased than their predecessors thanks to this approach.
Evaluation and Auditing
Systematically testing models for bias across different demographics, topics, and scenarios. Many AI companies now employ dedicated teams for this work.
Transparency
Publishing information about training data composition, known limitations, and bias evaluations so that users can make informed decisions.
What You Can Do
- Be aware: Know that AI outputs may reflect societal biases, especially on topics involving people, cultures, and identity.
- Question defaults: If an AI's response seems to make assumptions about gender, race, culture, or other categories, those assumptions may come from biased training data.
- Seek diverse perspectives: Explicitly ask for viewpoints from different cultural, demographic, or philosophical frameworks.
- Don't use AI as sole decision-maker: For consequential decisions about people (hiring, lending, criminal justice), AI should inform human judgment, not replace it.
Key Takeaways
- AI models absorb biases from training data — they learn statistical patterns, including unfair ones.
- Real-world consequences have included biased hiring, criminal justice, and image generation systems.
- Bias is pervasive rather than isolated, making it difficult to fully remove without trade-offs.
- Mitigation includes better data, human feedback, auditing, and transparency.
- Users should be aware of potential bias and never rely on AI as the sole decision-maker for consequential choices.
Ask me anything about this lesson.
I have the full lesson content as context.