Skip to main content
QUICK REVIEW

[Paper Review] Don't Take It Literally: An Edit-Invariant Sequence Loss for Text Generation

Guangyi Liu, Zichao Yang|arXiv (Cornell University)|Jun 29, 2021
Natural Language Processing TechniquesComputer Science4 citations
TL;DR

This paper proposes Edit-Invariant Sequence Loss (EISL), a novel training objective for neural text generation that computes matching loss between target n-grams and all n-grams in the generated sequence, making it robust to noise and edits in reference sequences. EISL outperforms cross-entropy loss and strong baselines across machine translation with noisy targets, unsupervised style transfer, and non-autoregressive generation, while being efficiently implementable as a drop-in replacement via convolutional operations.

ABSTRACT

Neural 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.

Motivation & Objective

  • To address the limitations of cross-entropy (CE) loss in text generation when reference sequences contain noise or are imperfect.
  • To develop a training objective that is invariant to common text edits such as word shuffling, repetition, and blanking.
  • To maintain end-to-end differentiability and computational efficiency while enabling better generalization under weak supervision.
  • To provide a drop-in replacement for CE loss that improves performance across diverse text generation tasks.

Proposed method

  • EISL computes the matching loss between each n-gram in the target sequence and all n-grams in the generated sequence.
  • The loss is formulated as a differentiable convolution operation, where target n-grams act as learnable kernels applied over the generated sequence.
  • The method aggregates matching scores across all n-gram positions, making the loss robust to reordering, repetition, and missing words.
  • EISL reduces to CE loss when n equals the full sequence length, ensuring backward compatibility.
  • The implementation leverages existing deep learning libraries for efficient computation using standard convolutional operations.
  • The loss is designed to be easily integrated into existing training pipelines without architectural changes.

Experimental results

Research questions

  • RQ1Can a sequence-level loss be made invariant to common text edits such as word shuffling, repetition, and blanking without sacrificing training efficiency?
  • RQ2How does EISL perform compared to CE loss when training on noisy or corrupted reference sequences in machine translation?
  • RQ3To what extent can EISL improve performance in unsupervised text style transfer with only weak content supervision?
  • RQ4Can EISL effectively replace CE loss in non-autoregressive text generation without requiring retraining or architectural changes?
  • RQ5Is EISL robust to varying degrees of noise and edit types, as measured by automatic and human evaluation metrics?

Key findings

  • EISL significantly outperforms standard cross-entropy loss on machine translation with noisy target sequences, achieving higher BLEU scores under various noise levels.
  • In unsupervised text style transfer, EISL achieves better content preservation and style transfer quality compared to CE and reinforcement learning baselines.
  • On non-autoregressive text generation, EISL enables better performance than CE even without a predefined generation order, demonstrating its flexibility.
  • The loss is robust to edit types such as word shuffling, repetition, and blanking, with loss values increasing much more slowly than CE as edit rates rise.
  • EISL achieves state-of-the-art results on all evaluated tasks while maintaining computational efficiency and compatibility with existing training frameworks.
  • Human evaluation confirms that EISL-generated outputs are more fluent and semantically aligned with reference sequences, especially under weak supervision.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.