AI Ethics for Software Engineers:

AI Ethics for Software Engineers:

When you were five you were very quick to call out when things weren’t fair. You asked why… a lot. You had to learn to share. You didn’t have preconceived notions of what was or wasn’t possible. Ethics isn’t just for philosophers – it’s something that everyone has a responsibility to think about. In this session we’ll walk through practical examples and advice of how you can start to apply ethical principles to your own AI projects today.


Gillian Armstrong

May 22, 2020


  1. 1.

    Liberty IT AI Ethics for Software Engineers: Embrace your inner

    5-year old Gillian Armstrong @virtualgill
  2. 9.

    Gillian Armstrong // @virtualgill • Business Requirements • Business Question

    • Machine Learning Question Keep in mind that you get nothing for free – the machine will only answer the question asked
  3. 12.

    Gillian Armstrong // @virtualgill • Stakeholders • Implementers • Everyone

    Impacted (positively and negatively) Are we getting input from all of these people?
  4. 14.

    Gillian Armstrong // @virtualgill • What will the owners /

    implementers gain? • What are the risks to them? • What will users of the system gain? • What are the risks to them?
  5. 15.

    Gillian Armstrong // @virtualgill • What will the owners /

    implementers gain? • What are the risks to them? • What will users of the system gain? • What are the risks to them? Keep these in mind as you go along and ensure you understand where Business Goals might start to be the driving factor in any ethical compromise
  6. 17.

    Gillian Armstrong // @virtualgill • Who is implementing? Why? •

    How will they make decisions on what data or algorithms? • Is it auditable?
  7. 18.

    Gillian Armstrong // @virtualgill • Where will you get the

    data from? Why? • Why did it get collected? • How did it get collected?
  8. 20.

    Gillian Armstrong // @virtualgill • How will we monitor? •

    What will we do if we find issues or unexpected impacts? • How often will we update?
  9. 21.

    Examples of Guidelines (lots more out there!) • European Commission

    Ethics guidelines for trustworthy AI trustworthy-ai • Social Impact Statement for Algorithms • The IEEE Global Initiative on Ethics of Autonomous and Intelligent Systems • Artificial Intelligence Impact Assessment content/uploads/2019/01/Artificial-Intelligence-Impact-Assessment-English.pdf Gillian Armstrong // @virtualgill
  10. 24.

    Gillian Armstrong // @virtualgill • Poor collection techniques (selection bias)

    • Incomplete or Incorrect Data • Unbalanced Data that is not representative of entire population • Over-simplifying reality • A “Get it Done” attitude / Pressure to succeed Some things that cause Bias in Data:
  11. 25.

    Gillian Armstrong // @virtualgill “If you torture the data long

    enough it will confess to anything.” - Ronald Coase (Nobel Prize-winning British economist)
  12. 28.

    Gillian Armstrong // @virtualgill fairness impartial and just treatment or

    behaviour without favouritism or discrimination. Dictionary Definition
  13. 29.

    Gillian Armstrong // @virtualgill fairness equal false negative rates across

    groups Statistical Definition – Group Based Fair prediction with disparate impact: A study of bias in recidivism prediction instruments. [Chouldechova] Inherent Trade-Offs in the Fair Determination of Risk Scores. [Kleninberg, Mullainathan, Raghavan] Algorithmic Fairness [Kleninberg, Ludwig, Mullainathan, Rambachan] Equality of Opportunity in Supervised Learning [Hardt, Price, Srebro] Attacking discrimination with smarter machine learning.
  14. 30.

    Gillian Armstrong // @virtualgill Assign 4 prizes randomly! Ensure there

    is no discrimination based on colour (red vs yellow) or shape (stars vs circles)
  15. 31.

    Gillian Armstrong // @virtualgill Remember models give you nothing for

    free… these will specifically need added as constraints. Note that also means that removing the ”sensitive” data (colour, shape) is very unlikely to result in the type of “fair” model you want.
  16. 35.

    Gillian Armstrong // @virtualgill fairness similar individuals should be treated

    similarly Statistical Definition – Individual Based Fairness Through Awareness. [Dwork, Hardt, Pitassi, Reingold, Zemel] Fairness in Learning: Classic and Contextual Bandits. [Joseph, Kearns, Morgenstern, Roth, 2016] Individual Fairness in Hindsight. [Gupta, Kamble] Preventing Fairness Gerrymandering: Auditing and Learning for Subgroup Fairness. [Kearns, Neel, Roth, Wu]
  17. 37.

    Gillian Armstrong // @virtualgill “…the data may themselves be accurate

    but the disparities they reflect may themselves be caused by prior injustice.” - Deborah Hellman, Discrimination Law Expert
  18. 38.

    Gillian Armstrong // @virtualgill Note that Bias encoded in the

    model can be: - Reflective of previous bias e.g. - Exacerbating future bias e.g. disproportionality-in-the-cjs.pdf
  19. 39.

    Gillian Armstrong // @virtualgill “Definitions of fairness, privacy, transparency, interpretability,

    and morality should remain firmly in the human domain.” - Aaron Roth, The Ethical Algorithm
  20. 42.

    Examples of Tools Available • AI Explainability 360 •

    What-If Tool • SHAP • Skater • Interpret • Fairlearn • Lime • Facets Gillian Armstrong // @virtualgill
  21. 44.

    Would you be ok with your project ending up on

    the front page of a newspaper? Gillian Armstrong // @virtualgill Headline Test:
  22. 46.

    Gillian Armstrong // @virtualgill Move Fast and Break Things isn’t

    always ok…. Sometimes we need to Move Slow and Make Things Better
  23. 48.
  24. 49.

    Gillian Armstrong // @virtualgill If you are working in AI

    and Software Development, you are already a natural Problem Solver Keep an Open Mind, Find Solutions, Innovate
  25. 51.

    AI Ethics is not about… Gillian Armstrong // @virtualgill Deciding

    how many people you are going to kill with your trolley Blaming Technology for all the evil in the world Bashing Developers Making you feel guilty