Towards User-Driven Neural Machine Translation

Huan Lin, Liang Yao, Baosong Yang, Dayiheng Liu, Haibo Zhang, Weihua Luo, Degen Huang, Jinsong Su

Abstract

Standard neural machine translation (NMT) models often adopt a "one-size-fits-all" approach, failing to account for a user’s unique style, topic preferences, and expression habits. This paper introduces User-Driven Neural Machine Translation (NMT), a framework that utilizes a dual-cache system and contrastive learning to capture personal traits from historical inputs. This approach enables personalized translations even for users previously unseen by the model (zero-shot).

Introduction

While modern NMT models excel at preserving semantic meaning, they often struggle to maintain the "personality" of the text. Every user possesses distinct linguistic traits; for instance, a fashion blogger employs different terminology than a software engineer, and a formal writer avoids the slang common in casual conversation.

Personalization in translation: User A (formal) vs. User B (casual).

Current personalization approaches face two primary challenges:

  1. Coarse-Grained Labels: Reliance on broad categories like gender or politeness fails to capture fine-grained personal habits.
  2. The Zero-Shot Barrier: Most models require a user to be present in the training data to learn their specific biases, which is impractical for real-world systems encountering millions of new users daily.

Proposed Method

The proposed framework treats a user's historical inputs as a proxy for their persona. The system architecture consists of three core components:

The User-Driven NMT architecture with dual-cache and contrastive learning components.

Dual-Cache Module

  • Topic Cache ($c_t^{(u)}$): Captures long-term, global traits (e.g., medical or tech terminology) by storing TF-IDF-weighted keywords from all past inputs.
  • Context Cache ($c_c^{(u)}$): Captures short-term, immediate style (e.g., current conversation flow) using a sliding window of the most recent inputs.

Gating Mechanism

The model employs a learnable gate to dynamically weight long-term "topic" information against short-term "context" information during translation generation.

User-Driven Contrastive Learning

To address the zero-shot challenge, the authors implement a triplet-margin loss during training. This objective forces the model to minimize the distance between translations for similar users (based on history) while maximizing the distance for dissimilar users. This teaches the model the underlying relationship between behavior and style, facilitating effective generalization to unseen users.

Experimental Setup

The research introduces the UDT-Corpus (User-Driven Translation Corpus), a Chinese-English dataset containing 57,639 sentences from 6,550 real-world users. Notably, 17,099 sentences are expert-annotated with English translations that specifically reflect the user's historical context. The model was pre-trained on the WMT2017 Chinese-to-English dataset (25M sentences) before fine-tuning on the UDT-Corpus.

Results and Discussion

The UD-NMT model achieved a 32.35 BLEU score on the UDT-Corpus, significantly outperforming the standard Transformer baseline (27.52) and a fine-tuned version (28.61). Ablation studies confirmed that both the dual-cache modules and the contrastive learning objective are essential for performance.

Human evaluations further validated the approach, with UD-NMT translations judged more relevant to user history 86% of the time compared to other personalized baselines. For example, in technical contexts like "wear resistance," the model correctly adapted to an apparel seller's specific terminology where generic models failed.

Conclusion

User-Driven NMT demonstrates that historical behavior provides a rich "portrait" for personalization without requiring explicit demographic profiles. While the model handles new users via similarity-based initialization, performance remains optimal when historical data is available. Future work will explore integrating additional behavioral signals, such as clickthrough data and manual edits, and investigate adversarial training to enhance robustness across diverse styles.

Summary updated

BibTeX
@inproceedings{lin2021towards,
  author = {Huan Lin and Liang Yao and Baosong Yang and Dayiheng Liu and Haibo Zhang and Weihua Luo and Degen Huang and Jinsong Su},
  title = {{Towards User-Driven Neural Machine Translation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.acl-long.310},
}
Figure