---
title: Pixel-Based Language Models
url: https://www.emergentmind.com/topics/pixel-based-language-models
type: topic
---

# Pixel-Based Language Models

Searching arXiv for recent and foundational papers on pixel-based language models to support the encyclopedia article.
arxiv_search(query="pixel-based language model PIXEL PIXAR MIXAR DualGPT multilingual", max_results=10, sort_by="relevance")
arxiv_search(query="pixel-based language models", max_results=10, sort_by="relevance")
Pixel-based language models are language models that represent written language as rendered images rather than as discrete word, subword, byte, or character identifiers. In the canonical formulation introduced by PIXEL, text is rendered as an image, split into patches, and modeled with masked patch reconstruction, thereby removing the fixed vocabulary bottleneck that constrains multilingual coverage in token-based systems [2207.06991]. Subsequent work extended the paradigm in several directions: decoder-only autoregressive generation in pixel space, multilingual pretraining across scripts, low-resolution visual tokens for logographic writing, sentence-level representation learning, OCR-free document understanding, and hybrid multimodal architectures that reintroduce text tokenizers and thereby recover some of the very constraints pixel methods were meant to avoid [2401.03321].

## 1. Conceptual basis

The central motivation for pixel-based language modeling is the vocabulary bottleneck. Standard language models are defined over a finite set of inputs, so multilingual scaling requires a trade-off between vocabulary coverage, embedding size, and output-layer cost. PIXEL addresses this by rendering text into an RGB image and training a ViT-MAE-style model to reconstruct masked patches instead of predicting a distribution over tokens. In the base configuration, text is rendered into an image of size \(16 \times 8464\), equivalent to \(529\) patches of size \(16 \times 16\); the model has \(112\)M parameters, with \(86\)M in the encoder and \(26\)M in the decoder [2207.06991].

This formulation yields a genuinely tokenization-free encoder. There is no wordpiece vocabulary, no token embedding table, no vocabulary softmax, and no need to expand the lexicon to accommodate additional scripts. Because the representation is visual, the same model can in principle process any script that can be rendered by a computer font system, including left-to-right and right-to-left scripts, ligatures, emoji, and non-Latin writing systems [2207.06991].

The empirical profile of the early approach was asymmetric rather than uniformly dominant. PIXEL was slightly weaker than BERT on English and other Latin-script settings, but substantially stronger on scripts that were not found in BERT’s pretraining data. On POS tagging, for example, PIXEL reached \(96.0\) on Coptic, \(96.3\) on Hindi, \(97.2\) on Japanese, \(94.2\) on Korean, and \(92.8\) on Chinese, while BERT was much weaker on those scripts; on English, by contrast, BERT remained slightly stronger. The same pattern appeared in dependency parsing and question answering, and the PIXEL–BERT gap was strongly correlated with BERT’s \([UNK]\) rate, with Pearson correlations of \(r=0.9\) for POS and \(r=0.95\) for parsing [2207.06991]. From the outset, then, pixel-based language modeling was less a universal replacement for tokenization than a reallocation of inductive bias toward script coverage and orthographic robustness.

## 2. Architectural families and training objectives

Two broad training regimes define the field. The first is masked patch reconstruction, exemplified by PIXEL and later multilingual encoder models. The second is autoregressive next-patch prediction, introduced by PIXAR and scaled multilingualy by MIXAR. In the autoregressive family, the basic factorization is the standard decoder-only form
$$
p(x_{1:T})=\prod_{t=1}^{T} p(x_t \mid x_{<t}),
$$
except that each \(x_t\) is a rendered text patch rather than a symbolic token [2401.03321].

PIXAR established the first pixel-based autoregressive language model. It uses a decoder-only Transformer with \(12\) layers, \(12\) attention heads, hidden size \(768\), SwiGLU MLPs, RMSNorm, and RoPE. Text is rendered into non-overlapping patches; in the best setting, the patch height is \(8\) pixels and the patch length is \(2\) characters, with a context window of \(360\) patches, and binary images performed best. Pure maximum-likelihood training proved insufficient for readable generation, so PIXAR added a second adversarial pretraining stage with a patch-wise context-aware adversarial loss. That stage improved LAMBADA from \(5.7\) to \(13.8\) and bAbI from \(11.1\) to \(19.6\), while raising readability from \(54.8\%\) to \(82.2\%\) on LAMBADA and from \(63.2\%\) to \(77.0\%\) on bAbI [2401.03321].

MIXAR extended this autoregressive line to multilingual and multiscript generation. It is a decoder-only Transformer with LLaMA-style design choices, trained on eight languages—German, English, Spanish, Italian, French, Korean, Chinese, and Japanese—using \(32 \times 32\) patches instead of PIXAR’s \(8 \times 8\) patches. Two scales are reported: \(116\)M parameters with \(12\) layers and \(477\)M parameters with \(24\) layers. The larger model substantially improved multilingual generative performance; on English bAbI it reached \(22.5\), and its reported LAMBADA average was \(9.6\). MIXAR also showed robustness to unseen languages and stronger robustness to orthographic attacks than GPT-2 and PIXAR at higher attack ratios [2604.11575].

A distinct architectural line replaces discrete symbolic inputs with character images rather than sentence ribbons or patchified line images. “Hot-Start from Pixels” treats Chinese characters as grayscale images and feeds visual embeddings into a GPT-2-small-style decoder with about \(117\)M parameters. At \(8 \times 8\) resolution, the pixel-based model achieved \(39.21\%\) next-character accuracy, essentially matching the index-based baseline at \(39.10\%\). Its most striking finding was a pronounced hot-start effect: at about \(0.4\%\) of total training, around \(8{,}200\) training sequences, Vision-100 reached \(12.34\%\) accuracy while the index-based baseline remained at \(5.84\%\) [2601.09566]. This result did not establish pixel inputs as universally better than token IDs, but it did show that even very low-resolution visual structure can be a strong early inductive bias.

## 3. Rendering as model design

In pixel-based language models, rendering is not a neutral preprocessing step; it determines the effective input alphabet. “Text Rendering Strategies for Pixel Language Models” compared four renderers for PIXEL—CONTINUOUS, WORDS, MONO, and BIGRAMS—and showed that structured rendering substantially changes downstream behavior. On GLUE with \(22\)M-parameter SMALL models, SMALL-CONTINUOUS reached a \(71.0\) average, whereas SMALL-BIGRAMS reached \(75.4\), SMALL-MONO \(74.4\), and SMALL-WORDS \(74.7\). On UDP, the differences were smaller, with SMALL-WORDS at \(76.6\), SMALL-BIGRAMS at \(76.1\), and SMALL-CONTINUOUS at \(76.2\). BASE-BIGRAMS also reached \(52.8\) on TyDiQA-GoldP, slightly above PIXEL’s \(52.3\), and \(74.2\) on MasakhaNER, above PIXEL’s \(70.6\) [2311.00522].

The mechanism proposed in that work is patch-frequency regularization. Continuous rendering creates a large number of almost-equivalent patches, many of which receive few updates. BIGRAMS compresses the visual input space by mapping words more canonically into patch-aligned two-character units, increasing the update frequency of meaningful patch types. The same paper explicitly connects this to token-frequency effects in token-based language models: pixel models avoid vocabularies, but they still inherit a sparse-representation problem when too many distinct visual forms are observed too rarely [2311.00522].

Pixology sharpened the interpretive picture by probing PIXEL layer by layer. It found that lower layers predominantly capture superficial visual features, whereas higher layers gradually learn more syntactic and semantic abstractions. PIXEL was substantially better than ViT-MAE on language tasks, but remained below BERT; on downstream fine-tuning, PIXEL reached \(0.97\) on POS, \(0.89\) on dependency parsing, and \(0.74\) GLUE average, versus \(0.93\), \(0.68\), and \(0.58\) for ViT-MAE and \(0.97\), \(0.91\), and \(0.80\) for BERT. The same study also found that some rendering constraints help earlier learning of surface-level features: among constrained variants, pixel-small-words was strongest, whereas pixel-small-bigrams did not show meaningful linguistic learning at small scale [2410.12011].

Taken together, these studies imply that rendering functions as an inductive bias analogous to tokenization design. A pixel model may be tokenization-free in the formal sense, yet still succeed or fail according to how faithfully the renderer exposes reusable orthographic structure.

## 4. Multilingual transfer, script coverage, and non-standard language

The strongest empirical argument for pixel-based language models remains multilingual transfer. In multilingual machine translation, source-side pixel representations outperformed subword embeddings in both balanced and highly imbalanced regimes. On TED-7, the pixel system reached \(26.2\) BLEU, \(49.5\) chrF, and \(77.9\) COMET, compared with \(25.7\), \(48.8\), and \(77.3\) for BPE. On TED-59, the gap widened to \(28.4\) versus \(23.8\) BLEU, \(50.1\) versus \(45.5\) chrF, and \(77.2\) versus \(73.3\) COMET. The improvement correlated most strongly with total script-level data, with \(\rho = 0.70\), \(p \ll 0.001\), rather than with language-pair data alone. The paper further notes that only about \(3\%\) of source-side subword embeddings are updated per batch on average in TED-59, whereas \(100\%\) of the pixel representation block parameters are updated every batch [2305.14280].

Multilingual pretraining in encoder-style pixel models shows the same pattern. PIXEL-M4 was pretrained on English, Hindi, Ukrainian, and Simplified Chinese, covering Latin, Devanagari, Cyrillic, and Han scripts. On a selected SIB-200 subset, pixel-m achieved an average macro-F1 of \(58.7\), compared with \(46.0\) for the English-only pixel-bigrams model. On UDP, the average LAS improved from \(76.7\) to \(79.3\); on NER, average macro-F1 improved from \(73.9\) to \(75.9\). Word-level probing with linspector further showed that pixel-m captures richer case marking, part-of-speech, verb tense, and morphological feature bundles, including in unseen scripts such as Arabic, Armenian, and Greek [2505.21265].

The same tokenizer-free advantage appears in non-standardized language. In a German case study on dialects, pixel-based models outperformed token-based BERT models in zero-shot dialect POS tagging, dependency parsing, and intent detection by up to \(26\) percentage points in some scenarios, though not in Standard German and not in topic classification. The advantage was concentrated precisely where tokenization is most brittle: dialectal spelling variation, irregular morphology, code-switching, and orthographic noise [2412.09084].

A more modular strategy augments pretrained language models with a pixel-level fallback encoder rather than replacing the entire input pipeline. In machine translation from Hindi, Russian, Spanish, Thai, and Ukrainian into English, pixel fallback was consistently best across SmolLM2-360M, SmolLM2-1.7B, and Phi-3-mini. For SmolLM2-360M, pixel fallback reached \(56.8\) on Hindi, \(56.0\) on Russian, and \(48.6\) on Thai, compared with \(53.2\), \(53.9\), and \(36.5\) for the base tokenizer. The same paper reports average compression ratios on FLORES+ of about \(5.1\times\) for Hindi, \(4.7\times\) for Russian, and \(8.6\times\) for Thai relative to the SmolLM2 tokenizer, and says inference can be up to \(4\times\) faster [2504.02122]. This is a different engineering point from end-to-end pixel LMs, but it reinforces the same empirical claim: vocabulary-free visual inputs are particularly effective when the tokenizer is the bottleneck.

## 5. Beyond next-token prediction

Pixel-based language modeling has expanded beyond masked modeling and autoregressive continuation into sentence representation learning, OCR-free document understanding, and speech synthesis. “Pixel Sentence Representation Learning” reframed sentence semantics as a visual representation learning problem and introduced a progressive alignment pipeline: visual alignment through typos and word-order shuffling, topical alignment through same-document spans, and reasoning alignment through all-NLI entailment pairs. Starting from vanilla PIXEL, which was reported at about \(16.28\) STS-b in English, the method raised English STS-b to about \(78\), while also exhibiting zero-shot cross-lingual transferability and a “leapfrogging pattern” across languages during iterative multilingual training [2402.08183].

Historical document modeling provides a different extension. PHD adapts PIXEL to real page images by replacing the long ribbon input with \(368 \times 368\) crops, equivalent to \(23 \times 23\) patches, and pretraining on synthetic scans plus historical newspapers from the \(1700\)–\(1900\) period. The model reconstructs masked image patches directly from document images without OCR. On a visualized GLUE setup, it scored above \(80\) on \(5\) of \(9\) tasks, and on the historical Runaways QA benchmark it achieved binary accuracy around \(74.7\), close to BERT’s \(78.3\) on the non-image baseline [2310.18343]. The significance is not that PHD surpassed text-native language models, but that it established nontrivial language understanding from pixels in a domain where OCR is especially noisy.

Pixel-TTS transports the same idea into speech synthesis. It renders characters as fixed \(16 \times 16\) grayscale patches, projects them with a Conv2D layer from \(1\) input channel to \(512\) output channels with kernel and stride \(16 \times 16\), and uses the resulting embeddings to condition a \(159\)M-parameter ADMA-based flow-matching TTS system. On LibriSpeech-PC at \(300\)k updates, Pixel-TTS achieved WER \(2.28\) and CER \(0.81\), compared with \(2.53\) and \(1.16\) for Text-TTS; in low-resource German adaptation, at \(150\)k updates on the \(10\)h setting, Pixel-TTS reached WER \(9.85\) and CER \(4.00\), versus \(17.22\) and \(8.54\) for Text-TTS, while requiring no embedding expansion for unseen German characters and numerals [2606.14750].

These extensions broaden the meaning of pixel-based language modeling. The paradigm is no longer confined to pretraining a universal encoder; it now includes semantic representation learning, document understanding in OCR-adverse settings, and visually grounded conditioning for generative systems.

## 6. Limitations, misconceptions, and current design tensions

A persistent misconception is that pixel-based language models are simply OCR systems or that they are uniformly superior to symbolic representations. The Chinese character-level study explicitly rejects such a reading: its conclusion is not that pixels are universally better than tokens, but that pixel-based modeling is viable, matches the index-based baseline on final accuracy, learns faster early on, and remains robust under low resolution and cropping [2601.09566]. PIXEL itself remained below BERT on English GLUE, with \(74.1\) versus \(80.0\), and below BERT on English SQuAD, with \(81.4\) versus \(88.2\) [2207.06991].

A second tension concerns the gap between visual and linguistic understanding. Pixology found a substantial gap between PIXEL’s visual and linguistic capabilities: lower layers are dominated by surface visual information, higher layers become progressively more linguistic, but the model never reaches BERT’s peak probing performance. Even where orthographic constraints help, the improvement is partial rather than decisive [2410.12011]. This suggests that a pixel model must first recover linguistic discreteness from rendered input before it can exploit higher-level syntax and semantics.

A third limitation is that script coverage does not eliminate perceptual difficulty. MIXAR improved multilingual autoregressive modeling, but still struggled on some CJK classification settings: on SIB-200, its CJK Seen AVG was \(24.8\), compared with \(69.4\) for MGPT-2. The same paper reports that font changes can act like a full orthographic attack, and that stage-2 GAN refinement does not reliably improve the largest model [2604.11575]. High-resolution glyph modeling remains harder than token prediction, particularly when a single patch must preserve dense stroke structure.

The most pointed controversy arises in hybrid multimodal systems that render text visually but also reintroduce tokenizers. In a DualGPT-style architecture evaluated on Javanese, Balinese, Sundanese, and Lampungnese transliteration, the default Llama 2 tokenizer had lower fertility and \(0\%\) OOV across all languages, yet performed significantly worse than a custom tokenizer aligned to the scripts, with improvements of up to \(30.15\) chrF++. Even Javanese and Balinese, which are related and share some orthographic similarities, had only \(16.4\%\) vocabulary overlap between grapheme-based tokenizers in that analysis [2602.06973]. The paper’s central warning is that visual rendering can bypass tokenization only in a pure pixel pipeline; once a system reintegrates a text tokenizer, tokenizer misalignment becomes a first-class bottleneck again.

The present state of the field is therefore dual. Pixel-based language models have demonstrated open-vocabulary modeling, strong cross-script transfer, robustness to orthographic perturbation, and viable autoregressive generation. At the same time, they remain sensitive to rendering strategy, patch geometry, font distribution, and objective design, and they do not automatically solve fairness or multilinguality when hybrid architectures preserve an English-centric tokenizer elsewhere in the stack. This suggests that future progress will depend less on the generic claim that “pixels replace tokens” than on a more specific program: multilingual pretraining over diverse scripts, rendering schemes that expose reusable orthographic structure without collapsing into ad hoc tokenization heuristics, objectives that improve readability and semantics without unstable adversarial training, and evaluation criteria that judge tokenizers and renderers by downstream support for the languages and scripts they are meant to serve.

Source: https://www.emergentmind.com/topics/pixel-based-language-models