Hard Non-Monotonic Attention for Character-Level Transduction
Authors:
- Shijie WuSWShijie Wu
- Pamela ShapiroPSPamela Shapiro
- Ryan CotterellRCRyan Cotterell
Preprint
Abstract
Character-level string-to-string transduction is an important component of various NLP tasks. The goal is to map an input string to an output string, where the strings may be of different lengths and have characters taken from different alphabets. Recent approaches have used sequence-to-sequence models with an attention mechanism to learn which parts of the input string the model should focus on during the generation of the output string. Both soft attention and hard monotonic attention have been used, but hard non-monotonic attention has only been used in other sequence modeling tasks such as image captioning (Xu et al., 2015), and has required a stochastic approximation to compute the gradient. In this work, we introduce an exact, polynomial-time algorithm for marginalizing over the exponential number of non-monotonic alignments between two strings, showing that hard attention models can be viewed as neural reparameterizations of the classical IBM Model 1. We compare soft and hard non-monotonic attention experimentally and find that the exact algorithm significantly improves performance over the stochastic approximation and outperforms soft attention. Code is available at https://github. com/shijie-wu/neural-transducer.Keywords
All Related Versions
This publication has 9 references indexed in Scilit:
- CoNLL-SIGMORPHON 2017 Shared Task: Universal Morphological Reinflection in 52 Languages2017
- Speeding Up Neural Machine Translation Decoding by Shrinking Run-time Vocabulary2017
- Strategies for Training Large Vocabulary Neural Language Models2016
- Sequence-to-sequence neural net models for grapheme-to-phoneme conversion2015
- Whitepaper of NEWS 2015 Shared Task on Machine Transliteration2015
- Effective Approaches to Attention-based Neural Machine Translation2015
- Long Short-Term MemoryNeural Computation, 1997
- Simple statistical gradient-following algorithms for connectionist reinforcement learningMachine Learning, 1992
- Ponapean Reference Grammar1981