Introduction
Neural Machine Translation (NMT) models are typically trained using Maximum Likelihood Estimation (MLE) to predict the next token in a reference sequence. However, this approach suffers from two primary issues: an objective mismatch between training (log-likelihood) and evaluation metrics (e.g., BLEU), and the computational difficulty of finding the optimal sequence during inference. While Beam Search offers a compromise between speed and quality, it remains computationally expensive. This paper proposes Trainable Greedy Decoding (TGD), which introduces a lightweight "actor" network to steer the decoding process toward higher-quality translations without the overhead of beam search.
Methodology: Steering the Decoder
The core of TGD is an actor-critic framework designed to "nudge" the internal hidden states of a pre-trained, frozen NMT model toward better long-term outcomes.
The Actor Network
Instead of modifying the base NMT model, the authors introduce a small feedforward network, the actor ($\pi_\phi$). At each decoding step $t$, the actor receives the current hidden state $z_t$ and produces a continuous action vector. This vector is added to the hidden state, effectively steering the model's trajectory toward sequences that maximize a specific reward, such as BLEU. Because the actor is extremely small (only 32 hidden units), the computational cost during inference is negligible.
Training via Deterministic Policy Gradient
Because metrics like BLEU are non-differentiable, the system employs a critic network to estimate the expected reward of a given decoding path. The actor is then trained using a variant of Deterministic Policy Gradient (DPG) to maximize the critic's predicted reward. To ensure stability in high-dimensional action spaces, the authors utilize a "Critic-Aware" importance sampling technique, weighting gradients based on the critic's evaluation of sampled noisy paths.
Experimental Results
The researchers evaluated TGD on the WMT’15 dataset across four language pairs: English to/from Czech (Cs), German (De), Russian (Ru), and Finnish (Fi).
Performance Gains
TGD consistently outperformed standard greedy decoding across all language pairs. As shown in the results, the method achieved statistically significant improvements in BLEU scores, particularly in the English-Russian and English-Finnish tasks.
Qualitative analysis revealed that the actor helps the model correct common greedy search errors, such as improper preposition usage and word redundancy. While the method improves greedy decoding significantly, the gains are smaller when the actor is added to an already large beam search, suggesting diminishing returns as the search space is more thoroughly explored by traditional means.
Conclusion
TGD demonstrates that decoding can be treated as a learnable task rather than a fixed heuristic. By decoupling the decoding objective from the training objective, researchers can optimize for diverse downstream metrics without retraining massive models. This framework is objective-agnostic, allowing for the optimization of any reward function, and its efficiency makes it highly suitable for production environments.
Summary updated