Introduction
Standard Sequence-to-Sequence (seq2seq) models, while powerful, often suffer from a fundamental discrepancy between training and inference. During training, models typically employ "Teacher Forcing," where the ground-truth previous token is provided to predict the next. At test time, however, the model must rely on its own previous (and potentially erroneous) predictions. This mismatch leads to exposure bias, where a single mistake can cause the model to spiral into nonsensical outputs. Furthermore, standard training optimizes for local, word-level cross-entropy, which does not always correlate with global sequence-level metrics like BLEU.
Beam-Search Optimization (BSO)
To address these issues, this paper introduces Beam-Search Optimization (BSO). BSO integrates the beam-search algorithm directly into the training process, effectively teaching the model to optimize for the entire sequence rather than individual tokens.
The BSO framework operates on several key principles:
- Learning as Search: The model maintains a beam of the top-$K$ candidate sequences during training.
- Violation-Triggered Updates: If the gold sequence falls off the beam, a loss is triggered. The model is then updated to ensure the correct path remains within the beam with a margin of safety.
- Non-Probabilistic Scoring: By moving away from local Softmax normalization, BSO avoids "label bias," where models favor short-term high-probability paths that lead to poor global outcomes.
- Sequence-Level Costs: The framework incorporates a cost function ($\Delta$) that penalizes candidates based on sequence-level metrics (e.g., sentence-level BLEU), aligning training more closely with evaluation.
Experimental Evaluation
The authors evaluated BSO across three challenging tasks: Word Ordering, Dependency Parsing, and Machine Translation.
Word Ordering
In the word ordering task using the Penn Treebank (PTB), the model must reconstruct a sentence from a shuffled bag of words. This task highlights the benefits of Constrained BSO (ConBSO), which restricts the search space to sequences that use each source word exactly once.
As shown in the results, ConBSO achieved a BLEU score of 34.5, a substantial improvement over the 31.0 achieved by the standard seq2seq baseline.
Machine Translation and Parsing
On the IWSLT 2014 German-to-English dataset, BSO reached 25.48 BLEU, outperforming standard baselines (23.87) and other techniques like Scheduled Sampling. In dependency parsing, while not surpassing specialized architectures, BSO significantly boosted the performance of general-purpose seq2seq models to 91.57 UAS.
Discussion and Future Work
A critical finding was that BSO requires a "warm-up" phase using standard cross-entropy training, as the sequence-level signal is too sparse for initial learning. Additionally, a "curriculum beam" approach—starting with a small beam and increasing it over time—was essential for stability.
While BSO offers significant performance gains, it introduces computational overhead, with training being approximately 3.3x slower than teacher forcing. Future research will focus on scaling BSO to larger datasets and improving the efficiency of the search-based training loop.
Summary updated