DL0115 Visual Chain-of-Thought

Explain how Chain-of-Thought (CoT) prompting with visual cropping (Visual CoT) enhances multi-step spatial reasoning in complex visual problem-solving.

Answer

Text-only CoT helps a vision-language model because it lets the model spend more tokens on intermediate reasoning, but it cannot help with detail the vision encoder never tokenized. A CLIP ViT-L/14 at 336 \times 336 produces a fixed 24 \times 24 grid of 576 patch tokens, so a 1500 \times 1500 photograph is downsampled by 4.5x before a single transformer layer runs and a 60-pixel license plate lands inside less than one patch. Visual CoT closes that gap by making localization an explicit step in the reasoning chain: the model first emits a bounding box for the region the sub-question depends on, that crop is re-encoded at the encoder’s native resolution, the new visual tokens are appended to the context alongside the original global tokens, and only then does the model answer. The chain becomes localize → crop → re-encode → reason, and it can iterate, which is exactly what multi-step spatial questions need: “what does the sign to the left of the red truck say?” decomposes into finding the truck, resolving left of in the global view, then reading text at a magnification where the glyphs actually exist. The VisCoT work trains this behavior with 438k question-answer pairs carrying intermediate bounding-box annotations, and reports its largest gains on text-rich and small-object splits, precisely where fixed-resolution encoding destroys the evidence.

(1) Perception Bottleneck, Not Reasoning Bottleneck: on high-resolution inputs the failure is usually that the target occupies a fraction of a patch, so extra reasoning tokens cannot recover it.
(2) Crop As A Resolution Amplifier: re-encoding a w \times h crop at S \times S raises the sampling density on that region by WH/(wh) without changing the encoder.
(3) Global Tokens Must Be Retained: a crop destroys the frame of reference, so relational predicates such as “left of” or “third from the top” require keeping the original 576 tokens in context.
(4) Errors Compound Multiplicatively: the answer is correct only if localization and reading are both correct, so a 0.9 localization accuracy caps a two-hop chain at 0.81.
(5) It Needs Grounding Supervision: unlike text CoT, the intermediate step is a box, so it comes from bbox-annotated data, a detector tool, or a localization reward rather than from prompting alone.
(6) Sequential Cost: each hop is an extra forward pass over the encoder plus a longer prefill, which trades latency for accuracy in a way tiling does not.

Left-to-right pipeline: a 1500 by 1500 image and question are globally encoded into 576 tokens, the model predicts a bounding box, the crop is re-encoded at 336 by 336 into another 576 tokens, and the model reasons over 1152 tokens to produce an answer, with a loop back to the localization step for multi-step questions and a dashed path showing the global tokens retained in context

Figure 1: Localization becomes an explicit reasoning step: the crop is re-encoded at native resolution and concatenated with the global tokens, so each hop of a multi-step spatial question is answered at the magnification it needs while the frame of reference survives.

The cost profile is what makes this a design decision rather than a free win. Visual CoT buys resolution with sequential compute: two or more encoder passes and a growing prefill, so at fixed batch size it roughly doubles time-to-first-token, and every hop is a place where a bad box silently poisons everything downstream. Tiling approaches such as AnyRes buy resolution with parallel compute instead, encoding a fixed grid of sub-images in one pass, which is friendlier to serving but pushes the visual context to 2,880 tokens or more and makes the language model’s O(N^2) attention the new bottleneck. The interesting property of the crop-based chain is that it is adaptive: it spends its extra tokens only on the region the question actually depends on, which is why it scales to 4K screenshots and document scans where uniform tiling would need dozens of tiles.

Mathematical Formulation:
N = (S/p)^2
N = (336/14)^2 = 576
\rho = \frac{W H}{w h}
\rho = \frac{1500 \cdot 1500}{150 \cdot 150} = 100
p_{\mathrm{task}} = p_{\mathrm{loc}} \cdot p_{\mathrm{read}}
p_{\mathrm{task}} = 0.90 \cdot 0.90 = 0.81

Where:

  • N is the number of visual tokens per encoder pass, S the encoder’s square input side, and p the patch size; S = 336, p = 14 gives the familiar 576 tokens.
  • W \times H are the original image dimensions and w \times h the predicted crop, both in pixels, with the crop constrained to lie inside the image.
  • \rho is the areal sampling gain on the cropped region, so the linear magnification is \sqrt{\rho} = 10 for the numbers above.
  • p_{\mathrm{loc}} is the probability the emitted box actually contains the target and p_{\mathrm{read}} the probability of reading it correctly once magnified; p_{\mathrm{task}} is end-to-end accuracy for a two-hop chain.
  • For a k-hop chain the same argument gives p_{\mathrm{task}} = \prod_{i=1}^{k} p_i, and total visual tokens grow as (k+1)N because the global view is kept.
Log-scale bar chart of how many ViT patches cover a 60 by 60 pixel target inside a 1500 by 1500 image: under one patch for a single 336 by 336 encode with 576 tokens, about four patches for AnyRes 2 by 2 tiling with 2880 tokens, and about 92 patches for a re-encoded 150 by 150 Visual CoT crop with 1152 tokens

Figure 2: A 60-pixel target inside a 1500 \times 1500 image gets under one patch from a single low-resolution pass and about four from 2 \times 2 tiling, but roughly 92 patches after a crop is re-encoded, at half the token cost of tiling.

PropertyVisual CoT (crop and re-encode)Fixed single low-res passAnyRes tiling
How fine detail is obtainedModel predicts a bbox, that crop is re-encoded at native encoder resolutionNot obtained; anything below one patch is destroyed at encode timeImage is split into a fixed grid of tiles, each encoded at full resolution
Visual tokens at 1500×15001,152 for one hop (576 global + 576 crop)5762,880 for four tiles plus a global view
Encoder passes per answerTwo or more, strictly sequentialOneOne, tiles batched in parallel
Patches on a 60 px targetAbout 92Under 1About 4
Supervision requiredBbox-annotated chains, a detector tool, or a localization rewardNone beyond standard instruction tuningNone; purely an input-packing change
Main failure modeA wrong box yields a confident answer about the wrong regionSmall text, gauges, and distant objects are simply invisibleQuadratic attention growth, and tile borders cut objects in half

Login to view more content


Log in to track your progress

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *