arXiv:2611.08998cs.CVNov 2026

Manuscript Offprint

arXiv:2611.08998

Seeing vs. Counting: Complexity Twins Show Where Multimodal LLMs Fail on Diagrams

Yin Liu

Abstract

When a multimodal LLM miscounts in a diagram, does it fail at seeing or at counting? Existing visual graph and puzzle benchmarks vary visual density and algorithmic hardness together, confounding the two. We pair counting questions about the same drawing that sit in different counting-complexity classes, such as its spanning trees (a determinant) and its simple paths (#P-complete), and use a transcription probe and a text-only control to separate reading from computing. We test Gemini, Gemma and Qwen3-VL models; for the Gemini models, the answer depends on how the model computes. In chain of thought, most of them read small drawings correctly and then fail at counting, at a rate set far more by the size of the answer than by its complexity class (for the primary model, the odds of an exact answer fall 2.38-fold per decade of the answer). Given code and an exact transcription, the primary model counts correctly even on 10×1010\times10 grids, and reading becomes the bottleneck: a single view misses horizontal edges, and a second reading of a rotated copy with crop checks reads 86/96 large grids exactly, against 57/96 when the upright reading is simply repeated.

1. Introduction

Counting is the simplest quantitative question a vision system can be asked, and multimodal large language models (MLLMs) still get it wrong surprisingly often [44, 46, 53, 62]. The usual diagnosis is perceptual: clutter, occlusion, an encoder that cannot bind features [6, 57]. But many counting questions asked of diagrams and graph drawings stay hard after the structure has been read off the pixels: they are computational, and complexity theory makes a testable prediction about how hard they are. Existing visual graph and puzzle benchmarks [2, 20, 32, 33, 66] vary visual density and algorithmic hardness together, confounding the two sources of error.

This paper separates them with a classical fact that, to

our knowledge, has not been used to evaluate MLLMs: superficially similar counting questions about the same structure sit on different rungs of the counting-complexity ladder. On a binary image the Euler characteristic is a weighted sum of 2×22\times2 pattern counts [23, 43], whereas the number of components needs global connectivity [1, 47]. On a planar drawing the numbers of spanning trees and perfect matchings are determinants [28, 30, 55], whereas the numbers of all matchings and of simple s−ts-t paths are #P-complete even for planar bounded-degree graphs [26, 45, 58]. On a balanced digraph Eulerian circuits are counted by one determinant (BEST [49, 61]); remove the arrowheads and the count becomes #P-complete [5, 19]. We call such pairs complexity twins (one in Fig. 1(a), all three families in Fig. 2), the converse of CLIP-blind pairs [57]: a twin keeps the drawing and changes the question. The pixels are identical in the grid and binary-image families and differ only by arrowheads in the Eulerian family, but the reading can still depend on the question (the transcriptions embedded in task-specific routing-prompt programs are identical across tasks in 95 of 153 images; Appendix I), so we score the transcription of every call. A twin usually changes the size of the answer as well, and much of our analysis separates class from answer size.

Complexity classes are asymptotic, but the ladder is also a ladder of algorithms: a determinant costs O(n3)O(n^3) steps; exact dynamic programs for the #P-complete grid twins keep a number of states that is exponential only in the width of the drawing, so they are subexponential on lattice drawings and polynomial at bounded width (Proposition 1); and enumeration costs at least the answer itself, which on our grid drawings grows exponentially in nn. Expressivity results for transformers [15, 34, 40, 41, 48] tie the ladder to the length of the chain of thought.

Whether a model's errors follow the ladder is an empirical question. Twins let us ask it with the drawing held fixed and, through magnitude-matched pairs, with the answer size held fixed too; the most telling pair is the spanning-tree count #ST against the simple-path count #Paths, where class and answer size point in opposite directions

(a) One image, two questions

Figure

(b) Accuracy vs. answer size

(c) Chain of thought → code → pixels

Figure 1. One image, two questions. (a) On this 4×5 drawing #ST (GapL, one determinant) is 324,268 and #Paths from vertex 0 to vertex 19 (#P-complete) is 200: the harder question has the smaller answer. (b) For gemini-3.8-flash (low; also in (c)), chain-of-thought exact match follows answer size far more than class (Visual, n = 721; dashed: m_{50}, where accuracy crosses 50%). (c) Code from an exact edge list solves almost all extra-large pairs; from pixels, on 96 fresh grids one upright view misses 2.8% of horizontal and 0.8% of vertical edges, and a second reading of a rotated copy with crop checks reads 86 of them exactly, against 57 for a repeated upright reading.

(Fig. 1(a)). Our answer to the title question has two regimes:

In chain of thought, most Gemini API models read small diagrams correctly and then fail at counting, at a rate set mainly by the size of the answer rather than by its complexity class; given code and an exact transcription, the Gemini models we tested with code count correctly, and reading large diagrams becomes the failure.

References (50)