You are on page 1of 45

Welcome to ● If you brought a laptop, plug it in front of a computer.

Social Otherwise, login to a desktop


Impacts of ● Be ready to share your computer with at most 2 other
Artificial persons
Intelligence ● If you are on a laptop, connect to Khipu’s wifi
Practical ● Link to these slides:
http://tiny.cc/KhipuSocialImpactsAI

● Colab: http://tiny.cc/colabKhipuSocialImpactsAI
(run the cells in Step 0 of the colab)
Link to these slides: http://tiny.cc/KhipuSocialImpactsAI
Before
diving in ● You accepted Khipu's Code of Conduct.
● Feel free to take photos of the presentation and share
them.
○ Not everyone in the room may want to appear in
photos.
Who we
Prof. Luciana Benotti
are
Prof. Laura Alonso Alemany

Dr. Laura Ación

Dr. Mariela Dr. Sabrina Lic. Hernán Lucía Lic. Karen


Rajngewerc López (Nano) González Guido Palacio
Maina Ivetta
Duration: 3 minutes
Now you 0:
Tell us about you Use the shared doc for your row to add your
name and where are you visiting from

Rows 1-2: http://tiny.cc/Row12SharedDoc

Rows 3-4: http://tiny.cc/Row34SharedDoc


What we will be talking about

Generated at https://openai.com/dall-e-2/ on Feb 9th 2023, prompt "an oil painting by a Latin American
artist depicting Latin American social diversity and the impact of large language models."
EDIA - Estereotipos y
Discriminación en
Inteligencia Artificial

https://huggingface.co/spaces/vialibre/edia
Stereotypes and Bias
Stereotypes
Sylvester Stallone won an
produce Oscar, would you consider
discrimination hiring him?
Stereotypes
Sylvester Stallone won an
produce Oscar, would you consider
discrimination hiring him?

as a writer?
Stereotypes
in language
technologies
Stereotypes
in language
technologies
Stereotypes,
discrimination and bias is…
bias unfair behavior
Stereotypes,
discrimination and bias is…
bias non-homogeneous
distribution across social
groups
Assessing bias in
language
technologies

if a language technology is equitative, stereotypes


should have probability equal to non-stereotypes
Assessing bias in
language
technologies

if a language technology is equitative, stereotypes


should have probability equal to non-stereotypes

Mary is a nurse
John is a nurse
Assessing bias in
language
technologies

https://aclanthology.org/2020.emnlp-main.154/
Assessing bias in
language
technologies
Assessing bias in
language
technologies

these are minimal pairs:


they only vary on one dimension of meaning
Now you 1: Duration: 7 minutes
Represent stereotypes In your shared document, write your name and
using minimal pairs 2+ sentences in Spanish/your preferred language
that are minimal pairs representing a stereotype
that you’ve experienced or that interests you.
Then, form teams of 3 with 2 neighbors and
share.
Rows 1-2: http://tiny.cc/Row12SharedDoc

Rows 3-4: http://tiny.cc/Row34SharedDoc


Is my language model
discriminatory?
How do we
measure bias?

Measuring social biases is an open area of research.


How do we
measure bias?

- for masked language models


- assess the tendency of the language model to generate
stereotypes in a non-equitative way (with higher probability than
anti-stereotypes)
How do we
measure bias?

For each sentence that needs to be compared:

1. generate variants of the sentence, masking one word at a


time, except for the words representing the social group

Salazar et al. (2020) https://aclanthology.org/2020.acl-main.240/ http://tiny.cc/KhipuSocialImpactsAI


How do we
measure bias?

Nakita et al. (2020)

http://tiny.cc/KhipuSocialImpactsAI
https://aclanthology.org/2020.emnlp-main.154/
How do we
measure bias?
How do we
measure bias?

for each sentence that needs to be compared:

1. generate variants of the sentence, masking one word at a time,


except for the words representing the social group
2. obtain the probability of each variant
3. log-sum the probabilities of all variants (a negative number!)

Salazar et al. (2020) https://aclanthology.org/2020.acl-main.240/ http://tiny.cc/KhipuSocialImpactsAI


Let’s go to
the colab!

Now we will explain the structure of the colab which includes a summary of
the content we just explained. The colab is self contained.

Colab: http://tiny.cc/colabKhipuSocialImpactsAI

Salazar et al. (2020) https://aclanthology.org/2020.acl-main.240/ http://tiny.cc/KhipuSocialImpactsAI


Now you 2: Duration: 30 minutes
Measure inequitable With your team, assess the tendency of the
trends language model to generate pairs of sentences
representing stereotypes and anti-stereotypes.
Use the minimal pairs from the previous
exercise.
Now you 2: Duration: 30 minutes
Measure inequitable
trends With your teams, assess the tendency of the
language model to generate pairs of sentences
representing stereotypes and anti-stereotypes.
Use the minimal pairs from the previous
But first, 10-minute
exercise.
break away from all
screens
Duration: 30 minutes
Now you 2: Link to colab: http://tiny.cc/Ex2colabKhipuSIAI
Measure inequitable Use the last 10 mins to summarize in your shared doc your
results. Guiding questions:
trends ● Considering your sentences in the previous exercise, does
the model tend to reinforce the stereotype of interest?
● Do you find any counterintuitive behavior? If so, what do
you attribute it to?
● What effect do longer sentences have on the output
value?
● Is there an effect of relative word frequency on the output
value?
Rows 1-2: http://tiny.cc/Row12SharedDoc

Rows 3-4: http://tiny.cc/Row34SharedDoc


A word is worth a
thousand sentences
Word associations to
model stereotypes
Word associations to
model stereotypes
Word associations to
model stereotypes
Word associations to
model stereotypes

this is PCA projection of the embedding


Now you 3: Duration: 10 minutes
Word associations With your team, use colab to answer:
● Which words in Exercise 1 sentences represent
the stereotype of interest?
● How are they distributed in space?
● Does this distribution seem intuitive to you?
Summarize findings in your shared doc.
Link to colab: http://tiny.cc/Ex3colabKhipuSIAI
Rows 1-2: http://tiny.cc/Row12SharedDoc

Rows 3-4: http://tiny.cc/Row34SharedDoc


Systematizing word
associations
Now you (bonus): Create two kernels of meaning for your
Systematizing word stereotype, and plot the association of
words representing your social group of
associations interest with respect to those kernels.
Link to colab:
http://tiny.cc/Ex4colabKhipuSIAI
Closing remarks
Further readings
● Ada Lovelace Institute. (2022). Looking before we leap: Ethical review processes for
AI and data science research. Available at:
https://www.adalovelaceinstitute.org/report/looking-before-we-leap
● Wang, Kapoor, Barocas, Solon, Narayanan, Arvind. Against Predictive Optimization:
On the Legitimacy of Decision-Making Algorithms that Optimize Predictive Accuracy
(October 4, 2022). Available at SSRN: https://ssrn.com/abstract=4238015
● Alonso Alemany and Benotti. Etica Practica para Ciencia de Datos.
https://sites.google.com/view/etica-practica-cd/
More resources
Call to action:
Sign and share with
your peers!

http://tiny.cc/DeclaMVD
Now you 5:
How to give good feedback
How can we improve? 1. Be positive
2. Be specific
3. Suggest the next step

Duration: 5 minutes

Link to survey:
http://tiny.cc/SurveySIAI
Collective effort

Muchas gracias

You might also like