SlideShare a Scribd company logo
1 of 17
Open Source Tools for AI
Bias Detection and
Mitigation
WhichTools Work Best and How to UseThem
My Biases
• Ph.D. Statistician
• Labor Economist
• Software Developer
• Pronouns: she, her, hers
• Artist
• Midwest Farm Girl
Today’s Agenda: Get You Started on Your AI Ethics Journey
• Bias Detection Overview andTerms
• Examples of Bias Detection with 3 SoftwareTools: AIF 360, Audit AI, and Google’s
What-IfTool
• Pros and Cons of EachTool (not a full tutorial—we don’t have enough time).
• Recommended Policies and Procedures for ImplementingAI Ethically
AI Bias and Ethics: Software is a Tool
• Some tools are better than others for the job at hand.
• AIF 360: Only tool that has bias mitigation.
• What-If: Interactive model understanding.
• Audit-AI:Tests whether the group classification rates are the same, using a
statistical test with p-values (or Bayes factor).
• All 3 tools are open source and have good support.
Recommendation:
• Audit-AI produces straightforward tests with minimum code. If the automated tests
are sufficient for your needs, it is the simplest to implement and understand.
• AIF 360 is the most comprehensive tool kit. It is the best for customization.
• What-If is better for understanding how the model works. It is best supported for
Tensorflow models. If you’re usingTensorflow, it’s a great tool. If you are not using
Tensorflow, it’s a great tool but requires some set up.
AI Ethics Bias ≠ Data Science Bias ≠ Fairness
• Fair: A human judgement about the morality of the process.
• Bias: When a Data Scientist Says it:These two groups do not have the same
counts/means.
Bias:When an AI Ethics Expert Says It:
“This model has systematic and repeatable errors that create unfair
outcomes.”
• Bias is an error.
• Biased models can cause us to miss opportunities.
• Biased models that are used as part of business practices can be a reputational
risk to your business.
Fidelity Confidential Information: DRAFT
Y = + bias𝑓(𝑋, 𝛽)
What
You’re
Trying to
Predict
Relationship
Between
Features and
WhatYou’re
Trying to Predict
Bias in AssigningY:
e.g.
• Human bias in hiring, or
lending,
• Unconscious bias in labeling
training data,
• Systematic bias that limits
opportunities for protected
groups
If the bias is large, and there are differences in features between the
dominant group and the protected group, the model learns how to tell who
is in the protected group instead of learning the relationships between
the features.
Where Does This Kind of Bias Come From?
Our Example: Healthcare Costs
An insurance company wants to find people with the highest predicted costs and offer
them services designed to improve their health.
This is simulated data based on a real example.
https://www.healthcarefinancenews.com/news/study-finds-racial-bias-optum-algorithm
Singh and Ramamurthy “Understanding racial bias in health using the Medical
Expenditure Panel Survey data”
But if we look at our protected group, we see that they have slightly worse
health measures—yet also have lower cost.
What Does Bias Testing Accomplish?
True/False Negative Rate
• False Negative Rate
True/False Positive Rate
• Statistical Parity
• Equal Opportunity
Both
• Average Odds
• Generalized Entropy
• Thiel Index
BiasTests Not Affected by Biases in theTarget
• Disparate Impact
Tests for Predictive Accuracy by Group
Predictive accuracy is calculated based on the target, which may be biased.
That means the above tests are affected (and possibly negated) when we think we
are working with a biased target.
Recommendation:
1) Always use Disparate Impact
2) Decide which is the more negative outcome and choose your other bias
tests accordingly.
Pick Fairness Metrics that Guard Against
the Most Negative Outcome
Predicted Label True Label
Positive Negative
Positive True Positive False Positive
Negative False Negative True Negative
Examples:
• A model that predicts whether a prisoner will re-offend if offered parole
should check False Positive rate by protected traits.
• A model that assigns people to a health-improvement program based on
prediction of cost should review the False Negative rate.
Bias Testing Demonstration
Audit-AI AIF 360 What-If
1. Import the packages
2. Specify a Pandas
dataframe with class
membership and
predictions.
1. Import the packages
2. Convert your Pandas
dataframe to a Structured
Data set of the
appropriate type.
3. Estimate a model.
4. Create a model explainer.
5. Run bias-detection
methods using the model
explainer.
6. Print out bias-detection
results.
7. Write function to loop
through different cut-offs
and store in a data frame.
8. Graph results.
1. Import the packages
2. Change Pandas dataframe
to a set of lists.
3. Create a WitWidget with
input and output columns.
4. Explore interactively.
What to Do If You Detect Bias?
Software solution: Bias Mitigation
Of the three tools, only AIF 360 has built-in bias mitigation—though they use
TensorFlow for adversarial debiasing.
Demonstration is in the notebook.
Real-World Examples of Bias
This image is instructive. It’s also interesting to read the lengthy debate it
sparked in the AI community. Salient points:
• One researcher was able to produce a better image just by re-training the
algorithm and starting the gradient descent in a different location.
• The team that constructed this algorithm was almost exclusively made up
of white men.
And Consider Our Toy Example
By simple inspection, the sickest people are not the most expensive.
And if that's the case, assigning people to a health improvement program to lower costs is
not going to have the expected business outcome.
This model fails twice--it's biased, and it doesn't lower costs!
This is a good reason to use theWhat-If tool: It gives you visibility into simple relationships.
AI Bias and Ethics: Software is a Tool
• Strengths of EachTool
• AIF 360: Production Monitoring andTesting
• Only tool for bias testing and mitigation.
• Highly customizable.
• Easy to automate
• What-If: Interactive model understanding.
• Intuitive and visual.
• Allows you to ask questions you wouldn’t have thought of asking.
• Audit-AI: Statistical bias testing
• Provides a p-value that answers the question “Is this difference due to
random chance?”
• Only tool that approaches bias tests in this way.
• Weaknesses
• AIF 360 is “fiddly”. Set up is onerous if you just need a quick test.
• What-IfTool is easiest and fullest-featured withTensorBoard andTensorFlow
Models. It also uses a sample.With a very large data set, a sample might tell
an incomplete story.
• Audit-AI:With very large data sets, most statistical tests will have small p-
values.
AI Bias and Ethics: Software is a Tool
• How to get better at this:
• Certified Ethical EmergingTechnologist Professional Certificate from
Coursera (taught by Renee Cummings and 6 other experts in this field.
• Towards a Code of Ethics for Artificial Intelligence by Paula Boddington
Boddington
• Montreal AI Ethics Institute: https://montrealethics.ai/
• Lighthouse3: https://lighthouse3.com/
• Case Studies
• COMPAS model, ProPublica https://www.propublica.org/article/machine-
bias-risk-assessments-in-criminal-sentencing
• Optum health model: https://www.healthcarefinancenews.com/news/study-
finds-racial-bias-optum-algorithm
Read the Docs!
• AIF 360
• Git Hub: https://github.com/Trusted-AI/AIF360
• My FavoriteTutorial:
https://nbviewer.jupyter.org/github/IBM/AIF360/blob/master/examples/tutori
al_medical_expenditure.ipynb
• Audit-AI
• GitHub: https://github.com/pymetrics/audit-ai
• Every you need is in the GitHub.The implementation is that simple.
• What-IfTool
• GitHub: https://github.com/PAIR-code/what-if-tool
• Video Demos: https://pair-code.github.io/what-if-tool/
Friendship is Magic
• LinkedIn: MelindaThielbar
• Git Hub: BowTieMLP
Let’s
connect!

More Related Content

More from All Things Open

Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow
 Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow
Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlowAll Things Open
 
DEI Challenges and Success
DEI Challenges and SuccessDEI Challenges and Success
DEI Challenges and SuccessAll Things Open
 
Scaling Web Applications with Background
Scaling Web Applications with BackgroundScaling Web Applications with Background
Scaling Web Applications with BackgroundAll Things Open
 
Supercharging tutorials with WebAssembly
Supercharging tutorials with WebAssemblySupercharging tutorials with WebAssembly
Supercharging tutorials with WebAssemblyAll Things Open
 
Using SQL to Find Needles in Haystacks
Using SQL to Find Needles in HaystacksUsing SQL to Find Needles in Haystacks
Using SQL to Find Needles in HaystacksAll Things Open
 
Configuration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit InterceptConfiguration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit InterceptAll Things Open
 
Scaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship ProgramScaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship ProgramAll Things Open
 
Build Developer Experience Teams for Open Source
Build Developer Experience Teams for Open SourceBuild Developer Experience Teams for Open Source
Build Developer Experience Teams for Open SourceAll Things Open
 
Deploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache BeamDeploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache BeamAll Things Open
 
Sudo – Giving access while staying in control
Sudo – Giving access while staying in controlSudo – Giving access while staying in control
Sudo – Giving access while staying in controlAll Things Open
 
Fortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML ApplicationsFortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML ApplicationsAll Things Open
 
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...All Things Open
 
Building AlmaLinux OS without RHEL sources code
Building AlmaLinux OS without RHEL sources codeBuilding AlmaLinux OS without RHEL sources code
Building AlmaLinux OS without RHEL sources codeAll Things Open
 
Open Source evaluation: A comprehensive guide on what you are using
Open Source evaluation: A comprehensive guide on what you are usingOpen Source evaluation: A comprehensive guide on what you are using
Open Source evaluation: A comprehensive guide on what you are usingAll Things Open
 
System Design on Easy Mode
System Design on Easy ModeSystem Design on Easy Mode
System Design on Easy ModeAll Things Open
 
Introduction to GitHub Copilot
Introduction to GitHub CopilotIntroduction to GitHub Copilot
Introduction to GitHub CopilotAll Things Open
 
Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!All Things Open
 
Know Your Data: The stats behind your alerts
Know Your Data: The stats behind your alertsKnow Your Data: The stats behind your alerts
Know Your Data: The stats behind your alertsAll Things Open
 
Imagined Dragons: Building an Imagination-Powered Music Recommendation Platform
Imagined Dragons: Building an Imagination-Powered Music Recommendation PlatformImagined Dragons: Building an Imagination-Powered Music Recommendation Platform
Imagined Dragons: Building an Imagination-Powered Music Recommendation PlatformAll Things Open
 
The Path to Real-time Data Integration with Open Source
The Path to Real-time Data Integration with Open SourceThe Path to Real-time Data Integration with Open Source
The Path to Real-time Data Integration with Open SourceAll Things Open
 

More from All Things Open (20)

Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow
 Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow
Spinning Your Drones with Cadence Workflows, Apache Kafka and TensorFlow
 
DEI Challenges and Success
DEI Challenges and SuccessDEI Challenges and Success
DEI Challenges and Success
 
Scaling Web Applications with Background
Scaling Web Applications with BackgroundScaling Web Applications with Background
Scaling Web Applications with Background
 
Supercharging tutorials with WebAssembly
Supercharging tutorials with WebAssemblySupercharging tutorials with WebAssembly
Supercharging tutorials with WebAssembly
 
Using SQL to Find Needles in Haystacks
Using SQL to Find Needles in HaystacksUsing SQL to Find Needles in Haystacks
Using SQL to Find Needles in Haystacks
 
Configuration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit InterceptConfiguration Security as a Game of Pursuit Intercept
Configuration Security as a Game of Pursuit Intercept
 
Scaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship ProgramScaling an Open Source Sponsorship Program
Scaling an Open Source Sponsorship Program
 
Build Developer Experience Teams for Open Source
Build Developer Experience Teams for Open SourceBuild Developer Experience Teams for Open Source
Build Developer Experience Teams for Open Source
 
Deploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache BeamDeploying Models at Scale with Apache Beam
Deploying Models at Scale with Apache Beam
 
Sudo – Giving access while staying in control
Sudo – Giving access while staying in controlSudo – Giving access while staying in control
Sudo – Giving access while staying in control
 
Fortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML ApplicationsFortifying the Future: Tackling Security Challenges in AI/ML Applications
Fortifying the Future: Tackling Security Challenges in AI/ML Applications
 
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
 
Building AlmaLinux OS without RHEL sources code
Building AlmaLinux OS without RHEL sources codeBuilding AlmaLinux OS without RHEL sources code
Building AlmaLinux OS without RHEL sources code
 
Open Source evaluation: A comprehensive guide on what you are using
Open Source evaluation: A comprehensive guide on what you are usingOpen Source evaluation: A comprehensive guide on what you are using
Open Source evaluation: A comprehensive guide on what you are using
 
System Design on Easy Mode
System Design on Easy ModeSystem Design on Easy Mode
System Design on Easy Mode
 
Introduction to GitHub Copilot
Introduction to GitHub CopilotIntroduction to GitHub Copilot
Introduction to GitHub Copilot
 
Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!Linux Distribution Collaboration …on a Mainframe!
Linux Distribution Collaboration …on a Mainframe!
 
Know Your Data: The stats behind your alerts
Know Your Data: The stats behind your alertsKnow Your Data: The stats behind your alerts
Know Your Data: The stats behind your alerts
 
Imagined Dragons: Building an Imagination-Powered Music Recommendation Platform
Imagined Dragons: Building an Imagination-Powered Music Recommendation PlatformImagined Dragons: Building an Imagination-Powered Music Recommendation Platform
Imagined Dragons: Building an Imagination-Powered Music Recommendation Platform
 
The Path to Real-time Data Integration with Open Source
The Path to Real-time Data Integration with Open SourceThe Path to Real-time Data Integration with Open Source
The Path to Real-time Data Integration with Open Source
 

Recently uploaded

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 

Recently uploaded (20)

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 

AI Bias Testing and Mitigation: How to Choose the Right Open Source Tools

  • 1. Open Source Tools for AI Bias Detection and Mitigation WhichTools Work Best and How to UseThem
  • 2. My Biases • Ph.D. Statistician • Labor Economist • Software Developer • Pronouns: she, her, hers • Artist • Midwest Farm Girl
  • 3. Today’s Agenda: Get You Started on Your AI Ethics Journey • Bias Detection Overview andTerms • Examples of Bias Detection with 3 SoftwareTools: AIF 360, Audit AI, and Google’s What-IfTool • Pros and Cons of EachTool (not a full tutorial—we don’t have enough time). • Recommended Policies and Procedures for ImplementingAI Ethically
  • 4. AI Bias and Ethics: Software is a Tool • Some tools are better than others for the job at hand. • AIF 360: Only tool that has bias mitigation. • What-If: Interactive model understanding. • Audit-AI:Tests whether the group classification rates are the same, using a statistical test with p-values (or Bayes factor). • All 3 tools are open source and have good support. Recommendation: • Audit-AI produces straightforward tests with minimum code. If the automated tests are sufficient for your needs, it is the simplest to implement and understand. • AIF 360 is the most comprehensive tool kit. It is the best for customization. • What-If is better for understanding how the model works. It is best supported for Tensorflow models. If you’re usingTensorflow, it’s a great tool. If you are not using Tensorflow, it’s a great tool but requires some set up.
  • 5. AI Ethics Bias ≠ Data Science Bias ≠ Fairness • Fair: A human judgement about the morality of the process. • Bias: When a Data Scientist Says it:These two groups do not have the same counts/means. Bias:When an AI Ethics Expert Says It: “This model has systematic and repeatable errors that create unfair outcomes.” • Bias is an error. • Biased models can cause us to miss opportunities. • Biased models that are used as part of business practices can be a reputational risk to your business. Fidelity Confidential Information: DRAFT
  • 6. Y = + bias𝑓(𝑋, 𝛽) What You’re Trying to Predict Relationship Between Features and WhatYou’re Trying to Predict Bias in AssigningY: e.g. • Human bias in hiring, or lending, • Unconscious bias in labeling training data, • Systematic bias that limits opportunities for protected groups If the bias is large, and there are differences in features between the dominant group and the protected group, the model learns how to tell who is in the protected group instead of learning the relationships between the features. Where Does This Kind of Bias Come From?
  • 7. Our Example: Healthcare Costs An insurance company wants to find people with the highest predicted costs and offer them services designed to improve their health. This is simulated data based on a real example. https://www.healthcarefinancenews.com/news/study-finds-racial-bias-optum-algorithm Singh and Ramamurthy “Understanding racial bias in health using the Medical Expenditure Panel Survey data” But if we look at our protected group, we see that they have slightly worse health measures—yet also have lower cost.
  • 8. What Does Bias Testing Accomplish? True/False Negative Rate • False Negative Rate True/False Positive Rate • Statistical Parity • Equal Opportunity Both • Average Odds • Generalized Entropy • Thiel Index BiasTests Not Affected by Biases in theTarget • Disparate Impact Tests for Predictive Accuracy by Group Predictive accuracy is calculated based on the target, which may be biased. That means the above tests are affected (and possibly negated) when we think we are working with a biased target. Recommendation: 1) Always use Disparate Impact 2) Decide which is the more negative outcome and choose your other bias tests accordingly.
  • 9. Pick Fairness Metrics that Guard Against the Most Negative Outcome Predicted Label True Label Positive Negative Positive True Positive False Positive Negative False Negative True Negative Examples: • A model that predicts whether a prisoner will re-offend if offered parole should check False Positive rate by protected traits. • A model that assigns people to a health-improvement program based on prediction of cost should review the False Negative rate.
  • 10. Bias Testing Demonstration Audit-AI AIF 360 What-If 1. Import the packages 2. Specify a Pandas dataframe with class membership and predictions. 1. Import the packages 2. Convert your Pandas dataframe to a Structured Data set of the appropriate type. 3. Estimate a model. 4. Create a model explainer. 5. Run bias-detection methods using the model explainer. 6. Print out bias-detection results. 7. Write function to loop through different cut-offs and store in a data frame. 8. Graph results. 1. Import the packages 2. Change Pandas dataframe to a set of lists. 3. Create a WitWidget with input and output columns. 4. Explore interactively.
  • 11. What to Do If You Detect Bias? Software solution: Bias Mitigation Of the three tools, only AIF 360 has built-in bias mitigation—though they use TensorFlow for adversarial debiasing. Demonstration is in the notebook.
  • 12. Real-World Examples of Bias This image is instructive. It’s also interesting to read the lengthy debate it sparked in the AI community. Salient points: • One researcher was able to produce a better image just by re-training the algorithm and starting the gradient descent in a different location. • The team that constructed this algorithm was almost exclusively made up of white men.
  • 13. And Consider Our Toy Example By simple inspection, the sickest people are not the most expensive. And if that's the case, assigning people to a health improvement program to lower costs is not going to have the expected business outcome. This model fails twice--it's biased, and it doesn't lower costs! This is a good reason to use theWhat-If tool: It gives you visibility into simple relationships.
  • 14. AI Bias and Ethics: Software is a Tool • Strengths of EachTool • AIF 360: Production Monitoring andTesting • Only tool for bias testing and mitigation. • Highly customizable. • Easy to automate • What-If: Interactive model understanding. • Intuitive and visual. • Allows you to ask questions you wouldn’t have thought of asking. • Audit-AI: Statistical bias testing • Provides a p-value that answers the question “Is this difference due to random chance?” • Only tool that approaches bias tests in this way. • Weaknesses • AIF 360 is “fiddly”. Set up is onerous if you just need a quick test. • What-IfTool is easiest and fullest-featured withTensorBoard andTensorFlow Models. It also uses a sample.With a very large data set, a sample might tell an incomplete story. • Audit-AI:With very large data sets, most statistical tests will have small p- values.
  • 15. AI Bias and Ethics: Software is a Tool • How to get better at this: • Certified Ethical EmergingTechnologist Professional Certificate from Coursera (taught by Renee Cummings and 6 other experts in this field. • Towards a Code of Ethics for Artificial Intelligence by Paula Boddington Boddington • Montreal AI Ethics Institute: https://montrealethics.ai/ • Lighthouse3: https://lighthouse3.com/ • Case Studies • COMPAS model, ProPublica https://www.propublica.org/article/machine- bias-risk-assessments-in-criminal-sentencing • Optum health model: https://www.healthcarefinancenews.com/news/study- finds-racial-bias-optum-algorithm
  • 16. Read the Docs! • AIF 360 • Git Hub: https://github.com/Trusted-AI/AIF360 • My FavoriteTutorial: https://nbviewer.jupyter.org/github/IBM/AIF360/blob/master/examples/tutori al_medical_expenditure.ipynb • Audit-AI • GitHub: https://github.com/pymetrics/audit-ai • Every you need is in the GitHub.The implementation is that simple. • What-IfTool • GitHub: https://github.com/PAIR-code/what-if-tool • Video Demos: https://pair-code.github.io/what-if-tool/
  • 17. Friendship is Magic • LinkedIn: MelindaThielbar • Git Hub: BowTieMLP Let’s connect!

Editor's Notes

  1. He relation
  2. For example, the COMPAS model from this ProPublica article: often categorized black defendants as higher recidivism risk, even when they were lower risk than white offenders. This meant black defendants were falsely denied parole more often than white defendants. Checking the False Positive rate would have been important for this model. False Negative
  3. How to set up WIT: https://github.com/PAIR-code/what-if-tool
  4. On the left is a pixelated phot of President Barak Obama. On the right is a face generated from that image by PULSE, an AI algorithm that purports to create realistic faces from down-sampled images. Many people argue that AI bias is exclusively about biased samples, but researchers point out that they were able to get much more inclusive results with the same data just by re-training the algorithm. Source: https://www.theverge.com/21298762/face-depixelizer-ai-machine-learning-tool-pulse-stylegan-obama-bias