Multilingual Pixel Representations for Translation and Effective Cross-lingual Transfer

Elizabeth Salesky, Neha Verma, Philipp Koehn, Matt Post

TL;DR

This paper demonstrates that training multilingual machine translation models using pixel-based representations—rendering text as images—effectively solves the "vocabulary bottleneck" common in traditional models. By sharing parameters at the visual level across all scripts, these models achieve significant performance gains (up to 9 BLEU) and adapt to new, unseen scripts much more efficiently than standard subword-based approaches.

What Problem Does This Paper Address?

Traditional multilingual machine translation (MMT) models rely on a fixed vocabulary of subwords. This creates a fundamental trade-off: as you add more languages, you must either increase the size of the embedding matrix (leading to a "vocabulary bottleneck") or reduce the number of parameters allocated to each language. This often leaves low-resource languages or those with unique scripts (like Chinese or Telugu) under-represented or plagued by "out-of-vocabulary" (OOV) issues.

While byte-level models offer a vocabulary-free alternative, they significantly increase sequence lengths, making training slow and computationally expensive. The authors propose using pixel representations to bypass these discrete vocabulary constraints entirely, allowing for complete parameter sharing across all languages and scripts.

Figure 1: Embedding matrices are disjoint parameter allocations by script, leading to a vocabulary bottleneck. Pixel representations however share parameters across scripts and are not limited to a discrete vocabulary.

Methods

The core idea is to treat text as a visual signal. The process involves:

  1. Rendering: Source text is rendered into images using the PangoCairo library with a standard font (Google Noto Sans).
  2. Tokenization: These sentence-level images are sliced into fixed-size, overlapping patches (24x24 pixels with a stride of 12).
  3. Encoding: A convolutional block processes these image patches into vectors, which are then fed into a standard Transformer encoder.
  4. Decoding: The model uses a traditional Transformer decoder to generate discrete subword tokens in the target language (English).

The authors found that pixel-based models benefit from a specific architecture: deeper encoders and shallower decoders. For example, moving from a 6-layer encoder/6-layer decoder to a 9-layer encoder/3-layer decoder improved performance by 2.8 BLEU.

Figure 2: Encoding text with pixels: text is rendered to images by sentence. Image tokens are created by over- lapping sliding windows of fixed height (h), width (w), and stride (s). Convolutional layer output is projected to flat vectors for subsequent Transformer layers.

Datasets

The researchers evaluated their approach on two primary benchmarks:

  • TED-7: A balanced dataset of 7 language pairs (Arabic, German, French, Japanese, Korean, Russian, and Chinese) translated into English (~1.2M sentences).
  • TED-59: A larger, highly imbalanced dataset covering 59 language pairs to English (~5.1M sentences), providing a more realistic test for multilingual scaling.
  • Cross-lingual Transfer: To test adaptation, they used five languages not seen during pretraining: Romanian, Polish, Farsi, Vietnamese, and Hebrew.

Key Insights and Ideas

  • Complete Parameter Sharing: Unlike subword embeddings where only ~3% of parameters are updated per batch, 100% of the pixel representation block is updated every batch. This leads to a much stronger initialization for new languages.
  • Visual Transfer: Models can exploit visual similarities. For instance, a model trained on Russian (Cyrillic) can transfer that knowledge to Belarusian because the characters look similar, even if the subwords are different.
  • Solving Representation Degeneration: Traditional embeddings often suffer from "degeneration," where rare words cluster together poorly in vector space. Pixel models mitigate this because all representations are updated at the pixel level regardless of word frequency.
  • Data Efficiency: Pixel models are remarkably efficient at learning new scripts. For Hebrew (an unseen script), the pixel model outperformed a subword model even when the latter was given a custom vocabulary expansion.
Figure 3: Performance across different model capacities, varying encoder depth and/or width (TED-7).

Key Results

  • Overall Gains: On the TED-59 dataset, pixel models improved average performance by 4.6 BLEU over subword baselines, with individual language gains reaching up to 9 BLEU.
  • Low-Resource Boost: Belarusian (a low-resource language with only 5k examples) saw a massive 10.2 BLEU improvement, thanks to positive transfer from other Cyrillic scripts in the dataset.
  • Cross-lingual Transfer: In zero-shot or few-shot settings for new scripts, pixel models were significantly more effective. For Hebrew, the pixel model achieved a 30% gain over subword models using vocabulary expansion.
Figure 5: Improvement per language for pixel representations compared to subwords on TED-59.

Limitations and Future Work

  • Many-to-One Focus: This study only applied pixel representations to the source side (many-to-one translation). Future work is needed to see if pixel-based decoding is equally effective.
  • Scale: While 5M sentences is significant, it is still small compared to industry-scale models (like NLLB). The authors note it remains to be seen how this scales to billions of parameters.
  • Training Speed: Pixel models can be slower to converge and require more disk space if images are pre-rendered.
  • Script Minimums: The authors observed that scripts with fewer than 10k training examples might still struggle, suggesting a minimum data threshold for effective visual learning.

Summary updated

BibTeX
@inproceedings{salesky2023multilingual,
  author = {Elizabeth Salesky and Neha Verma and Philipp Koehn and Matt Post},
  title = {{Multilingual Pixel Representations for Translation and Effective Cross-lingual Transfer}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=87WEkTIVSh},
}
Figure