Don’t Take It Literally: An Edit-Invariant Sequence Loss for Text Generation

21259

Authors

nan

Abstract

AbstractNeural text generation models are typically trained by maximizing log-likelihood with the sequence cross entropy (CE) loss, which encourages an exact token-by-token match between a target sequence with a generated sequence. Such training objective is sub-optimal when the target sequence is not perfect, e.g., when the target sequence is corrupted with noises, or when only weak sequence supervision is available. To address the challenge, we propose a novel Edit-Invariant Sequence Loss (EISL), which computes the matching loss of a target n-gram with all n-grams in the generated sequence. EISL is designed to be robust to various noises and edits in the target sequences. Moreover, the EISL computation is essentially an approximate convolution operation with target n-grams as kernels, which is easy to implement and efficient to compute with existing libraries. To demonstrate the effectiveness of EISL, we conduct experiments on a wide range of tasks, including machine translation with noisy target sequences, unsupervised text style transfer with only weak training signals, and non-autoregressive generation with non-predefined generation order. Experimental results show our method significantly outperforms the common CE loss and other strong baselines on all the tasks. EISL has a simple API that can be used as a drop-in replacement of the CE loss: https://github.com/guangyliu/EISL.

Keywords

nan

Full Content

Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2055 - 2078 July 10-15, 2022 ©2022 Association for Computational Linguistics Don’t Take It Literally: An Edit-Invariant Sequence Loss for Text Generation Guangyi Liu1, Zichao Yang2, Tianhua Tao3, Xiaodan Liang4, Junwei Bao5, Zhen Li1, Xiaodong He5, Shuguang Cui1, Zhiting Hu6 1Chinese University of Hong Kong, Shenzhen, 2Carnegie Mellon University, 3Tsinghua University, 4Sun Yat-Sen University, 5JD AI Research, 6UC San Diego guangyiliu@link.cuhk.edu.cn, zhh019@ucsd.edu Abstract Neural text generation models are typically trained by maximizing log-likelihood with the sequence cross entropy (CE) loss, which en- courages an exact token-by-token match be- tween a target sequence with a generated se- quence. Such training objective is sub-optimal when the target sequence is not perfect, e.g., when the target sequence is corrupted with noises, or when only weak sequence supervi- sion is available. To address the challenge, we propose a novel Edit-Invariant Sequence Loss (EISL), which computes the matching loss of a target n-gram with all n-grams in the gen- erated sequence. EISL is designed to be ro- bust to various noises and edits in the target sequences. Moreover, the EISL computation is essentially an approximate convolution op- eration with target n-grams as kernels, which is easy to implement and efficient to compute with existing libraries. To demonstrate the ef- fectiveness of EISL, we conduct experiments on a wide range of tasks, including machine translation with noisy target sequences, unsu- pervised text style transfer with only weak train- ing signals, and non-autoregressive generation with non-predefined generation order. Exper- imental results show our method significantly outperforms the common CE loss and other strong baselines on all the tasks. EISL has a simple API that can be used as a drop-in re- placement of the CE loss.1 1 Introduction Neural text generation models have ubiquitous ap- plications in natural language processing, includ- ing machine translation (Bahdanau et al., 2015, Sutskever et al., 2014, Wu et al., 2016, Vaswani et al., 2017), summarizations (Nallapati et al., 2016, See et al., 2017), dialogue systems (Li et al., 2016), etc. They are typically trained by maximizing the log-likelihood of the output sequence conditioning on the inputs with the cross entropy (CE) loss. The 1Code: https://github.com/guangyliu/EISL a cat is on the red blanket on the red blanket there is a cat Paraphrase: a cat is on the red blanket Noisy Target: a cat is is on the red blanket Image: Figure 1: Invariance exists in both image and text, e.g., image is invariant to translation (top), and text is robust to many forms of edits (bottom). CE loss can be easily factorized into individual loss terms and can be optimized efficiently with stochastic gradient descent. Due to its computa- tional efficiency and ease to implement, the train- ing paradigm has played an important role in build- ing successful large text generation models (Lewis et al., 2020, Radford et al., 2019). However, the CE loss minimizes the negative log-likelihood of only the reference …

Content truncated to 500 words

Labeled Text

AbstractNeural text generation models are typically trained by maximizing log-likelihood with the sequence cross entropy (CE) loss, which encourages an exact token-by-token match between a target sequence with a generated sequence. Such training objective is sub-optimal when the target sequence is not perfect, e.g., when the target sequence is corrupted with noises, or when only weak sequence supervision is available. To address the challenge, we propose a novel Edit-Invariant Sequence Loss (EISL), which computes the matching loss of a target n-gram with all n-grams in the generated sequence. EISL is designed to be robust to various noises and edits in the target sequences. Moreover, the EISL computation is essentially an approximate convolution operation with target n-grams as kernels, which is easy to implement and efficient to compute with existing libraries. To demonstrate the effectiveness of EISL, we conduct experiments on a wide range of tasks, including machine translation with noisy target sequences, unsupervised text style transfer with only weak training signals, and non-autoregressive generation with non-predefined generation order. Experimental results show our method significantly outperforms the common CE loss and other strong baselines on all the tasks. EISL has a simple API that can be used as a drop-in replacement of the CE loss:

Publication Details

Paper ID:
21259
Year:
2022
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan