Abstract
A good translation should not only translate the original content semantically, but also incarnate personal traits of the original text. For a real-world neural machine translation (NMT) system, these user traits (e.g., topic preference, stylistic characteristics and expression habits) can be preserved in user behavior (e.g., historical inputs). However, current NMT systems marginally consider the user behavior due to: 1) the difficulty of modeling user portraits in zero-shot scenarios, and 2) the lack of user-behavior annotated parallel dataset. To fill this gap, we introduce a novel framework called user-driven NMT. Specifically, a cache-based module and a user-driven contrastive learning method are proposed to offer NMT the ability to capture potential user traits from their historical inputs under a zero-shot learning fashion. Furthermore, we contribute the first Chinese-English parallel corpus annotated with user behavior called UDT-Corpus. Experimental results confirm that the proposed user-driven NMT can generate user-specific translations.
Introduction
Standard Neural Machine Translation (NMT) models are typically designed as "one-size-fits-all" systems. While they excel at capturing semantic meaning, they often ignore the unique stylistic quirks, topic preferences, and expression habits of individual users. For example, a professional might translate a phrase formally, whereas a younger user might use slang for the same source text.
This paper addresses the "Zero-Shot Gap"—the difficulty of personalizing translations for new users not seen during training—and the scarcity of data linking translations to specific user histories. The authors propose UD-NMT, a framework that captures user traits from historical inputs to enable personalized translation in a zero-shot fashion.
The UD-NMT Framework
The UD-NMT framework moves away from explicit user IDs, instead using historical inputs as a proxy for identity. It consists of two primary technical innovations: a dual-cache system and a contrastive learning objective.
1. Dual-Cache System
To represent user behavior, the model utilizes two distinct caches:
- Topic Cache ($c_t^{(u)}$): This captures long-term, global traits. By identifying keywords via TF-IDF from a user's entire history, the model infers their general domain (e.g., scientific vs. casual).
- Context Cache ($c_c^{(u)}$): This captures short-term traits from recent inputs, acting as a sliding window to maintain the user's current stylistic "vibe."
A gating mechanism blends these representations into a single vector that informs the NMT model's source sentence embeddings.
2. User-Driven Contrastive Learning
To handle the "cold start" problem for new users, the framework employs contrastive learning. During training, the model minimizes the distance between translations of users with similar historical behaviors and maximizes it for dissimilar ones. This teaches the model the underlying relationship between behavior and style, allowing it to generalize to brand-new users based on their first few inputs.
The UDT-Corpus
A major contribution of this work is the UDT-Corpus, the first Chinese-English parallel corpus annotated with user behavior. It includes data from 6,550 users and over 57,000 sentences. To ensure high quality, over 17,000 of these sentence pairs were manually revised by linguistic experts to accurately reflect the users' historical traits.
Experimental Results
UD-NMT demonstrates significant improvements over standard baselines in both quantitative and qualitative evaluations:
- Quantitative Performance: On the UDT-Corpus, UD-NMT achieved a 32.35 BLEU score, outperforming the standard fine-tuned Transformer (28.61) and previous personalization methods like UserBias (31.36).
- Human Evaluation: In qualitative tests, UD-NMT's translations were judged to be more consistent with historical user traits 86% of the time compared to standard models.
- Stylistic Adaptation: The model successfully adapts to domain-specific language, such as choosing between technical terms and general descriptions based purely on the user's history cache.
Conclusion
By shifting the focus from static user IDs to dynamic historical behavior, UD-NMT provides a robust path toward personalized machine translation. While challenges remain regarding the computational overhead of maintaining user caches at scale, the use of contrastive learning and dual-cache systems offers a promising solution for the zero-shot personalization of NMT systems.
Summary updated