Evaluating Pixel Language Models on Non-Standardized Languages

Alberto Muñoz-Ortiz, Verena Blaschke, Barbara Plank

Abstract

We explore the potential of pixel-based models for transfer learning from standard languages to dialects. These models convert text into images that are divided into patches, enabling a continuous vocabulary representation that proves especially useful for out-of-vocabulary words common in dialectal data. Using German as a case study, we compare the performance of pixel-based models to token-based models across various syntactic and semantic tasks. Our results show that pixel-based models outperform token-based models in part-of-speech tagging, dependency parsing, and intent detection for zero-shot dialect evaluation by up to 26 percentage points in some scenarios, though not in Standard German. However, pixel-based models fall short in topic classification. These findings emphasize the potential of pixel-based models for handling dialectal data, though further research should be conducted to assess their effectiveness in various linguistic contexts.

Introduction: The Tokenization Trap

Pretrained language models (PLMs) are incredibly powerful, but they are heavily biased toward standardized languages with massive amounts of training data. When these models encounter dialects or non-standard language varieties, their performance often plummets.

A major culprit is tokenization. Traditional tokenizers are trained to split standard text into meaningful subwords. However, dialects often feature non-standard spellings and orthographic variations. When fed dialectal text, standard tokenizers "panic" and shatter words into tiny, meaningless fragments. For example, a human reader can easily see the visual similarity between the Standard German "willkommen" and the Swiss German "wiukomme," but a tokenizer treats them as entirely unrelated sequences of sub-tokens.

Comparison of tokenization and pixel patching for Standard German (a) and Swiss German (b).

This research investigates whether bypassing the tokenizer entirely by teaching models to "read" text visually as images can help them bridge the gap between standard languages and non-standard varieties.

Methodology: Reading Text as Images

The authors utilize the PIXEL (Pixel-based Encoder of Language) architecture. Instead of relying on a discrete text vocabulary, PIXEL works like a computer vision model:

  1. Text Renderer: Converts a string of text into an RGB image.
  2. Encoder: Divides the image into 16x16 pixel patches and feeds them into a Vision Transformer (ViT).
  3. Task-Specific Head: Fine-tunes the representations for specific NLP tasks.

The researchers pretrained a German PIXEL model from scratch on a monolingual Standard German corpus. They then fine-tuned it on Standard German for four downstream tasks: Part-of-Speech (POS) tagging, dependency parsing, topic classification, and intent detection. Finally, they evaluated the model zero-shot on various German dialects (Bavarian, Alemannic, Low Saxon, and Turkish-German code-switching) and compared its performance against standard token-based models (bert-cased and bert-uncased).

Results: Visual Robustness in Dialectal Contexts

PIXEL demonstrated superior robustness in zero-shot dialect evaluation. By treating text as an image, the model generalizes over orthographic noise that would normally break a tokenizer. It learns that words that look similar often mean similar things.

LAS performance for dependency parsing across Standard German (GSD, HDT) and Turkish-German (SAGT) datasets.

Key Findings:

  • Syntactic Tasks: PIXEL showed significant gains in zero-shot dialect evaluation. On the Low Saxon dataset, PIXEL outperformed BERT by up to 6.6 percentage points in POS tagging accuracy. In specific setups, PIXEL beat BERT by up to 26 percentage points.
  • Intent Detection: PIXEL dominated on dialectal intent detection. On the Bavarian de-st test set, PIXEL achieved 88.6% accuracy compared to bert-cased's 79.8%.
  • The Semantic Divide: While PIXEL excels at syntactic and short-sequence tasks, it struggles with longer sequence classification like topic classification. This is attributed to "patch multiplicity," where the same word might fall across different 16x16 pixel boundaries depending on its position in a sentence, slightly altering its visual representation.
  • Standard German Performance: BERT models still maintain the upper hand when evaluated on Standard German (the language they were trained on), highlighting that PIXEL is specifically advantageous for transferring knowledge to noisy or dialectal domains.

Discussion and Future Directions

While pixel-based models offer a promising path for low-resource and non-standardized languages, they come with higher computational costs for rendering and processing images. Future research may focus on multilingual pixel-based models to bypass the need for language-specific tokenizers entirely. Additionally, methods like using monospace fonts could reduce "patch multiplicity" issues, potentially improving performance on long-sequence tasks. These findings emphasize the potential of visual representations to effectively bridge the linguistic gap between standard languages and their diverse varieties.

Summary updated

BibTeX
@inproceedings{munozortiz2025evaluating,
  author = {Alberto Muñoz-Ortiz and Verena Blaschke and Barbara Plank},
  title = {{Evaluating Pixel Language Models on Non-Standardized Languages}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2025},
  url = {https://openreview.net/forum?id=3sIUKItbTY},
}
Figure