Avijit Ghosh commited on
Commit
2711cd6
1 Parent(s): a1801f4

added yaml

Browse files
BiasEvals.csv DELETED
@@ -1,45 +0,0 @@
1
- Modality,Suggested Evaluation,What it is evaluating,Considerations,Link,URL
2
- Text,Word Embedding Association Test (WEAT),Associations and word embeddings based on Implicit Associations Test (IAT),"Although based in human associations, general societal attitudes do not always represent subgroups of people and cultures.",Semantics derived automatically from language corpora contain human-like biases,https://researchportal.bath.ac.uk/en/publications/semantics-derived-automatically-from-language-corpora-necessarily
3
- Text,"Word Embedding Factual As
4
- sociation Test (WEFAT)",Associations and word embeddings based on Implicit Associations Test (IAT),"Although based in human associations, general societal attitudes do not always represent subgroups of people and cultures.",Semantics derived automatically from language corpora contain human-like biases,https://researchportal.bath.ac.uk/en/publications/semantics-derived-automatically-from-language-corpora-necessarily
5
- Text,Sentence Encoder Association Test (SEAT),Associations and word embeddings based on Implicit Associations Test (IAT),"Although based in human associations, general societal attitudes do not always represent subgroups of people and cultures.",[1903.10561] On Measuring Social Biases in Sentence Encoders,https://arxiv.org/abs/1903.10561
6
- Text,Contextual Word Representation Association Tests for social and intersectional biases,Associations and word embeddings based on Implicit Associations Test (IAT),"Although based in human associations, general societal attitudes do not always represent subgroups of people and cultures.",Assessing social and intersectional biases in contextualized word representations | Proceedings of the 33rd International Conference on Neural Information Processing Systems,https://dl.acm.org/doi/abs/10.5555/3454287.3455472
7
- Text,StereoSet,Protected class stereotypes,Automating stereotype detection makes distinguishing harmful stereotypes difficult. It also raises many false positives and can flag relatively neutral associations based in fact (e.g. population x has a high proportion of lactose intolerant people).,[2004.09456] StereoSet: Measuring stereotypical bias in pretrained language models,https://arxiv.org/abs/2004.09456
8
- Text,Crow-S Pairs,Protected class stereotypes,Automating stereotype detection makes distinguishing harmful stereotypes difficult. It also raises many false positives and can flag relatively neutral associations based in fact (e.g. population x has a high proportion of lactose intolerant people).,[2010.00133] CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Models,https://arxiv.org/abs/2010.00133
9
- Text,HONEST: Measuring Hurtful Sentence Completion in Language Models,Protected class stereotypes and hurtful language,Automating stereotype detection makes distinguishing harmful stereotypes difficult. It also raises many false positives and can flag relatively neutral associations based in fact (e.g. population x has a high proportion of lactose intolerant people).,HONEST: Measuring Hurtful Sentence Completion in Language Models,https://aclanthology.org/2021.naacl-main.191.pdf
10
- Text,TANGO: Towards Centering Transgender and Non-Binary Voices to Measure Biases in Open Language Generation,"Bias measurement for trans and nonbinary community via measuring gender non-affirmative language, specifically 1) misgendering 2), negative responses to gender disclosure","Based on automatic evaluations of the resulting open language generation, may be sensitive to the choice of evaluator. Would advice for a combination of perspective, detoxify, and regard metrics","Paper
11
- Dataset",
12
- Text,BBQ: A hand-built bias benchmark for question answering,Protected class stereotypes,,BBQ: A hand-built bias benchmark for question answering,https://aclanthology.org/2022.findings-acl.165.pdf
13
- Text,"BBNLI, bias in NLI benchmark",Protected class stereotypes,,On Measuring Social Biases in Prompt-Based Multi-Task Learning,https://aclanthology.org/2022.findings-naacl.42.pdf
14
- Text,WinoGender,Bias between gender and occupation,,Gender Bias in Coreference Resolution,https://arxiv.org/abs/1804.09301
15
- Text,WinoQueer,"Bias between gender, sexuality",,Winoqueer,https://arxiv.org/abs/2306.15087
16
- Text,Level of caricature,,,CoMPosT: Characterizing and Evaluating Caricature in LLM Simulations,https://arxiv.org/abs/2310.11501
17
- Text,SeeGULL: A Stereotype Benchmark with Broad Geo-Cultural Coverage Leveraging Generative Models,,,[2305.11840] SeeGULL: A Stereotype Benchmark with Broad Geo-Cultural Coverage Leveraging Generative Models,https://arxiv.org/abs/2305.11840
18
- Text,"Investigating Subtler Biases in LLMs:
19
- Ageism, Beauty, Institutional, and Nationality Bias in Generative Models",,,https://arxiv.org/abs/2309.08902,https://arxiv.org/abs/2309.08902
20
- Text,ROBBIE: Robust Bias Evaluation of Large Generative Language Models,,,[2311.18140] ROBBIE: Robust Bias Evaluation of Large Generative Language Models,https://arxiv.org/abs/2311.18140
21
- Image,Image Embedding Association Test (iEAT),Embedding associations,,"Image Representations Learned With Unsupervised Pre-Training Contain Human-like Biases | Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency",https://dl.acm.org/doi/abs/10.1145/3442188.3445932
22
- Image,Dataset leakage and model leakage,Gender and label bias,,[1811.08489] Balanced Datasets Are Not Enough: Estimating and Mitigating Gender Bias in Deep Image Representations,https://arxiv.org/abs/1811.08489
23
- Image,Grounded-WEAT,Joint vision and language embeddings,,Measuring Social Biases in Grounded Vision and Language Embeddings - ACL Anthology,https://aclanthology.org/2021.naacl-main.78/
24
- Image,Grounded-SEAT,,,,
25
- Image,CLIP-based evaluation,"Gender and race and class associations with four attribute categories (profession, political, object, and other.)",,DALL-Eval: Probing the Reasoning Skills and Social Biases of Text-to-Image Generative Transformers,https://arxiv.org/abs/2202.04053
26
- Image,Human evaluation,,,,
27
- Image,,,,[2108.02818] Evaluating CLIP: Towards Characterization of Broader Capabilities and Downstream Implications,https://arxiv.org/abs/2108.02818
28
- Image,,,,[2004.07173] Bias in Multimodal AI: Testbed for Fair Automatic Recruitment,https://arxiv.org/abs/2004.07173
29
- Image,Characterizing the variation in generated images,,,Stable bias: Analyzing societal representations in diffusion models,https://arxiv.org/abs/2303.11408
30
- Image,Stereotypical representation of professions,,,Editing Implicit Assumptions in Text-to-Image Diffusion Models see section 6,
31
- Image,Effect of different scripts on text-to-image generation,"It evaluates generated images for cultural stereotypes, when using different scripts (homoglyphs). It somewhat measures the suceptibility of a model to produce cultural stereotypes by simply switching the script",,Exploiting Cultural Biases via Homoglyphs in Text-to-Image Synthesis,https://arxiv.org/pdf/2209.08891.pdf
32
- Image,Automatic classification of the immorality of images,,,Ensuring Visual Commonsense Morality for Text-to-Image Generation,https://arxiv.org/pdf/2209.08891.pdf
33
- Image,"ENTIGEN: effect on the
34
- diversity of the generated images when adding
35
- ethical intervention",,,"How well can Text-to-Image Generative Models understand Ethical
36
- Natural Language Interventions?",
37
- Image,Evaluating text-to-image models for (complex) biases,,,Easily accessible text-to-image generation amplifies demographic stereotypes at large scale,https://dl.acm.org/doi/abs/10.1145/3593013.3594095
38
- Image,,,,FACET: Fairness in Computer Vision Evaluation Benchmark,https://openaccess.thecvf.com/content/ICCV2023/html/Gustafson_FACET_Fairness_in_Computer_Vision_Evaluation_Benchmark_ICCV_2023_paper.html
39
- Image,Evaluating text-to-image models for occupation-gender biases from source to output,"Measuring bias from source to output (dataset, model and outcome). Using different prompts to search dataset and to generate images. Evaluate them in turn for stereotypes.","Evaluating for social attributes that one self-identifies for, e.g. gender, is challenging in computer- generated images.",Fair Diffusion: Instructing Text-to-Image Generation Models on Fairness,https://arxiv.org/abs/2302.10893
40
- Image,Evaluating text-to-image models for gender biases in a multilingual setting,Using different prompts in different languages to generate images and evaluate them in turn for stereotypes.,,Multilingual Text-to-Image Generation Magnifies Gender Stereotypes and Prompt Engineering May Not Help You,
41
- Image,Evaluating text-to-image models for biases when multiple people are generated,This work focuses on generating images depicting multiple people. This puts the evaluation on a higher level beyond portrait evaluation.,Same as for the other evaluations of social attributes + evaluating for location in image is difficult as the models have no inherent spatial understanding.,The Male CEO and the Female Assistant: Probing Gender Biases in Text-To-Image Models Through Paired Stereotype Test,https://arxiv.org/abs/2402.11089
42
- Image,Multimodal Composite Association Score: Measuring Gender Bias in Generative Multimodal Models,Measure association between concepts in multi-modal settings (image and text),,,
43
- Image,VisoGender,"This work measures gender-occupation biases in image-to-text models by evaluating: (1) their ability to correctly resolve the pronouns of individuals in scenes, and (2) the perceived gender of individuals in images retrieved for gender-neutral search queries.",Relies on annotators’ perceptions of binary gender. Could better control for the fact that models generally struggle with captioning any scene that involves interactions between two or more individuals.,VisoGender: A dataset for benchmarking gender bias in image-text pronoun resolution,https://proceedings.neurips.cc/paper_files/paper/2023/hash/c93f26b1381b17693055a611a513f1e9-Abstract-Datasets_and_Benchmarks.html
44
- Audio,Not My Voice! A Taxonomy of Ethical and Safety Harms of Speech Generators,Lists harms of audio/speech generators,Not necessarily evaluation but a good source of taxonomy. We can use this to point readers towards high-level evaluations,https://arxiv.org/pdf/2402.01708.pdf,https://arxiv.org/pdf/2402.01708.pdf
45
- Video,Diverse Misinformation: Impacts of Human Biases on Detection of Deepfakes on Networks,Human led evaluations of deepfakes to understand susceptibility and representational harms (including political violence),"Repr. harm, incite violence",https://arxiv.org/abs/2210.10026,https://arxiv.org/abs/2210.10026
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DemoData.csv ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Group,Modality,Type,Metaname,Suggested Evaluation,What it is evaluating,Considerations,Link,URL,Screenshots,Applicable Models ,Datasets,Hashtags,Abstract,Authors
2
+ BiasEvals,Text,Model,weat,Word Embedding Association Test (WEAT),Associations and word embeddings based on Implicit Associations Test (IAT),"Although based in human associations, general societal attitudes do not always represent subgroups of people and cultures.",Semantics derived automatically from language corpora contain human-like biases,https://researchportal.bath.ac.uk/en/publications/semantics-derived-automatically-from-language-corpora-necessarily,"['Images/WEAT1.png', 'Images/WEAT2.png']",,,"['Bias', 'Word Association', 'Embeddings', 'NLP']","Artificial intelligence and machine learning are in a period of astounding growth. However, there are concerns that these
3
+ technologies may be used, either with or without intention, to perpetuate the prejudice and unfairness that unfortunately
4
+ characterizes many human institutions. Here we show for the first time that human-like semantic biases result from the
5
+ application of standard machine learning to ordinary language—the same sort of language humans are exposed to every
6
+ day. We replicate a spectrum of standard human biases as exposed by the Implicit Association Test and other well-known
7
+ psychological studies. We replicate these using a widely used, purely statistical machine-learning model—namely, the GloVe
8
+ word embedding—trained on a corpus of text from the Web. Our results indicate that language itself contains recoverable and
9
+ accurate imprints of our historic biases, whether these are morally neutral as towards insects or flowers, problematic as towards
10
+ race or gender, or even simply veridical, reflecting the status quo for the distribution of gender with respect to careers or first
11
+ names. These regularities are captured by machine learning along with the rest of semantics. In addition to our empirical
12
+ findings concerning language, we also contribute new methods for evaluating bias in text, the Word Embedding Association
13
+ Test (WEAT) and the Word Embedding Factual Association Test (WEFAT). Our results have implications not only for AI and
14
+ machine learning, but also for the fields of psychology, sociology, and human ethics, since they raise the possibility that mere
15
+ exposure to everyday language can account for the biases we replicate here.","Aylin Caliskan, Joanna J. Bryson, and Arvind Narayanan"
16
+ BiasEvals,Text,Dataset,stereoset,StereoSet,Protected class stereotypes,Automating stereotype detection makes distinguishing harmful stereotypes difficult. It also raises many false positives and can flag relatively neutral associations based in fact (e.g. population x has a high proportion of lactose intolerant people).,StereoSet: Measuring stereotypical bias in pretrained language models,https://arxiv.org/abs/2004.09456,,,,,,
17
+ BiasEvals,Text,Dataset,crowspairs,Crow-S Pairs,Protected class stereotypes,Automating stereotype detection makes distinguishing harmful stereotypes difficult. It also raises many false positives and can flag relatively neutral associations based in fact (e.g. population x has a high proportion of lactose intolerant people).,CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Models,https://arxiv.org/abs/2010.00133,,,,,,
18
+ BiasEvals,Text,Output,honest,HONEST: Measuring Hurtful Sentence Completion in Language Models,Protected class stereotypes and hurtful language,Automating stereotype detection makes distinguishing harmful stereotypes difficult. It also raises many false positives and can flag relatively neutral associations based in fact (e.g. population x has a high proportion of lactose intolerant people).,HONEST: Measuring Hurtful Sentence Completion in Language Models,https://aclanthology.org/2021.naacl-main.191.pdf,,,,,,
19
+ BiasEvals,Image,Model,ieat,Image Embedding Association Test (iEAT),Embedding associations,"Although based in human associations, general societal attitudes do not always represent subgroups of people and cultures.","Image Representations Learned With Unsupervised Pre-Training Contain Human-like Biases | Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency",https://dl.acm.org/doi/abs/10.1145/3442188.3445932,,,,,,
20
+ BiasEvals,Image,Dataset,imagedataleak,Dataset leakage and model leakage,Gender and label bias,,Balanced Datasets Are Not Enough: Estimating and Mitigating Gender Bias in Deep Image Representations,https://arxiv.org/abs/1811.08489,,,,,,
21
+ BiasEvals,Image,Output,stablebias,Characterizing the variation in generated images,,,Stable bias: Analyzing societal representations in diffusion models,https://arxiv.org/abs/2303.11408,,,,,,
22
+ BiasEvals,Image,Output,homoglyphbias,Effect of different scripts on text-to-image generation,"It evaluates generated images for cultural stereotypes, when using different scripts (homoglyphs). It somewhat measures the suceptibility of a model to produce cultural stereotypes by simply switching the script",,Exploiting Cultural Biases via Homoglyphs in Text-to-Image Synthesis,https://arxiv.org/pdf/2209.08891.pdf,,,,,,
23
+ BiasEvals,Audio,Taxonomy,notmyvoice,Not My Voice! A Taxonomy of Ethical and Safety Harms of Speech Generators,Lists harms of audio/speech generators,Not necessarily evaluation but a good source of taxonomy. We can use this to point readers towards high-level evaluations,Not My Voice! A Taxonomy of Ethical and Safety Harms of Speech Generators,https://arxiv.org/pdf/2402.01708.pdf,,,,,,
24
+ BiasEvals,Video,Output,videodiversemisinfo,Diverse Misinformation: Impacts of Human Biases on Detection of Deepfakes on Networks,Human led evaluations of deepfakes to understand susceptibility and representational harms (including political violence),"Repr. harm, incite violence","Diverse Misinformation: Impacts of Human Biases on Detection of Deepfakes on Networks
25
+ ",https://arxiv.org/abs/2210.10026,,,,,,
26
+ Privacy,,,,,,,,,,,,,,
app.py CHANGED
@@ -2,36 +2,80 @@ import gradio as gr
2
  from css import custom_css
3
  import pandas as pd
4
  from gradio_modal import Modal
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
 
 
 
6
 
 
 
7
 
8
  # create a gradio page with tabs and accordions
9
 
10
  # Path: taxonomy.py
11
 
12
- metadatadict = {}
13
-
14
- def loadtable(path):
15
- rawdf = pd.read_csv(path)
16
- for i, row in rawdf.iterrows():
17
- metadatadict['<u>'+str(row['Link'])+'</u>'] = '['+str(row['Link'])+']('+str(row['URL'])+')'
18
- #rawdf['Link'] = '['+rawdf['Link']+']('+rawdf['URL']+')'
19
- rawdf['Link'] = '<u>'+rawdf['Link']+'</u>'
20
- rawdf = rawdf.drop(columns=['URL'])
21
- return rawdf
22
 
23
- def filter_bias_table(fulltable, modality_filter):
24
- filteredtable = fulltable[fulltable['Modality'].isin(modality_filter)]
25
  return filteredtable
26
 
27
  def showmodal(evt: gr.SelectData):
28
  print(evt.value, evt.index, evt.target)
29
  modal = Modal(visible=False)
30
- md = gr.Markdown("")
31
- if evt.index[1] == 4:
 
 
 
 
32
  modal = Modal(visible=True)
33
- md = gr.Markdown('# '+metadatadict[evt.value])
34
- return [modal,md]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  with gr.Blocks(title = "Social Impact Measurement V2", css=custom_css) as demo: #theme=gr.themes.Soft(),
37
  # create tabs for the app, moving the current table to one titled "rewardbench" and the benchmark_text to a tab called "About"
@@ -51,7 +95,9 @@ The following categories are high-level, non-exhaustive, and present a synthesis
51
  """)
52
  with gr.Tabs(elem_classes="tab-buttons") as tabs1:
53
  with gr.TabItem("Bias/Stereotypes"):
54
- fulltable = loadtable('BiasEvals.csv')
 
 
55
  gr.Markdown("""
56
  Generative AI systems can perpetuate harmful biases from various sources, including systemic, human, and statistical biases. These biases, also known as "fairness" considerations, can manifest in the final system due to choices made throughout the development process. They include harmful associations and stereotypes related to protected classes, such as race, gender, and sexuality. Evaluating biases involves assessing correlations, co-occurrences, sentiment, and toxicity across different modalities, both within the model itself and in the outputs of downstream tasks.
57
  """)
@@ -62,36 +108,25 @@ The following categories are high-level, non-exhaustive, and present a synthesis
62
  show_label=True,
63
  # info="Which modality to show."
64
  )
 
 
 
 
 
 
65
  with gr.Row():
66
- biastable_full = gr.DataFrame(value=fulltable, wrap=True, datatype="markdown", visible=False)
67
- biastable_filtered = gr.DataFrame(value=fulltable, wrap=True, datatype="markdown", visible=True)
68
- modality_filter.change(filter_bias_table, inputs=[biastable_full, modality_filter], outputs=biastable_filtered)
 
 
69
  with Modal(visible=False) as modal:
70
- md = gr.Markdown("Test 1")
71
- gr.Markdown('### Aylin Caliskan, Joanna J. Bryson, and Arvind Narayanan')
72
- tags = ['Bias', 'Word Association', 'Embedding', 'NLP']
73
- tagmd = ''
74
- for tag in tags:
75
- tagmd += '<span class="tag">#'+tag+'</span> '
76
- gr.Markdown(tagmd)
77
- gr.Markdown('''
78
- Artificial intelligence and machine learning are in a period of astounding growth. However, there are concerns that these
79
- technologies may be used, either with or without intention, to perpetuate the prejudice and unfairness that unfortunately
80
- characterizes many human institutions. Here we show for the first time that human-like semantic biases result from the
81
- application of standard machine learning to ordinary language—the same sort of language humans are exposed to every
82
- day. We replicate a spectrum of standard human biases as exposed by the Implicit Association Test and other well-known
83
- psychological studies. We replicate these using a widely used, purely statistical machine-learning model—namely, the GloVe
84
- word embedding—trained on a corpus of text from the Web. Our results indicate that language itself contains recoverable and
85
- accurate imprints of our historic biases, whether these are morally neutral as towards insects or flowers, problematic as towards
86
- race or gender, or even simply veridical, reflecting the status quo for the distribution of gender with respect to careers or first
87
- names. These regularities are captured by machine learning along with the rest of semantics. In addition to our empirical
88
- findings concerning language, we also contribute new methods for evaluating bias in text, the Word Embedding Association
89
- Test (WEAT) and the Word Embedding Factual Association Test (WEFAT). Our results have implications not only for AI and
90
- machine learning, but also for the fields of psychology, sociology, and human ethics, since they raise the possibility that mere
91
- exposure to everyday language can account for the biases we replicate here.
92
- ''')
93
- gr.Gallery(['Images/WEAT1.png', 'Images/WEAT2.png'])
94
- biastable_filtered.select(showmodal, None, [modal,md])
95
 
96
 
97
 
 
2
  from css import custom_css
3
  import pandas as pd
4
  from gradio_modal import Modal
5
+ import os
6
+ import yaml
7
+
8
+
9
+ folder_path = 'configs'
10
+ # List to store data from YAML files
11
+ data_list = []
12
+ metadata_dict = {}
13
+
14
+ # Iterate over each file in the folder
15
+ for filename in os.listdir(folder_path):
16
+ if filename.endswith('.yaml'):
17
+ # Read YAML file
18
+ file_path = os.path.join(folder_path, filename)
19
+ with open(file_path, 'r') as yamlfile:
20
+ yaml_data = yaml.safe_load(yamlfile)
21
+ # Append YAML data to list
22
+ data_list.append(yaml_data)
23
+ metadata_dict['<u>'+yaml_data['Link']+'</u>'] = yaml_data
24
+
25
+ globaldf = pd.DataFrame(data_list)
26
+ globaldf['Link'] = '<u>'+globaldf['Link']+'</u>'
27
+
28
+ # Define the desired order of categories
29
+ modality_order = ["Text", "Image", "Audio", "Video"]
30
+ type_order = ["Model", "Dataset", "Output", "Taxonomy"]
31
 
32
+ # Convert Modality and Type columns to categorical with specified order
33
+ globaldf['Modality'] = pd.Categorical(globaldf['Modality'], categories=modality_order, ordered=True)
34
+ globaldf['Type'] = pd.Categorical(globaldf['Type'], categories=type_order, ordered=True)
35
 
36
+ # Sort DataFrame by Modality and Type
37
+ globaldf.sort_values(by=['Modality', 'Type'], inplace=True)
38
 
39
  # create a gradio page with tabs and accordions
40
 
41
  # Path: taxonomy.py
42
 
43
+ def filter_modality(filteredtable, modality_filter):
44
+ filteredtable = filteredtable[filteredtable['Modality'].isin(modality_filter)]
45
+ return filteredtable
 
 
 
 
 
 
 
46
 
47
+ def filter_type(filteredtable, modality_filter):
48
+ filteredtable = filteredtable[filteredtable['Type'].isin(modality_filter)]
49
  return filteredtable
50
 
51
  def showmodal(evt: gr.SelectData):
52
  print(evt.value, evt.index, evt.target)
53
  modal = Modal(visible=False)
54
+ titlemd = gr.Markdown("")
55
+ authormd = gr.Markdown("")
56
+ tagsmd = gr.Markdown("")
57
+ abstractmd = gr.Markdown("")
58
+ gallery = gr.Gallery([])
59
+ if evt.index[1] == 5:
60
  modal = Modal(visible=True)
61
+ itemdic = metadata_dict[evt.value]
62
+
63
+ tags = itemdic['Hashtags']
64
+ if pd.notnull(tags) and len(tags)>0:
65
+ tagstr = ''
66
+ for tag in tags:
67
+ tagstr += '<span class="tag">#'+tag+'</span> '
68
+ tagsmd = gr.Markdown(tagstr, visible=True)
69
+
70
+ titlemd = gr.Markdown('# ['+itemdic['Link']+']('+itemdic['URL']+')',visible=True)
71
+
72
+ if pd.notnull(itemdic['Authors']):
73
+ authormd = gr.Markdown('## '+itemdic['Authors'],visible=True)
74
+ if pd.notnull(itemdic['Abstract']):
75
+ abstractmd = gr.Markdown(itemdic['Abstract'],visible=True)
76
+ if pd.notnull(itemdic['Screenshots']) and len(itemdic['Screenshots'])>0:
77
+ gallery = gr.Gallery(itemdic['Screenshots'],visible=True)
78
+ return [modal, titlemd, authormd, tagsmd, abstractmd, gallery]
79
 
80
  with gr.Blocks(title = "Social Impact Measurement V2", css=custom_css) as demo: #theme=gr.themes.Soft(),
81
  # create tabs for the app, moving the current table to one titled "rewardbench" and the benchmark_text to a tab called "About"
 
95
  """)
96
  with gr.Tabs(elem_classes="tab-buttons") as tabs1:
97
  with gr.TabItem("Bias/Stereotypes"):
98
+ fulltable = globaldf[globaldf['Group'] == 'BiasEvals']
99
+ fulltable = fulltable[['Modality','Type', 'Suggested Evaluation', 'What it is evaluating', 'Considerations', 'Link']]
100
+
101
  gr.Markdown("""
102
  Generative AI systems can perpetuate harmful biases from various sources, including systemic, human, and statistical biases. These biases, also known as "fairness" considerations, can manifest in the final system due to choices made throughout the development process. They include harmful associations and stereotypes related to protected classes, such as race, gender, and sexuality. Evaluating biases involves assessing correlations, co-occurrences, sentiment, and toxicity across different modalities, both within the model itself and in the outputs of downstream tasks.
103
  """)
 
108
  show_label=True,
109
  # info="Which modality to show."
110
  )
111
+ type_filter = gr.CheckboxGroup(["Model", "Dataset", "Output", "Taxonomy"],
112
+ value=["Model", "Dataset", "Output", "Taxonomy"],
113
+ label="Type",
114
+ show_label=True,
115
+ # info="Which modality to show."
116
+ )
117
  with gr.Row():
118
+ biastable_full = gr.DataFrame(value=fulltable, wrap=True, datatype="markdown", visible=False, interactive=False)
119
+ biastable_filtered = gr.DataFrame(value=fulltable, wrap=True, datatype="markdown", visible=True, interactive=False)
120
+ modality_filter.change(filter_modality, inputs=[biastable_filtered, modality_filter], outputs=biastable_filtered)
121
+ type_filter.change(filter_type, inputs=[biastable_filtered, type_filter], outputs=biastable_filtered)
122
+
123
  with Modal(visible=False) as modal:
124
+ titlemd = gr.Markdown(visible=False)
125
+ authormd = gr.Markdown(visible=False)
126
+ tagsmd = gr.Markdown(visible=False)
127
+ abstractmd = gr.Markdown(visible=False)
128
+ gallery = gr.Gallery(visible=False)
129
+ biastable_filtered.select(showmodal, None, [modal, titlemd, authormd, tagsmd, abstractmd, gallery])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
 
131
 
132
 
configs/crowspairs.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Abstract: .nan
2
+ 'Applicable Models ': .nan
3
+ Authors: .nan
4
+ Considerations: Automating stereotype detection makes distinguishing harmful stereotypes
5
+ difficult. It also raises many false positives and can flag relatively neutral associations
6
+ based in fact (e.g. population x has a high proportion of lactose intolerant people).
7
+ Datasets: .nan
8
+ Group: BiasEvals
9
+ Hashtags: .nan
10
+ Link: 'CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language
11
+ Models'
12
+ Modality: Text
13
+ Screenshots: []
14
+ Suggested Evaluation: Crow-S Pairs
15
+ Type: Dataset
16
+ URL: https://arxiv.org/abs/2010.00133
17
+ What it is evaluating: Protected class stereotypes
configs/homoglyphbias.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Abstract: .nan
2
+ 'Applicable Models ': .nan
3
+ Authors: .nan
4
+ Considerations: .nan
5
+ Datasets: .nan
6
+ Group: BiasEvals
7
+ Hashtags: .nan
8
+ Link: Exploiting Cultural Biases via Homoglyphs in Text-to-Image Synthesis
9
+ Modality: Image
10
+ Screenshots: []
11
+ Suggested Evaluation: Effect of different scripts on text-to-image generation
12
+ Type: Output
13
+ URL: https://arxiv.org/pdf/2209.08891.pdf
14
+ What it is evaluating: It evaluates generated images for cultural stereotypes, when
15
+ using different scripts (homoglyphs). It somewhat measures the suceptibility of
16
+ a model to produce cultural stereotypes by simply switching the script
configs/honest.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Abstract: .nan
2
+ 'Applicable Models ': .nan
3
+ Authors: .nan
4
+ Considerations: Automating stereotype detection makes distinguishing harmful stereotypes
5
+ difficult. It also raises many false positives and can flag relatively neutral associations
6
+ based in fact (e.g. population x has a high proportion of lactose intolerant people).
7
+ Datasets: .nan
8
+ Group: BiasEvals
9
+ Hashtags: .nan
10
+ Link: 'HONEST: Measuring Hurtful Sentence Completion in Language Models'
11
+ Modality: Text
12
+ Screenshots: []
13
+ Suggested Evaluation: 'HONEST: Measuring Hurtful Sentence Completion in Language Models'
14
+ Type: Output
15
+ URL: https://aclanthology.org/2021.naacl-main.191.pdf
16
+ What it is evaluating: Protected class stereotypes and hurtful language
configs/ieat.yaml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Abstract: .nan
2
+ 'Applicable Models ': .nan
3
+ Authors: .nan
4
+ Considerations: Although based in human associations, general societal attitudes do
5
+ not always represent subgroups of people and cultures.
6
+ Datasets: .nan
7
+ Group: BiasEvals
8
+ Hashtags: .nan
9
+ Link: Image Representations Learned With Unsupervised Pre-Training Contain Human-like
10
+ Biases | Proceedings of the 2021 ACM Conference on Fairness, Accountability, and
11
+ Transparency
12
+ Modality: Image
13
+ Screenshots: []
14
+ Suggested Evaluation: Image Embedding Association Test (iEAT)
15
+ Type: Model
16
+ URL: https://dl.acm.org/doi/abs/10.1145/3442188.3445932
17
+ What it is evaluating: Embedding associations
configs/imagedataleak.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Abstract: .nan
2
+ 'Applicable Models ': .nan
3
+ Authors: .nan
4
+ Considerations: .nan
5
+ Datasets: .nan
6
+ Group: BiasEvals
7
+ Hashtags: .nan
8
+ Link: 'Balanced Datasets Are Not Enough: Estimating and Mitigating Gender Bias in
9
+ Deep Image Representations'
10
+ Modality: Image
11
+ Screenshots: []
12
+ Suggested Evaluation: Dataset leakage and model leakage
13
+ Type: Dataset
14
+ URL: https://arxiv.org/abs/1811.08489
15
+ What it is evaluating: Gender and label bias
configs/notmyvoice.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Abstract: .nan
2
+ 'Applicable Models ': .nan
3
+ Authors: .nan
4
+ Considerations: Not necessarily evaluation but a good source of taxonomy. We can use
5
+ this to point readers towards high-level evaluations
6
+ Datasets: .nan
7
+ Group: BiasEvals
8
+ Hashtags: .nan
9
+ Link: Not My Voice! A Taxonomy of Ethical and Safety Harms of Speech Generators
10
+ Modality: Audio
11
+ Screenshots: []
12
+ Suggested Evaluation: Not My Voice! A Taxonomy of Ethical and Safety Harms of Speech
13
+ Generators
14
+ Type: Taxonomy
15
+ URL: https://arxiv.org/pdf/2402.01708.pdf
16
+ What it is evaluating: Lists harms of audio/speech generators
configs/stablebias.yaml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Abstract: .nan
2
+ 'Applicable Models ': .nan
3
+ Authors: .nan
4
+ Considerations: .nan
5
+ Datasets: .nan
6
+ Group: BiasEvals
7
+ Hashtags: .nan
8
+ Link: 'Stable bias: Analyzing societal representations in diffusion models'
9
+ Modality: Image
10
+ Screenshots: []
11
+ Suggested Evaluation: Characterizing the variation in generated images
12
+ Type: Output
13
+ URL: https://arxiv.org/abs/2303.11408
14
+ What it is evaluating: .nan
configs/stereoset.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Abstract: .nan
2
+ 'Applicable Models ': .nan
3
+ Authors: .nan
4
+ Considerations: Automating stereotype detection makes distinguishing harmful stereotypes
5
+ difficult. It also raises many false positives and can flag relatively neutral associations
6
+ based in fact (e.g. population x has a high proportion of lactose intolerant people).
7
+ Datasets: .nan
8
+ Group: BiasEvals
9
+ Hashtags: .nan
10
+ Link: 'StereoSet: Measuring stereotypical bias in pretrained language models'
11
+ Modality: Text
12
+ Screenshots: []
13
+ Suggested Evaluation: StereoSet
14
+ Type: Dataset
15
+ URL: https://arxiv.org/abs/2004.09456
16
+ What it is evaluating: Protected class stereotypes
configs/videodiversemisinfo.yaml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Abstract: .nan
2
+ 'Applicable Models ': .nan
3
+ Authors: .nan
4
+ Considerations: Repr. harm, incite violence
5
+ Datasets: .nan
6
+ Group: BiasEvals
7
+ Hashtags: .nan
8
+ Link: 'Diverse Misinformation: Impacts of Human Biases on Detection of Deepfakes on
9
+ Networks
10
+
11
+ '
12
+ Modality: Video
13
+ Screenshots: []
14
+ Suggested Evaluation: 'Diverse Misinformation: Impacts of Human Biases on Detection
15
+ of Deepfakes on Networks'
16
+ Type: Output
17
+ URL: https://arxiv.org/abs/2210.10026
18
+ What it is evaluating: Human led evaluations of deepfakes to understand susceptibility
19
+ and representational harms (including political violence)
configs/weat.yaml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Abstract: "Artificial intelligence and machine learning are in a period of astounding\
2
+ \ growth. However, there are concerns that these\ntechnologies may be used, either\
3
+ \ with or without intention, to perpetuate the prejudice and unfairness that unfortunately\n\
4
+ characterizes many human institutions. Here we show for the first time that human-like\
5
+ \ semantic biases result from the\napplication of standard machine learning to ordinary\
6
+ \ language\u2014the same sort of language humans are exposed to every\nday. We replicate\
7
+ \ a spectrum of standard human biases as exposed by the Implicit Association Test\
8
+ \ and other well-known\npsychological studies. We replicate these using a widely\
9
+ \ used, purely statistical machine-learning model\u2014namely, the GloVe\nword embedding\u2014\
10
+ trained on a corpus of text from the Web. Our results indicate that language itself\
11
+ \ contains recoverable and\naccurate imprints of our historic biases, whether these\
12
+ \ are morally neutral as towards insects or flowers, problematic as towards\nrace\
13
+ \ or gender, or even simply veridical, reflecting the status quo for the distribution\
14
+ \ of gender with respect to careers or first\nnames. These regularities are captured\
15
+ \ by machine learning along with the rest of semantics. In addition to our empirical\n\
16
+ findings concerning language, we also contribute new methods for evaluating bias\
17
+ \ in text, the Word Embedding Association\nTest (WEAT) and the Word Embedding Factual\
18
+ \ Association Test (WEFAT). Our results have implications not only for AI and\n\
19
+ machine learning, but also for the fields of psychology, sociology, and human ethics,\
20
+ \ since they raise the possibility that mere\nexposure to everyday language can\
21
+ \ account for the biases we replicate here."
22
+ 'Applicable Models ': .nan
23
+ Authors: Aylin Caliskan, Joanna J. Bryson, and Arvind Narayanan
24
+ Considerations: Although based in human associations, general societal attitudes do
25
+ not always represent subgroups of people and cultures.
26
+ Datasets: .nan
27
+ Group: BiasEvals
28
+ Hashtags:
29
+ - Bias
30
+ - Word Association
31
+ - Embeddings
32
+ - NLP
33
+ Link: Semantics derived automatically from language corpora contain human-like biases
34
+ Modality: Text
35
+ Screenshots:
36
+ - Images/WEAT1.png
37
+ - Images/WEAT2.png
38
+ Suggested Evaluation: Word Embedding Association Test (WEAT)
39
+ Type: Model
40
+ URL: https://researchportal.bath.ac.uk/en/publications/semantics-derived-automatically-from-language-corpora-necessarily
41
+ What it is evaluating: Associations and word embeddings based on Implicit Associations
42
+ Test (IAT)
temp.ipynb ADDED
@@ -0,0 +1,568 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 20,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "import pandas as pd"
10
+ ]
11
+ },
12
+ {
13
+ "cell_type": "code",
14
+ "execution_count": 21,
15
+ "metadata": {},
16
+ "outputs": [],
17
+ "source": [
18
+ "df = pd.read_csv('DemoData.csv')"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "code",
23
+ "execution_count": 22,
24
+ "metadata": {},
25
+ "outputs": [],
26
+ "source": [
27
+ "import pandas as pd\n",
28
+ "import yaml\n",
29
+ "import os\n",
30
+ "import ast\n",
31
+ "\n",
32
+ "# Create a folder to store YAML files if it doesn't exist\n",
33
+ "if not os.path.exists('configs'):\n",
34
+ " os.makedirs('configs')\n",
35
+ "\n",
36
+ "# Iterate over each row in the DataFrame\n",
37
+ "for index, row in df.iterrows():\n",
38
+ " # Extract Metaname and use it as the filename for YAML\n",
39
+ " filename = str(row['Metaname']) + '.yaml'\n",
40
+ " # Convert 'Screenshots' column to a Python list\n",
41
+ " screenshots_list = None\n",
42
+ " try:\n",
43
+ "\n",
44
+ " screenshots_list = ast.literal_eval(row['Screenshots'])\n",
45
+ " except:\n",
46
+ " screenshots_list = []\n",
47
+ " # Remove the 'Metaname' and 'Screenshots' columns from the data to be converted to YAML\n",
48
+ " row_data = row.drop(['Metaname', 'Screenshots'])\n",
49
+ " # Convert the remaining data to a dictionary\n",
50
+ " data_dict = row_data.to_dict()\n",
51
+ " # Add the 'Screenshots' list to the dictionary\n",
52
+ " data_dict['Screenshots'] = screenshots_list\n",
53
+ " # Write the data as YAML to a new file\n",
54
+ " with open(os.path.join('configs', filename), 'w') as yamlfile:\n",
55
+ " yaml.dump(data_dict, yamlfile, default_flow_style=False)"
56
+ ]
57
+ },
58
+ {
59
+ "cell_type": "code",
60
+ "execution_count": 5,
61
+ "metadata": {},
62
+ "outputs": [
63
+ {
64
+ "data": {
65
+ "text/html": [
66
+ "<div>\n",
67
+ "<style scoped>\n",
68
+ " .dataframe tbody tr th:only-of-type {\n",
69
+ " vertical-align: middle;\n",
70
+ " }\n",
71
+ "\n",
72
+ " .dataframe tbody tr th {\n",
73
+ " vertical-align: top;\n",
74
+ " }\n",
75
+ "\n",
76
+ " .dataframe thead th {\n",
77
+ " text-align: right;\n",
78
+ " }\n",
79
+ "</style>\n",
80
+ "<table border=\"1\" class=\"dataframe\">\n",
81
+ " <thead>\n",
82
+ " <tr style=\"text-align: right;\">\n",
83
+ " <th></th>\n",
84
+ " <th>Group</th>\n",
85
+ " <th>Modality</th>\n",
86
+ " <th>Level</th>\n",
87
+ " <th>Metaname</th>\n",
88
+ " <th>Suggested Evaluation</th>\n",
89
+ " <th>What it is evaluating</th>\n",
90
+ " <th>Considerations</th>\n",
91
+ " <th>Link</th>\n",
92
+ " <th>URL</th>\n",
93
+ " <th>Screenshots</th>\n",
94
+ " <th>Applicable Models</th>\n",
95
+ " <th>Datasets</th>\n",
96
+ " <th>Hashtags</th>\n",
97
+ " </tr>\n",
98
+ " </thead>\n",
99
+ " <tbody>\n",
100
+ " <tr>\n",
101
+ " <th>0</th>\n",
102
+ " <td>BiasEvals</td>\n",
103
+ " <td>Text</td>\n",
104
+ " <td>Model</td>\n",
105
+ " <td>weat</td>\n",
106
+ " <td>Word Embedding Association Test (WEAT)</td>\n",
107
+ " <td>Associations and word embeddings based on Impl...</td>\n",
108
+ " <td>Although based in human associations, general ...</td>\n",
109
+ " <td>Semantics derived automatically from language ...</td>\n",
110
+ " <td>https://researchportal.bath.ac.uk/en/publicati...</td>\n",
111
+ " <td>['Images/WEAT1.png', 'Images/WEAT2.png']</td>\n",
112
+ " <td>NaN</td>\n",
113
+ " <td>NaN</td>\n",
114
+ " <td>NaN</td>\n",
115
+ " </tr>\n",
116
+ " <tr>\n",
117
+ " <th>1</th>\n",
118
+ " <td>BiasEvals</td>\n",
119
+ " <td>Text</td>\n",
120
+ " <td>Model</td>\n",
121
+ " <td>wefat</td>\n",
122
+ " <td>Word Embedding Factual As\\nsociation Test (WEFAT)</td>\n",
123
+ " <td>Associations and word embeddings based on Impl...</td>\n",
124
+ " <td>Although based in human associations, general ...</td>\n",
125
+ " <td>Semantics derived automatically from language ...</td>\n",
126
+ " <td>https://researchportal.bath.ac.uk/en/publicati...</td>\n",
127
+ " <td>NaN</td>\n",
128
+ " <td>NaN</td>\n",
129
+ " <td>NaN</td>\n",
130
+ " <td>NaN</td>\n",
131
+ " </tr>\n",
132
+ " <tr>\n",
133
+ " <th>2</th>\n",
134
+ " <td>BiasEvals</td>\n",
135
+ " <td>Text</td>\n",
136
+ " <td>Dataset</td>\n",
137
+ " <td>stereoset</td>\n",
138
+ " <td>StereoSet</td>\n",
139
+ " <td>Protected class stereotypes</td>\n",
140
+ " <td>Automating stereotype detection makes distingu...</td>\n",
141
+ " <td>StereoSet: Measuring stereotypical bias in pre...</td>\n",
142
+ " <td>https://arxiv.org/abs/2004.09456</td>\n",
143
+ " <td>NaN</td>\n",
144
+ " <td>NaN</td>\n",
145
+ " <td>NaN</td>\n",
146
+ " <td>NaN</td>\n",
147
+ " </tr>\n",
148
+ " <tr>\n",
149
+ " <th>3</th>\n",
150
+ " <td>BiasEvals</td>\n",
151
+ " <td>Text</td>\n",
152
+ " <td>Dataset</td>\n",
153
+ " <td>crwospairs</td>\n",
154
+ " <td>Crow-S Pairs</td>\n",
155
+ " <td>Protected class stereotypes</td>\n",
156
+ " <td>Automating stereotype detection makes distingu...</td>\n",
157
+ " <td>CrowS-Pairs: A Challenge Dataset for Measuring...</td>\n",
158
+ " <td>https://arxiv.org/abs/2010.00133</td>\n",
159
+ " <td>NaN</td>\n",
160
+ " <td>NaN</td>\n",
161
+ " <td>NaN</td>\n",
162
+ " <td>NaN</td>\n",
163
+ " </tr>\n",
164
+ " <tr>\n",
165
+ " <th>4</th>\n",
166
+ " <td>BiasEvals</td>\n",
167
+ " <td>Text</td>\n",
168
+ " <td>Output</td>\n",
169
+ " <td>honest</td>\n",
170
+ " <td>HONEST: Measuring Hurtful Sentence Completion ...</td>\n",
171
+ " <td>Protected class stereotypes and hurtful language</td>\n",
172
+ " <td>Automating stereotype detection makes distingu...</td>\n",
173
+ " <td>HONEST: Measuring Hurtful Sentence Completion ...</td>\n",
174
+ " <td>https://aclanthology.org/2021.naacl-main.191.pdf</td>\n",
175
+ " <td>NaN</td>\n",
176
+ " <td>NaN</td>\n",
177
+ " <td>NaN</td>\n",
178
+ " <td>NaN</td>\n",
179
+ " </tr>\n",
180
+ " <tr>\n",
181
+ " <th>5</th>\n",
182
+ " <td>BiasEvals</td>\n",
183
+ " <td>Image</td>\n",
184
+ " <td>Model</td>\n",
185
+ " <td>ieat</td>\n",
186
+ " <td>Image Embedding Association Test (iEAT)</td>\n",
187
+ " <td>Embedding associations</td>\n",
188
+ " <td>Although based in human associations, general ...</td>\n",
189
+ " <td>Image Representations Learned With Unsupervise...</td>\n",
190
+ " <td>https://dl.acm.org/doi/abs/10.1145/3442188.344...</td>\n",
191
+ " <td>NaN</td>\n",
192
+ " <td>NaN</td>\n",
193
+ " <td>NaN</td>\n",
194
+ " <td>NaN</td>\n",
195
+ " </tr>\n",
196
+ " <tr>\n",
197
+ " <th>6</th>\n",
198
+ " <td>BiasEvals</td>\n",
199
+ " <td>Image</td>\n",
200
+ " <td>Dataset</td>\n",
201
+ " <td>imagedataleak</td>\n",
202
+ " <td>Dataset leakage and model leakage</td>\n",
203
+ " <td>Gender and label bias</td>\n",
204
+ " <td>NaN</td>\n",
205
+ " <td>Balanced Datasets Are Not Enough: Estimating a...</td>\n",
206
+ " <td>https://arxiv.org/abs/1811.08489</td>\n",
207
+ " <td>NaN</td>\n",
208
+ " <td>NaN</td>\n",
209
+ " <td>NaN</td>\n",
210
+ " <td>NaN</td>\n",
211
+ " </tr>\n",
212
+ " <tr>\n",
213
+ " <th>7</th>\n",
214
+ " <td>BiasEvals</td>\n",
215
+ " <td>Image</td>\n",
216
+ " <td>Output</td>\n",
217
+ " <td>stablebias</td>\n",
218
+ " <td>Characterizing the variation in generated images</td>\n",
219
+ " <td>NaN</td>\n",
220
+ " <td>NaN</td>\n",
221
+ " <td>Stable bias: Analyzing societal representation...</td>\n",
222
+ " <td>https://arxiv.org/abs/2303.11408</td>\n",
223
+ " <td>NaN</td>\n",
224
+ " <td>NaN</td>\n",
225
+ " <td>NaN</td>\n",
226
+ " <td>NaN</td>\n",
227
+ " </tr>\n",
228
+ " <tr>\n",
229
+ " <th>8</th>\n",
230
+ " <td>BiasEvals</td>\n",
231
+ " <td>Image</td>\n",
232
+ " <td>Output</td>\n",
233
+ " <td>homoglyphbias</td>\n",
234
+ " <td>Effect of different scripts on text-to-image g...</td>\n",
235
+ " <td>It evaluates generated images for cultural ste...</td>\n",
236
+ " <td>NaN</td>\n",
237
+ " <td>Exploiting Cultural Biases via Homoglyphs in T...</td>\n",
238
+ " <td>https://arxiv.org/pdf/2209.08891.pdf</td>\n",
239
+ " <td>NaN</td>\n",
240
+ " <td>NaN</td>\n",
241
+ " <td>NaN</td>\n",
242
+ " <td>NaN</td>\n",
243
+ " </tr>\n",
244
+ " <tr>\n",
245
+ " <th>9</th>\n",
246
+ " <td>BiasEvals</td>\n",
247
+ " <td>Audio</td>\n",
248
+ " <td>Taxonomy (?)</td>\n",
249
+ " <td>notmyvoice</td>\n",
250
+ " <td>Not My Voice! A Taxonomy of Ethical and Safety...</td>\n",
251
+ " <td>Lists harms of audio/speech generators</td>\n",
252
+ " <td>Not necessarily evaluation but a good source o...</td>\n",
253
+ " <td>Not My Voice! A Taxonomy of Ethical and Safety...</td>\n",
254
+ " <td>https://arxiv.org/pdf/2402.01708.pdf</td>\n",
255
+ " <td>NaN</td>\n",
256
+ " <td>NaN</td>\n",
257
+ " <td>NaN</td>\n",
258
+ " <td>NaN</td>\n",
259
+ " </tr>\n",
260
+ " <tr>\n",
261
+ " <th>10</th>\n",
262
+ " <td>BiasEvals</td>\n",
263
+ " <td>Video</td>\n",
264
+ " <td>Output</td>\n",
265
+ " <td>videodiversemisinfo</td>\n",
266
+ " <td>Diverse Misinformation: Impacts of Human Biase...</td>\n",
267
+ " <td>Human led evaluations of deepfakes to understa...</td>\n",
268
+ " <td>Repr. harm, incite violence</td>\n",
269
+ " <td>Diverse Misinformation: Impacts of Human Biase...</td>\n",
270
+ " <td>https://arxiv.org/abs/2210.10026</td>\n",
271
+ " <td>NaN</td>\n",
272
+ " <td>NaN</td>\n",
273
+ " <td>NaN</td>\n",
274
+ " <td>NaN</td>\n",
275
+ " </tr>\n",
276
+ " <tr>\n",
277
+ " <th>11</th>\n",
278
+ " <td>Privacy</td>\n",
279
+ " <td>NaN</td>\n",
280
+ " <td>NaN</td>\n",
281
+ " <td>NaN</td>\n",
282
+ " <td>NaN</td>\n",
283
+ " <td>NaN</td>\n",
284
+ " <td>NaN</td>\n",
285
+ " <td>NaN</td>\n",
286
+ " <td>NaN</td>\n",
287
+ " <td>NaN</td>\n",
288
+ " <td>NaN</td>\n",
289
+ " <td>NaN</td>\n",
290
+ " <td>NaN</td>\n",
291
+ " </tr>\n",
292
+ " </tbody>\n",
293
+ "</table>\n",
294
+ "</div>"
295
+ ],
296
+ "text/plain": [
297
+ " Group Modality Level Metaname \\\n",
298
+ "0 BiasEvals Text Model weat \n",
299
+ "1 BiasEvals Text Model wefat \n",
300
+ "2 BiasEvals Text Dataset stereoset \n",
301
+ "3 BiasEvals Text Dataset crwospairs \n",
302
+ "4 BiasEvals Text Output honest \n",
303
+ "5 BiasEvals Image Model ieat \n",
304
+ "6 BiasEvals Image Dataset imagedataleak \n",
305
+ "7 BiasEvals Image Output stablebias \n",
306
+ "8 BiasEvals Image Output homoglyphbias \n",
307
+ "9 BiasEvals Audio Taxonomy (?) notmyvoice \n",
308
+ "10 BiasEvals Video Output videodiversemisinfo \n",
309
+ "11 Privacy NaN NaN NaN \n",
310
+ "\n",
311
+ " Suggested Evaluation \\\n",
312
+ "0 Word Embedding Association Test (WEAT) \n",
313
+ "1 Word Embedding Factual As\\nsociation Test (WEFAT) \n",
314
+ "2 StereoSet \n",
315
+ "3 Crow-S Pairs \n",
316
+ "4 HONEST: Measuring Hurtful Sentence Completion ... \n",
317
+ "5 Image Embedding Association Test (iEAT) \n",
318
+ "6 Dataset leakage and model leakage \n",
319
+ "7 Characterizing the variation in generated images \n",
320
+ "8 Effect of different scripts on text-to-image g... \n",
321
+ "9 Not My Voice! A Taxonomy of Ethical and Safety... \n",
322
+ "10 Diverse Misinformation: Impacts of Human Biase... \n",
323
+ "11 NaN \n",
324
+ "\n",
325
+ " What it is evaluating \\\n",
326
+ "0 Associations and word embeddings based on Impl... \n",
327
+ "1 Associations and word embeddings based on Impl... \n",
328
+ "2 Protected class stereotypes \n",
329
+ "3 Protected class stereotypes \n",
330
+ "4 Protected class stereotypes and hurtful language \n",
331
+ "5 Embedding associations \n",
332
+ "6 Gender and label bias \n",
333
+ "7 NaN \n",
334
+ "8 It evaluates generated images for cultural ste... \n",
335
+ "9 Lists harms of audio/speech generators \n",
336
+ "10 Human led evaluations of deepfakes to understa... \n",
337
+ "11 NaN \n",
338
+ "\n",
339
+ " Considerations \\\n",
340
+ "0 Although based in human associations, general ... \n",
341
+ "1 Although based in human associations, general ... \n",
342
+ "2 Automating stereotype detection makes distingu... \n",
343
+ "3 Automating stereotype detection makes distingu... \n",
344
+ "4 Automating stereotype detection makes distingu... \n",
345
+ "5 Although based in human associations, general ... \n",
346
+ "6 NaN \n",
347
+ "7 NaN \n",
348
+ "8 NaN \n",
349
+ "9 Not necessarily evaluation but a good source o... \n",
350
+ "10 Repr. harm, incite violence \n",
351
+ "11 NaN \n",
352
+ "\n",
353
+ " Link \\\n",
354
+ "0 Semantics derived automatically from language ... \n",
355
+ "1 Semantics derived automatically from language ... \n",
356
+ "2 StereoSet: Measuring stereotypical bias in pre... \n",
357
+ "3 CrowS-Pairs: A Challenge Dataset for Measuring... \n",
358
+ "4 HONEST: Measuring Hurtful Sentence Completion ... \n",
359
+ "5 Image Representations Learned With Unsupervise... \n",
360
+ "6 Balanced Datasets Are Not Enough: Estimating a... \n",
361
+ "7 Stable bias: Analyzing societal representation... \n",
362
+ "8 Exploiting Cultural Biases via Homoglyphs in T... \n",
363
+ "9 Not My Voice! A Taxonomy of Ethical and Safety... \n",
364
+ "10 Diverse Misinformation: Impacts of Human Biase... \n",
365
+ "11 NaN \n",
366
+ "\n",
367
+ " URL \\\n",
368
+ "0 https://researchportal.bath.ac.uk/en/publicati... \n",
369
+ "1 https://researchportal.bath.ac.uk/en/publicati... \n",
370
+ "2 https://arxiv.org/abs/2004.09456 \n",
371
+ "3 https://arxiv.org/abs/2010.00133 \n",
372
+ "4 https://aclanthology.org/2021.naacl-main.191.pdf \n",
373
+ "5 https://dl.acm.org/doi/abs/10.1145/3442188.344... \n",
374
+ "6 https://arxiv.org/abs/1811.08489 \n",
375
+ "7 https://arxiv.org/abs/2303.11408 \n",
376
+ "8 https://arxiv.org/pdf/2209.08891.pdf \n",
377
+ "9 https://arxiv.org/pdf/2402.01708.pdf \n",
378
+ "10 https://arxiv.org/abs/2210.10026 \n",
379
+ "11 NaN \n",
380
+ "\n",
381
+ " Screenshots Applicable Models Datasets \\\n",
382
+ "0 ['Images/WEAT1.png', 'Images/WEAT2.png'] NaN NaN \n",
383
+ "1 NaN NaN NaN \n",
384
+ "2 NaN NaN NaN \n",
385
+ "3 NaN NaN NaN \n",
386
+ "4 NaN NaN NaN \n",
387
+ "5 NaN NaN NaN \n",
388
+ "6 NaN NaN NaN \n",
389
+ "7 NaN NaN NaN \n",
390
+ "8 NaN NaN NaN \n",
391
+ "9 NaN NaN NaN \n",
392
+ "10 NaN NaN NaN \n",
393
+ "11 NaN NaN NaN \n",
394
+ "\n",
395
+ " Hashtags \n",
396
+ "0 NaN \n",
397
+ "1 NaN \n",
398
+ "2 NaN \n",
399
+ "3 NaN \n",
400
+ "4 NaN \n",
401
+ "5 NaN \n",
402
+ "6 NaN \n",
403
+ "7 NaN \n",
404
+ "8 NaN \n",
405
+ "9 NaN \n",
406
+ "10 NaN \n",
407
+ "11 NaN "
408
+ ]
409
+ },
410
+ "execution_count": 5,
411
+ "metadata": {},
412
+ "output_type": "execute_result"
413
+ }
414
+ ],
415
+ "source": [
416
+ "df"
417
+ ]
418
+ },
419
+ {
420
+ "cell_type": "code",
421
+ "execution_count": 9,
422
+ "metadata": {},
423
+ "outputs": [],
424
+ "source": [
425
+ "import urllib.request\n",
426
+ "from bs4 import BeautifulSoup\n",
427
+ "\n",
428
+ "from pypdf import PdfReader \n",
429
+ "from urllib.request import urlretrieve\n",
430
+ "\n",
431
+ "import pdfplumber\n",
432
+ "\n"
433
+ ]
434
+ },
435
+ {
436
+ "cell_type": "code",
437
+ "execution_count": 12,
438
+ "metadata": {},
439
+ "outputs": [
440
+ {
441
+ "name": "stdout",
442
+ "output_type": "stream",
443
+ "text": [
444
+ "https://researchportal.bath.ac.uk/en/publications/semantics-derived-automatically-from-language-corpora-necessarily\n",
445
+ "\n",
446
+ " Semantics derived automatically from language corpora contain human-like biases\n",
447
+ " — the University of Bath's research portal\n",
448
+ "https://researchportal.bath.ac.uk/en/publications/semantics-derived-automatically-from-language-corpora-necessarily\n",
449
+ "\n",
450
+ " Semantics derived automatically from language corpora contain human-like biases\n",
451
+ " — the University of Bath's research portal\n",
452
+ "https://arxiv.org/abs/1903.10561\n",
453
+ "[1903.10561] On Measuring Social Biases in Sentence Encoders\n",
454
+ "https://dl.acm.org/doi/abs/10.5555/3454287.3455472\n",
455
+ "Error\n",
456
+ "https://arxiv.org/abs/2004.09456\n",
457
+ "[2004.09456] StereoSet: Measuring stereotypical bias in pretrained language models\n",
458
+ "https://arxiv.org/abs/2010.00133\n",
459
+ "[2010.00133] CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Models\n",
460
+ "https://aclanthology.org/2021.naacl-main.191.pdf\n"
461
+ ]
462
+ },
463
+ {
464
+ "name": "stderr",
465
+ "output_type": "stream",
466
+ "text": [
467
+ "Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.\n"
468
+ ]
469
+ },
470
+ {
471
+ "name": "stdout",
472
+ "output_type": "stream",
473
+ "text": [
474
+ "HONEST: Measuring Hurtful Sentence Completion in Language Models\n",
475
+ "nan\n",
476
+ "Error\n",
477
+ "https://aclanthology.org/2022.findings-acl.165.pdf\n"
478
+ ]
479
+ },
480
+ {
481
+ "name": "stderr",
482
+ "output_type": "stream",
483
+ "text": [
484
+ "Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.\n"
485
+ ]
486
+ },
487
+ {
488
+ "name": "stdout",
489
+ "output_type": "stream",
490
+ "text": [
491
+ "BBQ: A Hand-Built Bias Benchmark for Question Answering \n",
492
+ "https://aclanthology.org/2022.findings-naacl.42.pdf\n"
493
+ ]
494
+ },
495
+ {
496
+ "name": "stderr",
497
+ "output_type": "stream",
498
+ "text": [
499
+ "Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.\n"
500
+ ]
501
+ },
502
+ {
503
+ "name": "stdout",
504
+ "output_type": "stream",
505
+ "text": [
506
+ "On Measuring Social Biases in Prompt-Based Multi-Task Learning\n"
507
+ ]
508
+ }
509
+ ],
510
+ "source": [
511
+ "def get_page_title(url):\n",
512
+ " soup = BeautifulSoup(urllib.request.urlopen(url))\n",
513
+ " return soup.title.string\n",
514
+ "\n",
515
+ "\n",
516
+ "def extract_pdf_title(url):\n",
517
+ " urlretrieve(url, 'temp.pdf')\n",
518
+ " with pdfplumber.open('temp.pdf') as pdf:\n",
519
+ " for page in pdf.pages:\n",
520
+ " for line in page.extract_text().split('\\n'):\n",
521
+ " return line\n",
522
+ " return \"\"\n",
523
+ "\n",
524
+ " \n",
525
+ " \n",
526
+ "for url in df['URL'][:10]:\n",
527
+ " try:\n",
528
+ " print(url)\n",
529
+ " title = get_page_title(url)\n",
530
+ " print(title)\n",
531
+ " except:\n",
532
+ " try:\n",
533
+ " title = extract_pdf_title(url)\n",
534
+ " print(title)\n",
535
+ " except:\n",
536
+ " print(\"Error\")"
537
+ ]
538
+ },
539
+ {
540
+ "cell_type": "code",
541
+ "execution_count": null,
542
+ "metadata": {},
543
+ "outputs": [],
544
+ "source": []
545
+ }
546
+ ],
547
+ "metadata": {
548
+ "kernelspec": {
549
+ "display_name": "gradio",
550
+ "language": "python",
551
+ "name": "python3"
552
+ },
553
+ "language_info": {
554
+ "codemirror_mode": {
555
+ "name": "ipython",
556
+ "version": 3
557
+ },
558
+ "file_extension": ".py",
559
+ "mimetype": "text/x-python",
560
+ "name": "python",
561
+ "nbconvert_exporter": "python",
562
+ "pygments_lexer": "ipython3",
563
+ "version": "3.12.2"
564
+ }
565
+ },
566
+ "nbformat": 4,
567
+ "nbformat_minor": 2
568
+ }