File size: 8,526 Bytes
fa5430b
 
 
 
 
 
 
 
 
 
 
f6d08ef
fa5430b
 
f6d08ef
 
fa5430b
 
f6d08ef
 
fa5430b
 
f6d08ef
 
fa5430b
 
f6d08ef
 
fa5430b
 
f6d08ef
 
fa5430b
 
f6d08ef
 
fa5430b
 
f6d08ef
 
fa5430b
 
f6d08ef
 
 
 
 
 
 
 
 
fa5430b
 
 
 
 
 
 
f6d08ef
 
fa5430b
 
 
 
 
 
91904ba
fa5430b
f6d08ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fa5430b
 
 
f6d08ef
 
 
fa5430b
f6d08ef
fa5430b
 
 
 
 
 
 
 
 
 
 
 
f6d08ef
fa5430b
 
 
f6d08ef
fa5430b
 
 
 
 
 
 
 
 
 
 
 
 
f6d08ef
fa5430b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f6d08ef
fa5430b
 
 
 
 
f6d08ef
fa5430b
 
 
f6d08ef
 
fa5430b
 
 
 
 
 
f6d08ef
fa5430b
 
 
 
f6d08ef
fa5430b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f6d08ef
fa5430b
 
 
f6d08ef
fa5430b
 
 
 
 
5aa34c5
 
fa5430b
5aa34c5
 
 
f6d08ef
fa5430b
5aa34c5
fa5430b
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
---
license: cc-by-4.0
task_categories:
  - visual-question-answering
language:
  - en
tags:
  - spatial-reasoning
  - map-understanding
  - multi-choice-qa
configs:
  - config_name: t1_no_visual_supervision
    data_files:
      - split: test
        path: data/t1_no_visual_supervision.jsonl
  - config_name: t1_query_supervision
    data_files:
      - split: test
        path: data/t1_query_supervision.jsonl
  - config_name: t2_no_visual_supervision
    data_files:
      - split: test
        path: data/t2_no_visual_supervision.jsonl
  - config_name: t2_query_supervision
    data_files:
      - split: test
        path: data/t2_query_supervision.jsonl
  - config_name: t3_no_visual_supervision
    data_files:
      - split: test
        path: data/t3_no_visual_supervision.jsonl
  - config_name: t3_oracle_supervision
    data_files:
      - split: test
        path: data/t3_oracle_supervision.jsonl
  - config_name: t3_query_supervision
    data_files:
      - split: test
        path: data/t3_query_supervision.jsonl
  - config_name: t4_no_visual_supervision
    data_files:
      - split: test
        path: data/t4_no_visual_supervision.jsonl
  - config_name: t4_oracle_supervision
    data_files:
      - split: test
        path: data/t4_oracle_supervision.jsonl
  - config_name: t4_query_supervision
    data_files:
      - split: test
        path: data/t4_query_supervision.jsonl
---

# Map-based Spatial Reasoning Benchmark

A multi-view map-based spatial reasoning benchmark. Each row is one multiple-choice
question instance over a registered map image; models must answer with a single option
letter. Four tasks (T1–T4), four base-map views, and controlled evidence conditions
(direct / query / oracle) and world perturbations (transform / world layers) allow
fine-grained analysis of spatial reasoning robustness.

## Task overview

| Task | Question type | Description |
|---|---|---|
| T1 | direction / angular_order / egocentric_side / dual_anchor_direction | Cardinal direction, clockwise angular ordering, and egocentric side between colored point markers |
| T2 | composite_euclidean_distance / composite_network_distance / nearest_point / directional_nearest_point | Comparing metric or network distances between marked points, and identifying the nearest point |
| T3 | segment_building_count (subtasks: `route`, `seg`) | Counting first-row buildings along a directed route segment |
| T4 | waypoint_ordering / route_validity / detour_waypoint_shortest / detour_waypoint_traversability | Waypoint ordering, route validity, and detour planning under road closures |

## Supervision conditions

Each task is released under one or more *supervision conditions*, which differ only in
the visual evidence overlaid on the registered map images — the questions, options and
answers are identical across conditions of the same task.

| File | `condition` | Available for | Visual evidence |
|---|---|---|---|
| `*_no_visual_supervision.jsonl` | `direct` | T1–T4 | None — the bare base map, no task annotations |
| `*_query_supervision.jsonl` | `query` | T1–T4 | Query-dependent scaffolding that supports answering the question (e.g., route segments, measured rays, partial building-footprint scaffolds) |
| `*_oracle_supervision.jsonl` | `oracle` | T3–T4 | Complete oracle annotations of the ground-truth solution |

Note: for T4 `detour_waypoint_traversability`, the `query` condition uses the
fully annotated road-status / waypoint-map pair, since the weak scaffold does not
cover this question type.

## Sample counts (per condition)

T1/T2 provide 2 conditions each; T3/T4 provide 3. All conditions of a task share the
same instance set. Total: **77,800 rows** (40,000 for T1/T2 + 13,800 for T3 + 24,000
for T4).

### T1 — 10,000 per condition

Base question set = 400 instances per view. 7 geometric transform variants (rot90,
rot180, rot270, mirror_h, mirror_h_rot90/180/270) replicate the base set.

| view | composition | rows |
|---|---|---|
| sat | base 400 + 7 transforms x 400 | 3,200 |
| wprd01 | base 400 + 7 transforms x 400 | 3,200 |
| blank | base 400 + 7 transforms x 400 | 3,200 |
| webrd04 | base 400 only | 400 |
| **total** | | **10,000** |

### T2 — 10,000 per condition

Same structure as T1 (400 base instances, same view/transform coverage): 3,200 x 3 + 400 = **10,000**.

### T3 — 4,600 per condition

Base question set = 200 instances per view; world layer has 2 variants
(`intervention_001`, `sham_001`) with 200 each. The `blank` view is not used for T3:
the task is building-footprint recognition, which is only meaningful on imagery that
actually shows buildings (satellite / map tiles).

| view | composition | rows |
|---|---|---|
| sat | base 200 + 7 transforms x 200 + 2 world x 200 | 2,000 |
| wprd01 | base 200 + 7 transforms x 200 + 2 world x 200 | 2,000 |
| webrd04 | base 200 + 2 world x 200 | 600 |
| **total** | | **4,600** |

### T4 — 8,000 per condition

Base question set = 400 instances; world layer = 2 variants x 200. The `blank` view is
not used for T4: the task is road/waypoint recognition on the route network, which
requires imagery that actually depicts roads (satellite / map tiles).

| view | composition | rows |
|---|---|---|
| sat | base 400 + 7 transforms x 400 + 2 world x 200 | 3,600 |
| wprd01 | base 400 + 7 transforms x 400 + 2 world x 200 | 3,600 |
| webrd04 | base 400 + 2 world x 200 | 800 |
| **total** | | **8,000** |

## Dimensions

| Field | Values | Meaning |
|---|---|---|
| `view` | `sat` / `webrd04` / `wprd01` / `blank` | Base map style: satellite imagery / road map / place-label map / blank background. **Note:** the `webrd04` (road-map) view is only provided for the `base` layer — its tiles contain textual labels (e.g., Chinese characters), which would become unreadable or mirrored after rotation/flipping, so no `transform` variants are generated for this view |
| `layer` | `base` / `transform` / `world` | Original scene, geometric transform stress test, or world intervention |
| `variant` | `rot90`, `rot180`, `rot270`, `mirror_h`, `mirror_h_rot*` (transform); `intervention_001`, `sham_001` (world); `null` (base) | Sub-variant of the layer. Note: transform variants have rotated/flipped map frames — "north is up" applies to the transformed image |
| `condition` | `direct` / `query` / `oracle` | Visual evidence condition (see [Supervision conditions](#supervision-conditions)) |

## Row schema

```json
{
  "id": "c0019932db15_blank_query",
  "task_id": "T1",
  "layer": "base",
  "variant": null,
  "view": "blank",
  "condition": "query",
  "question_type": "angular_order",
  "question": "From the green point, sweeping clockwise from north, ...",
  "options": ["A. yellow, red", "B. red, yellow"],
  "answer": "B",
  "answer_letter": "B",
  "system_prompt": "You are evaluating spatial reasoning ...",
  "images": ["images/t1/c_06d46000d7/s_429d01__q_e5ebc72207__base__query__blank_query_q4.png"],
  "meta": {
    "case_id": "c_06d46000d7",
    "scheme": "s_429d01",
    "instance_id": "q_e5ebc72207",
    "tile_type": "blank",
    "subtask": null
  }
}
```

- `options` are pre-shuffled; the correct letter is `answer_letter`.
- Evaluation is exact match on the option letter for all rows.
- Multiple-choice prompt format: append `Options:\n<options>` and instruct the model to
  output only the letter (see `system_prompt`).

## Image naming

Images live under `images/{task}/{case_code}/`. Directory segments `case_id`, `scheme`
and `question_dir` are anonymized with deterministic short codes (`c_*`, `s_*`, `q_*`);
the remaining segments (`layer`, `condition`, original file name) are kept verbatim, e.g.

```
images/t1/c_06d46000d7/s_429d01__q_e5ebc72207__base__query__blank_query_q4.png
```

The same source image may be referenced by several rows (e.g., shared across transform
variants or views); 77,800 rows reference 27,394 unique image files.

## Loading

```python
from datasets import load_dataset
from huggingface_hub import snapshot_download
from PIL import Image

# Download the image files once (the jsonl only stores relative image paths)
root = snapshot_download("mapspatial/map-spatial-benchmark", repo_type="dataset")

ds = load_dataset("mapspatial/map-spatial-benchmark", "t1_query_supervision", split="test")
row = ds[0]
img = Image.open(f"{root}/{row['images'][0]}")
```

## Anonymization note

Identifiers of the source map data (case / scheme / question directory) are replaced by
deterministic hash codes and are not reversible from this repository.