Abstract
Neural Machine Translation (NMT) models typically require vast amounts of parallel data to generalize effectively. In low-resource scenarios, these models often overfit to specific lexical strings rather than learning underlying linguistic structures. We introduce CipherDAug, a novel data augmentation technique that utilizes simple ROT-$k$ (Caesar) ciphers to create synthetic "new" source languages from existing parallel data. By enforcing a co-regularization loss that encourages the model to produce identical translations for both plaintext and its enciphered counterparts, CipherDAug achieves substantial improvements in translation quality. Our results demonstrate gains of up to +8.6 BLEU points in extremely low-resource settings and consistent improvements in high-resource environments, all without the need for external monolingual corpora.
Introduction
The performance of NMT systems is heavily dependent on the availability of large-scale parallel corpora. While high-resource language pairs like English-German perform well, low-resource pairs often suffer from "memorization," where the model fails to capture the semantic essence of sentences. Existing augmentation methods like back-translation require significant external data and additional models, while word-replacement strategies (e.g., SwitchOut) can disrupt sentence structure or ignore context.
CipherDAug addresses these challenges by leveraging a classic cryptographic insight: the meaning of a sentence is often encoded in its distributional properties—such as character/word frequencies and their relative positions—rather than the specific characters used. By applying a bijective ROT-$k$ shift, we generate a "different view" of the source information that preserves the original syntactic and semantic structure while providing lexical diversity.
Methodology
The core of CipherDAug is the generation of ciphertext views and a multi-view learning objective.
ROT-$k$ Encipherment
We use a simple substitution cipher where each letter in the source alphabet is shifted by $k$ positions. For instance, a ROT-1 shift transforms "abc" into "bcd". This process preserves sentence length, punctuation, and the statistical distribution of tokens, but alters the lexical appearance.
Multi-view Learning Objective
Rather than simply appending ciphertexts to the training set, we propose a specialized loss function composed of three parts:
- Anchor Cross-Entropy: Standard cross-entropy loss for the original plaintext source.
- Cipher Cross-Entropy: Standard cross-entropy loss for the enciphered source.
- Agreement Loss: A symmetric Kullback-Leibler (KL) divergence term that penalizes discrepancies between the output probability distributions of the plaintext and ciphertext inputs.
To stabilize training, a softmax temperature parameter ($\tau$) is used to flatten the probability distributions, ensuring the agreement loss remains informative.
Experimental Results
We evaluated CipherDAug across various data scales, from extremely low-resource (Slovak-English, 61k pairs) to high-resource (WMT14 English-German, 4.5M pairs).
Translation Performance
CipherDAug demonstrates remarkable efficacy in low-resource settings. On the Slovak$\rightarrow$English task, it achieved a BLEU score of 32.62, a significant jump from the baseline of 24.0. This performance even surpassed massively multilingual models trained on dozens of languages. In mid-sized tasks like IWSLT14 German$\rightarrow$English, the method provided a +2.9 BLEU improvement, outperforming established baselines like SwitchOut.
High-Resource and Robustness
Even on the large-scale WMT14 dataset, CipherDAug yielded a statistically significant boost of +0.6 BLEU. Beyond raw scores, the method significantly improves model robustness. Analysis showed a 40% reduction in hallucinations—instances where the model generates fluent but irrelevant text. By forcing the model to reconcile two distinct lexical views of the same input, it becomes more attentive to the actual source content.
Discussion: The BPE Effect
A surprising mechanism behind CipherDAug's success is its interaction with Byte-Pair Encoding (BPE). Since BPE subwords are learned on the combined vocabulary of plain and ciphered text, rare words in the plaintext may be segmented into more common, informative subwords when enciphered. This allows the model to share information more effectively across the corpus, mitigating the impact of rare tokens.
Conclusion
CipherDAug provides a simple yet powerful framework for NMT data augmentation. By exploiting the distributional invariance of ciphers, it creates high-quality synthetic data that forces models to learn more robust representations. Future work may explore more complex ciphers or target-side augmentation. While model capacity can become a bottleneck at very large scales, the consistent gains across diverse datasets establish CipherDAug as a valuable tool for improving NMT, particularly in data-scarce environments.
Summary updated