Auto-Sizing the Transformer Network: Improving Speed, Efficiency, and Performance for Low-Resource Machine Translation

Kenton Murray, Jeffery Kinnison, Toan Q. Nguyen, Walter J. Scheirer, David Chiang

Introduction

The Transformer architecture has revolutionized machine translation (MT), yet its massive parameter count often leads to overfitting in low-resource scenarios. Traditional methods to optimize model size, such as Neural Architecture Search (NAS), are computationally and environmentally prohibitive. This paper introduces auto-sizing, a technique that uses group regularization to automatically prune unnecessary neurons during a single training run, yielding models that are faster, smaller, and more accurate for low-resource languages.

The Challenge: Over-parameterization in Low-Resource MT

Transformers are notoriously "data-hungry." In settings where training data is scarce—such as for Hausa or Tigrinya—the standard "small" Transformer configuration remains significantly over-parameterized. This excess capacity allows the model to memorize noise rather than learn generalizable patterns. While finding the optimal architecture usually requires expensive grid or random searches across hundreds of GPU hours, auto-sizing aims to find the right fit in a single pass.

Methodology: One-Shot Auto-Sizing

The core of the auto-sizing approach is the integration of architecture search directly into the training objective via group regularization.

The Transformer architecture consists of Multi-Head Attention and Feed-Forward layers, both of which are targets for auto-sizing.

Group Regularization and Proximal Gradient Descent

The authors apply $\ell_{2,1}$ and $\ell_{\infty,1}$ regularizers to the weight matrices of the feed-forward networks (FFN) and multi-head attention (MHA) layers. Unlike standard weight decay, these regularizers drive entire groups of weights (e.g., specific neurons or attention heads) to exactly zero. To handle the non-differentiable nature of these penalties, the authors utilize proximal gradient descent, alternating between standard gradient steps and a "proximal step" that performs the actual pruning.

GPU Optimization

A key technical contribution is a parallelized proximal step for the $\ell_{\infty,1}$ norm. By reformulating the mathematics to utilize prefix sums and sorting, the authors achieved an efficient implementation on modern GPUs, ensuring that the regularization does not significantly slow down training compared to a standard baseline.

Experimental Results

The method was evaluated on five low-resource translation directions, including Tigrinya–English (15k sentences) and Hausa–English (45k sentences).

Comparison of Auto-sizing against Standard Baselines and Random Search across different language pairs.

Performance and Efficiency

As shown in the results table, auto-sizing consistently outperforms or matches the standard baseline while using significantly fewer parameters.

  • Translation Quality: On the extremely low-resource Tigrinya–English task, auto-sizing improved the BLEU score by 3.9 points over the recommended baseline.
  • Model Compression: The technique successfully removed approximately one-third of the parameters (reducing model size from ~40M to ~27M) while maintaining or improving translation quality.
  • Search Speed: Auto-sizing is an order of magnitude faster than random search. For Tigrinya-English, it achieved superior results in ~2.1k seconds, compared to the ~43.7k seconds required for a 72-configuration random search.

Key Insights

  • Component Sensitivity: Feed-forward sub-components are more amenable to pruning than attention layers. Deleting FFN neurons often improved BLEU scores, whereas aggressive attention pruning sometimes hindered performance.
  • Encoder vs. Decoder: In the smallest datasets, the encoder could be heavily pruned. The decoder remained more sensitive, likely due to its role in generating the final output sequence.
  • The "One-Shot" Advantage: Auto-sizing provides a robust, "plug-and-play" optimizer that finds high-performing, compressed architectures in roughly the same time as a single baseline training run.

Conclusion and Future Work

Auto-sizing offers a practical path for deploying efficient Transformers in low-resource environments. While it slightly underperformed on larger datasets like French–English—suggesting a "high-resource ceiling" where extra parameters are beneficial—it remains a powerful tool for resource-constrained MT. Future research may explore specialized regularizers for the attention mechanism to further refine the pruning process.

Summary updated

BibTeX
@inproceedings{murray2019auto,
  author = {Kenton Murray and Jeffery Kinnison and Toan Q. Nguyen and Walter J. Scheirer and David Chiang},
  title = {{Auto-Sizing the Transformer Network: Improving Speed, Efficiency, and Performance for Low-Resource Machine Translation}},
  booktitle = {NGT @ EMNLP},
  year = {2019},
  doi = {10.18653/v1/d19-5625},
}
Figure