An Empirical Investigation of Global and Local Normalization for Recurrent Neural Sequence Models Using a Continuous Relaxation to Beam Search

Kartik Goyal, Chris Dyer, Taylor Berg-Kirkpatrick

Abstract

Authors: Kartik Goyal, Chris Dyer, Taylor Berg-Kirkpatrick.
Venue: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies.

This paper explores the long-standing debate between global and local normalization in neural sequence models. While locally normalized models are standard due to their training efficiency, they often suffer from "label bias." Globally normalized models theoretically resolve this but are computationally challenging to train. The authors introduce a differentiable "soft beam search" to perform search-aware training, allowing for a fair empirical comparison. Their findings suggest that global normalization remains superior in large search spaces by mitigating errors induced by inexact decoding.

Introduction

Neural sequence-to-sequence models have revolutionized tasks like machine translation and syntactic parsing. However, the optimal training objective remains a subject of research. Most modern systems use local normalization, predicting the next token based on a probability distribution that sums to one at each step. While efficient, this approach can lead to sub-optimal sequences during decoding. This paper investigates whether globally normalized models, which score entire sequences as a whole, offer tangible benefits when paired with modern high-capacity encoders like Bi-LSTMs.

The Normalization Debate: Local vs. Global

The primary drawback of locally normalized models is label bias. Because these models must distribute a fixed "probability budget" at every step, they cannot easily penalize a path that appears promising early on but leads to a dead end. In contrast, globally normalized models score the entire sequence, allowing them to effectively "downvote" all successors of a poor candidate.

Comparison of local and global normalization in beam search.

As illustrated in the figure above, global models possess a "flexibility advantage." In a local model, even a "bad" branch must allocate some probability mass to its successors. A global model can set these scores to near-zero, preventing low-quality candidates from occupying valuable slots in the beam during search.

To compare these models fairly, the authors address the discrepancy between training (usually done via teacher-forcing) and testing (done via beam search). They propose search-aware training, optimizing the model to minimize errors made during the actual decoding process.

The challenge is that standard beam search involves discrete "top-k" operations that are non-differentiable. To overcome this, the authors employ a continuous relaxation called Soft-k-argmax. This technique transforms beam search into a differentiable function, allowing gradients to flow back through the search process.

The Soft Beam Computation architecture and Soft-k-argmax relaxation.

Additionally, the authors introduce a self-normalization initialization strategy. Global models are notoriously difficult to train from scratch. By pre-training a local model with an $L2$ penalty on the log-partition function ($\log Z$), they create a stable starting point where unnormalized scores approximate probabilities.

Experimental Evaluation

The approach was tested on two tasks:

  1. CCG Supertagging: A task with a large label space (1,284 tags) used to test the impact of encoder capacity (unidirectional vs. bidirectional) on label bias.
  2. Machine Translation (MT): Using the IWSLT 2014 German-to-English dataset to evaluate performance in a massive search space.

Key Results

  • Label Bias and Encoder Power: In CCG tagging, a bidirectional encoder mitigated much of the label bias for local models. However, with a unidirectional encoder, the global model outperformed the local model by 2.15% accuracy (85.50% vs 83.35%), demonstrating its inherent robustness.
  • Machine Translation Performance: The search-aware global model achieved 29.27 BLEU, a significant improvement over the 27.62 BLEU baseline. Qualitatively, global models were more "cautious," producing longer sequences and avoiding the premature "end-of-sentence" predictions common in local models.

Conclusion

This investigation confirms that while powerful encoders can reduce the impact of label bias, global normalization provides a critical safety net during inexact search. By using a differentiable relaxation to beam search, the authors demonstrate that global models can be trained effectively to match or exceed local models while exhibiting more stable decoding behavior in complex tasks like machine translation.

Summary updated

BibTeX
@inproceedings{goyal2019empirical,
  author = {Kartik Goyal and Chris Dyer and Taylor Berg-Kirkpatrick},
  title = {{An Empirical Investigation of Global and Local Normalization for Recurrent Neural Sequence Models Using a Continuous Relaxation to Beam Search}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  url = {https://openreview.net/forum?id=rkZDlmb_Zr},
}
Figure