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 · DOI

Introduction

While Vision-Language Models (VLMs) have made strides in general image description and standard mathematical problem-solving, they often struggle with tasks requiring precise Visual Symbolic Compositional Reasoning (VSCR). This involves the ability to perceive structured elements, understand their relationships, and manipulate them under strict logical or physical constraints. To address this, researchers have introduced MathSticks, a massive benchmark consisting of matchstick arithmetic puzzles that challenge models to bridge the gap between perception and planning.

The Visual Symbolic Compositional Reasoning (VSCR) Challenge

The core of the MathSticks benchmark is the matchstick puzzle, a classic brain teaser where one must move a specific number of sticks to make an incorrect equation valid. Solving these puzzles requires a three-step "closed-loop" process:

  1. Perception: Recognizing digits and operators formed by matchsticks (often in a seven-segment display format).
  2. Planning: Identifying which sticks to move to transform the equation while adhering to "stick conservation"—no sticks can be added or discarded.
  3. Verification: Ensuring the resulting symbolic equation is mathematically correct.
Overview of the MathSticks task, illustrating the recognition of the initial equation and the reasoning required to transform it into a valid one.

Methodology and Dataset Generation

The researchers developed a rigorous pipeline to create a dataset of 1.4 million solvable instances. This was achieved through:

  • Symbolic Enumeration: An exhaustive search algorithm mapped every possible valid one- and two-stick move across thousands of potential equations, ensuring mathematical solvability and strict adherence to conservation rules.
  • Deterministic Visual Rendering: Symbolic states were mapped to precise images using a template library of seven-segment digits. Each matchstick is assigned unique coordinates, allowing for unambiguous automated evaluation.

The benchmark evaluates models under two conditions: text-prompted (where the model receives both the image and the equation string) and pure-visual (where the model must parse the symbols directly from the image).

Experimental Results: The Human-AI Gap

The benchmark reveals a significant performance gap between humans and even the most advanced AI models. While humans achieve an average accuracy of 91.72%, typically solving puzzles in roughly a minute, AI performance drops sharply as complexity increases.

Performance comparison across various models and difficulty levels (L1-L4) in both text-prompted and pure-visual settings.

As shown in the results table, OpenAI’s o3-250416 leads the closed models but only reaches 60% accuracy in the text-prompted setting. This performance plummets to 38.5% in the pure-visual regime. Open-source models like Qwen2.5-VL and InternVL struggle even more, scoring near zero in pure-visual tasks, indicating a fundamental inability to simultaneously parse and reason about these symbols.

Key Insights

  • The Perception Bottleneck: A primary failure mode is the misreading of the seven-segment display. Models frequently confuse similar digits (e.g., "5" vs. "6") or miss small details like the vertical bar distinguishing a "1" from a "7."
  • Constraint Violations: Many models fail to internalize the "conservation of matter." They often suggest "hallucinated" moves, such as removing non-existent sticks or adding new ones, violating the puzzle's core rules.
  • Complexity Scaling: While human accuracy remains stable as puzzle difficulty increases, AI performance drops significantly when moving from one-stick to two-stick relocations.
  • Operator Sensitivity: Tasks requiring the transformation of operators (e.g., changing a + to a -) proved significantly more difficult for models than digit-only manipulations.

Conclusion and Future Directions

MathSticks serves as a powerful diagnostic tool for identifying weaknesses in current VLM architectures. The results suggest that "test-time compute"—allowing models more time to "think" through multi-step plans—is beneficial but not a complete solution. Future work will focus on expanding the visual diversity of the benchmark and developing training methodologies that emphasize constrained symbolic editing rather than static image-to-text mapping.

Summary updated

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