ImgCoT: Compressing Long Chain of Thought into Compact Visual Tokens for Efficient Reasoning of Large Language Model
Xiaoshu Chen, Sihang Zhou, Ke Liang, Taichun Zhou, Xinwang Liu
TL;DR
This work tackles the inefficiency of long Chain-of-Thought (CoT) reasoning in large language models by introducing ImgCoT, a framework that compresses CoT into compact visual tokens rather than text. By rendering CoT as images and learning latent visual tokens with a spatial inductive bias, ImgCoT better preserves global reasoning structure while discarding surface linguistic details. A hybrid variant, Loose ImgCoT (L-ImgCoT), adds a small set of textual reasoning steps selected by a gamma-based threshold to retain essential domain-specific details under tighter inference budgets. Across multiple datasets and backbones, ImgCoT and L-ImgCoT outperform text-based latent compression baselines and offer substantial gains in reasoning efficiency with competitive or superior accuracy, demonstrating the practical value of visual CoT compression.
Abstract
Compressing long chains of thought (CoT) into compact latent tokens is crucial for efficient reasoning with large language models (LLMs). Recent studies employ autoencoders to achieve this by reconstructing textual CoT from latent tokens, thus encoding CoT semantics. However, treating textual CoT as the reconstruction target forces latent tokens to preserve surface-level linguistic features (e.g., word choice and syntax), introducing a strong linguistic inductive bias that prioritizes linguistic form over reasoning structure and limits logical abstraction. Thus, we propose ImgCoT that replaces the reconstruction target from textual CoT to the visual CoT obtained by rendering CoT into images. This substitutes linguistic bias with spatial inductive bias, i.e., a tendency to model spatial layouts of the reasoning steps in visual CoT, enabling latent tokens to better capture global reasoning structure. Moreover, although visual latent tokens encode abstract reasoning structure, they may blur reasoning details. We thus propose a loose ImgCoT, a hybrid reasoning that augments visual latent tokens with a few key textual reasoning steps, selected based on low token log-likelihood. This design allows LLMs to retain both global reasoning structure and fine-grained reasoning details with fewer tokens than the complete CoT. Extensive experiments across multiple datasets and LLMs demonstrate the effectiveness of the two versions of ImgCoT.
