MathSticks: A Benchmark for Visual Symbolic Compositional Reasoning with Matchstick Puzzles

Yuheng Ji, Huajie Tan, Cheng Chi, Yijie Xu, Yuting Zhao, Enshen Zhou, Huaihai Lyu, Pengwei Wang, Zhongyuan Wang, Shanghang Zhang, Xiaolong Zheng

TL;DR

The paper introduces MATHSTICKS, a massive benchmark of 1.4 million matchstick arithmetic puzzles designed to test Vision-Language Models (VLMs) on their ability to combine visual perception, constrained symbolic manipulation, and arithmetic verification. The evaluation reveals a stark capability gap: while humans solve these puzzles with over 90% accuracy, even the most advanced reasoning-focused closed-source models struggle, and open-source models fail entirely.

What Problem Does This Paper Address?

While current Vision-Language Models (VLMs) excel at static image recognition or text-based logic, they often stumble when forced to bridge the gap between the two. The authors define this challenge as Visual Symbolic Compositional Reasoning (VSCR).

To successfully solve a VSCR task, a model must accurately parse structured visual elements, plan local modifications under strict physical constraints (like moving a set number of matchsticks without adding or discarding any), and verify the mathematical validity of the final result. Existing benchmarks typically evaluate these skills in isolation. MATHSTICKS unifies them using classic matchstick arithmetic puzzles, exposing a critical blind spot in how AI handles discrete symbolic manipulation paired with continuous visual inputs.

Figure 1: Overview of the MATHSTICKS task.

Methods

The authors developed a rigorous two-stage generation pipeline to construct the benchmark:

  1. Symbolic Enumeration: Equations are represented as discrete 7-slot state vectors. The system exhaustively searches the space of valid one- and two-stick moves under strict stick conservation rules. It filters out arithmetically invalid equations and deduplicates solutions.
  2. Deterministic Visual Rendering: Valid symbolic states are mapped to images using a standardized template library of seven-segment digits and operators. This ensures a perfect one-to-one correspondence between the visual matchsticks and the underlying symbolic math.

To isolate where models fail, the benchmark evaluates them under two distinct input regimes:

  • Text-prompted: The model receives both the puzzle image and the explicit equation string (e.g., "5+23=40"), isolating pure symbolic reasoning from visual parsing.
  • Pure-visual: The model receives only the image, requiring it to perform both OCR-like structural parsing and subsequent reasoning.

Datasets

The pipeline generated a total of 1,411,388 validated solvable instances. The dataset is categorized across four difficulty levels (L1 to L4) based on digit scale (single- vs. multi-digit operands).

For evaluation, the authors released a compact, balanced 400-item test set stratified evenly with 100 instances per difficulty level. The benchmark also tracks diagnostic attributes such as move complexity (1-move vs. 2-move solutions), solution multiplicity (unique vs. multiple valid answers), and operator flipping (whether the plus/minus sign changes).

Table 1: Comparison of representative benchmarks across five key dimensions. Partial denotes limited coverage in specific sub-tasks or without a unified protocol.

Key Insights and Ideas

  • Test-Time Compute Helps, But Isn't Enough: Reasoning-optimized models (like OpenAI's o3 and Seed-1.6-Thinking) significantly outperform their standard counterparts (like GPT-4o or Seed-1.6). This demonstrates that systematic, stepwise reasoning is essential for compositional edits, though a massive gap to human performance remains.
  • The Open-Source Collapse: All tested open-source models (including the Qwen2.5-VL and InternVL3 families) scored near 0% across both text-prompted and pure-visual regimes. Scaling up parameter sizes did not alleviate this, suggesting a fundamental lack of inductive biases or targeted training data for visual-symbolic tasks.
  • Perception is a Major Bottleneck: Models perform substantially better when provided with the text string of the equation. Without it, subtle visual similarities in seven-segment displays (e.g., confusing '5' and '6') cause the entire reasoning chain to collapse.
  • Operator Bias: Models struggle significantly more with "operator flipping" puzzles (changing a + to a - or vice versa) than with digit-only modifications, indicating a bias toward altering digit morphology over abstract operators.

Key Results

The authors evaluated 14 representative VLMs alongside a human baseline group:

  • Humans: Achieved an average accuracy of 91.72%, taking roughly one minute per puzzle.
  • Closed-Source Models: OpenAI's o3-250416 led the pack with 60.00% accuracy in the text-prompted setting, which plummeted to 38.50% in the pure-visual setting. Gemini-2.5-Pro followed as the second-best performer.
  • Open-Source Models: Consistently scored 0.00% across almost all categories, highlighting a total inability to handle the benchmark's constraints.
Detailed accuracy breakdown of evaluated models across difficulty levels.

Limitations and Future Work

The paper highlights that current VLMs lack an internalized understanding of structural constraints—frequently proposing illegal moves like creating non-existent digits or ignoring stick conservation.

The authors conclude that resolving these failures will require more than just scaling up model sizes. Future work must focus on creating specialized training datasets and architectural innovations designed specifically to bridge continuous visual perception with discrete, rule-bound symbolic manipulation.

Summary updated

Abstract

We introduce \textsc{MathSticks}, a benchmark for Visual Symbolic Compositional Reasoning (VSCR), which unifies visual perception, symbolic manipulation, and arithmetic consistency. Each task presents an incorrect matchstick equation that must be corrected by moving one or two sticks under strict conservation rules. The benchmark includes both text-guided and purely visual settings, systematically covering digit scale, move complexity, solution multiplicity, and operator variation, with 1.4M generated instances and a curated test set. Evaluations of 14 vision--language models reveal substantial limitations: closed-source models succeed only on simple cases, open-source models fail in the visual regime, while humans exceed 90\% accuracy. These findings establish \textsc{MathSticks} as a rigorous testbed for advancing compositional reasoning across vision and symbols. Our code and dataset are publicly available at https://github.com/Yuheng2000/MathSticks.
BibTeX
@misc{ji2025mathsticks,
  author = {Yuheng Ji and Huajie Tan and Cheng Chi and Yijie Xu and Yuting Zhao and Enshen Zhou and Huaihai Lyu and Pengwei Wang and Zhongyuan Wang and Shanghang Zhang and Xiaolong Zheng},
  title = {{MathSticks: A Benchmark for Visual Symbolic Compositional Reasoning with Matchstick Puzzles}},
  year = {2025},
  eprint = {2510.00483},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.00483},
}
Figure