0% found this document useful (0 votes)
22 views

Building Responsible AI Algorithms

Uploaded by

kiritomc1233
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Building Responsible AI Algorithms

Uploaded by

kiritomc1233
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Building Responsible AI Algorithms

Responsibility

AI- related failures


In case AI- related failures led to death or injury, everyone who was involved in
the development of the offending vehicle should be held accountable ( researcher,
Engineer, CTO, legal officers...)

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.

PROTECT HUMAN PRIVACY


Products and technologies must ensure that they do not infringe on human rights,
but rather protect them.
AI systems should aim to protect human citizens, maintaining the individual rights
of people to exercise their thoughts and take action.
ENSURING SAFETY
When developing algorithms, developers must ensure that AI is deployed in a safe
manner that does not harm its users.
AI safety is one of the dimension of responsible AI and it’s important to bear in
mind when developing ML systems.
AI PRINCIPLES

FAIRNESS, BIAS, AND HUMAN-CENTERED VALUES

Fairness

Fairness in the context of machine learning and artificial intelligence, is described


as providing unbiased treatment to individuals, especially those with protected
status.

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.

Some applications or uses of AI systems have implications for human rights,


including risks that human rights and human-centered values might be
intentionally or unintentionally infringed.
=> Using “AI values-alignment” can help ensure that AI systems’ behaviors
“protect and promote human rights and align with human-centered values.”

TRANSPARENCY AND TRUST


Due to the difficulty in understanding the rationale and methodologies applied to
AI outcomes, businesses and society in general are increasingly losing trust in this
technology. This barrier has led to widespread skepticism regarding the adoption
of AI being affected.
To build trust in artificial intelligence, transparency and explanation measures need
to be established. There needs to be an explanation for why an AI system produces
certain results, including explanations about the algorithm, uncertainty estimates,
and performance indicators.

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.

• Plastic pollution poses a significant threat to human health and marine


ecosystems.
• Ocean Cleanup utilizes AI technology to detect and map ocean plastics.
⚬ GoPro scans ocean areas for marine debris, generating datasets to train AI object
detection algorithms
⇒ Identification and removal of over 400 large plastics from affected areas.
⇒ Organization's goal of removing 90 percent of floating ocean plastic by 2040

PRIVACY, SAFETY, AND SECURITY


⇒ Imagining a world without guiding principles for ML development paints a grim
picture, as evidenced by the erratic and potentially harmful behavior of AI
chatbots.

⇒ Establishing AI principles before embarking on ML programs is crucial to


safeguarding individuals worldwide, regardless of their backgrounds or beliefs.
Data

Data is the underlying ingredient of all ML systems. As ML works with loads of


data, it’s critical to understand the foundations of data and data ethics, with the
primary focus on training and fine-tuning your model appropriately.
The “80 Million Tiny Images” dataset was built by MIT in 2006 and it contains
different nouns from Wordnet, a large database for words using semantic relations
such as synonyms, etc.
The dataset has over 1,700 citations according to Google Scholar.
72 Dublin-based researcher Abeba Birhane, and Lero, a SFI software research
center, discovered that the dataset contained a high amount of racist insults,
misogynistic slurs, and hate speech. These included references to the N-word, and
slurs such as “whores,” “rape suspect,” and “child molester,” among other
offensive terms. It also had content like non-consensual photos of nudity and
inappropriate images of children.

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

Fairness is the absence of any form of prejudice or favoritism towards an


individual or group of people based on their intrinsic or acquired traits in the
context of decision-making.

Fairness through Unawareness


Fairness-through-unawareness refers to leaving out of the model protected
attributes such as gender, races, ...
A model is considered fair if it provides similar predictions to similar individuals.

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

Conditional Statistical Parity

FAIRNESS IN RELATION DOMAINS

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

Autonomous Learning with Benign Intent


- Difficult Predictability of Behavior
- Risk of Unsafe Exploration
- Challenges in Reinforcement Learning
- Major Policy Questions

Human Controlled with Benign Intent


Supervised algorithms designed with good intentions for beneficial decision-
making processes.

Human Controlled with Malicious Intent


- Creation of deep fake videos for disinformation purposes
- Impersonation of public figures to spread false narratives or incite harm
- Targeted attacks using AI-driven tools for hacking or social engineering
AI Harms
- Discrimination, hate speech, and exclusion
- Information Hazards
- Misinformation Harms
- Malicious Uses
- Human-Computer Interaction Harms
- Environmental and Socioeconomic Harms

Mitigations and Technical Considerations


- Inclusive Training Data: Incorporate diverse and representative training data to
counteract stereotypes, reduce biases, and improve
fairness in AI models.
- Documentation and Transparency: Document specific groups in
training data, identify missing elements, and provide transparent documentation to
enhance explainability and regulatory compliance.
- Toxic Statement Filtering: Implement filters to remove harmful statements during
model training to ensure safer outputs.
- Distillation Techniques: Use targeted datasets and distillation methods to improve
model performance, reduce computational costs, and achieve specific tasks
effectively.
- Language Representation: Include better representation of different languages in
training datasets to enhance language model performance and suitability.
- Inclusive Product Design: Design AI products inclusively to prevent
unwanted outputs and promote diversity and neutrality.
- Efficiency and Environmental Considerations: Segment LLMs, use efficient
architectures, monitor impacts, and adopt sustainable practices to reduce
environmental harm.
- Responsible Deployment and Monitoring: Establish policies, labels, and
monitoring mechanisms to prevent misinformation, malicious intent, and ensure
factual outputs.
- Innovation and Algorithmic Tools: Explore innovative LM architectures and
utilize tools like differential privacy to prevent privacy leaks and improve model
accuracy.

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

HITL is described as "the process of combining both AI and human intelligence to


create machine learning models". In there:

Humans intervene in the training, testing, and calibration phases of AI models,


creating continuous feedback loops to improve results.
HITL provides a workflow and user interface so that humans, called “raters” or
“labelers,” can record, evaluate, and provide feedback on the output of AI models.
The output parts of the AI model are evaluated, tested, and validated by humans
when machine learning algorithms cannot produce the right decision or result.

There are several key risks and challenges when applying a human-in-the-loop
(HITL) approach:

Ethical and safety risks of AI:

AI is "dangerous" if not controlled properly.

Risk of data leak:

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).

Negative impact on the reviewer's mental health:

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.

Reviewer diversity challenges:

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.

HITL is also used in the medical domain to compare results from


human experts and ML models in conjunction with human experts.
=> The ML technologies achieved “superior diagnostic accuracy” than the human
experts alone.
EXPLAINABILITY

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

Identify the rules, procedures, and responsibilities involved in decision making


Ensure effective communication and accountability
Clearly define roles and responsibilities to delegate decision-making authority

Data

Data is crucial for AI modeling and machine learning


Data needs to be fully documented in terms of source and provenance
Use Data Cards to enhance data transparency
Monitoring Plans

Continuously monitor the performance of AI systems


Evaluate changes in the operating environment when expanding the system
Analyze when to stop using an AI system based on continuous evaluation

Performance Goals and Metrics

Clearly define the initial purpose of the AI system


Set up indicators to evaluate the effectiveness of the system

XAI Tools

Data Cards:

A data transparent documentation framework


Data Cards contain summaries of the data, including an introduction to the data set
and a description of the motivation and intent in creating the data set.
Model Cards:

Provides information that characterizes the model's performance


Describe the model's desired use cases to reduce the risk of misuse

SHAP (SHapley Additive exPlanations):

Interpret the model's predictions by assigning importance values to each input


feature

PAIR's Explorable Explainer Dashboard:

Provides a discovery-enabled dashboard for ML model analysis and prediction

LIME (Local Interpretable Model-agnostic Explanations):

Provide "local explanations" for each specific case of the classification model
Interpret ML:

Explain machine learning model predictions


PRIVACY

INTRODUCTION

Protect users' personal information


Ensure responsible AI development and deployment
Avoid data misuses

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

2. Why we need robustness ?


• Prevent unwanted model behavior that reduces user trust.
• Unusual performance may indicate a problem that needs to be addressed
immediately.

Techniques
• Sampling
• Bias Mitigation
• Data Balancing
• Data Augmentation
• Cross-validation
• Ensembles
• Transfer Learning
• Adversarial Traning
Challenges for Robustness:

Data quality: Poor data affects model performance.


Model degradation: Predictability decreases over time as the environment/data
distribution changes.
Characteristic stability: Characteristic changes can affect model stability.
Precision and Coverage: Balance between precision and coverage depending on
the use case.
Input noise: Models can be fooled by input bias, which is dangerous if exploited by
bad actors.
AI ETHICS

1. Ethical issues with Large Language Models (LLMs):

a) Racist language common in LLMs:

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.

b) Working with data contributors (crowdworkers):

It is necessary to protect privacy and pay fair wages to workers.


Limit your exposure to harmful content.
Transparency in data collection and labeling processes.

c) Inequality and job quality:

Job automation using LLMs can lead to unemployment, an increase in low-wage


jobs.
However, it also opens up opportunities to reduce risks and reduce repetition in
work.

d) Impact on the creative industry:


LLMs can support creative work but also threaten the profits of some industries.
Their impact needs to be studied further.

e) Gap in access to benefits of LLMs:

The benefits of LLMs are uneven across social groups and countries due to
economic and technological gaps.

2. Ethical issues with Generative Models:

a) Truth, accuracy and the "dream" phenomenon:

The model often gives false and fabricated information with high reliability.
Solution: Prompt-tuning, controlling, ensuring human values.

b) Copyright infringement issue:

Disputes over ownership of works created by AI.


The problem of using copyrighted source data to train the model.

3. For Computer Vision:


Fraud issues such as stealing unemployment benefits and fooling facial recognition
systems
Errors in medical diagnosis, affecting human health
Violate users' privacy and consent when collecting and using photo/video data
without consent.

You might also like