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

Optical Context Compression Is Just (Bad) Autoencoding

Ivan Yee Lee, Cheng Yang, Taylor Berg-Kirkpatrick

TL;DR

This paper argues that "optical context compression"—rendering text into images to compress long contexts for LLMs—is an inefficient "modality detour." By comparing the DeepSeek-OCR vision pipeline against simple direct text-based methods like mean pooling and hierarchical encoders, the authors show that vision-based compression is consistently outperformed in reconstruction, language modeling, and factual recall, despite requiring significantly more parameters and pretraining.

What Problem Does This Paper Address?

As Large Language Models (LLMs) tackle increasingly long documents, the "context window" becomes a major bottleneck for both memory and computation. Recently, researchers (notably the DeepSeek-OCR team) proposed a novel solution: instead of processing thousands of text tokens, why not render the text into a 2D image and use a vision encoder to produce a small number of "vision tokens"?

The intuition was that vision encoders are naturally good at summarizing spatial information. However, this paper asks a fundamental question: Does this detour through pixels actually help? When we render text to an image, we discard high-dimensional learned embeddings in favor of raw pixels, only to ask a vision encoder to recover that information later. The authors investigate whether this "unlearned modality bottleneck" is a feature or a bug.

Figure 1: DeepSeek-OCR viewed as an autoencoder. Direct compression (left, blue) operates on learned embeddings, while the vision path (right, orange) renders tokens to pixels—a non-parametric detour—then compresses. Both produce compressed representations for the decoder to reconstruct.

Methods

The authors frame context compression as an autoencoding task and compare three main approaches:

  1. Vision (DeepSeek-OCR): Text is rendered to an image and processed through a 400M-parameter pipeline (SAM ViT-B + CLIP-L + Projector). This method is heavily pretrained on over 500M images.
  2. Mean Pooling: A near-zero-parameter baseline that simply averages token embeddings over a sliding window. It has only one learned parameter: a separator token.
  3. Hierarchical Encoder: A small, randomly initialized learned encoder (13–92M parameters) using a pyramid of residual convolutional blocks to halve the sequence length at each step.
  4. Truncation (Baseline): The simplest possible baseline—just throwing away the oldest part of the context to fit the token budget.

The study evaluates these methods across three tasks: Reconstruction (can the model recover the original text?), Language Modeling (does the compressed context help predict the next token?), and Factual Recall (can the model answer questions about the compressed context?).

Datasets

  • FineWiki: 510,000 segments of English Wikipedia for general training and evaluation.
  • The Stack (Python subset): A source code corpus used to test if vision performs better on data where 2D layout (indentation, newlines) is "load-bearing."
  • Factual Recall Set: 9,794 machine-generated (via GPT-5-nano) question-answer pairs based on the Wikipedia validation set, targeting specific details like dates and names.

Key Insights and Ideas

  • The Double Bottleneck: Vision-based methods suffer twice. First, they face a "legibility cliff"—as compression increases, the rendered text becomes too small for the vision encoder to resolve. Second, they face the same token-count bottleneck as direct methods. Direct methods only face the latter.
  • Reconstruction $\neq$ Utility: A surprising finding was that even when a vision encoder can reconstruct text well, that representation doesn't necessarily translate to better language modeling. Vision tokens often performed no better than simply truncating the context.
  • The Modality Detour is Costly: Direct methods operate on the decoder's own embedding space. Vision forces the model to "re-derive" information it already owned in the text domain, paying a heavy price in parameters and efficiency for no measurable gain.

Key Results

  • Reconstruction: The hierarchical encoder achieved the lowest perplexity at all compression ratios. Remarkably, the near-zero-parameter mean pooling matched the 400M-parameter vision encoder at moderate compression (see Figure 2).
  • Language Modeling: Vision performed comparably to truncation—meaning the compressed vision tokens provided almost no more useful information for next-token prediction than if they had been deleted entirely. The hierarchical encoder consistently outperformed all other methods (see Figure 3).
  • Factual Recall: While all compression methods beat truncation (proving they do preserve some information that truncation discards), vision never surpassed the best direct text-based baseline (see Figure 5).
  • Code Corpus: Even on source code, where 2D layout should favor vision, the vision encoder was the worst-performing method at matched token budgets.
Figure 2: Reconstruction perplexity across compression ratios for vision (DeepSeek-OCR), mean pooling (near-zero-parameter), and hierarchical (learned) encoders. Hierarchical achieves lowest perplexity at all ratios; near-zero-parameter mean pooling is comparable to vision’s 400M-parameter encoder at moderate compression. See Table 2 for complete data.

Limitations and Future Work

The authors acknowledge several constraints:

  • Context Length: Experiments were capped at 4,000 tokens. It is possible that at extreme scales (e.g., 100k+ tokens), the trade-offs might shift.
  • Domain Specificity: While Wikipedia and Code were tested, the performance on noisy scanned documents or non-English text remains an open question.
  • Architecture: The study focused on the "render-then-encode" paradigm rather than every possible vision architecture.

The authors conclude that the current excitement around optical context compression is largely unsupported by evidence. For researchers looking to extend context windows, the path forward likely lies in better text-domain compression, not a detour through pixels.

Summary updated

BibTeX
@inproceedings{lee2026optical,
  author = {Ivan Yee Lee and Cheng Yang and Taylor Berg-Kirkpatrick},
  title = {{Optical Context Compression Is Just (Bad) Autoencoding}},
  booktitle = {COLM},
  year = {2026},
  url = {https://openreview.net/forum?id=UW93sjOqUP},
}
Figure