Counting Symbols on Technical Drawings: A Benchmark and Verified Rewards for MLLMs

Junxian Li, Ruixuan Yang, Zhenhua XuarXiv 2026

TL;DR

While modern AI can count cats in a park with ease, it often stumbles when asked to count capacitors on a circuit board or carbon atoms in a molecule. This paper introduces CountDrawBench, a rigorous new benchmark for technical drawings, and Code-Verified RL, a training framework that uses executable code to reward models for not just getting the right total, but for actually finding the right objects at the right locations.

What Problem Does This Paper Address?

Technical drawings—blueprints, schematics, and molecular structures—are the language of engineering and science. For a human, counting the number of "Type A" doors in a floor plan is a routine task. For a Multi-modal Large Language Model (MLLM), it’s a nightmare.

The challenge is three-fold:

  1. Scale and Density: Symbols are often tiny and packed tightly together.
  2. Visual Ambiguity: A resistor looks a lot like an inductor if you aren't looking closely.
  3. Drawing Conventions: In chemistry, a carbon atom isn't always labeled; it's often just implied by the end of a line.

Current models often suffer from "right answer, wrong reason." A model might miss two actual targets but hallucinate two others, resulting in a "correct" count that masks a total failure of visual understanding. As shown in Figure 1, even advanced models can provide the correct final number while pointing to completely wrong locations.

Figure 1: Examples of MLLMs failing to count or ground objects correctly in technical drawings.

Methods

The authors propose a reinforcement learning (RL) framework called Code-Verified RL. Instead of just giving the model a "thumbs up" for the final number, they use a code interpreter to provide granular, verifiable feedback during training.

The core of their approach is a unified objective using Group Relative Policy Optimization (GRPO), which integrates three distinct rewards:

  • Count Reward ($R_{cnt}$): A standard reward for the final integer answer.
  • Instance-Matching Reward ($R_{box}$): This is the "show your work" part. The model must provide bounding boxes for every object it counts. The system uses the Hungarian algorithm (a classic optimization method for pairing items) to match predicted boxes with ground truth boxes and calculates their overlap (Intersection over Union, or IoU).
  • Zoom-based Reward ($R_{zoom}$): To ensure consistency, the model is asked to count objects in the full image and then in four smaller "zoomed-in" tiles. If the sum of the tiles doesn't equal the total count, the model is penalized. This forces the model to maintain local-to-global consistency.

The training pipeline is illustrated in Figure 3, showing how these rewards are fed back into the model update.

Figure 3: The Code-Verified RL training pipeline.

Datasets

The authors introduced two major data contributions:

  1. CountDrawBench: A benchmark for evaluation containing 1,574 question-answer pairs from 707 images. It spans six domains: floor plans (SESYD, Floor-CAD), circuit diagrams (SESYD Circular), doors (CubiCasa5K), molecules (ChemOCR), and mechanical drawings (MechVQA).
  2. CountDraw-7K: A larger training set of 7,000 questions used to fine-tune their models.

The benchmark is unique because it includes instance-level bounding boxes for nearly half of the questions, allowing for the evaluation of localization (did the model actually find the object?) rather than just counting.

Key Insights and Ideas

  • The "Hallucination Mask": The authors found that count-only evaluation is deceptive. Models frequently get the right total by making offsetting errors. By requiring bounding boxes, they force the model to ground its reasoning in the actual pixels.
  • Consistency as a Signal: The zoom-based reward is a clever way to leverage the model's own "eyes" against itself. If a model sees 5 resistors in the big picture but only 3 when looking at the pieces, it knows it has made a mistake.
  • Technical Drawings are "Hard Mode": Unlike natural images where objects have textures and shadows, technical drawings are abstract. Figure 6 shows a clear trend: as objects get smaller and the drawing gets denser, model performance craters.
Figure 6: Performance drops significantly as target size decreases and instance density increases.

Key Results

  • Benchmark Difficulty: CountDrawBench is a "stress test." The best proprietary model (Gemini-3.8-Flash) only achieved 59.3% accuracy.
  • Method Effectiveness: Their trained model, CountDraw-9B (based on Qwen3.5), improved from a baseline of 49.3% to 54.3% accuracy, outperforming all other open-source models.
  • Localization Leap: The most dramatic improvement was in localization. The mean IoU (mIoU) jumped from 8.92 to 35.83, proving that the model became significantly better at actually identifying the correct instances, as seen in the case studies in Figure 5.
  • Generalization: Even though it was trained on technical drawings, CountDraw-9B showed improved performance on natural image counting benchmarks like FSC-147, suggesting that learning to "look closer" is a generalizable skill.
Figure 5: Case studies showing CountDraw-9B providing correct counts and localizations where others fail.

Limitations and Future Work

The authors acknowledge that while they've made progress, a 54% accuracy rate is still far from human-level reliability in professional engineering contexts.

  • Zero-Count Questions: Models still struggle to confidently say "there are zero of these here."
  • Complex Conventions: Some highly specialized engineering symbols or complex 3D-to-2D projections in mechanical drawings remain out of reach.
  • Future Directions: Integrating more sophisticated "tool-use" (like allowing the model to dynamically crop and zoom during inference) and expanding the benchmark to even more diverse technical fields are logical next steps.

Summary updated

Abstract

Today's MLLMs can count objects in natural images. However, when asking them how many bolt holes appear in a mechanical drawing or how many nitrogen atoms are in a chemical structure, they often struggle. Counting in technical drawings remains challenging, as objects can be small, densely packed, or even implied by drawing conventions. To study this problem, we introduce CountDrawBench, a benchmark including floor plans, electrical schematics, mechanical drawings, and molecular structures, with 1,574 counting questions and instance-level annotations where available. Besides evaluation, we introduce Code-Verified RL, a reinforcement learning framework that teaches MLLMs to count with executable feedback. Our method combines three complementary rewards: a count reward that checks the final answer, an instance-matching reward that verifies object locations, and a zoom-based reward that checks counting consistency across local image regions. All three are integrated into a unified GRPO objective. Extensive experiments reveal that even leading MLLMs struggle on CountDrawBench, with the best evaluated model achieving only 59.3% accuracy. Our method improves Qwen3.5-9B from 49.3% to 54.3% accuracy, outperforming all evaluated open-source baselines. These results establish CountDrawBench as a challenging testbed for technical drawing understanding and demonstrate the value of code-verified rewards in these tasks. Code and data will be released upon acceptance.
BibTeX
@misc{li2026counting,
  author = {Junxian Li and Ruixuan Yang and Zhenhua Xu},
  title = {{Counting Symbols on Technical Drawings: A Benchmark and Verified Rewards for MLLMs}},
  year = {2026},
  eprint = {2611.29309},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.29309},
}
Figure