NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Case-Sensitive Neural Machine Translation

Xuewen Shi, Heyan Huang, Ping Jian, Yi-Kun Tang

Introduction

In Natural Language Processing (NLP), capitalization is more than a stylistic choice; it is a vital semantic signal. It distinguishes between common nouns and named entities (e.g., "apple" vs. "Apple") and clarifies sentence structure. However, Neural Machine Translation (NMT) models face a "capitalization contradiction." Lowercasing everything keeps the vocabulary small but loses crucial information. Conversely, keeping original casing (True-casing) explodes the vocabulary size and treats different cases of the same word as unrelated entities, hindering the model's ability to learn shared meanings. This paper introduces strategies to integrate case awareness directly into the translation process.

Proposed Methods

The authors propose two main architectural approaches to handle casing effectively without vocabulary explosion.

1. Case Tokens

This approach inserts artificial tokens into the sequence to indicate capitalization.

  • Left Case Token (LCT): The token (e.g., <ca> for capitalized, <ab> for abbreviations) is placed before the word.
  • Right Case Token (RCT): The token is placed after the word.

2. Joint Case Prediction (CP)

This method modifies the NMT decoder by adding an auxiliary network layer specifically for case prediction. The researchers evaluated three timing variations for this prediction:

  • $CP_{pre}$: Predict the case before generating the word.
  • $CP_{pos}$: Predict the case after generating the word.
  • $CP_{syn}$: Predict both the word and its case simultaneously.
Architectural diagrams of the proposed Case Token and Joint Case Prediction (CP) methods.

Adaptive Scaling (AS)

Because lowercase words dominate typical corpora, models often become biased toward predicting lowercase. To address this "class inequality," the authors employed Adaptive Scaling, a technique that dynamically adjusts the loss function during training to give more weight to rarer capitalized instances.

Experimental Results

The methods were evaluated on three linguistically diverse translation tasks: Chinese-English (Zh-En), English-French (En-Fr), and English-German (En-De).

Detailed BLEU score performance across different models and language pairs.

Key Findings

  • Prediction Order Matters: Predicting the case before the word ($CP_{pre}$ and LCT) generally outperformed predicting it after. The authors suggest that knowing the case first narrows the search space for the target word, facilitating the decoder's task.
  • Linguistic Distance Impacts Gains: The Zh-En task saw the most dramatic improvements (up to 2.5 BLEU points). Since Chinese provides no case hints, the model's internal ability to predict case based on context was a significant upgrade.
  • Efficiency Trade-offs: There is a computational cost. Adding case tokens increases sequence length, making decoding ~14% slower. Joint Prediction models ($CP_{pre}$) were roughly 50% slower than a standard Transformer due to the extra autoregressive steps.

Conclusion

The proposed case-sensitive NMT strategies achieve significant improvements in translation quality by effectively managing capitalization. While there is a trade-off in decoding efficiency, the gains in semantic accuracy are substantial, particularly for language pairs with disparate casing rules. Future work may apply these approaches to other generation tasks like text summarization and Automatic Speech Recognition (ASR).

Summary updated

BibTeX
@inproceedings{shi2020case,
  author = {Xuewen Shi and Heyan Huang and Ping Jian and Yi-Kun Tang},
  title = {{Case-Sensitive Neural Machine Translation}},
  booktitle = {PAKDD},
  year = {2020},
  doi = {10.1007/978-3-030-47426-3\_51},
}
Figure