StereoSet: Measuring stereotypical bias in pretrained language models(2021)

Minhan Cho·2022년 11월 1일

Summary of Paper

0. Abstract

  • what is stereotype: over-generaized belief(biases), hurting target groups
  • it is important to quantify bias captured in models, but existing quantifying tasks is done on small set of artificially constructed bias-assessing sentences
  • StereoSet: large scale natural dataset in English, on four domains: ge3nder, profession, race, religion
  • evaluated stereotype on BERT, GPT2, RoBERTa, XLNet

1. Introduction

  • current success of nn models: pretrained representations(word2vec etc.) & pretrained models(ELMo, BERT, GPT etc.)
  • pretrained representations/models are commendable, concern about fairness of them: massive text corpora for pretraining, danger of stereotypical biases in real world & reflected on those representations/models
    - 실제로, GPT2는 afro-american에 대해 stereotypical sentence를 생성하는 것으로 나타나기도 함
    - word representations(word2vec, GloVe)에서 word analogies/association test 등을 통해 male name이 female name보다 career term에 더 연관되고, african-american name이 european-american name보다 unpleasant term과 더 associate됨을 보인 바 있음
  • word representation의 biasness를 따지는 것에는 context가 주어져야 하는데, 이에는 몇 가지 drawback 있음
    - context is artificial, 해당 단어의 natural usage를 reflect하지 않음
    - stereotypical attribute terms to be predefined
    - focus on single word & ignore multiword terms(e.g. construction worker)
  • proposing methods to evaluate bias of pretrained language models:
    - sentence level(intasentence), discourse level(intersentence) -> term(e.g. tennis player) is provided with a natural context -> 3 possible associative contexts
    - with associative contexts, 해당 model이 얼마나 biased 되어있는지 판단할 수 있음
  • StereoSet is crowdsourced, 4 domains, 321 target terms, 16,995 test instances(associative contexts가 3배수임을 감안)

2. Task Formulation

  • ideal LM은 model ability(performance)도 좋고, bias도 적어야 함
  • model이 stereotype을 atni-stereotype보다 더 consistently 선호한다면 model exhibits stereotypical bias라고 말할 수 있음
  • CAT(Context Association Test) measures model ability as well as biasednass of a model
  • CAT provides 3 candidates: stereotypical, anti-stereotypical, unrelated association, 앞의 둘은 stereotypical association을, 뒤의 unrelated association은 model ability를 측정함
  • 2 types of association tests: intrasentence(sentence-level) CAT, intersentence(discourse-level) CAT

2.1 Intrasentence

  • measures sentence-level bias & language modeling ability
  • fill-in-the-blank style context sentence describing target term, set of three attributes

2.2 Intersentence

  • measures discourse-level bias & language modeling ability
  • 1st sentence contains target group, 2nd sentence contains attribute of target group

3.1 Bias in word embeddings

  • word embedding의 biasedness를 테스트하는 2가지 큰 방안은 word analogy test & word association test.
  • word analogy test: 문법적(syntactic) 또는 의미론적(semantic) 관계가 있는 2개 단어를 주고, 제시된 한 단어에 대해 비슷한 관계에 있는 단어를 찾는 것
  • 2016, 2019년 연구로 word representation에 undesired biases가 있음을 찾아냄
  • word embedding association test(WEAT, 2017): 두 가지의 배타적인 집단에 대해 마찬가지로 두 가지 배타적인 attribute를 설정하고 두 가지 집단에 대해 어떤 attribute가 등장하는지 bias를 quantify함
  • word embedding에 대해 bias를 quantify한 첫 large scale study임

3.2 Bias in pretrained language models(TBU)

  • 2019년에는 WEAT를 sentence encoder로 확장하고, Sentence Encoder Association Test(SEAT)로 명명하였음: target term과 attribute에 대해 generic context form(This is "target term")

4. Dataset Creation

  • 4 domains: gender, profession, race, religion
  • each domain마다 social group representing term을 선택하였음
  • target term context, associative context는 AMTurk 사용, 미국인으로 제한

4.1 Target terms

  • Wikidata relation triplets(<subject, relation, object>)를 이용해 target domain의 target term 설정
  • relation P106(profession), P172(race), P140(religion)이 등장한 target term만 추출
  • infrequent or too fine-grained(assistant producer -> producer) 단어는 filter out
  • target terms는 multiple words를 포함함

4.2 CATs collection

  • intrasentence CAT: crowdworker들은 target term에 대해 3 attribute terms 작성하고, target term에 대한 context sentence(fill-in-the-blank type)를 작성
  • intersentence CAT: target term에 대한 sentence 작성, 3 associative sentences 작성
  • stereotypical, anti-stereotypical associations 중 realistic한 것들만 제공 요구

4.3 CATs validation

  • 작성된 associations를 5명이 판단하여 stereotype/anti-stereotype/unrelated association으로 분류, 3명 이상의 classifier가 일치된 의견을 보일 때에만 통과: 83%가 남겨짐

5. Dataset Analysis

  • 사람들이 항상 stereotype을 negative nuance와 연결짓는 것은 아님: e.g. Asians are good at math
    - fine-tuned BERT로 sentiment analysis 진행(appendix A.5)
    다만, anti-stereotype의 수치와 비교하면, negative 비율이 더 높은 것은 사실
  • keywords of StereoSet(relatively more frequently appeared words than in real-world distribution)을 분류하고, keyword에서 target term은 제거(연구진으로부터 annotator에게 보내진 것이므로): multiple annotators are using similar attribute terms
  • gender/race의 target term은 'beatufiul, feminine, amsculine'과 같은 physical attributes,
    professional term은 'pushy, greedy, hardwork' 등 behavioural attribute,
    religious term은 'diety, forgiving, reborn' 등 belief attributes와 연결됨

6. Experimental Setup

6.1 Development and test sets

  • target term에 기반해 StereoSet을 분리: 25%는 development set, 75%는 hidden test set(공개되지 않음)
  • model을 fine tune하는 게 아니라 biasedness를 측정하는 게 목적이므로 training set은 존재하지 않음

6.2 Evaluation Metrics

  • LM으로서의 performance, bias를 모두 측정

Language Modeling Score (lms)

  • target term context가 주어졌을 때 2가지 선택지(meaningful == stereotype/anti-stereotype, meaningless == unrelated option) 중 하나를 고르는 것
  • target term의 lms는 model이 meaningful option을 meaningless option에 비해 더 많이 선택한 percentage로 측정함
  • dataset의 overall lms는 terms의 lms를 평균낸 것
  • lms 만점은 100

Stereotype Score (ss)

  • ss는 anti-stereotypical association을 stereotypical association에 비해 더 선호하는 percentage
  • 나머지는 위와 같음
  • ideal ss는 50: stereotype을 anti-stereotype와 똑같이 선호

Idealized CAT Score (icat)

  • ss와 lms를 idealized CAT (icat) score로 통합하고 다음과 같은 성질을 가짐:
  1. ideal model은 icat score가 100: e.g. lms가 100, ss가 50이면 icat은 100
  2. fully biased model은 icat score가 0: e.g. ss가 100(always prefer stereotype or anti-stereotype) 또는 0(always prefer anti-stereotype over stereotype)이면 icat score는 0
  3. random model은 icat score가 50: e.g. lmsrk 50, ss가 50이면 icat은 50
  • icat score는 다음과 같음: icat=lmsmin(ss,100ss)50icat = lms * \frac{min(ss,100-ss)}{50}
    maximum은 model이 stereotype, anti-stereotype 둘 다 선호하지 않을 경우, minimum은 한 쪽을 다른 한 쪽보다 선호할 경우
  • icat의 해석: language modeling 능력이 뛰어나면서 unbiased manner를 가지는 정도

6.3 Baselines

IdealLM

  • lms: 100, ss: 50, icat: 100

StereotypedLM

  • 항상 anti-stereotype 대신 stereotype 선택
  • lms: 상관없음, ss: 10, icat: 0

RandomLM

  • ranomly picks association
  • lms: 50, ss: 50, icat: 50

SentimentLM

  • model이 most negative sentiment만 선택

7. Main Experiment

  • BERT, RoBERTa, XLNet, GPT2를 Stereoset에 실험

7.1 BERT

  • fill-in-blank 형식의 intrasentence CAT은 비슷하게 학습(MLM)하는 BERT와 적합
  • attribute term의 log probability를 기준으로 선택지를 고르고, multi-word라면 각 단어의 log probability의 평균을 사용
  • intersentence CAT의 task는 NSP와 비슷, probability를 계산해 ranking함

7.2 RoBERTa

  • BERT와 거의 비슷하나, RoBERTa에는 NSP가 없으므로 Wikipedia에서 가져온 9.5 mln 규모의 sentence pair를 가져와 학습하였음

7.3 XLNet

  • XLNet은 auto-regressive setting 또는 bidirectional setting으로 사용가능한데, 여기서는 bidirectional setting 사용해 BERT와 RoBERTa의 evaluation setting을 따라할 수 있도록 하였음
  • intrasentence CAT에서는 pretrained XLNet model 사용, intersentence CAT에서는 NSP head를 학습시켜 사용

7.4 GPT2

  • GPT2는 위 모델들과 다르게 auto-regressive setting을 사용(이전의 context를 기반으로 word 예측)
  • intrasentence CAT에서는 각 attribute term을 넣은 문장의 probability를 계산함, multi-word에서는 각 subword의 probability를 평균냄
  • intersentence CAT에서는 NSP를 학습시켜 사용(Appendix A.4 참조)

8. Results and discussion

Baselines vs Models

  • 모든 pretrained models는 RandomLM보다 lms 더 높음: pretrained model이 better LM임
    - GPT2-large, GPT2-medium이 가장 높은 lms
    - BERT-large, GPT2-medium, GPT2-large와 linear weighted combination 하여 ensemble model 만든 결과, 가장 높은 performance를 보였음
  • 모든 model이 baseline보다는 높은 icat을 기록
    - GPT2-small이 가장 높은 icat(가장 idealistic), XLNet-base는 가장 낮은 icat 기록
    - SentimentLM의 icat score는 RandomLM의 icat과 비슷: sentiment는 idealistic LM을 만드는 게 좋지 않음

Relation between lms and ss

  • 모든 모델은 lms와 ss 간 강한 상관관계 있었음: performance 높아질수록 stereotypical bias도 높아짐
    - real world corpora에 의존하기 때문에 real world의 bias도 더 반영하는 것으로 생각될 수 있음
    - GPT2 계열의 모델이 lms와 ss 사이의 good balance 갖고 있어 high icat score를 기록

Impact of model size

  • 각 모델은 parameter size가 다름
  • LM size 커질수록 lms(model ability) 상승하고 ss(biasedness)도 상승하나, icat은 반드시 그런 것은 아님
    - LM ability가 어느 정도 performance 수준에 도달하면, biasedness는 그 이상 증가하지 않음

Impact of pretraining corpora

  • training의 대상이 된 corpora의 size는 lms나 icat과 상관관계가 존재하지 않음: architecture의 차이, corpora type의 차이 때문에 그러한 것으로 추정함
  • lms와 icat에서 고득점을 올린 GPT2는 reddit corpora를 사용해 학습시켰는데, subreddit에 다양한 주제가 많으므로 stereotypical/anti-stereotypical associations이 모두 학습되었을 것으로 추측함

Domain-wise bias

  • 위에서 서술한 앙상블 모델의 겨로가를 서술
  • 앙상블 모델은 다른 domain에 비해 race에 대해 비교적 덜 biased
  • mother, african과 같이 이미 stereotype이 고저오디어 있고 널리 퍼진 경우에는 language model에 반영되어 있으나, producer, Crimean과 같은 단어는 반대였음
  • 다만, muslim에 대해서는 stereotype association 비중이 높았으나 실제 결과에서는 idealistic behaviour를 보임: 설명 불가

Intrasentence vs Intersentence CATSs

  • intersentence CATs의 words per instance가 intrasentence 보다 더 많으므로 더 어려운 task가 될 것으로 예측하고, 실제로도 그러함

9. Limitations

  • crowdsource의 연령이 80%가 50대 이하이므로 미국 전체 인구의 stereotype을 반영하지 않을 수 있음
  • stereotype은 주관적인 의견이므로 객관적 사실과 충돌할 수 있으며, 이는 anti-stereotype의 경우에도 마찬가지임. 이러한 경우에도 idealistic model은 두 선택지 간 선호의 차이가 없어야 함. annotators에게 이러한 요소를 최대한 배제할 것을 요청하긴 했지만 일부 섞여들어가 있을 수 있음
  • 때로는 stereotype을 선호하는 것이 두 선택지 사이에서 균형을 잡는 것보다 더 나을 수 있음: e.g. chef made the food () -> disgusting? delicious?

10. Conclusion

  • Context Association Test(CAT)을 만들어 pretrained model의 stereotypical biases를 측정: idealized CAT(icat)을 만들어 ideal LM에 얼마나 가까운지 측정
  • StereoSet을 crowdsource로 만들어 16,995 CATs를 구성하여 4개 domain(gender, race, religion, profession)에 대해 구성
  • 현재 제안된 모든 모델이 strong stereotypical biases를 나타내고 있음
  • GPT2 계열의 모델들은 BERT, RoBERTa, XLNet에 비해 idealistic한 면모를 더 잘 보임
  • hidden test data를 업로드해 향후 모델에 사용할 수 있도록 제공

Assignment

  1. Besides the mentioned bias, state and explain 5 other new concepts that you have learned, which are central to the topic of your paper. Focus on deep learning or machine leaning-specific concepts that have not been covered in the course.

A. RoBERTa, XLNet, ...

  1. State your opinions on the ovrall approach taken by the authors of the paper in tackling the bias problem. Are there any limitations of their proposed approach? Are there things you agree or disagree with? Is there something you want to add about tackling the bias problem?

A. The authors describe intrasentence task as a sentence-level biasedness test and intersentence task as a discourse-level biasedness test. Therefore intrasentence instance consists of a sentence with a target term and a blank, which can be filled with stereotyped term/anti-stereotyped term/meeaningless term, while intersentence instance is a pair of sentences, one with target term and the other one(stereotyped/anti-stereotyped/meaningless sentence) followed by.

However, there seems little difference between two tasks(intrasentence & intersentence). For example, intersentence instance "He is an Arab from the Middle East." & "A. He is probably a terrorist with bombs.(stereotyped) B. He is a pacifist.(anti-stereotyped)" seems pretty much close to assessing relationship between "Arab(or Middle East)" and "terrorist(or pacifist)". If it really is, Context Association Tests(CATs) developed by the authors will be almost same with Word Embedding Association Test(WEAT) from the previous works.

To solve this question, it would have been much better if the authors add ablation study with regard to word representation models and CATs.

Also, the authors proposed 4 categories of biases: profession/gender/race/relgion. However, they do not present any supporting evidence why they selected those 4 biases. Though those biases are prevalent in offline and online both, it would have been better if they have reference on it.

profile
multidisciplinary

0개의 댓글