Learning Neural Sequence-to-Sequence Models from Weak Feedback with Bipolar Ramp Loss

Laura Jehl, Carolin Lawrence, Stefan RiezlerarXiv 2019

TL;DR

Training sequence-to-sequence models usually requires expensive "gold" labels, but this paper shows how to learn effectively from "weak feedback" (like whether a database query returned the right answer). The key is a bipolar ramp loss objective that doesn't just reward good outputs ("hope") but actively punishes high-probability bad ones ("fear"), especially when refined down to the individual token level.

What Problem Does This Paper Address?

Most neural models are trained using Maximum Likelihood Estimation (MLE), which requires a perfect target sequence for every input. In the real world, these "gold labels" are often hard to get. For example, it’s easy to tell if a semantic parser got the right answer from a database, but much harder to provide the exact logical query it should have used.

Existing methods for "weak supervision" (learning from rewards rather than labels), like Minimum Risk Training (MRT), often struggle when the model is performing poorly. If a model samples ten bad outputs and zero good ones, MRT might simply ignore the bad ones rather than learning why they were wrong. This paper addresses the need for a more robust signal that can distinguish between "good" and "bad" even when the feedback is noisy or sparse.

Methods

The authors adapt the structured ramp loss—traditionally used in linear models—for neural networks. The core idea is "bipolarity": the loss function simultaneously maximizes the probability of a "hope" output (the best-scoring sequence in the model's current reach) and minimizes the probability of a "fear" output (a high-probability sequence that received a bad reward).

The paper introduces three main flavors of this loss:

  1. RAMP (Bipolar): Uses both a hope and a fear output in one objective.
  2. RAMP1 & RAMP2: "Unipolar" versions that focus only on discouraging fear or encouraging hope, respectively.
  3. RAMP-T (Token-level): A novel contribution that applies the bipolar principle to individual tokens. Instead of punishing an entire sentence for one mistake, it identifies which specific tokens differ between the "hope" and "fear" sequences and updates only those.
Figure 1: Settings for token-level rewards τ+ and τ −

Datasets

The researchers evaluated their methods across three distinct scenarios:

  • Semantic Parsing: Using NLMAPS V2, a corpus of natural language questions about geography (OpenStreetMap). Feedback is "weak" because the model only knows if the executed query returned the correct answer, not if the query itself was written correctly.
  • Weakly Supervised Machine Translation (MT): Using English-German Wikipedia articles. Here, "weak feedback" comes from cross-lingual document links—the model is rewarded if its translation matches the content of a linked document in the target language.
  • Supervised MT: Using the IWSLT 2014 German-English task to see if these objectives help even when gold labels are available (by reducing "exposure bias").

Key Insights and Ideas

  • The Power of "Fear": The "aha moment" of the paper is that discouraging bad outputs is just as important as encouraging good ones. In semantic parsing, MRT failed to learn in 37% of cases because it couldn't find a single correct answer to reward. Bipolar ramp loss solves this by actively pushing the model away from the wrong answers it did find.
  • Granularity Matters: Sequence-level rewards are blunt instruments. By moving to the token level (RAMP-T), the model can perform "surgical" updates. If the "hope" sequence is "a small house" and the "fear" is "the house," the model learns specifically to favor "a small" over "the," rather than re-learning the word "house" which appeared in both.
  • Efficiency: Ramp loss is more computationally efficient than MRT. While MRT requires executing many queries against a database to calculate an average reward, Ramp loss only needs to find the best and worst candidates from a k-best list.

Key Results

The bipolar objectives consistently outperformed both the MLE baseline and standard MRT across all tasks.

  • Semantic Parsing: The token-level RAMP-T achieved a massive 12.42 point increase in F1 score over the baseline, significantly beating MRT.
Table 2: F1 scores for semantic parsing show RAMP-T as the clear winner.
  • Weakly Supervised MT: Even with very noisy feedback from document links, the bipolar ramp loss improved performance by 0.44 BLEU points. The authors found that using only positive or only negative feedback actually made the model perform worse than the baseline, proving that bipolarity is "crucial" in weak supervision.
Table 5: BLEU scores for weakly supervised MT.

Limitations and Future Work

While the gains in semantic parsing were dramatic, the improvements in Machine Translation were relatively small (less than 0.5 BLEU). The authors note that document-level links are an extremely "weak" signal, and domain mismatch remains a significant challenge that ramp loss alone doesn't solve.

Additionally, the authors observed that the model sometimes over-optimized for sentence length, leading to deletion errors in translations. Future work could involve more sophisticated reward functions or better ways to handle the trade-off between model probability and external metrics.

Summary updated

Abstract

In many machine learning scenarios, supervision by gold labels is not available and consequently neural models cannot be trained directly by maximum likelihood estimation (MLE). In a weak supervision scenario, metric-augmented objectives can be employed to assign feedback to model outputs, which can be used to extract a supervision signal for training. We present several objectives for two separate weakly supervised tasks, machine translation and semantic parsing. We show that objectives should actively discourage negative outputs in addition to promoting a surrogate gold structure. This notion of bipolarity is naturally present in ramp loss objectives, which we adapt to neural models. We show that bipolar ramp loss objectives outperform other non-bipolar ramp loss objectives and minimum risk training (MRT) on both weakly supervised tasks, as well as on a supervised machine translation task. Additionally, we introduce a novel token-level ramp loss objective, which is able to outperform even the best sequence-level ramp loss on both weakly supervised tasks.
BibTeX
@misc{jehl2019learning,
  author = {Laura Jehl and Carolin Lawrence and Stefan Riezler},
  title = {{Learning Neural Sequence-to-Sequence Models from Weak Feedback with Bipolar Ramp Loss}},
  year = {2019},
  eprint = {1907.03748},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.03748},
}
Figure