Sentiment Classification

sentiment classification에서 겪을 수 있는 문제: 대량의 라벨링된 training set 이 없음

- 10000~100000 단어 정도면 무난

 

지금부터 두 개의 알고리즘 살펴볼 것임

 

[Simeple sentiment classification model]

- 나의 vocab상 인덱스에 따라서 one-hot vector 생성

- 엄청 큰 데이터셋으로 학습된 E 를 활용하여 embeddings 추출

- 300차원의 vector

- 이 벡터들을 모두 더하거나 평균을 내서, softmax classifier에 입력한다

- 별점 1~5점으로 총 다섯개의 possible outcome을 출력한다

 

(문제점)

- 단어 순서를 무시한다 (위 이미지의 마지막 리뷰 같은 경우, 잘못 분류할 수 있음 good의 출현빈도가 높음)

 

 

[RNN for sentiment classification]

 

many-to-one

 

Debiasing Word Embeddings

[The problem of bias in word embeddings]

 

학습된 word embedding이 Man:Computer_programmer as Woman:homemaker 와 같은 끔찍한 analogy를 출력하기 시작함

 

"Word embeddings can reflect gernder, ethnicity, age, sexual orientation, and other biases of the text used to train the model"

 

학습 알고리즘이 주요 의사결정을 내리는 시대 - 바람직하지 않은 biases 를 최대한 줄이거나 제거해야 한다

 

[Addressing bias in word embeddings]

1. identify bias direction (우리가 제거하고자 하는 특정 bias에 해당하는) 

- 어떻게? $e_{he} - e_{she} $, $e_{male} - e_{she} $, ... 뺀 다음 평균을 구한다

그 결과 이쪽 방향이 gender bias라는 것을 알 수 있다(1차원) // 세로로는 non-bias direction (299차원)

- 여기서는 평균이라고 단순하게 표현했는데 페이퍼에서는 SVU(singular value decomposition)을 사용한다 (PCA와 비슷)

 

2. Neutralize 

- For every word that is not definitional, project to get rid of bias

예를 들어 grandfather, girl, he 등등 단어는 본질적으로(intrinsic) 젠더 요소가 정의에 포함되어 있음

반면에 doctor, babysitter 같은 단어는 gender neutral 해야 함 -> 이러한 단어를 bias 방향으로 움직여서 요소를 제거함

doctor, babysitter 주목

 

3. Equalize pairs

girl-boy, grandmother-grandfather와 같이 embedding 상 유일한 차이가 gender였으면 하는 쌍을 고른다

 

babysitter-grandmother 의 거리가 babysitter-grandfather의 거리보다 좁다 <- bias

gender neutral 해야 하는 단어와의 거리가 동일해야 한다

 

가운데 축으로부터 등거리(equidistant) 하도록 grandmother와 grandfather 를 이동

그 결과 babysitter와의 거리가 동일해짐 (윗단계에 의해 babysitter는 세로축 위에 있음)

 

- 어떤 단어를 neutralize 해야 할까?

저자들은 definitional 한 단어인지 아닌지 분류하는 classifier를 학습한다

 

- 마지막 단계에서 equalize 해야 하는 단어쌍은?

비교적 수가 적으므로 직접 골라서 equalize할 수 있다

복사했습니다!