[Paper Review] Towards Debiasing Sentence Representations (ACL 2020)

김진수·2024년 2월 14일

Paper Review

목록 보기
5/10
post-thumbnail

Abstract

기존 debiasing method는 주로 단어 임베딩에 대한 debiasing에 집중한다. 하지만 단어가 등장하는 맥락에 따라 단어의 의미가 변하므로 문장에 대한 debiasing이 필요하다. 이에 논문에서는 문장 내의 bias를 제거하면서 sentence-level downstream task의 성능을 보존하는 SENTDEBIASSENT-DEBIAS를 제시함.

Method

제시하는 debiasing 방법은 크게 4가지 step으로 나뉜다.

1) Bias Attribute의 정의

D\mathcal{D} : 길이 dd의 튜플 mm개로 구성된 집합.
D={(w1(i),...,wd(i))}i=1m\mathcal{D}=\{(w_1^{(i)},...,w_d^{(i)})\}_{i=1}^{m}
예시) D={(man,woman),(he,she),(boy,girl)}\mathcal{D}=\{(man, woman), (he, she), (boy, girl)\}라 하면,
d=2d=2이고 m=3m=3

2) 단어를 문장으로 Contextualize

nn개의 context에 대해 단어를 문장으로 만들어 ‘bias attribute sentence dataset S\mathcal{S}를 정의

S=i=1m\mathcal{S} = \cup_{i=1}^m ContextualizeContextualize(w1(i),...,wd(i))={(sii,...,sdi)}i=1n(w_1^{(i)},...,w_d^{(i)})= \{(s_i^{i},...,s_d^{i})\}_{i=1}^n

예) I have a {muslim} friend 라는 문장이 있을 때

→ I have a {christian} friend

→ I have a {jewish} friend

라는 문장들을 만든다.

Contextualize()Contextualize()는 이처럼 text corpora에서 문장을 찾고 그 문장에 D\mathcal{D} 안에 있는 단어들을 바꿔 넣어서 뻥튀기해준다.

Wikitext-2를 비롯해 여러 텍스트 데이터셋에서 문장을 가져옴.

3) Estimating the Bias Subspace

편의상 bias attribute를 구성하는 word set의 개수인 mm은 고려하지 않는다.

Rj\mathcal{R}_j : n개의 문장 임베딩을 갖는 집합

Intuition\text{Intuition} : R1\mathcal{R}_1R2\mathcal{R}_2의 차이가 bias에 대한 정보(만)을 담고 있을것.

μj\mu_j : Rj\mathcal{R}_j 안의 n개 문장 임베딩(w1,wn)(w_1,…w_n)의 평균

VV : bias subspace, PCA(주성분분석)를 이용해 아래와 같이 구한다.(아래 k는 k개의 주성분을 사용한다는 뜻)

V=PCAk(j=1dwRj(wμj))V = PCA_k(\cup_{j=1}^d\cup_{w\in\mathcal{R}_j}(w-\mu_j))

4) Debiasing

4-1) Neutralize : Orthogonal Projection

한 문장의 representation h\mathbf{h}를 bias subspace V={v1,...,vk}V=\{v_1,...,v_k\}에 대해 projection해주고 이를 h\mathbf{h}에서 빼면 bias subspace에 대해 orthogonalorthogonal한 벡터 h^\hat{\mathbf{h}}를 얻을 수 있다.

hv=j=1kh,vjvj\mathbf{h}_\mathbf{v} = \sum_{j=1}^{k}\left\langle \mathbf{h},\mathbf{v}_j \right\rangle\mathbf{v}_j
h^=hhv\hat{\mathbf{h}}=\mathbf{h}-\mathbf{h}_{\mathbf{v}}

4-2) Equalize : Equidistance objective

gender에 대해 어떤 단어 nn이 중립적이라면, nn은 biased words(예를 들면 manman, womanwoman)와 정반대의 방향으로 같은 거리만큼 떨어져 있어야 한다. 그래서 단어 임베딩에 대한 기존의 hard-debiasing 방법들은 이러한 equlization작업을 해줬는데, 본 논문에서의 sentence debiasing은 context template의 수만큼 연산량이 늘어나므로 생략했다고 한다. 물론 equalization을 거치지 않았다고 해도, neutralize 과정에서 문장 임베딩은 이미 bias subspace에 대해 orthogonalize해졌으므로 생략해도 무방하다고 논문에서는 주장한다.

Experiment

Evaluation

  • WEATWEAT : 두 개의 단어 집합 간의 effect size를 고려
    --> WEATWEAT를 문장에 대해 적용한 SEATSEAT를 evaluation metric으로 사용
  • Downstream Task Performance
    아래의 task에 대한 능력(Fine튜닝을 거침)을 측정한 결과 성능 하락폭은 최대 3% 정도였고, 오히려 debiasing 이후 성능이 오른 task도 있다.
    - SST-2
    - CoLA
    - QNLI

Contextualize Size / Domain Mixture

  • 더 많은 contextualize template을 이용할수록 Debiasing이 더 잘 되고, 분산도 낮아짐
    - Wikitext-2 안의 문장들을 contextualize template으로 사용하는 모델에서, template의 수가 많아질수록 성능 향상
  • 여러 domain에서의 template을 이용할수록 Debiasing이 더 잘 되고, 분산도 낮아짐
    - Wikitext-2, SST, Redit, MELD, POM 등 다양한 데이터셋에서 template을 가져와 학습했을 때 성능 향상.

Contributions / Limitations

  • 문장 단위의 debiasing을 위해 Contextualization을 활용하는 방식이 Main Contribution이라고 생각함.
  • Downstream Task Performance가 Fine Tuning을 거친 후에 측정되었는데, 이런 경우 bias subspace에 대해 orthogonal해진 문장 임베딩에 다시 bias가 생길 수 있음.
  • Contextualizaion Template의 선택에 따라 성능 변화가 심할 수 있음.
profile
ML Student

0개의 댓글