Elamur Research⌕
☰
home / papers / 2008 / Parallel Implementations of Word Alignment Tool

Parallel Implementations of Word Alignment Tool

Summary

GIZA++ is the standard tool for training IBM and HMM word alignment models for phrase-based SMT. It runs as a single process on a single thread, and word alignment accounts for most of an SMT system's training time. Gao and Vogel use the structure of EM to fix this. In the E-step, every sentence pair can be aligned independently, because parameters change only in the M-step. They build two parallel versions on this basis. PGIZA++ splits the corpus across separate processes, possibly on cluster nodes, and a master process merges their count files and normalizes them. MGIZA++ runs threads in shared memory and uses locks to synchronize access to the count tables. On 4 CPUs, MGIZA++ finished in about 41% of the single-thread time, and its Viterbi alignments were almost identical to the reference. PGIZA++ gained little on a small corpus because of file I/O and normalization costs, but it scales past a single machine. While parallelizing, the authors also found and fixed an HMM initialization bug in GIZA++. The work matters because it makes alignment training on large parallel corpora practical.

Key points

  • Model sequence: both tools parallelize the usual training pipeline of Model 1, then HMM, then Model 3 and Model 4. Each iteration consists of parallel alignment and count collection, followed by a central merge-and-normalize step.
  • Pruning count tables: in a 10-million-sentence-pair experiment, pruning shrank each child's lexicon (TTable) count file from about 1.27 GB to between 494 MB (Model 1) and 129 MB (Model 4). Pruning slightly changes the results.
  • Speed on a small corpus (total time):
    • MGIZA++ on 1 CPU: 14,913 s, the same speed as the original GIZA++.
    • MGIZA++ on 4 CPUs: 6,140 s.
    • PGIZA++ on 4 nodes: 12,963 s. Its Model 1 stage was actually slower than single-thread MGIZA++.
  • Agreement with bug-fixed GIZA++ (share of sentences with different Viterbi alignments):
    • Original GIZA++: 10.19%, mostly due to the HMM bug, which arose when the target sentence has one word.
    • MGIZA++: 0.019%.
    • PGIZA++: 1.86%.
    • Score residuals were 0.6503, 0.0017 and 0.0371, respectively.
  • Job control: PGIZA++ can launch child processes via ssh, Condor or Maui. Children report completion by creating signal files on a shared network file system.

Interesting ideas

  • I1. Parallelize the E-step. Any EM-style learner whose parameters are fixed during the E-step can be split into independent data shards with summed counts. This applies, for example, to training topic models or HMM taggers on large Ukrainian corpora.
  • I2. Prune counts before writing them. Dropping low-probability counts before writing them to disk greatly cuts network and disk I/O. The small loss in fidelity may be acceptable, and this trade-off is worth measuring in any distributed counting pipeline.
  • I3. Measure fidelity, not just speed. Comparing outputs against a reference implementation by counting changed outputs and computing a normalized score residual is a cheap regression test. It could be reused when refactoring or porting any NLP tool.
  • I4. Use shared files as a barrier. Workers creating marker files in a shared folder, watched by a master script, gives scheduler-independent synchronization with no messaging infrastructure. It is handy for simple cluster workflows.
  • I5. Choose by corpus size and network speed. Shared-memory threads win on moderate data, while multi-process clusters pay off only at large scale. The authors suggest combining both, along with dynamic assignment of work and binary model formats (about 1/3 the size of text for the TTable).

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Natural language processing

Cited by

205 papers of our library cite it (of the 140884 whose bibliographies we read); 13 of them have a page here, 192 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{gao2008parallel,
  title = {{Parallel Implementations of Word Alignment Tool}},
  author = {Gao, Qin and Vogel, Stephan},
  booktitle = {Software Engineering, Testing, and Quality Assurance for Natural Language Processing},
  year = {2008},
  doi = {10.3115/1622110.1622119},
  url = {https://doi.org/10.3115/1622110.1622119}
}

References

8 references, 0 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Arthur Dempster, Nan Laird, and Donald Rubin. 1977. Maximum Likelihood From Incomplete Data via the EM Algorithm. Journal of the Royal Statistical Society, Series B, 39(1):138 find
  2. Douglas Thain, Todd Tannenbaum, and Miron Livny. 2005. Distributed Computing in Practice: The Condor Experience. Concurrency and Computation: Practice and Experience, 17(2-4):323-356 find
  3. Franz Josef Och and Hermann Ney. 2003. A Systematic Comparison of Various Statistical Alignment Models. Computational Linguistics, 29(1):19-51 find
  4. Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondrej Bojar, Alexandra Constantin, Evan Herbst. 2007. Moses: Open Source Toolkit for Statistical Machine Translation. find
  5. ACL 2007, Demonstration Session, Prague, Czech Republic Peter F. Brown, Stephan A. Della Pietra, Vincent J. Della Pietra, Robert L. Mercer. 1993. The Mathematics of Statistical Machine Translation: Parameter Estimation. Computational Linguistics, 19(2):263-311 find
  6. Stephan Vogel, Hermann Ney and Christoph Tillmann. 1996. HMM-based Word Alignment in Statistical Translation. In COLING ’96: The 16th International Conference on Computational Linguistics, pp. 836-841, Copenhagen, Denmark. find
  7. Xiaojun Lin, Xinhao Wang and Xihong Wu. 2006. NLMP System Description for the 2006 NIST MT Evaluation. find
  8. NIST 2006 Machine Translation Evaluation Yaser Al-Onaizan, Jan Curin, Michael Jahr, Kevin Knight, John D. Lafferty, I. Dan Melamed, David Purdy, Franz J. Och, Noah A. Smith and David Yarowsky. 1999. Statistical Machine Translation. Final Report JHU Workshop, Available at http://www.clsp.jhu.edu/ws99… ↗

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/gao-2008-parallel-implementations-word-alignment-tool/