Building Responsible AI Algorithms
Building Responsible AI Algorithms
Responsibility
BEING ACCOUNTABLE
Accountability is a key component of Responsible AI.
ELIMINATING TOXICITY
Removing toxicity from ML models is a fundamental tenant of responsible AI.
As datasets are built from the Internet, which certainly includes human toxicity and
biases, these datasets tend to have toxic terms, phrases, images and ideas
embedded in them.
Thinking Fairly
Algorithmic fairness is a key component in responsible AI frameworks
Thinking fairly is an act of responsibility and all practitioners working on ML
models/AI systems need to adopt this way of thinking.
Fairness
Bias
Bias refers to AI systems that produce biased results that reflect and perpetuate
human biases within a society, including historical and current social inequality,
Human-centered
Human-centered means genuinely focusing on the humans who are at the heart of
what the organization does.
ACCOUNTABILITY
What’s accountability?
The term accountability refers to the need to explain and justify one’s decisions
and actions to partners. In the context of artificial intelligence, accountability is the
expectation that organizations or individuals will ensure the proper functioning
throughout their lifecycle of the AI systems that they design, develop, operate or
deploy.
SOCIAL BENEFITS
Healthcare
Mount Sinai utilized deep learning to accurately predict liver, rectum, and prostate
cancers with a remarkable 94 percent accuracy rate.
Agriculture
• In 2017, researchers utilized Google's TensorFlow to create an image database
for cassava leaves in Tanzania
• The result is 98 percent accuracy in identifying diseases affecting these plants.
Climate change
• AI is also playing a crucial role in combating climate change:
⚬ AI-powered robots and drones to address the escalating threat of wildfires.
⚬ For instance, the Los Angeles City Fire Department (LAFD) has adopted AI-
powered robots and drones for their firefighting operations.
⚬ Green-cooling technologies, for instance, cool electronics without depleting
natural resources ⇒ reducing energy consumption in data centers from 20 percent
to 4 percent.
Data Ethics
Data ethics is considered a new branch of ethics that builds on the foundation of
computer and information ethics, with a more refined approach to data-centricity.
It highlights the various moral dimensions of data and the need for ethical analysis
and evaluation. It encourages the good and responsible practice of collecting,
sharing, and using data, with particular focus and attention on its potential to
adversely impact people and society.
Most private and regulatory bodies, including governmental agencies, are coming
together to provide data ethics guidelines, with the aim of increasing awareness,
understanding, and adoption.
As with most ethical practices, principles are set in place to guide practitioners
who seek further guidance on ethical/responsible AI processes. On that note, data
ethics has a few guiding principles designed with the users in mind to help with the
integration of data ethics in data- driven activities. The following sections discuss a
few data ethics principles to consider.
Ownership
This is the first principle of data ethics. It states that the individual should have
ownership of their personal information, where the collection of someone’s
personal data without their knowledge or consent is unlawful and unethical.
This means they have no control over their personal information, which should not
be the case. This leads to the next principle of data ethics, data control.
Data Control
Individuals should have primary control over their data and proper context as to
how their data is processed and activated. They should be able to manage the flow
of their personal information and be able to opt out at any time.
Transparency
Data ethics recommends including transparency in your data practices. All data-
processing activities and automated decisions should be understandable and made
known to the users.
Accountability
Accountability is a fundamental part of data processing where efforts should be
made to reduce the risks and mitigate social and ethical implications for
individuals. Proper handling of data processing should be embedded throughout
the organization and accountability should be included as part of the data
workflow.
Equality
It’s very important to pay close attention to vulnerable people who might be prone
to discrimination or stigmatization due to their financial, social, or health-related
conditions. This also helps reduce potential bias existent in supervised and
unsupervised algorithms.
Privacy
To protect people’s data, it’s crucial that it is stored in a robust and secure database
with several data security methods in place, such as dual authentication, password
protection, and file encryption.
Intention
It’s important to define the problem you’re trying to solve and decide whether ML
is the best solution for the identified problem.
It’s also important to determine which data points are needed for your model and
to ensure that you collect only the relevant data.
Outcomes
You might have the best intentions but these can be overridden if the outcome
negatively affects society. This is why it’s crucial to analyze the potential
downfalls and harms of your ML model and to test its use cases during the pre-
training phase.
Data Curation
To ensure that data curation (the process of collecting, organizing, and maintaining
data/datasets) is carried out in an ethical manner, it’s important to consider the
following issues:
• The data is accurate and does not contain false information. Data sources have to
be credible and curators should avoid making alterations, as these could lead to
corrupt and unreliable data.
• Curation adheres to all relevant data laws where applicable. Appropriate
intellectual property such as copyrights should be taken into account. Curators
should obtain licenses when necessary. Restrictions should be placed on how the
data can be shared and reused, when appropriate.
• Safeguards on the security, privacy, and confidentiality of the data are put in
place to allow only the intended audience to gain access to the data.
• Data curation should closely consider information about controversial or delicate
topics, including providing a fair representation of multiple groups and
perspectives. It’s also important to prevent potential misuse of data, such as in
areas of political dissension or the study of marginalized groups.
Best Practices
- Annotation and Filtering
- Rater Diversity
- Synthetic Data
- Data Cards and Datasheets
- Model Cards
Fairness
Definition
Equal Opportunity
For a preferred label and a given attribute, a classifier predicts that preferred label
equally well for all values of that attribute.
Demographic Parity
A fairness metric that is satisfied if the classifications of a model are not dependent
on a given sensitive attribute.
Equalized Odds
For any particular label and attribute, a classifier predicts that label equally well for
all values of that attribute. It requires that groups have the same false positive rates
and true positive rates.
Treatment Equality
The rate of false negatives and false positives is the same for both protected group
categories.
Test Fairness
Conterfactual Fairness
Types of Bias
Historical Bias
This occurs when there is a mix-up between the world as it is and the
values/objectives embedded in an AI model.
Representation Bias
Representation bias arises when the training population under-represents parts of
the population.
Representation bias occurs when defining and sampling the population you’d like
to train your model on.
Measurement Bias
This arises when selecting and measuring features and labels, mostly caused by
human judgement.
Aggregation Bias
Aggregation bias occurs during model construction, when populations are
inappropriately combined.
Evaluation Bias
This occurs during model interaction and evaluation. It can be the result of
unsuitable or disproportionate
Deployment Bias
Deployment bias is seen after model deployment, when a system is used or
interpreted in inappropriate ways.
Safety
AI Safety
AI is becoming increasingly popular for its incorrect and harmful results across the
different modalities, from language, image, speech, and so on. But AI is not 100
percent evil. It’s based on our uses. It has many benefits and it’s progressively
becoming an integral part of existing technologies
Benchmarking
• Benchmarking provides a reference point to measure the performance of AI
models.
• It helps identify biases and potential harms in AI systems, including Large
Language Models (LLMs).
HUMAN-IN-THE-LOOP
There are several key risks and challenges when applying a human-in-the-loop
(HITL) approach:
A data protection policy is needed when working with reviewers to prevent data
leaks.
Human bias and bias:
Reviewers' beliefs, opinions, and biases can influence the data labeling process
(causing errors and bias).
There should be a limit to the amount of toxic content reviewers are exposed to in
a day to avoid damage to their mental health.
In the case of the reviewer diversity study, the results suggest that reviewers' self-
identification can influence how they label toxicity.
This causes challenges in ensuring fairness and objectivity when building machine
learning models.
Explainable AI (XAI)
Explainable AI (XAI) is a set of tools and frameworks that provides explanations
and interpretations for output of a ML model.
=> Model’s Accountability
4 Aspects of AI Accountability
Governance Structures
Data
XAI Tools
Data Cards:
Provide "local explanations" for each specific case of the classification model
Interpret ML:
INTRODUCTION
PRIVACY PRESERVING AI
Traditional approaches: Anonymization, data aggregation, personal de-
identification, access restrictions
Federated Learning: Secure infrastructure that allows co-training of predictive
models, keeping data at the device
Differential Privacy: Ensures sensitive data analysis does not reveal personal
information by introducing noise into the data
FEDERATED LEARNING
Collaborative machine learning: Multiple clients work together under a
central server's coordination.
Raw data is saved locally, only updates to the shared model
Recommended when device data is more important/sensitive than the server
DIFFERENTIAL PRIVACY
Keep system behavior stable when data changes
Anonymity is achieved by introducing consistent noise into the data
The noise is loud enough to protect privacy but is still useful
ROBUSTNESS
1.What is robustness ?
• Measures the stability of an algorithms’ performance when a model is attacked
and noise is added to the training data
• Measures the degree to which a model’s performance changes when using new
data versus training data
• Ensure that the algorithm of a model can handle unseen, perturbed data
Techniques
• Sampling
• Bias Mitigation
• Data Balancing
• Data Augmentation
• Cross-validation
• Ensembles
• Transfer Learning
• Adversarial Traning
Challenges for Robustness:
LLMs reflect the racial bias present in the data that trains them.
Failure to include new language trends due to social changes makes LLMs
obsolete.
There is a need for transparency, accountability, and human control over the
process of building training data.
The benefits of LLMs are uneven across social groups and countries due to
economic and technological gaps.
The model often gives false and fabricated information with high reliability.
Solution: Prompt-tuning, controlling, ensuring human values.