Spaces:
Runtime error
Runtime error
yjernite
commited on
Commit
•
c174a7f
1
Parent(s):
f450e5b
done with section 1
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ _ID_CLUSTER_SCREEN_SHOTS = {
|
|
7 |
2: ("cluster_2_of_24_latinx_woman.JPG", "Cluster 2 of 24"),
|
8 |
18: ("cluster_18_of_24_hispanic_nonbinary.JPG", "Cluster 18 of 24"),
|
9 |
0: ("cluster_0_of_24_black_woman.JPG", "Cluster 0 of 24"),
|
|
|
10 |
6: ("cluster_6_of_24_black_man.JPG", "Cluster 6 of 24"),
|
11 |
7: ("cluster_7_of_24_pacific_indigenous_man_nonbinary.JPG", "Cluster 7 of 24"),
|
12 |
3: (
|
@@ -151,7 +152,8 @@ with gr.Blocks() as demo:
|
|
151 |
This tells us that images that are similar to the ones in this cluster will **likely look like** Hispanic women to viewers.
|
152 |
You can cycle through [a few other examples right](https://hf.co/spaces/society-ethics/DiffusionFaceClustering "or even better, visualize them in the app"),
|
153 |
such as cluster 19 which mostly features the words *Caucasian* and *man*, different gender term distributions for *African American* in 0 and 6,
|
154 |
-
as well as clusters like 7 that showcase the limitations of mapping visual features to ethnicity
|
|
|
155 |
"""
|
156 |
)
|
157 |
with gr.Column(scale=1):
|
@@ -167,7 +169,7 @@ with gr.Blocks() as demo:
|
|
167 |
with gr.Row():
|
168 |
with gr.Column(scale=1):
|
169 |
id_cl_id_2 = gr.Dropdown(
|
170 |
-
choices=[3, 8, 23, 12, 13
|
171 |
value=3,
|
172 |
show_label=False,
|
173 |
)
|
@@ -181,17 +183,23 @@ with gr.Blocks() as demo:
|
|
181 |
gr.Markdown(
|
182 |
"""
|
183 |
#### [Stereotypical Representations and Associations](https://hf.co/spaces/society-ethics/DiffusionFaceClustering "Select cluster to visualize to the left or go straight to the interactive demo")
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
"""
|
196 |
)
|
197 |
with gr.Row():
|
@@ -199,14 +207,22 @@ with gr.Blocks() as demo:
|
|
199 |
gr.Markdown(
|
200 |
"""
|
201 |
#### [Specification, Markedness, and Bias](https://hf.co/spaces/society-ethics/DiffusionFaceClustering "Select cluster to visualize to the right or go straight to the interactive demo")
|
202 |
-
|
203 |
-
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
"""
|
206 |
)
|
207 |
with gr.Column(scale=1):
|
208 |
id_cl_id_3 = gr.Dropdown(
|
209 |
-
choices=[19, 0, 6, 15],
|
210 |
value=6,
|
211 |
show_label=False,
|
212 |
)
|
|
|
7 |
2: ("cluster_2_of_24_latinx_woman.JPG", "Cluster 2 of 24"),
|
8 |
18: ("cluster_18_of_24_hispanic_nonbinary.JPG", "Cluster 18 of 24"),
|
9 |
0: ("cluster_0_of_24_black_woman.JPG", "Cluster 0 of 24"),
|
10 |
+
5: ("cluster_5_of_24_white_unmarked_latinx_man.JPG", "Cluster 5 of 24"),
|
11 |
6: ("cluster_6_of_24_black_man.JPG", "Cluster 6 of 24"),
|
12 |
7: ("cluster_7_of_24_pacific_indigenous_man_nonbinary.JPG", "Cluster 7 of 24"),
|
13 |
3: (
|
|
|
152 |
This tells us that images that are similar to the ones in this cluster will **likely look like** Hispanic women to viewers.
|
153 |
You can cycle through [a few other examples right](https://hf.co/spaces/society-ethics/DiffusionFaceClustering "or even better, visualize them in the app"),
|
154 |
such as cluster 19 which mostly features the words *Caucasian* and *man*, different gender term distributions for *African American* in 0 and 6,
|
155 |
+
as well as clusters like 7 that showcase the limitations of mapping visual features to ethnicity categories
|
156 |
+
by grouping together *Pacific Islander*, *Indigenous American*, and *Latino*.
|
157 |
"""
|
158 |
)
|
159 |
with gr.Column(scale=1):
|
|
|
169 |
with gr.Row():
|
170 |
with gr.Column(scale=1):
|
171 |
id_cl_id_2 = gr.Dropdown(
|
172 |
+
choices=[3, 8, 23, 12, 13],
|
173 |
value=3,
|
174 |
show_label=False,
|
175 |
)
|
|
|
183 |
gr.Markdown(
|
184 |
"""
|
185 |
#### [Stereotypical Representations and Associations](https://hf.co/spaces/society-ethics/DiffusionFaceClustering "Select cluster to visualize to the left or go straight to the interactive demo")
|
186 |
+
|
187 |
+
Even before we start leveraging these clusters to analyze system behaviors in other settings,
|
188 |
+
they already provide useful insights about some of the bias dynamics in the system.
|
189 |
+
In particular, they help us understand which groups are more susceptible to representation harms when using these systems,
|
190 |
+
especially when the models are more likely to associate them with **stereotypical representations**.
|
191 |
+
|
192 |
+
Let's look at **clusters 3, 8, and 23** in the 24-cluster setting, as they all primarily feature images whose prompt contains a Native American identity term.
|
193 |
+
Cluster 3 is made up entirely of images of individuals wearing large traditional headdresses.
|
194 |
+
It is also the 4th largest cluster across all generations - which suggests that this one feature has a disproportionate importance in representations of these groups.
|
195 |
+
This behavior further brings to light well known representation issues in the models' training data.
|
196 |
+
It also showcases the necessity of modeling the diversity of how people map visual features to inferred social characteristics,
|
197 |
+
as the images in 8 and 23 are more likely to bear some similarity to depictions of people in contemporary professional settings.
|
198 |
+
|
199 |
+
With a different focus, **clusters 12, and 13** help us explore stereotypical representations of non-binary identities.
|
200 |
+
While both are made up of over 80% images for which the prompt mentions the word *non-binary*,
|
201 |
+
the similarities in cluster 12 are particularly flagrant upon visual inspection; with all depictions featuring similar glasses and similar haircuts -
|
202 |
+
neither of which should be a strong indicator of gender.
|
203 |
"""
|
204 |
)
|
205 |
with gr.Row():
|
|
|
207 |
gr.Markdown(
|
208 |
"""
|
209 |
#### [Specification, Markedness, and Bias](https://hf.co/spaces/society-ethics/DiffusionFaceClustering "Select cluster to visualize to the right or go straight to the interactive demo")
|
210 |
+
|
211 |
+
The last phenomenon we study through the lens of our clustering is that of **markedness**,
|
212 |
+
or *default behavior* of the models when neither gender nor ethnicity is specified.
|
213 |
+
This corresponds to asking the question: "If I **don't** explicitly tell my model to generate a person of specific genders or ethnicities,
|
214 |
+
will I still see diverse outcomes?"
|
215 |
+
|
216 |
+
Unsurprisingly, we find that not to be the case.
|
217 |
+
The clusters with the most examples of both prompts with unspecified gender and ethnicity terms are **clusters 5 and 19**,
|
218 |
+
and both are also strongly associated with the words *man*, *White*, and *Causian*.
|
219 |
+
This association holds across genders (as showcased by **cluster 15**, which has a majority of *woman* and *White* prompts)
|
220 |
+
and ethnicities (comparing the proportions of unspecified genders in **clusters 0 and 6**)
|
221 |
"""
|
222 |
)
|
223 |
with gr.Column(scale=1):
|
224 |
id_cl_id_3 = gr.Dropdown(
|
225 |
+
choices=[5, 19, 0, 6, 15],
|
226 |
value=6,
|
227 |
show_label=False,
|
228 |
)
|