TopoBench: Benchmarking LLMs on Hard Topological Reasoning
Organizations: Intercom Research · University College Dublin · University of Galway · Salk Institute ·
Abstract
Solving topological grid puzzles requires reasoning over global spatial invariants such as connectivity, loop closure, and region symmetry and remains challenging for even the most powerful large language models (LLMs). To study these abilities under controlled settings, we introduce TopoBench, a benchmark of six puzzle families across three difficulty levels. We evaluate strong reasoning LLMs on TopoBench and find that even frontier models solve fewer than one quarter of hard instances, with two families nearly unsolved. To investigate whether these failures stem from reasoning limitations or from difficulty extracting and maintaining spatial constraints, we annotate 750 chain of thought traces with an error taxonomy that surfaces four candidate causal failure modes, then test them with targeted interventions simulating each error type. These interventions show that certain error patterns like premature commitment and constraint forgetting have a direct impact on the ability to solve the puzzle, while repeated reasoning is a benign effect of search. Finally we study mitigation strategies including prompt guidance, cell-aligned grid representations and tool-based constraint checking, finding that the bottleneck lies in extracting constraints from spatial representations and not in reasoning over them. Code and data are available at github.com/mayug/topobench-benchmark.
Figures & tables
| Puzzle | Task description | Spatial constraint |
|---|---|---|
| Flow Free | Route non-intersecting paths between color-matched endpoints, filling every cell. | Path connectivity |
| Bridges (Hashiwokakero) | Connect numbered islands with bridges; degree, crossing, and connectivity constraints. | Network connectivity |
| Galaxies (Tentai Show) | Partition grid into regions each rotationally symmetric around a marked center. | Rotational symmetry |
| Undead | Place monsters so line-of-sight counts through mirrors match clues. | Reflection & visibility |
| Pattern (Nonogram) | Fill a binary grid to match row/column run-length clues. | Contiguity across axes |
| Loopy (Slitherlink) | Draw a single closed loop on grid edges satisfying per-cell edge-count clues. | Loop closure |
| Model | Source | Params (Active) | Arch. | Open-weight | Reasoning | Multimodal |
|---|---|---|---|---|---|---|
| Reasoning models | ||||||
| GPT-5-mini-high | OpenAI | – | ✓ | ✓ | ||
| Gemini-3-Flash-Preview | – | ✓ | ✓ | |||
| DeepSeek V3.2 | DeepSeek | 671B (37B) | MoE | ✓ | ✓ | – |
| Qwen3-32B | Alibaba | 32B | D | ✓ | ✓ | – |
| OLMo-3.1-32B-Think | AI2 | 32B | D | ✓ | ✓ | – |
| Model | FlowFree | Bridges | Loopy | Galaxies | Undead | Pattern | Avg |
|---|---|---|---|---|---|---|---|
| Easy (n=50) | |||||||
| Gemini 3 Flash | 0.72 | 0.86 | 0.18 | 0.16 | 0.78 | 0.90 | 0.60 |
| GPT-5 Mini | 0.66 | 0.90 | 0.32 | 0.58 | 0.88 | 0.92 | 0.71 |
| DeepSeek V3.2 | 0.64 | 0.94 | 0.26 | 0.04 | 0.76 | 0.82 | 0.58 |
| Qwen3-235b | 0.48 | 0.72 | 0.00 | 0.00 | 0.24 | 0.44 | 0.31 |
| GLM-4.7 Flash | 0.14 | 0.00 | 0.04 | 0.00 | 0.00 | 0.02 | 0.03 |
| Abbr. | Error type | Definition |
| RR | Repeated Reasoning | Near-identical move sequences repeated from the same board position without meaningful variation. |
| STF | State-Tracking Failure | Claimed board state diverges from the cumulative effect of the model’s own stated actions. |
| CF | Constraint Forgetting | An explicit action that directly violates structural puzzle rules (overcounting, crossing, overwriting fixed cells). |
| PC | Premature Commitment | Commits to a provably incorrect configuration and persists for 3+ steps. |
| ES | Explicit Surrender | Explicitly gives up, requests a solver, or states it cannot proceed. |
| IO | Incomplete Output | Fails to produce a complete, valid final answer. |
| Model / Format | FlowFree | Bridges | Loopy | Galaxies | Undead | Pattern |
|---|---|---|---|---|---|---|
| DeepSeek V3.2 | 28.7 | 74.0 | 8.7 | 1.3 | 44.0 | 52.7 |
| Int-Format | +5.3 | +17.3 | +7.3 | +28.0 | -26.0 | -8.7 |
| Int-Format JSON | +3.3 | +14.0 | +3.3 | +23.3 | -36.7 | -8.0 |
| GPT-5 Mini | 30.0 | 68.7 | 10.7 | 19.3 | 73.3 | 75.3 |
| With Image | +0.7 | -0.7 | +2.0 | -0.7 | -5.3 | -18.0 |
| Int-Format | +8.0 | +12.0 | +12.0 | +15.3 | -8.7 | -22.0 |
| Condition | Acc. | Valid |
|---|---|---|
| Baseline (no tools) | 40% | 50% |
| Structured only | 46% | 100% |
| + render_board | 42% | 100% |
| Full structured suite | 50% | 100% |
Appendix figures & tables25 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | FlowFree | Bridges | Loopy | Galaxies | Undead | Pattern | Avg |
|---|---|---|---|---|---|---|---|
| Easy | |||||||
| Gemini 3 Flash | 0.72 0.12 | 0.86 0.10 | 0.18 0.11 | 0.16 0.10 | 0.78 0.11 | 0.90 0.09 | 0.60 0.06 |
| GPT-5 Mini | 0.66 0.13 | 0.90 0.09 | 0.32 0.13 | 0.58 0.13 | 0.88 0.09 | 0.92 0.08 | 0.71 0.05 |
| DeepSeek V3.2 | 0.64 0.13 | 0.94 0.07 | 0.26 0.12 | 0.04 0.06 | 0.76 0.12 | 0.82 0.11 | 0.58 0.06 |
| qwen3-235b-a22b-thinking-2507 | 0.48 0.13 | 0.72 0.12 | 0.00 0.04 | 0.00 0.04 | 0.24 0.12 | 0.44 0.13 | 0.31 0.05 |
| GLM-4.7 Flash | 0.14 0.10 | 0.00 0.04 | 0.04 0.06 | 0.00 0.04 | 0.00 0.04 | 0.02 0.05 | 0.03 0.02 |
| Model / Format | FlowFree | Bridges | Loopy | Galaxies | Undead | Pattern |
|---|---|---|---|---|---|---|
| DeepSeek V3.2 | 28.7 7.2 | 74.0 7.0 | 8.7 4.6 | 1.3 2.2 | 44.0 7.8 | 52.7 7.9 |
| With Image | – | – | – | – | – | – |
| Int-Format | +5.3 10.4 | +17.3 8.4 | +7.3 7.5 | +28.0 7.6 | -26.0 10.0 | -8.7 11.1 |
| Int-Format JSON | +3.3 10.3 | +14.0 8.8 | +3.3 7.1 | +23.3 7.3 | -36.7 9.0 | -8.0 11.1 |
| Gemini 3 Flash | 42.7 7.8 | 58.0 7.8 | 6.0 3.9 | 5.3 3.7 | 29.3 7.2 | 66.0 7.5 |
| With Image | +4.7 11.1 | +7.3 10.9 | -3.3 5.1 | +0.0 5.5 | -4.7 10.0 | +6.7 10.3 |
| Puzzle | Easy | Medium | Hard |
|---|---|---|---|
| Bridges | 5x5d0 | 7x7d1 | 10x10d2 |
| Galaxies | 5x5dn | 7x7du | 10x10du |
| Loopy | 5x5t0de | 7x7t0dt | 10x10t0dh |
| Pattern | 5x5 | 7x7 | 10x10 |
| Undead | 4x4de | 5x5dn | 7x7dt |
| Flow Free | 5 5–6 6 | 7 7–8 8 | 9 9–12 12 |
| Abbr. | Error type | Definition |
| RR | Repeated Reasoning | Near-identical move sequences repeated from the same board position without meaningful variation. |
| STF | State-Tracking Failure | Claimed board state diverges from the cumulative effect of the model’s own stated actions. |
| CF | Constraint Forgetting | An explicit action that directly violates structural puzzle rules (overcounting, crossing, overwriting fixed cells). |
| PC | Premature Commitment | Commits to a provably incorrect configuration and persists for 3+ steps. |
| ES | Explicit Surrender | Explicitly gives up, requests a solver, or states it cannot proceed. |
| IO | Incomplete Output | Fails to produce a complete, valid final answer. |
| Group | N | Mean tokens | Median tokens | Std |
|---|---|---|---|---|
| Correct | 308 | 21,801 | 18,368 | 12,174 |
| Other failure | 128 | 34,632 | 34,924 | 15,423 |
| ES failure | 464 | 42,425 | 42,326 | 8,713 |
| Condition | Easy | Medium | Hard | Total | |
| Baseline | 91.7 | 82.0 | 32.0 | 66.2 [60.4, 71.5] | – |
| RR Gold Ctrl | 91.7 | 85.0 | 32.0 | 67.3 [61.5, 72.6] | 1.1 |
| RR Rand Ctrl | 93.5 | 80.0 | 30.0 | 65.7 [59.9, 71.0] | 0.5 |
| RR Standard | 94.7 | 76.0 | 24.0 | 62.2 [56.3, 67.7] | 4.0 |
| STF | 88.9 | 73.0 | 19.0 | 58.4 [52.5, 64.0] | 7.8 |
| PC Half | 93.9 | 43.0 | 8.0 | 45.4 [39.7, 51.2] | 20.8 ∗ |
| Condition | Easy | Medium | Hard | Total | |
| Baseline | 81.0 | 44.0 | 9.0 | 44.7 [39.1, 50.3] | – |
| RR Gold Ctrl | 82.0 | 45.0 | 6.0 | 44.3 [38.8, 50.0] | 0.3 |
| RR Rand Ctrl | 71.0 | 33.0 | 3.0 | 35.7 [30.5, 41.2] | 9.0 ∗ |
| RR Standard | 70.0 | 45.0 | 2.0 | 39.0 [33.7, 44.6] | 5.7 |
| STF | 63.0 | 35.0 | 1.0 | 33.0 [27.9, 38.5] | 11.7 ∗ |
| PC Half | 74.0 | 26.0 | 0.0 | 33.3 [28.2, 38.8] | 11.3 ∗ |
| Condition | Bridges ( ) | Undead ( ) | ||
|---|---|---|---|---|
| Total | Total | |||
| Baseline | 66.2 [60.4, 71.5] | – | 44.7 [39.1, 50.3] | – |
| RR Gold Ctrl | 67.3 [61.5, 72.6] | 1.1 | 44.3 [38.8, 50.0] | 0.3 |
| RR Standard | 62.2 [56.3, 67.7] | 4.0 | 39.0 [33.7, 44.6] | 5.7 |
| STF | 58.4 [52.5, 64.0] | 7.8 | 33.0 [27.9, 38.5] | 11.7 ∗ |
| PC Half | 45.4 [39.7, 51.2] | 20.8 ∗ | 33.3 [28.2, 38.8] | 11.3 ∗ |
| Puzzle | Condition | Easy | Medium | Hard | Total |
|---|---|---|---|---|---|
| Bridges | Standard prompt ( ) | 94.0 | 88.0 | 40.0 | 74.0 |
| Bridges | Intervention baseline ( ) | 91.7 | 82.0 | 32.0 | 66.2 |
| Undead | Standard prompt ( ) | 76.0 | 46.0 | 10.0 | 44.0 |
| Undead | Intervention baseline ( ) | 81.0 | 44.0 | 9.0 | 44.7 |
| # | Condition | Medium | Hard | Total | |
|---|---|---|---|---|---|
| 1 | Baseline (rules + minimal I/O) | 80% | 40% | 60% | – |
| 2 | Text backtrack instruction | 84% | 28% | 56% | 4 |
| 3 | 1-shot gold path (no NL reasoning) | 76% | 42% | 59% | 1 |
| 4 | 1-shot worked example (verbose NL) | 86% | 28% | 57% | 3 |
| 5 | 2-shot worked example (verbose NL) | 76% | 30% | 53% | 7 |
| 6 | Text planning instruction | 78% | 30% | 54% | 6 |
| Condition | Tools available | Accuracy | Board valid | Avg tokens |
|---|---|---|---|---|
| Baseline (no tools) | — | 40% | 50% | 25,640 |
| Additive ablation | ||||
| State mutation only | make_move , render_board | 26% | 96% | 28,308 |
| + degree bookkeeping | + state_summary | 42% | 100% | 22,784 |
| + move enumeration | + neighbors | 44% | 100% | 19,570 |
| + connectivity | + components | 48% | 98% | 18,030 |
| Model | Format | FlowFree | Bridges | Loopy | Galaxies | Undead | Pattern | Avg |
|---|---|---|---|---|---|---|---|---|
| Gemini 3 Flash | ascii | 0.72 | 0.86 | 0.18 | 0.16 | 0.78 | 0.90 | 0.60 |
| Gemini 3 Flash | intformat | 0.70 | 1.00 | 0.40 | 0.98 | 0.60 | 0.94 | 0.77 |
| Gemini 3 Flash | intf. json | 0.72 | 1.00 | 0.54 | 0.98 | 0.12 | 0.96 | 0.72 |
| Gemini 3 Flash | ascii + img | 0.74 | 0.92 | 0.08 | 0.16 | 0.60 | 0.92 | 0.57 |
| GPT-5 Mini | ascii | 0.66 | 0.90 | 0.32 | 0.58 | 0.88 | 0.92 | 0.71 |
| GPT-5 Mini | intformat | 0.72 | 0.98 | 0.66 | 0.88 | 0.98 | 0.90 | 0.85 |
| Model | Format | FlowFree | Bridges | Loopy | Galaxies | Undead | Pattern | Avg |
|---|---|---|---|---|---|---|---|---|
| Gemini 3 Flash | ascii | 0.54 | 0.66 | 0.00 | 0.00 | 0.10 | 0.78 | 0.35 |
| Gemini 3 Flash | intformat | 0.70 | 1.00 | 0.00 | 0.14 | 0.10 | 0.78 | 0.45 |
| Gemini 3 Flash | intf. json | 0.68 | 1.00 | 0.00 | 0.06 | 0.00 | 0.86 | 0.43 |
| Gemini 3 Flash | ascii + img | 0.62 | 0.70 | 0.00 | 0.00 | 0.14 | 0.82 | 0.38 |
| GPT-5 Mini | ascii | 0.22 | 0.72 | 0.00 | 0.00 | 0.80 | 0.90 | 0.44 |
| GPT-5 Mini | intformat | 0.38 | 0.90 | 0.02 | 0.16 | 0.72 | 0.70 | 0.48 |
| Model | Format | FlowFree | Bridges | Loopy | Galaxies | Undead | Pattern | Avg |
|---|---|---|---|---|---|---|---|---|
| Gemini 3 Flash | ascii | 0.02 | 0.22 | 0.00 | 0.00 | 0.00 | 0.30 | 0.09 |
| Gemini 3 Flash | intformat | 0.12 | 0.86 | 0.00 | 0.00 | 0.00 | 0.36 | 0.22 |
| Gemini 3 Flash | intf. json | 0.18 | 0.90 | 0.00 | 0.00 | 0.00 | 0.30 | 0.23 |
| Gemini 3 Flash | ascii + img | 0.06 | 0.34 | 0.00 | 0.00 | 0.00 | 0.44 | 0.14 |
| GPT-5 Mini | ascii | 0.02 | 0.44 | 0.00 | 0.00 | 0.52 | 0.44 | 0.24 |
| GPT-5 Mini | intformat | 0.04 | 0.54 | 0.00 | 0.00 | 0.24 | 0.00 | 0.14 |
| Model | Tokens | Price per 1M tokens (USD) | Full price (USD) |
|---|---|---|---|
| gpt-5-mini | 49,607,682 | 2.00 | 99.22 |
| qwen3-235b | 36,252,844 | 2.30 | 83.38 |
| gemini-3-flash-preview | 27,014,575 | 3.00 | 81.04 |
| deepseek-v3.2 | 30,766,175 | 0.42 | 12.92 |
| glm-4.7-flash | 26,939,558 | 0.40 | 10.78 |
| olmo-3.1-32b-think | 19,736,186 | 0.50 | 9.87 |
| Model | Tokens | Price per 1M tokens (USD) | Full price (USD) |
|---|---|---|---|
| gpt-5-mini | 191,749,525 | 2.00 | 383.50 |
| gemini-3-flash-preview | 109,343,674 | 3.00 | 328.03 |
| qwen3-235b | 108,633,225 | 2.30 | 249.86 |
| deepseek-v3.2 | 91,074,375 | 0.42 | 38.25 |
| glm-4.7-flash | 82,757,329 | 0.40 | 33.10 |
| olmo-3.1-32b-think | 58,457,735 | 0.50 | 29.23 |