[Paper Review] Applying the Transformer to Character-level Transduction
This paper demonstrates that the Transformer architecture, when trained with a large batch size and a feature-invariant input representation, achieves state-of-the-art performance on character-level transduction tasks—including morphological inflection, historical text normalization, grapheme-to-phoneme conversion, and transliteration—outperforming prior recurrent sequence-to-sequence models despite having fewer parameters.
The transformer has been shown to outperform recurrent neural network-based sequence-to-sequence models in various word-level NLP tasks. Yet for character-level transduction tasks, e.g. morphological inflection generation and historical text normalization, there are few works that outperform recurrent models using the transformer. In an empirical study, we uncover that, in contrast to recurrent sequence-to-sequence models, the batch size plays a crucial role in the performance of the transformer on character-level tasks, and we show that with a large enough batch size, the transformer does indeed outperform recurrent models. We also introduce a simple technique to handle feature-guided character-level transduction that further improves performance. With these insights, we achieve state-of-the-art performance on morphological inflection and historical text normalization. We also show that the transformer outperforms a strong baseline on two other character-level transduction tasks: grapheme-to-phoneme conversion and transliteration.
Motivation & Objective
- To investigate why Transformers underperform on character-level transduction tasks despite their success in word-level NLP.
- To identify and resolve the key hyperparameter bottleneck—batch size—that limits Transformer performance in low-data character-level settings.
- To propose a feature-invariant input representation that removes order bias in feature-guided transduction tasks.
- To establish state-of-the-art results across four character-level transduction tasks using a minimal, carefully-tuned Transformer.
- To demonstrate that Transformers can outperform strong RNN baselines when properly optimized for low-resource, character-level sequence-to-sequence tasks.
Proposed method
- Adopt a small Transformer with N=4 layers, d_model=256, d_ff=1024, and 4 attention heads to reduce model capacity for low-data settings.
- Introduce feature-invariant positional encoding by setting position embeddings of morphological features to zero and using a special token to distinguish features from characters.
- Use a large batch size (up to 400, or ~4% of the 10k-train-example dataset) to stabilize training and improve performance.
- Apply label smoothing (0.1) and Adam optimizer with β2=0.98 or 0.999 to improve generalization on character-level tasks.
- Train the model in a left-to-right greedy decoding fashion with learned character embeddings and a linear layer before the softmax.
- Tune dropout rates (0.1 and 0.3) per task to balance overfitting and generalization, especially in low-data regimes.
Experimental results
Research questions
- RQ1Why has the Transformer underperformed on character-level transduction tasks compared to RNNs, despite its success in word-level tasks?
- RQ2To what extent does batch size influence Transformer performance on low-resource, character-level sequence-to-sequence tasks?
- RQ3How can feature-guided inputs (e.g., morphological attributes) be encoded in a way that preserves model invariance to feature order?
- RQ4Can a small, carefully-tuned Transformer outperform strong recurrent baselines on character-level transduction tasks?
- RQ5Does the Transformer’s performance advantage scale across diverse character-level tasks, including morphological inflection, g2p, transliteration, and text normalization?
Key findings
- The Transformer outperforms a strong recurrent baseline on morphological inflection with a 94.81% development accuracy, achieving a new state of the art.
- Performance on the morphological inflection task increases steadily with batch size, with the Transformer only outperforming RNNs at batch sizes ≥128.
- The feature-invariant Transformer achieves 91.85% accuracy on historical text normalization, surpassing the previous SOTA by 0.24 points.
- On grapheme-to-phoneme conversion, the Transformer achieves a 27.63% WER and 0.069 PER, outperforming prior recurrent models.
- On transliteration, the Transformer with dropout=0.3 achieves a 43.39% MFS score, significantly improving upon previous results.
- The model with dropout=0.3 performs best on historical text normalization (CERi=0.340), while dropout=0.1 is optimal for g2p, indicating task-specific hyperparameter sensitivity.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.