Visual Text Compression as Measure Transport

Lv Tang, Tianyi Zheng, Yang Liu, Bo Li, Xingyu LiNeurIPS 2026

TL;DR

Rendering long text into images and feeding it to a Vision-Language Model (VLM) can slash token counts by up to 20x, but this shortcut unpredictably boosts performance on some tasks while wrecking it on others. By framing this visual encoding process through the mathematics of measure transport, the authors uncover exactly what information gets lost inside image patches—and when that loss actually hurts. This yields a smart, label-free router that knows before running inference whether your prompt should be read as text or looked at as an image.

What Problem Does This Paper Address?

Processing massive documents with Large Language Models (LLMs) is computationally expensive because every word gets chopped into subword tokens. Enter Visual Text Compression (VTC): instead of feeding raw text to an LLM, you render the text onto a page image and let a VLM read it. Because a single visual patch can hold many characters, VTC shrinks sequence lengths by 3–20x.

Here is the catch: nobody knew when VTC was safe to use. On multi-hop QA tasks like HotpotQA, the visual path dramatically outperforms raw text; on summarization or logical reasoning, performance collapses. Crucially, the compression ratio tells you nothing about whether the model will succeed or fail. Without a principled way to measure task-relevant information loss, VTC remained a gamble rather than a reliable engineering tool.

Methods

Instead of treating the Vision Transformer (ViT) encoder as a black-box compressor, the authors model it using measure transport—specifically, as a "push-forward map" that takes fine-grained text tokens localized on a page and rearranges them into coarser visual patch tokens.

Figure 1: Left: the text-only baseline. Right: our VTC framework. Given x, we first compute label- free probes (W, L, TRR, VCR, γ), combine them into the transport-efficiency score TE(x), and route the instance under the rule TE(x) ≥τ (Sec. 3.2). If the visual path is selected, x is rendered to an image, encoded by the ViT push-forward map, and read by a VLM augmented with foveation that re-encodes high-Cq patches (Sec. 3.3). Across the 24-benchmark suite, the label-free rule matches the per-dataset oracle on 17/24 datasets (70.8%), raises the macro-average score from 45.9 to 47.4 (+1.5 points, +3.3% relative), and uses 10.3% fewer average input tokens than pure-LLM.

Because true optimal transport distances (like Wasserstein distance) require ground-truth task labels to know which word differences matter, the authors build an operational, label-free proxy cost $C(x)$ that decomposes visual distortion into two intuitive failure modes:

  1. Precision Cost (Within-patch smoothing): Merging nearby characters into one patch blurs fine lexical details (like "2023" vs. "2024"). They estimate this from the task specification's sensitivity to exact tokens ($W$).
  2. Coverage Cost (Cross-patch fragmentation): Scattering long-range evidence across 2D patches and pages breaks linear reading order. They estimate this using BM25 relevance dispersion ($L$), discounted by how redundant the text is via gzip compression ($\text{TRR}$).

Using this cost, they introduce two mechanisms:

  • Transport Efficiency ($\text{TE}$) Routing: They combine surviving information ($1 + \gamma - C(x)$, where $\gamma$ is a bonus for structured layouts like tables) with the Visual Compression Ratio ($\text{VCR}$). If $\text{TE}(x)$ clears a fixed threshold $\tau$, the input goes to the VLM; otherwise, it stays with the text-only LLM.
  • Localized Foveation: For inputs routed to the visual path, the system calculates transport cost per image patch. Just like the human eye focusing on dense text, it selectively crops and re-encodes high-cost "hotspot" patches at higher resolution, provided the information recovered justifies the extra tokens.

Datasets

The authors evaluate their framework across an existing suite of 24 diverse NLP benchmarks (no new datasets are introduced, though independent synthetic probes are used to calibrate model-specific scalar weights). The suite spans:

  • Multi-hop & Extractive QA: HotpotQA, MuSiQue, 2WikiMHQA, QASPER, MultiFieldQA, CoQA, ReCoRD, DROP.
  • Reading Comprehension & Reasoning: QuALITY, RACE-H, DREAM, LogiQA, BoolQ, SciFact, ContractNLI.
  • Classification: Yahoo Answers, DBpedia, IMDB, Yelp.
  • Summarization: CNN/DM, XSum, GovReport, BillSum, QMSum.

Key Insights and Ideas

  • Compression ratio is an efficiency stat, not a quality predictor: Saving 68% of tokens on CNN/DM causes summarization scores to tank, while saving 45% on HotpotQA nearly triples the F1 score. What matters is how visual geometry interacts with task structure.
  • Two distinct visual bottlenecks: Decomposing the transport cost reveals why tasks fail. Long-document summarization suffers heavily from cross-patch fragmentation (coverage cost), while sentiment and multiple-choice tasks suffer from within-patch blurring (precision cost).
Figure 2: The label-free proxy C(x) tracks the labelled operational gap ∆(x) on 24 NLP benchmarks with the Qwen3-4B backbone (LLM and VLM). (a) Mean ∆(x) = stext −svis within each C(x) tertile, with 8 datasets per bin and error bars of ±1 standard error. ∆is reported in the native task metric, all on the same 0 to 100 scale. The mean ∆increases monotonically from −6.9 in the low-C tertile to +10.1 in the high-C tertile, showing that the label-free proxy orders the C(x) tertiles consistently with the labelled operational gap. (b) Per-dataset decomposition of C(x) into its intra-patch component ∆intra(x) = α · W(x) (Orange) and inter-patch component ∆inter(x) = β · L(x) (1 −TRR(x)) (Green), matching Eq. 8. The composition varies systematically with task structure. ∆inter is largest on long-document summarization such as CNN/DM [15], XSum [32], GovReport [17], and BillSum [20], and on several high-coverage reasoning or classification inputs such as LogiQA [25] and BoolQ [10]. ∆intra remains substantial on precision-sensitive tasks such as QuALITY [34], RACE-H [21], ContractNLI [19], and IMDB [30]. This empirical separation is consistent with the factorization T# = Tinter ◦Tintra in Eq. 6.
  • Visual rendering isn't purely lossy: On structured inputs (lists, layouts) or tasks benefiting from spatial grouping, rendering text as an image preserves 2D relationships that flat 1D token sequences strip away, allowing VLMs to beat text-only LLMs.
  • Zooming in helps, but can't fix global fragmentation: Foveation repairs localized blurry details cheaply, but when evidence is scattered across an entire document, local high-res crops cannot replace routing the prompt back to a text LLM.

Key Results

Evaluated on the matched Qwen3-4B backbone (comparing text-only LLM vs. VLM):

  • Naive VTC trades accuracy for tokens: Running everything through the VLM cuts input tokens by 29.0%, but drops the average score across all 24 datasets by 1.5 points (44.4 vs. 45.9).
  • Label-free routing gets the best of both worlds: Using a single fixed threshold ($\tau = 1.28$), the routing rule matches the post-hoc per-dataset oracle on 17/24 benchmarks (70.8%). It boosts the macro-average score from 45.9 to 47.4 (+3.3% relative) while cutting average tokens by 10.3%.
Figure 3: TE decision plane at 4B scale. Each of 24 benchmarks is placed at its (VCR(x), ISR(x)) coordinates and coloured by the oracle preference. The dashed curve is the TE(x) = τ contour, a hyperbola because TE(x) = ISR(x) · VCR(x). The two shaded regions are the select-visual and select-text assignments of the rule TE(x) ≥τ, and decision errors are marked with an ×. For oracle labeling, the visual arm is the better of VLM and VLM+Fov, matching the upper-bound definition in Tab. 2. The single scalar τ is fixed across all benchmarks. The rule is correct on 17/24 datasets (70.8%) at Qwen3-4B, raises the macro-average score from 45.9 to 47.4 (+1.5 points, +3.3% rela- tive), and uses 10.3% fewer average input tokens than the LLM-only baseline model.
  • Matches supervised predictors without labels: In leave-one-dataset-out cross-validation, the zero-label transport rule ties the best 5-feature supervised logistic regression classifier (70.8% accuracy).
  • Foveation is token-thrifty: Adding foveation lifts pure VLM scores from 44.4 to 44.8 for less than 3% extra tokens, concentrating gains (+0.7 points) on visual-friendly benchmarks.

Limitations and Future Work

  • Headroom to the Oracle: While Decision-routed beats the pure LLM by +1.5 points, a post-hoc Oracle router achieves +4.3 points. The remaining 2.8-point gap happens on borderline datasets where the coarse proxy underestimates structural gains or losses.
  • Proxy Approximation: The authors explicitly note that $C(x)$ is an engineering operationalization inspired by measure transport, not an exact numerical solution to a Wasserstein distance.
  • Finer-grained routing: Currently, features like precision sensitivity ($W$) rely heavily on task-level specifications. Incorporating finer sample-level structural probes is highlighted as a promising way to close the remaining gap to the oracle.

Summary updated

Abstract

Visual text compression (VTC) promises efficient long-context processing by rendering text into an image and re-encoding it with a vision-language model, often producing $3$--$20\times$ fewer decoder tokens than subword tokenization. Yet token savings do not translate predictably into downstream utility: on some tasks the visual path matches or exceeds the text path, on others it collapses, and the compression ratio itself does not predict which regime will occur. The missing quantity is therefore not another summary of efficiency, but a principled measure of task-relevant information loss induced by visual encoding. We address this problem by formulating VTC in the language of measure transport. Treating text and visual tokens as empirical probability measures, we show that the ViT patch encoder induces a push-forward map whose transport cost decomposes into a precision cost from within-patch aggregation and a coverage cost from cross-patch fragmentation. Both terms are estimable from downstream-label-free probes. This formulation yields two operational consequences: a downstream-label-free routing criterion that selects whether to use the visual path for a given input or benchmark instance, and a transport-informed foveation mechanism that re-encodes high-cost regions at higher resolution. Across $24$ NLP datasets at Qwen3-4B, our label-free rule matches the per-dataset oracle on $17/24$ datasets ($70.8\%$), and improves the average task score by $+3.3\%$ with $-10.3\%$ average tokens relative to a pure-LLM.
BibTeX
@inproceedings{tang2026visual,
  author = {Lv Tang and Tianyi Zheng and Yang Liu and Bo Li and Xingyu Li},
  title = {{Visual Text Compression as Measure Transport}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=3F9lWapX9y},
}
Figure