Whiteboard-of-Thought: Thinking Step-by-Step Across Modalities

Sachit Menon, Richard Zemel, Carl VondrickarXiv 2024 · DOI

Introduction

Large Language Models (LLMs) have demonstrated remarkable capabilities in logical reasoning through techniques like "Chain-of-Thought" (CoT). By breaking down problems into sequential text steps, these models can solve complex mathematical and linguistic puzzles. However, a significant gap remains: spatial and visual intuition. Humans often overcome mental blocks by sketching diagrams or using a whiteboard; conversely, LLMs are often confined to a linear, token-based world that struggles to represent two-dimensional relationships.

Even state-of-the-art Multimodal LLMs (MLLMs) like GPT-4o frequently fail at simple visual queries when presented in text. For instance, describing a letter as "a circle with a vertical line on the right going down" might lead a model to incorrectly identify it as a "b" instead of a "q". This failure stems from the way information is tokenized—as a sequence of discrete characters rather than a spatial map—making it difficult for models to perform the implicit visual reasoning necessary to bridge the gap between description and reality.

The Whiteboard-of-Thought Framework

To address this limitation, researchers have introduced Whiteboard-of-Thought (WoT). This zero-shot prompting framework mimics the human "pen and paper" approach by allowing models to externalize their visual reasoning. Instead of attempting to solve a spatial problem purely through text, the model is prompted to write Python code (using libraries like Matplotlib or Turtle) to create a visualization of the problem.

Figure 1: A comparison between standard Chain-of-Thought (CoT) and Whiteboard-of-Thought (WoT). While CoT struggles with spatial descriptions, WoT uses code to render a visual representation, allowing the model's vision component to correctly identify the shape.

The WoT process follows a four-step loop:

  1. Query: The model receives a text-based visual or spatial problem.
  2. Visualization Code: The model writes code to "draw" the problem elements.
  3. Execution: A standard Python interpreter runs the code to generate an image (the "whiteboard").
  4. Visual Reasoning: The generated image is fed back into the MLLM, which uses its native vision capabilities to "see" the result and produce a final answer.

Crucially, WoT requires no specialized modules or fine-tuning. It leverages the emergent ability of modern models to write graphics code and their existing image-processing capabilities.

Experimental Evaluation and Benchmarks

The effectiveness of WoT was evaluated across several challenging benchmarks that typically baffle text-only or standard multimodal models. These included the BIG-Bench ASCII Understanding task, where models must recognize digits, words, and Kanji characters rendered in ASCII text, and Spatial Navigation tasks involving non-grid structures like hexagons and rhombuses.

Figure 2: WoT applied to ASCII art recognition. By re-rendering ASCII strings into clear visual images, the model can overcome the spatial distortions caused by tokenization.

The results were dramatic. In the ASCII Kanji recognition task, accuracy soared from a mere 1.1% using standard CoT to 73.8% with WoT. Similarly, ASCII MNIST recognition improved from 21.6% to 66.0%. In spatial navigation, particularly on hexagonal maps—where text-based coordinate tracking is notoriously difficult—accuracy jumped from 8% to 61%.

Key Insights and Performance Analysis

The research highlights several critical findings regarding how MLLMs process spatial data:

  • Tokenization as a Blind Spot: LLMs fail at ASCII art because they see a string of characters, not a 2D grid. WoT restores the spatial relationships that tokenization destroys.
  • Geometry Matters: While text-based reasoning is sufficient for simple 2D square grids, it falls apart for non-grid geometries. WoT levels the playing field across all shapes by providing a consistent visual reference.
  • Perception is the Bottleneck: Interestingly, an error analysis revealed that 75% of WoT's failures were due to the model's inability to correctly perceive the image it had drawn, rather than errors in the drawing code itself. This suggests that as the vision components of MLLMs improve, the ceiling for WoT will naturally rise.
  • Selective Application: WoT is not a universal panacea. In tasks where the raw text is already clear (such as "Bubble" ASCII where words are simply wrapped in symbols), the overhead of drawing can actually introduce errors. Visual thinking is most effective when the problem is inherently non-linear.

Conclusion and Future Directions

Whiteboard-of-Thought demonstrates that giving models a way to "see" their own reasoning can unlock significant capabilities in spatial and visual domains. Future work may involve Iterative Refinement, where the model looks at its drawing, identifies errors, and modifies the code to produce a better visualization. Additionally, developing a mechanism for Dynamic Tool Selection would allow models to autonomously decide when a problem requires a whiteboard versus when text-based reasoning is sufficient. By bridging the gap between symbolic code and visual perception, WoT moves us closer to models that can think across modalities as fluidly as humans do.

Summary updated

BibTeX
@misc{menon2024whiteboard,
  author = {Sachit Menon and Richard Zemel and Carl Vondrick},
  title = {{Whiteboard-of-Thought: Thinking Step-by-Step Across Modalities}},
  year = {2024},
  eprint = {2406.14562},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.14562},
}
Figure