"Mask and Infill": Masked Language Model 을 활용한 감정 전이
"Mask and Infill" : Applying Masked Language Model to Sentiment Transfer
"Mask and Infill" : Applying Masked Language Model to Sentiment Transfer
@misc{wu2019mask,
title = {"Mask and Infill" : Applying Masked Language Model to Sentiment Transfer},
author = {Xing Wu and Tao Zhang and Liangjun Zang and Jizhong Han and Songlin Hu},
year = {2019},
eprint = {1908.08039},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/1908.08039}
}
Wu, X., Zhang, T., Zang, L., Han, J., & Hu, S. (2019). "Mask and Infill" : Applying Masked Language Model to Sentiment Transfer [Preprint]. arXiv. https://doi.org/10.48550/arXiv.1908.08039
WU X, ZHANG T, ZANG L, et al. "Mask and Infill" : Applying Masked Language Model to Sentiment Transfer[EB/OL]. (2019-08-21)[2026-11-30]. https://arxiv.org/abs/1908.08039.
초록
본 논문은 비 병렬 텍스트에 대한 감성 전이 (sentiment transfer) 작업에 초점을 맞추며, 문장의 감성 속성 (예: 긍정 또는 부정) 을 변경하되 속성 독립적 콘텐츠는 보존하는 것을 목표로 한다. RNN 기반 인코더 - 디코더 구조가 단어 간의 깊은 및 장기 의존성을 포착하는 데 한계가 있어, 기존 연구들은 처음부터 만족스러운 문장을 생성하는 데 어려움을 겪고 있다. 인간이 문장의 감성 속성을 변환할 때, 처음부터 새로운 문장을 구축하는 대신 원본 감성 토큰을 목표 감성 표현으로만 교체하는 단순하지만 효과적인 접근 방식을 취한다. 이러한 과정은 텍스트 인필링 (Text Infilling) 또는 클로즈 (Cloze) 작업과 매우 유사하며, 심층 양방향 마스킹 언어 모델 (예: BERT) 으로 처리 가능하다. 따라서 본 논문은 "Mask and Infill"이라는 두 단계 접근법을 제안한다. 마스킹 단계에서는 감성 토큰의 위치를 마스킹함으로써 스타일과 콘텐츠를 분리한다. 인필 단계에서는 MLM 을 속성 조건부 MLM 으로 리트로핏하여, 문맥 1 과 목표 감성에 조건부 예측을 통해 마스킹된 위치를 단어 또는 구로 채운다. 우리는 양적, 질적 평가 및 인간 평가를 통해 두 리뷰 데이터셋에서 모델을 평가하였다. 실험 결과는 본 모델이 최상위 성능 (state-of-the-art performance) 을 개선함을 보여준다.
This paper focuses on the task of sentiment transfer on non-parallel text, which modifies sentiment attributes (e.g., positive or negative) of sentences while preserving their attribute-independent content. Due to the limited capability of RNNbased encoder-decoder structure to capture deep and long-range dependencies among words, previous works can hardly generate satisfactory sentences from scratch. When humans convert the sentiment attribute of a sentence, a simple but effective approach is to only replace the original sentimental tokens in the sentence with target sentimental expressions, instead of building a new sentence from scratch. Such a process is very similar to the task of Text Infilling or Cloze, which could be handled by a deep bidirectional Masked Language Model (e.g. BERT). So we propose a two step approach "Mask and Infill". In the mask step, we separate style from content by masking the positions of sentimental tokens. In the infill step, we retrofit MLM to Attribute Conditional MLM, to infill the masked positions by predicting words or phrases conditioned on the context1 and target sentiment. We evaluate our model on two review datasets with quantitative, qualitative, and human evaluations. Experimental results demonstrate that our models improve state-of-the-art performance.