Introduction
Traditional Neural Machine Translation (NMT) models typically rely on a softmax layer to predict discrete tokens from a large vocabulary. This approach creates a "softmax bottleneck," where calculating a probability distribution over tens of thousands of words at every generation step becomes computationally and memory-intensive. Continuous-output models offer an alternative by predicting points (embeddings) in a high-dimensional vector space. While more efficient, training these models effectively remains a challenge.
The Syn-margin Approach
Existing continuous-output training often uses the von Mises-Fisher (vMF) distribution or margin-based losses requiring negative sampling. The authors propose syn-margin, a novel loss function that mathematically synthesizes negative samples directly from the model's predictions, bypassing the need for expensive vocabulary searches.
The core intuition is geometric: any component of a predicted vector $\hat{u}$ that does not align with the target vector $u$ represents an error. Syn-margin identifies the "wrongest" direction and penalizes it directly.
Two variants are introduced:
- SMP (Syn-margin by Projection): Uses the component of the prediction perfectly orthogonal to the target as the negative sample.
- SMD (Syn-margin by Difference): Uses the normalized difference vector ($\hat{u} - u$) as the negative sample.
By treating these synthetic samples as constants during backpropagation, the model is forced to move its predictions toward the target without "cheating" by shifting the negative samples.
Experimental Results
The researchers evaluated syn-margin on IWSLT’16 French$\rightarrow$English and German$\rightarrow$English benchmarks. Pretrained FastText embeddings were used for the target space.
As shown in the table above, syn-margin (specifically SMP) achieved statistically significant improvements in BLEU scores compared to the vMF baseline and other margin-based methods. Beyond raw metrics, the models demonstrated better grammatical awareness, such as improved gender agreement in translation (e.g., correctly predicting "her personality" in French$\rightarrow$English tasks where baselines failed).
Furthermore, syn-margin maintains high training efficiency. By avoiding heuristic searches through the embedding table, it achieves speeds comparable to the highly optimized vMF loss, significantly outperforming traditional "most informative" negative sampling methods.
Conclusion
Syn-margin provides a principled, stable, and efficient training signal for continuous-output NMT. By leveraging the geometry of the prediction space to synthesize negative samples, it overcomes the limitations of random or heuristic sampling. While currently applied to machine translation, this approach holds promise for other tasks involving high-dimensional embedding targets, such as zero-shot learning or multi-modal alignment.
Summary updated