In the case of models which use text data as input, such as Sentiment Analysis, Attention Mechanism is widely used to improve the performance by weighting the parts of input that affect the prediction. Despite the length constraints and the nature of the noisy text data, the existing Attention Mechanism models calculate the weights by using all the input words even if the length of sentence is extremely long. In this paper, we propose attention mask based on Bernoulli Sampling to remove noise among input words and to calculate the weights more precisely. Attention mask makes the Attention Mechanism use the selected hidden states when calculating weights. This paper also propose a way to process sentence by using CNN based residual learning instead of LSTM. In this model, experiments were conducted using Yelp data, which is widely used for Sentiment Analysis. From these experiments, we demonstrated that our proposed model have a better performance than baseline models.
감성 분석 (Sentiment Analysis)와 같이 텍스트를 인풋으로 다루는 모델의 경우, 인풋을 구성하는 단어들 중 예측에 영향을 미치는 부분에 대해 가중치를 줌으로써 성능을 향상시키는 어텐션 메커니즘(Attention Mechanism)이 많이 사용된다. 길이에 제약이 없고, 노이즈가 많은 텍스트 데이터의 특성에도 불구하고, 기존 어텐션 메커니즘 모델들은 가중치를 계산함에 있어 주어진 인풋 단어들을 모두 반영하여 가중치를 계산한다. 본 논문에서는 베르누이 샘플링(Bernoulli Sampling)을 기반으로 한 어텐션 마스크(Attention Mask)를 이용하여 인풋 단어들 중 노이즈를 제거함으로써, 어텐션 메커니즘으로 하여금 가중치를 더욱 정교하게 계산하고자 한다. 본 모델은 감성 분석에 많이 사용되는 Yelp 데이터를 이용하여 실험을 진행하였으며, 기존 어텐션 메커니즘을 적용한 모델들에 비해 우수한 성능을 보였다.