# VALIDATION This file summarises the technical validation of StatMapCorpus, reported in full in the Technical Validation section of the data descriptor. The corpus was validated at four points: - the Stage 2 image classifier; - the structure of the selection in embedding space; - the Gate 4 labels against two human coders; - the cascade as a whole, by repeating its model calls and by auditing the images it rejected. The labels behind the last two are in `validation.csv`; its columns are described in `CODEBOOK.md`. The `validation/` directory of the code repository (https://github.com/MartaSolarz/StatMapCorpus) has two things: - the scripts that compute every number below from `validation.csv` and `statmapcorpus_dataset.parquet`; - the analysis plans, which were fixed before the respective data were collected. The thematic map types are numbered as in `CODEBOOK.md`: M1 choropleth, M2 diagram, M3 isoline, M4 dot density, M5 heat map, M6 cartogram, M7 flow map. ## Stage 2 classifier The fixed test set had 801 images, 148 of them positive. On it, the published classifier reached: - precision 0.763; - recall 0.959; - F1 0.850; - area under the precision–recall curve 0.882, and under the ROC curve 0.980. Active learning raised F1 from 0.823, the value obtained with the initial labels alone. The operating point favours recall on purpose: a false positive costs a download and a model call at Gate 2, whereas a false negative is lost for good. ## Structure of the selection in embedding space We projected 100,000 Stage 1 records with UMAP and placed the corpus in the same layout. The records predicted positive by Stage 2 occupy a contiguous region, and the corpus lies inside it. On average, 80.0% of the 15 nearest neighbours of a corpus map were Stage 2 positives, against 3.7% for sample records. Within the corpus, the thematic map types do not form separate clusters. Among a map's nearest neighbours, the five rare types are enriched 11- to 35-fold over their prevalence, yet none reaches a majority (9.8–40.5%). Image embeddings therefore separate statistical maps from other images, but they do not identify the type. That is why a vision-language model assigned the types. ## Labels against two human coders **Sample.** 157 corpus maps were drawn from the 22,499 maps left after removing byte-identical duplicates: - 20 maps drawn at random from all maps the model had labelled with each of the seven types; - all 17 maps labelled as carrying no legible text. 17 drawn maps were replaced from the same stratum because the image was illegible, cropped or a near-duplicate. Multi-type maps made up 40% of the 140 maps drawn by type, against 45% expected under the sampling design (z = −1.36). Each map's probability of inclusion is in `validation.csv` (`inclusion_probability`). **Coding.** The author (`coder1`) and a second, independent coder (`coder2`) each coded every map. They worked in an interface that showed no model output and followed a written codebook based on the model prompts. For each map they answered 12 questions: - whether it is a statistical map; - whether the data are referenced to administrative or statistical units; - whether the data are quantitative; - whether it carries any lettering; - which of the seven types it uses; - whether its legend is classed, continuous or not applicable. One coder answered "cannot assess" for one map on ten questions; these ten pairs were excluded, leaving 1,874 paired judgements (157 maps × 12 questions − 10). There was no calibration round, so the agreement below includes differences in how the coders interpreted the definitions. **Agreement and reference standards.** The coders disagreed in 99 of 1,874 paired judgements (5.3%). Disputes concentrated on three questions: - the choropleth (17 maps); - whether the data are referenced to administrative or statistical units (27 maps; κ = 0.34); - the legend type (34 maps), mostly at the boundary of the class "not applicable". Disputes were not resolved by arbitration. Instead, precision was computed three times: - **A:** every dispute resolved in favour of the first coder; - **B:** every dispute resolved in favour of the second coder; - **C:** disputed maps excluded. **Precision.** Precision is the share of maps labelled with a type by the model to which the coders also assigned that type. It is weighted by the inverse probability of inclusion (Horvitz–Thompson), with Wilson intervals on the Kish effective sample size. | Label | n | n_eff | Precision A | Precision B | Precision C | 95% CI (C) | κ model–human | κ human–human | |---|---:|---:|---:|---:|---:|---|---:|---:| | Choropleth (M1) | 75 | 22.0 | 0.96 | 0.97 | 0.97 | 0.81–1.00 | 0.67 | 0.78 | | Diagram (M2) | 43 | 24.2 | 0.90 | 0.90 | 0.90 | 0.72–0.97 | 0.78 | 0.97 | | Isoline (M3) | 19 | 19.0 | 0.55 | 0.50 | 0.52 | 0.32–0.73 | 0.54 | 0.96 | | Dot density (M4) | 21 | 20.7 | 0.69 | 0.64 | 0.67 | 0.46–0.83 | 0.78 | 0.93 | | Heat map (M5) | 20 | 19.0 | 0.71 | 0.71 | 0.71 | 0.48–0.86 | 0.80 | 0.96 | | Cartogram (M6) | 19 | 19.0 | 0.90 | 0.90 | 0.90 | 0.69–0.97 | 0.94 | 0.97 | | Flow map (M7) | 21 | 20.9 | 0.63 | 0.63 | 0.63 | 0.42–0.80 | 0.74 | 1.00 | | *Lettering (field)* | | | | | | | 0.96 | 0.89 | | present | 139 | 28.1 | 1.00 | 1.00 | 1.00 | 0.88–1.00 | | | | absent | 14 | 14.0 | 0.94 | 0.76 | 0.93 | 0.69–0.99 | | | | *Legend type (field)* | | | | | | | 0.82 | 0.65 | | classed | 70 | 17.1 | 0.96 | 0.99 | 0.99 | 0.80–1.00 | | | | continuous | 15 | 3.7 | 0.87 | 0.87 | 0.87 | 0.38–0.99 | | | | not applicable | 38 | 9.8 | 1.00 | 0.41 | 0.99 | 0.71–1.00 | | | The table's columns are: - **n:** sampled maps assigned the label by the model on which both coders agreed (reference C). References A and B also include the disputed maps. - **n_eff:** Kish effective sample size for C. - **κ:** Cohen's kappa in the sample. For lettering and legend type it is computed once per field. **Findings.** - **By type.** Precision was high for choropleths, diagrams and cartograms (0.90–0.97 under C), lower for heat maps, dot density and flow maps (0.63–0.71) and lowest for isolines (0.52). For every type, A and B differed by at most 5 percentage points, so these conclusions do not depend on the coder. - **Whole label set.** The complete set of seven type labels matched the coders' set for 0.94 of corpus maps (A 0.94, B 0.90). - **Statistical-map criteria.** The three criteria that define a statistical map held jointly for 0.96–0.99. - **The errors are systematic.** - All nine maps wrongly labelled as isoline maps were choropleths. - So were four of the seven false dot density maps. - Half of the false flow maps were diagrams. - The false heat maps were mostly isoline maps or diagrams. - **Lettering.** It was confirmed for all maps labelled as carrying text, and for 0.93 of those labelled as carrying none (B 0.76). - **Legend type.** - Classed legends were confirmed for 0.99 of maps. - Continuous legends were confirmed for 0.87, on an effective sample of only four maps. - Precision of "not applicable" ranged from 0.41 (B) to 1.00 (A), reflecting the boundary dispute above. - **Model confidence was not informative.** In the sample, the complete set of types matched the coders' set for 71% of maps labelled with high confidence and 68% with medium confidence. **Coder independence.** The first coder designed the pipeline. Before the analysis, we therefore tested whether her answers agreed with the model more often than the second coder's. - Over all type judgements, she agreed with the model in 92.8% of cases and the second coder in 91.7%. - Exact McNemar test: 18 against 6 discordant pairs, P = 0.023. - The difference is small but not negligible, so variant B, based on the second coder's reading, should be taken as the conservative bound. The sample was drawn from maps that passed the cascade, so it estimates precision but not recall. Recall of the cascade as a whole is addressed by the audit below. ## Repeatability of the model labels Calls to the vision-language models used the default sampling temperature. We therefore repeated Gates 3 and 4 twice for 300 corpus maps: the 157 validation maps and 143 maps drawn at random from the rest of the corpus. Code, prompts, models and output limits were identical to production. The responses of earlier gates, which form part of the input at Gates 3 and 4, were fixed at their production values. The instability measured here is therefore a lower bound. The re-runs comprised 1,200 calls. **The random maps represent the corpus.** For them, the complete set of seven types was identical in all three runs (production and two re-runs) for 142 of 143 maps (99.3%; 95% CI 96.1–99.9%). Together with the legend type, it was identical for 137 (95.8%). The validation maps over-represent rare and multi-type maps and were less stable: 89.8% and 85.4%. **Instability is a strong signal of error.** Units are pairs of a map and one of eight fields, on the validation maps, against reference C. - Of the labels reproduced in both re-runs, 6.2% disagreed with the coders (n = 1,163). - Of the labels not reproduced, 50.0% disagreed (n = 28). - Odds ratio 15.2. This is exploratory, because labels of one map are not independent. Repeatability is nevertheless higher than precision for every type. Isoline and flow-map labels, for example, were reproduced for 90% and 100% of maps, but only 52% and 63% of them were correct. These errors come from the model's reading of the definitions, not from sampling noise, and repeating a call would not remove them. **Inclusion at Gate 3 was less stable than the type labels.** - Of the random maps, 5 of 143 (3.5%; 95% CI 1.5–7.9%) would have been rejected in at least one re-run. - Of the validation maps, 26 of 157 would have been, half of them among the 17 maps without lettering. - All 17 had passed in production with English recorded as their language, but 13 were assigned another language in at least one re-run. Because Gate 3 required English lettering, maps without lettering are in the corpus only incidentally. ## Audit of rejected images The audit estimates how many maps that met the inclusion criteria were lost in the cascade. The author coded 150 images blind to the step that rejected them, answering for each whether it met all inclusion criteria (yes, no or cannot assess). The images were drawn at random from the rejected images of five strata. 20 corpus maps were added as controls (`DECOY`). | Stratum in `validation.csv` | Rejected at | Population | Sample | Met all criteria | 95% CI | Extrapolated (95% CI) | |---|---|---:|---:|---:|---|---| | `G2_not_a_map` | Gate 2: not a map | 337 | 15 | 0 | 0.0–20.4% | 0 (0–69) | | `G2_not_dominant` | Gate 2: map covers less than about half of the image | 425 | 15 | 0 | 0.0–20.4% | 0 (0–87) | | `G3_content` | Gate 3: content conditions | 25,984 | 60 | 4 (6.7%) | 2.6–15.9% | 1,732 (682–4,138) | | `G3_language` | Gate 3: language alone | 17,643 | 20 | 1 (5.0%) | 0.9–23.6% | 882 (157–4,166) | | `G4_no_type` | Gate 4: none of the seven types | 97 | 20 | 2 (10.0%) | 2.8–30.1% | 10 (3–29) | | `DECOY` | corpus maps (controls) | – | 20 | 17 (85%) | – | – | Extrapolated to the strata, about 2,600 rejected images would have qualified. The sum of the per-stratum Wilson bounds is 840–8,500. Almost all of these images were rejected at Gate 3. The cascade thus trades some completeness for precision, mainly at the gate that judges whether a map is statistical. The corpus should not be taken as exhaustive, even within the sampled candidates.