diff --git a/deon/assets/examples_of_ethical_issues.yml b/deon/assets/examples_of_ethical_issues.yml
index 4c03b61..27d0af7 100644
--- a/deon/assets/examples_of_ethical_issues.yml
+++ b/deon/assets/examples_of_ethical_issues.yml
@@ -55,7 +55,7 @@
- line_id: C.2
links:
- text: ✅ A study by Park et al shows how reweighting can mitigate racial bias when predicting risk of postpartum depression.
- url: https://doi.org/10.1001/jamanetworkopen.2021.3909
+ url: https://doi.org/10.1001/jamanetworkopen.2021.3909
- text: ⛔ word2vec, trained on Google News corpus, reinforces gender stereotypes.
url: https://www.technologyreview.com/s/602025/how-vector-space-mathematics-reveals-the-hidden-sexism-in-language/
- text: ⛔ Women are more likely to be shown lower-paying jobs than men in Google ads.
@@ -82,7 +82,7 @@
links:
- text: ✅ Amazon developed an experimental AI recruiting tool, but did not deploy it because it learned to perpetuate bias against women.
url: https://www.reuters.com/article/us-amazon-com-jobs-automation-insight/amazon-scraps-secret-ai-recruiting-tool-that-showed-bias-against-women-idUSKCN1MK08G
- - text: ⛔ In hypothetical trials, language models assign the death penalty more frequently to defendants who use African American dialects.
+ - text: ⛔ In hypothetical trials, language models assign the death penalty more frequently to defendants who use African American dialects.
url: https://arxiv.org/abs/2403.00742
- text: ⛔ Variables used to predict child abuse and neglect are direct measurements of poverty, unfairly targeting low-income families for child welfare scrutiny.
url: https://www.wired.com/story/excerpt-from-automating-inequality/
@@ -92,7 +92,7 @@
url: https://www.whitecase.com/publications/insight/algorithms-and-bias-what-lenders-need-know
- line_id: D.2
links:
- - text: ✅ A study by Garriga et al uses ML best practices to test for and communicate fairness across racial groups for a model that predicts mental health crises.
+ - text: ✅ A study by Garriga et al uses ML best practices to test for and communicate fairness across racial groups for a model that predicts mental health crises.
url: https://www.nature.com/articles/s41591-022-01811-5
- text: ⛔ Apple credit card offers smaller lines of credit to women than men.
url: https://www.wired.com/story/the-apple-card-didnt-see-genderand-thats-the-problem/
@@ -119,7 +119,7 @@
- line_id: D.4
links:
- text: ✅ GDPR includes a "right to explanation," i.e. meaningful information on the logic underlying automated decisions.
- url: hhttps://academic.oup.com/idpl/article/7/4/233/4762325
+ url: https://academic.oup.com/idpl/article/7/4/233/4762325
- text: ⛔ Patients with pneumonia with a history of asthma are usually admitted to the intensive care unit as they have a high risk of dying from pneumonia. Given the success of the intensive care, neural networks predicted asthmatics had a low risk of dying and could therefore be sent home. Without explanatory models to identify this issue, patients may have been sent home to die.
url: http://people.dbmi.columbia.edu/noemie/papers/15kdd.pdf
- line_id: D.5
diff --git a/docs/docs/examples.md b/docs/docs/examples.md
index c1ee2fc..d4e9960 100644
--- a/docs/docs/examples.md
+++ b/docs/docs/examples.md
@@ -4,31 +4,31 @@
To make the ideas contained in the checklist more concrete, we've compiled **examples** of times when tradoffs were handled well, and times when things have gone wrong. Examples are paired with the checklist questions to help illuminate where in the process ethics discussions may have helped provide a course correction. Positive examples show how principles of `deon` can be followed in the real world.
-
Checklist Question | Examples
---- | ---
- | **Data Collection**
-**A.1 Informed consent**: If there are human subjects, have they given informed consent, where subjects affirmatively opt-in and have a clear understanding of the data uses to which they consent? | - [✅ A voiceover studio is now required to get informed consent from a performer before using their likeness in AI-generated content.](https://variety.com/2024/biz/news/sag-aftra-ai-voiceover-studio-video-games-1235866313/)
- [⛔ Facebook uses phone numbers provided for two-factor authentication to target users with ads.](https://techcrunch.com/2018/09/27/yes-facebook-is-using-your-2fa-phone-number-to-target-you-with-ads/)
- [⛔ African-American men were enrolled in the Tuskegee Study on the progression of syphilis without being told the true purpose of the study or that treatment for syphilis was being withheld.](https://en.wikipedia.org/wiki/Tuskegee_syphilis_experiment)
- [⛔ OpenAI's ChatGPT memorized and regurgitated entire poems without checking for copyright permissions.](https://news.cornell.edu/stories/2024/01/chatgpt-memorizes-and-spits-out-entire-poems)
-**A.2 Collection bias**: Have we considered sources of bias that could be introduced during data collection and survey design and taken steps to mitigate those? | - [⛔ StreetBump, a smartphone app to passively detect potholes, may fail to direct public resources to areas where smartphone penetration is lower, such as lower income areas or areas with a larger elderly population.](https://hbr.org/2013/04/the-hidden-biases-in-big-data)
- [⛔ Facial recognition cameras used for passport control register Asian's eyes as closed.](http://content.time.com/time/business/article/0,8599,1954643,00.html)
-**A.3 Limit PII exposure**: Have we considered ways to minimize exposure of personally identifiable information (PII) for example through anonymization or not collecting information that isn't relevant for analysis? | - [✅ DuckDuckGo enables users to anonymously access ChatGPT by *not* collecting user IP addresses along with queries.](https://www.theverge.com/2024/6/6/24172719/duckduckgo-private-ai-chats-anonymous-gpt-3-5)
- [⛔ Personal information on taxi drivers can be accessed in poorly anonymized taxi trips dataset released by New York City.](https://www.theguardian.com/technology/2014/jun/27/new-york-taxi-details-anonymised-data-researchers-warn)
- [⛔ Netflix prize dataset of movie rankings by 500,000 customers is easily de-anonymized through cross referencing with other publicly available datasets.](https://www.wired.com/2007/12/why-anonymous-data-sometimes-isnt/)
-**A.4 Downstream bias mitigation**: Have we considered ways to enable testing downstream results for biased outcomes (e.g., collecting data on protected group status like race or gender)? | - [⛔ In six major cities, Amazon's same day delivery service excludes many predominantly black neighborhoods.](https://www.bloomberg.com/graphics/2016-amazon-same-day/)
- [⛔ Facial recognition software is significanty worse at identifying people with darker skin.](https://www.theregister.co.uk/2018/02/13/facial_recognition_software_is_better_at_white_men_than_black_women/)
- | **Data Storage**
-**B.1 Data security**: Do we have a plan to protect and secure data (e.g., encryption at rest and in transit, access controls on internal users and third parties, access logs, and up-to-date software)? | - [✅ MediCapt, which documents forensic evidence in conflict regions, effectively protects sensitive information using encryption, limited access, and security audits.](https://phr.org/issues/sexual-violence/medicapt/)
- [⛔ Personal and financial data for more than 146 million people was stolen in Equifax data breach.](https://www.nbcnews.com/news/us-news/equifax-breaks-down-just-how-bad-last-year-s-data-n872496)
- [⛔ Cambridge Analytica harvested private information from over 50 million Facebook profiles without users' permission.](https://www.nytimes.com/2018/03/17/us/politics/cambridge-analytica-trump-campaign.html)
- [⛔ AOL accidentally released 20 million search queries from 658,000 customers.](https://www.wired.com/2006/08/faq-aols-search-gaffe-and-you/)
-**B.2 Right to be forgotten**: Do we have a mechanism through which an individual can request their personal information be removed? | - [✅ The EU's General Data Protection Regulation (GDPR) includes the "right to be forgotten."](https://www.eugdpr.org/the-regulation.html)
-**B.3 Data retention plan**: Is there a schedule or plan to delete the data after it is no longer needed? | - [⛔ FedEx exposes private information of thousands of customers after a legacy s3 server was left open without a password.](https://www.zdnet.com/article/unsecured-server-exposes-fedex-customer-records/)
- | **Analysis**
-**C.1 Missing perspectives**: Have we sought to address blindspots in the analysis through engagement with relevant stakeholders (e.g., checking assumptions and discussing implications with affected communities and subject matter experts)? | - [✅ Code for America programmatically cleared >140,000 eligible criminal records by collaborating with multiple relevant stakeholders like policymakers, advocacy groups, and courts.](https://codeforamerica.org/programs/criminal-justice/automatic-record-clearance/)
- [⛔ When Apple's HealthKit came out in 2014, women couldn't track menstruation.](https://www.theverge.com/2014/9/25/6844021/apple-promised-an-expansive-health-app-so-why-cant-i-track)
-**C.2 Dataset bias**: Have we examined the data for possible sources of bias and taken steps to mitigate or address these biases (e.g., stereotype perpetuation, confirmation bias, imbalanced classes, or omitted confounding variables)? | - [✅ A study by Park et al shows how reweighting can mitigate racial bias when predicting risk of postpartum depression.](https://doi.org/10.1001/jamanetworkopen.2021.3909)
- [⛔ word2vec, trained on Google News corpus, reinforces gender stereotypes.](https://www.technologyreview.com/s/602025/how-vector-space-mathematics-reveals-the-hidden-sexism-in-language/)
- [⛔ Women are more likely to be shown lower-paying jobs than men in Google ads.](https://www.theguardian.com/technology/2015/jul/08/women-less-likely-ads-high-paid-jobs-google-study)
-**C.3 Honest representation**: Are our visualizations, summary statistics, and reports designed to honestly represent the underlying data? | - [⛔ Misleading chart shown at Planned Parenthood hearing distorts actual trends of abortions vs. cancer screenings and preventative services.](https://www.politifact.com/truth-o-meter/statements/2015/oct/01/jason-chaffetz/chart-shown-planned-parenthood-hearing-misleading-/)
- [⛔ Georgia Dept. of Health graph of COVID-19 cases falsely suggests a steeper decline when dates are ordered by total cases rather than chronologically.](https://www.vox.com/covid-19-coronavirus-us-response-trump/2020/5/18/21262265/georgia-covid-19-cases-declining-reopening)
-**C.4 Privacy in analysis**: Have we ensured that data with PII are not used or displayed unless necessary for the analysis? | - [⛔ Strava heatmap of exercise routes reveals sensitive information on military bases and spy outposts.](https://www.theguardian.com/world/2018/jan/28/fitness-tracking-app-gives-away-location-of-secret-us-army-bases)
-**C.5 Auditability**: Is the process of generating the analysis well documented and reproducible if we discover issues in the future? | - [✅ NASA's Transform to Open Science initiative is working to make research more reproducible and accessible.](https://nasa.github.io/Transform-to-Open-Science/)
- [✅ Medic's Community Health Tooklit supports health workers in hard-to-reach areas. The toolkit is fully open source on Github for anyone to view or collaborate.](https://communityhealthtoolkit.org/)
- [⛔ Excel error in well-known economics paper undermines justification of austerity measures.](https://www.bbc.com/news/magazine-22223190)
- | **Modeling**
-**D.1 Proxy discrimination**: Have we ensured that the model does not rely on variables or proxies for variables that are unfairly discriminatory? | - [✅ Amazon developed an experimental AI recruiting tool, but did not deploy it because it learned to perpetuate bias against women.](https://www.reuters.com/article/us-amazon-com-jobs-automation-insight/amazon-scraps-secret-ai-recruiting-tool-that-showed-bias-against-women-idUSKCN1MK08G)
- [⛔ In hypothetical trials, language models assign the death penalty more frequently to defendants who use African American dialects.](https://arxiv.org/abs/2403.00742)
- [⛔ Variables used to predict child abuse and neglect are direct measurements of poverty, unfairly targeting low-income families for child welfare scrutiny.](https://www.wired.com/story/excerpt-from-automating-inequality/)
- [⛔ Criminal sentencing risk asessments don't ask directly about race or income, but other demographic factors can end up being proxies.](https://www.themarshallproject.org/2015/08/04/the-new-science-of-sentencing)
- [⛔ Creditworthiness algorithms based on nontraditional criteria such as grammatic habits, preferred grocery stores, and friends' credit scores can perpetuate systemic bias.](https://www.whitecase.com/publications/insight/algorithms-and-bias-what-lenders-need-know)
-**D.2 Fairness across groups**: Have we tested model results for fairness with respect to different affected groups (e.g., tested for disparate error rates)? | - [✅ A study by Garriga et al uses ML best practices to test for and communicate fairness across racial groups for a model that predicts mental health crises.](https://www.nature.com/articles/s41591-022-01811-5)
- [⛔ Apple credit card offers smaller lines of credit to women than men.](https://www.wired.com/story/the-apple-card-didnt-see-genderand-thats-the-problem/)
- [⛔ With COMPAS, a risk-assessment algorithm used in criminal sentencing, black defendants are almost twice as likely as white defendants to be mislabeled as likely to reoffend.](https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing)
- [-- Northpointe's rebuttal to ProPublica article.](https://www.documentcloud.org/documents/2998391-ProPublica-Commentary-Final-070616.html)
- [-- Related academic study.](https://www.liebertpub.com/doi/pdf/10.1089/big.2016.0047)
- [⛔ Google's speech recognition software doesn't recognize women's voices as well as men's.](https://www.dailydot.com/debug/google-voice-recognition-gender-bias/)
- [⛔ Google searches involving black-sounding names are more likely to serve up ads suggestive of a criminal record than white-sounding names.](https://www.technologyreview.com/s/510646/racism-is-poisoning-online-ad-delivery-says-harvard-professor/)
- [⛔ OpenAI's GPT models show racial bias in ranking job applications based on candidate names.](https://www.bloomberg.com/graphics/2024-openai-gpt-hiring-racial-discrimination/)
-**D.3 Metric selection**: Have we considered the effects of optimizing for our defined metrics and considered additional metrics? | - [✅ Facebook seeks to optimize "time well spent", prioritizing interaction over popularity.](https://www.wired.com/story/facebook-tweaks-newsfeed-to-favor-content-from-friends-family/)
- [⛔ YouTube's search autofill suggests pedophiliac phrases due to high viewership of related videos.](https://gizmodo.com/youtubes-creepy-kid-problem-was-worse-than-we-thought-1820763240)
- [⛔ A widely used commercial algorithm in the healthcare industry underestimates the care needs of black patients because it optimizes for spending as a proxy for need, introducing racial bias due to unequal access to care.](https://www.science.org/doi/10.1126/science.aax2342)
-**D.4 Explainability**: Can we explain in understandable terms a decision the model made in cases where a justification is needed? | - [✅ GDPR includes a "right to explanation," i.e. meaningful information on the logic underlying automated decisions.](hhttps://academic.oup.com/idpl/article/7/4/233/4762325)
- [⛔ Patients with pneumonia with a history of asthma are usually admitted to the intensive care unit as they have a high risk of dying from pneumonia. Given the success of the intensive care, neural networks predicted asthmatics had a low risk of dying and could therefore be sent home. Without explanatory models to identify this issue, patients may have been sent home to die.](http://people.dbmi.columbia.edu/noemie/papers/15kdd.pdf)
-**D.5 Communicate limitations**: Have we communicated the shortcomings, limitations, and biases of the model to relevant stakeholders in ways that can be generally understood? | - [✅ OpenAI posted an explanation of how ChatGPT is trained to behave, its limitations, and future directions for improvement.](https://openai.com/index/how-should-ai-systems-behave/)
- [⛔ Google Flu claims to accurately predict weekly influenza activity and then misses the 2009 swine flu pandemic.](https://www.forbes.com/sites/stevensalzberg/2014/03/23/why-google-flu-is-a-failure/#6fa6a1925535)
- | **Deployment**
-**E.1 Monitoring and evaluation**: Do we have a clear plan to monitor the model and its impacts after it is deployed (e.g., performance monitoring, regular audit of sample predictions, human review of high-stakes decisions, reviewing downstream impacts of errors or low-confidence decisions, testing for concept drift)? | - [✅ RobotsMali uses AI to create children's books in Mali's native languages, and incorporates human review to ensure that all AI-generated content is accurate and culturally sensitive.](https://restofworld.org/2024/mali-ai-translate-local-language-education/)
- [⛔ Dutch Prime Minister and entire cabinet resign after investigations reveal that 26,000 innocent families were wrongly accused of social benefits fraud partially due to a discriminatory algorithm.](https://www.vice.com/en/article/jgq35d/how-a-discriminatory-algorithm-wrongly-accused-thousands-of-families-of-fraud)
- [⛔ Sending police officers to areas of high predicted crime skews future training data collection as police are repeatedly sent back to the same neighborhoods regardless of the true crime rate.](https://www.smithsonianmag.com/innovation/artificial-intelligence-is-now-used-predict-crime-is-it-biased-180968337/)
-**E.2 Redress**: Have we discussed with our organization a plan for response if users are harmed by the results (e.g., how does the data science team evaluate these cases and update analysis and models to prevent future harm)? | - [✅ Healing ARC uses a targeted, race-conscious algorithm to counteract documented inequities in access to heart failure care for Black and Latinx patients.](https://catalyst.nejm.org/doi/full/10.1056/CAT.22.0076)
- [⛔ Software mistakes result in healthcare cuts for people with diabetes or cerebral palsy.](https://www.theverge.com/2018/3/21/17144260/healthcare-medicaid-algorithm-arkansas-cerebral-palsy)
-**E.3 Roll back**: Is there a way to turn off or roll back the model in production if necessary? | - [⛔ Google "fixes" racist algorithm by removing gorillas from image-labeling technology.](https://www.theverge.com/2018/1/12/16882408/google-racist-gorillas-photo-recognition-algorithm-ai)
- [⛔ Microsoft's Twitter chatbot Tay quickly becomes racist.](https://www.theguardian.com/technology/2016/mar/24/microsoft-scrambles-limit-pr-damage-over-abusive-ai-bot-tay)
-**E.4 Unintended use**: Have we taken steps to identify and prevent unintended uses and abuse of the model and do we have a plan to monitor these once the model is deployed? | - [⛔ Generative AI can be exploited to create convincing scams like "virtual kidnapping".](https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/how-cybercriminals-can-perform-virtual-kidnapping-scams-using-ai-voice-cloning-tools-and-chatgpt)
- [⛔ Deepfakes—realistic but fake videos generated with AI—span the gamut from celebrity porn to presidential statements.](http://theweek.com/articles/777592/rise-deepfakes)
+| Checklist Question | Examples |
+| --- | --- |
+| **Data Collection** | |
+| **A.1 Informed consent**: If there are human subjects, have they given informed consent, where subjects affirmatively opt-in and have a clear understanding of the data uses to which they consent? | |
+| **A.2 Collection bias**: Have we considered sources of bias that could be introduced during data collection and survey design and taken steps to mitigate those? | |
+| **A.3 Limit PII exposure**: Have we considered ways to minimize exposure of personally identifiable information (PII) for example through anonymization or not collecting information that isn't relevant for analysis? | |
+| **A.4 Downstream bias mitigation**: Have we considered ways to enable testing downstream results for biased outcomes (e.g., collecting data on protected group status like race or gender)? | |
+| **Data Storage** | |
+| **B.1 Data security**: Do we have a plan to protect and secure data (e.g., encryption at rest and in transit, access controls on internal users and third parties, access logs, and up-to-date software)? | |
+| **B.2 Right to be forgotten**: Do we have a mechanism through which an individual can request their personal information be removed? | |
+| **B.3 Data retention plan**: Is there a schedule or plan to delete the data after it is no longer needed? | |
+| **Analysis** | |
+| **C.1 Missing perspectives**: Have we sought to address blindspots in the analysis through engagement with relevant stakeholders (e.g., checking assumptions and discussing implications with affected communities and subject matter experts)? | |
+| **C.2 Dataset bias**: Have we examined the data for possible sources of bias and taken steps to mitigate or address these biases (e.g., stereotype perpetuation, confirmation bias, imbalanced classes, or omitted confounding variables)? | |
+| **C.3 Honest representation**: Are our visualizations, summary statistics, and reports designed to honestly represent the underlying data? | |
+| **C.4 Privacy in analysis**: Have we ensured that data with PII are not used or displayed unless necessary for the analysis? | |
+| **C.5 Auditability**: Is the process of generating the analysis well documented and reproducible if we discover issues in the future? | |
+| **Modeling** | |
+| **D.1 Proxy discrimination**: Have we ensured that the model does not rely on variables or proxies for variables that are unfairly discriminatory? | |
+| **D.2 Fairness across groups**: Have we tested model results for fairness with respect to different affected groups (e.g., tested for disparate error rates)? | |
+| **D.3 Metric selection**: Have we considered the effects of optimizing for our defined metrics and considered additional metrics? | |
+| **D.4 Explainability**: Can we explain in understandable terms a decision the model made in cases where a justification is needed? | |
+| **D.5 Communicate limitations**: Have we communicated the shortcomings, limitations, and biases of the model to relevant stakeholders in ways that can be generally understood? | |
+| **Deployment** | |
+| **E.1 Monitoring and evaluation**: Do we have a clear plan to monitor the model and its impacts after it is deployed (e.g., performance monitoring, regular audit of sample predictions, human review of high-stakes decisions, reviewing downstream impacts of errors or low-confidence decisions, testing for concept drift)? | |
+| **E.2 Redress**: Have we discussed with our organization a plan for response if users are harmed by the results (e.g., how does the data science team evaluate these cases and update analysis and models to prevent future harm)? | |
+| **E.3 Roll back**: Is there a way to turn off or roll back the model in production if necessary? | |
+| **E.4 Unintended use**: Have we taken steps to identify and prevent unintended uses and abuse of the model and do we have a plan to monitor these once the model is deployed? | |
diff --git a/docs/render_templates.py b/docs/render_templates.py
index f0f14b1..4d8eadd 100644
--- a/docs/render_templates.py
+++ b/docs/render_templates.py
@@ -54,12 +54,12 @@ def make_table_of_links():
for r in refs:
refs_dict[r["line_id"]] = r["links"]
- template = """Checklist Question | Examples
---- | ---
+ template = """| Checklist Question | Examples |
+| --- | --- |
{lines}
"""
- line_template = "**{line_id} {line_summary}**: {line} | {row_text}"
- section_title_template = " | **{section_title}**"
+ line_template = "| **{line_id} {line_summary}**: {line} | {row_text} |"
+ section_title_template = "| **{section_title}** | |"
line_delimiter = "\n"
formatted_rows = []
@@ -74,7 +74,7 @@ def make_table_of_links():
for link in refs_dict[line.line_id]:
text = link["text"]
url = link["url"]
- bullet_hyperlink = f"[{text}]({url})"
+ bullet_hyperlink = f'{text}'
bulleted_list.append(bullet_hyperlink)
formatted_bullets = "".join(bulleted_list)