Introduction
ScratchEval is a new benchmark designed to challenge Large Multimodal Models (LMMs) with programming puzzles using Scratch, the block-based visual language widely used in primary education. The results provide a sobering reality check: even state-of-the-art models like Gemini-1.5-Pro and GPT-4o struggle with these "kid-level" logic puzzles. Currently, the highest-performing model barely surpasses 50% accuracy, highlighting a significant gap between visual perception and logical reasoning in AI.
The Challenge of Visual Programming
While LMMs have demonstrated impressive "image-to-code" capabilities—such as converting UI mockups into functional HTML—most existing benchmarks decouple visual understanding from logical reasoning. Typically, a model describes an image and then generates code based on that textual description.
The authors of ScratchEval argue that true visual programming reasoning requires a unified approach. In Scratch, the programming logic is inherent in the image itself, represented by interlocking visual blocks. To solve these puzzles, a model must simultaneously parse spatial relationships, read text within blocks, and simulate the underlying execution logic. This benchmark addresses a critical gap in evaluating how well AI can "think" through a visual algorithm rather than merely translating formats.
Methodology
The researchers developed ScratchEval as a benchmark consisting of 305 manually curated multiple-choice questions. Each question presents a Scratch script image and requires the model to predict an outcome, such as a character's final position or the value of a variable after execution.
To evaluate model performance, three distinct prompting strategies were employed:
- Original Prompt (no-CoT): A direct request for the answer.
- Zero-shot Chain-of-Thought (CoT): Appending "Let’s think step by step" to encourage a logical breakdown.
- Enhanced CoT (eCoT): Appending "Let’s explain the picture and think step by step," which forces the model to explicitly describe visual elements before attempting to reason through the logic.
The ScratchEval Dataset
The dataset is bilingual (English and Chinese) and covers four primary cognitive domains:
- Math: Simple arithmetic operations embedded within scripts.
- Logical Thinking: Reasoning through complex structures like loops and conditionals.
- Graphic Perception: Identifying which script corresponds to a specific visual output or drawing.
- Spatial Perception: Determining a character's final orientation or coordinates on the stage.
Analysis of Model Reasoning
A key finding of the study is that visual hallucinations remain a major bottleneck. Even when models correctly identify the blocks via OCR, they often "hallucinate" the execution logic. For instance, a model might correctly see a loop but fail to calculate how that loop increments a specific variable.
Interestingly, while standard CoT improved performance by 10% to 20%, the "Enhanced" CoT (eCoT) sometimes hindered performance. This suggests that requiring a model to provide a verbose description of the image can introduce noise, distracting the model from the core logical task. Furthermore, models generally performed better on perception-heavy tasks (spatial and graphic) than on those requiring rigorous math or logical reasoning.
Performance Benchmarks
The researchers tested ten prominent models, including both proprietary and open-source leaders.
- Gemini-1.5-Pro emerged as the top performer with an overall accuracy of 52.8%.
- Qwen2-VL (72B) was the strongest open-source model at 45.0%, slightly ahead of GPT-4o at 43.9%.
- The 50% Barrier: Most models failed to reach 50% accuracy. Given that random guessing on a four-option test yields 25%, these scores indicate that LMMs are still far from mastering basic visual logic.
Conclusion and Future Directions
The study identifies visual encoder bottlenecks as a primary limiting factor. Current "eyes" of AI struggle to parse complex, nested block structures effectively. Future research will likely focus on improving visual-logic alignment during the pre-training phase and expanding the benchmark to include more diverse visual programming environments beyond Scratch. For now, it seems your eight-year-old might still have the edge in visual logic.
Summary updated