Fast Collocation-Based Bayesian HMM Word Alignment

Philip Schulz, Wilker AzizCOLING 2016

Abstract

We present a new Bayesian HMM word alignment model for statistical machine translation. The model is a mixture of an alignment model and a language model. The alignment component is a Bayesian extension of the standard HMM. The language model component is responsible for the generation of words needed for source fluency reasons from source language context. This allows for untranslatable source words to remain unaligned and at the same time avoids the introduction of artificial NULL words which introduces unusually long alignment jumps. Existing Bayesian word alignment models are unpractically slow because they consider each target position when resampling a given alignment link. The sampling complexity therefore grows linearly in the target sentence length. In order to make our model useful in practice, we devise an auxiliary variable Gibbs sampler that allows us to resample alignment links in constant time independently of the target sentence length. This leads to considerable speed improvements. Experimental results show that our model performs as well as existing word alignment toolkits in terms of resulting BLEU score.

Introduction

Statistical Machine Translation (SMT) relies heavily on accurate word alignment to map source words to their target counterparts. The Hidden Markov Model (HMM) has long been a standard for this task, modeling the spatial "jumps" between alignments. However, traditional HMMs suffer from two primary drawbacks: the problematic use of "NULL" words to handle untranslatable source terms, and the prohibitive computational cost of Bayesian inference, which typically scales linearly with sentence length. This paper introduces a Bayesian HMM that replaces NULL words with a source-side collocation model and utilizes a novel auxiliary variable Gibbs sampler to achieve constant-time resampling.

The BHMM-Z Model: Beyond the NULL Word

The proposed BHMM-Z model addresses the NULL word problem by introducing a source-side collocation model. Instead of forcing every source word to align to a target word or a synthetic NULL token—which often distorts the HMM's jump distribution—the model uses a binary indicator variable $Z_j$.

If $Z_j = 0$, the source word is generated from a target word (standard alignment). If $Z_j = 1$, the source word is generated from the preceding source word. This approach treats untranslatable words as internal linguistic collocations rather than "empty" translations, acting as a mini-language model within the aligner to handle source-language fluency naturally.

Efficient Inference via Auxiliary Variables

To overcome the $O(l)$ complexity of standard Bayesian Gibbs sampling, where $l$ is the target sentence length, the authors introduce an auxiliary variable sampler. By utilizing data augmentation, the sampler evaluates only a small subset of candidate alignment positions—the current alignment plus a few random alternatives—rather than the entire target sentence. The authors provide a formal proof of Harris ergodicity, ensuring that this $O(1)$ "subset" approach converges to the correct distribution. This algorithmic breakthrough makes Bayesian HMMs competitive in speed with traditional tools.

Experimental Evaluation

The models were evaluated on WMT 2014 news commentary data across several language pairs, including Czech, German, French, and Russian paired with English. The results demonstrate that the BHMM-Z model is highly effective.

BLEU scores for various language pairs comparing the proposed BHMM-Z model against standard baselines.

As shown in Figure 1, BHMM-Z performs on par with or better than industry standards like Giza++ and fastAlign in terms of BLEU scores, with particularly strong results in Czech and Russian. Furthermore, the Bayesian framework naturally encourages sparsity through Dirichlet priors. BHMM-Z produces significantly smaller phrase tables—roughly three times smaller than standard Bayesian HMMs—by setting fewer but more precise alignment links. In terms of efficiency, BHMM-Z took 267 minutes on a single CPU, comparing favorably to Giza++'s 202 minutes on two CPUs.

Conclusion

This work demonstrates that Bayesian HMMs can be both effective and efficient for word alignment. By replacing NULL words with collocations and implementing a constant-time sampler, the authors provide a scalable framework that maintains high translation quality while producing more compact and precise alignment models. Future work may involve more complex language models for untranslatable words, such as Pitman-Yor processes, to further improve alignment accuracy.

Summary updated

BibTeX
@inproceedings{schulz2016fast,
  author = {Philip Schulz and Wilker Aziz},
  title = {{Fast Collocation-Based Bayesian HMM Word Alignment}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2016},
  url = {https://openreview.net/forum?id=UWFWgXlAeo},
}
Figure