"Mask e Infilção": Aplicação de Modelos de Linguagem Maskados para Transferência de Sentimento
"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.
Resumo
Este trabalho foca na tarefa de transferência de sentimento em textos não paralelos, que modifica atributos de sentimento (por exemplo, positivo ou negativo) de frases enquanto preserva seu conteúdo independente de atributos. Devido à capacidade limitada da estrutura encoder-decoder baseada em RNN para capturar dependências profundas e de longo alcance entre palavras, trabalhos anteriores dificilmente conseguem gerar frases satisfatórias do zero. Quando humanos convertem o atributo de sentimento de uma frase, uma abordagem simples, mas eficaz, consiste em substituir apenas os tokens sentimentais originais na frase por expressões sentimentais alvos, em vez de construir uma nova frase do zero. Tal processo é muito semelhante à tarefa de Text Infilling ou Cloze, que pode ser tratada por um Modelo de Linguagem Bidirecional Maskado Profundo (por exemplo, BERT). Portanto, propomos uma abordagem em duas etapas, "Mask and Infill". Na etapa de mask, separamos estilo de conteúdo mascarando as posições dos tokens sentimentais. Na etapa de infill, adaptamos o MLM para um MLM Condicional a Atributo, para preencher as posições mascaradas prever palavras ou frases condicionadas ao contexto1 e ao sentimento alvo. Avaliamos nosso modelo em dois conjuntos de dados de revisões com avaliações quantitativas, qualitativas e humanas. Os resultados experimentais demonstram que nossos modelos melhoram o estado da arte.
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.