bilaljawaid980 commited on
Commit
ae26923
·
1 Parent(s): c0bf631

Correct polyhedron geometry and line intersection counterfactual

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. All question and answer/all_answers_combined.csv +2 -2
  2. All question and answer/all_questions_combined.csv +1 -1
  3. Dataset/combined_suite_rebuild_report.json +17 -40
  4. Dataset/final_suite_audit.json +112 -114
  5. Dataset/final_suite_audit.md +2 -2
  6. Dataset/line_intersection_dataset_3000/README.md +7 -1
  7. Dataset/line_intersection_dataset_3000/annotations.jsonl +0 -0
  8. Dataset/line_intersection_dataset_3000/answer_key.csv +0 -0
  9. Dataset/line_intersection_dataset_3000/build_manifest.json +14 -3
  10. Dataset/line_intersection_dataset_3000/dataset_final.csv +0 -0
  11. Dataset/line_intersection_dataset_3000/dataset_final.jsonl +0 -0
  12. Dataset/line_intersection_dataset_3000/flatten_annotations.py +3 -3
  13. Dataset/line_intersection_dataset_3000/generate_line_intersection_dataset.py +9 -2
  14. Dataset/line_intersection_dataset_3000/question_set.csv +0 -0
  15. Dataset/line_intersection_dataset_3000/validate_line_intersect_dataset.py +49 -21
  16. Dataset/line_intersection_dataset_3000/validation_metrics.json +436 -182
  17. Dataset/line_intersection_dataset_3000/validation_report.txt +15 -14
  18. Dataset/polyhedron_dataset_3000/README.md +8 -2
  19. Dataset/polyhedron_dataset_3000/annotations.jsonl +0 -0
  20. Dataset/polyhedron_dataset_3000/answer_key.csv +0 -0
  21. Dataset/polyhedron_dataset_3000/build_manifest.json +13 -13
  22. Dataset/polyhedron_dataset_3000/dataset_final.csv +0 -0
  23. Dataset/polyhedron_dataset_3000/dataset_final.jsonl +0 -0
  24. Dataset/polyhedron_dataset_3000/flatten_annotations.py +2 -2
  25. Dataset/polyhedron_dataset_3000/generate_polyhedron_dataset.py +6 -9
  26. Dataset/polyhedron_dataset_3000/images/polyhedron_0019.png +2 -2
  27. Dataset/polyhedron_dataset_3000/images/polyhedron_0038.png +2 -2
  28. Dataset/polyhedron_dataset_3000/images/polyhedron_0057.png +2 -2
  29. Dataset/polyhedron_dataset_3000/images/polyhedron_0076.png +2 -2
  30. Dataset/polyhedron_dataset_3000/images/polyhedron_0095.png +2 -2
  31. Dataset/polyhedron_dataset_3000/images/polyhedron_0114.png +2 -2
  32. Dataset/polyhedron_dataset_3000/images/polyhedron_0133.png +2 -2
  33. Dataset/polyhedron_dataset_3000/images/polyhedron_0152.png +2 -2
  34. Dataset/polyhedron_dataset_3000/images/polyhedron_0171.png +2 -2
  35. Dataset/polyhedron_dataset_3000/images/polyhedron_0190.png +2 -2
  36. Dataset/polyhedron_dataset_3000/images/polyhedron_0209.png +2 -2
  37. Dataset/polyhedron_dataset_3000/images/polyhedron_0228.png +2 -2
  38. Dataset/polyhedron_dataset_3000/images/polyhedron_0247.png +2 -2
  39. Dataset/polyhedron_dataset_3000/images/polyhedron_0266.png +2 -2
  40. Dataset/polyhedron_dataset_3000/images/polyhedron_0285.png +2 -2
  41. Dataset/polyhedron_dataset_3000/images/polyhedron_0304.png +2 -2
  42. Dataset/polyhedron_dataset_3000/images/polyhedron_0323.png +2 -2
  43. Dataset/polyhedron_dataset_3000/images/polyhedron_0342.png +2 -2
  44. Dataset/polyhedron_dataset_3000/images/polyhedron_0361.png +2 -2
  45. Dataset/polyhedron_dataset_3000/images/polyhedron_0380.png +2 -2
  46. Dataset/polyhedron_dataset_3000/images/polyhedron_0399.png +2 -2
  47. Dataset/polyhedron_dataset_3000/images/polyhedron_0418.png +2 -2
  48. Dataset/polyhedron_dataset_3000/images/polyhedron_0437.png +2 -2
  49. Dataset/polyhedron_dataset_3000/images/polyhedron_0456.png +2 -2
  50. Dataset/polyhedron_dataset_3000/images/polyhedron_0475.png +2 -2
All question and answer/all_answers_combined.csv CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c5bb1bbfa4add115bdf21837504b58f8aea564722760a986fa855da5ccb03963
3
- size 126966703
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d2312082155b9ae1132ac12c39d6e6f5ea085020c89a2038afa2d4a48978925
3
+ size 126965335
All question and answer/all_questions_combined.csv CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fc57ada5f1dae80cb78586aea64afbdbfb5fd4a58362147acb8686d75b91baee
3
  size 113410628
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa3a54051692cbe13725b15dfd9b0be7b3abd145bbb4772a555c5f7b1eba7956
3
  size 113410628
Dataset/combined_suite_rebuild_report.json CHANGED
@@ -15,6 +15,7 @@
15
  "clock_reading": 15000,
16
  "combination": 15000,
17
  "combination3d": 15000,
 
18
  "coordinate_geometry": 15000,
19
  "cube_net": 15000,
20
  "cube_structure": 15000,
@@ -24,16 +25,20 @@
24
  "fold_punch": 15000,
25
  "gauge_reading": 15000,
26
  "gear_train": 15000,
 
27
  "impossible_object": 15000,
 
28
  "line_intersect": 15000,
29
  "nested_hexagons": 15000,
30
  "nested_squares": 15000,
31
  "nested_triangles": 15000,
32
  "occluded_pattern": 15000,
 
33
  "orthographic": 15000,
34
  "overlap_circles": 15000,
35
  "physical_stability": 15000,
36
  "polyhedron": 15000,
 
37
  "rotation_match": 15000,
38
  "route_puzzle": 15000,
39
  "rpm": 15000,
@@ -41,15 +46,9 @@
41
  "surface_topology": 15000,
42
  "symmetry_pattern": 15000
43
  },
44
- "answer_rows": 435000,
45
  "extra_prefixes": [],
46
- "missing_prefixes": [
47
- "compass_bearing",
48
- "hex_pathfinding",
49
- "laser_mirror",
50
- "optical_illusion",
51
- "projectile_motion"
52
- ],
53
  "present": true,
54
  "question_answer_row_counts_match": true,
55
  "question_prefix_counts": {
@@ -57,6 +56,7 @@
57
  "clock_reading": 15000,
58
  "combination": 15000,
59
  "combination3d": 15000,
 
60
  "coordinate_geometry": 15000,
61
  "cube_net": 15000,
62
  "cube_structure": 15000,
@@ -66,16 +66,20 @@
66
  "fold_punch": 15000,
67
  "gauge_reading": 15000,
68
  "gear_train": 15000,
 
69
  "impossible_object": 15000,
 
70
  "line_intersect": 15000,
71
  "nested_hexagons": 15000,
72
  "nested_squares": 15000,
73
  "nested_triangles": 15000,
74
  "occluded_pattern": 15000,
 
75
  "orthographic": 15000,
76
  "overlap_circles": 15000,
77
  "physical_stability": 15000,
78
  "polyhedron": 15000,
 
79
  "rotation_match": 15000,
80
  "route_puzzle": 15000,
81
  "rpm": 15000,
@@ -83,37 +87,10 @@
83
  "surface_topology": 15000,
84
  "symmetry_pattern": 15000
85
  },
86
- "question_rows": 435000,
87
  "stale_or_mismatched": {
88
- "angle_estimation": "question rows differ from current question_set.csv",
89
- "clock_reading": "dataset_version is [''], expected legacy-current",
90
- "combination": "dataset_version is [''], expected legacy-current",
91
- "combination3d": "question rows differ from current question_set.csv",
92
- "coordinate_geometry": "dataset_version is [''], expected coordinate-geometry-2.0.0",
93
- "cube_net": "question rows differ from current question_set.csv",
94
- "cube_structure": "question rows differ from current question_set.csv",
95
- "depth_height": "dataset_version is [''], expected depth-height-2.0.0",
96
- "embedded_figures": "dataset_version is [''], expected legacy-current",
97
- "fbd": "question rows differ from current question_set.csv",
98
- "fold_punch": "question rows differ from current question_set.csv",
99
- "gauge_reading": "dataset_version is [''], expected legacy-current",
100
- "gear_train": "dataset_version is [''], expected legacy-current",
101
- "impossible_object": "question rows differ from current question_set.csv",
102
- "line_intersection": "dataset_version is [''], expected line-intersection-2.0.0",
103
- "nested_hexagons": "question rows differ from current question_set.csv",
104
- "nested_squares": "question rows differ from current question_set.csv",
105
- "nested_triangles": "question rows differ from current question_set.csv",
106
- "occluded_pattern": "dataset_version is [''], expected occluded-pattern-2.0.0",
107
- "orthographic": "dataset_version is [''], expected legacy-current",
108
- "overlap_circles": "question rows differ from current question_set.csv",
109
- "physical_stability": "dataset_version is [''], expected legacy-current",
110
- "polyhedron": "dataset_version is [''], expected polyhedron-3.0.0",
111
- "rotation_matching": "question rows differ from current question_set.csv",
112
- "route": "dataset_version is [''], expected route-2.0.0",
113
- "rpm": "question rows differ from current question_set.csv",
114
- "shadow_inference": "question rows differ from current question_set.csv",
115
- "surface_topology": "question rows differ from current question_set.csv",
116
- "symmetry_pattern": "dataset_version is [''], expected symmetry-pattern-2.0.0"
117
  }
118
  },
119
  "discovered_dataset_count": 34,
@@ -266,7 +243,7 @@
266
  "prefix": "line_intersect",
267
  "questions": 15000,
268
  "slug": "line_intersection",
269
- "version": "line-intersection-2.0.0"
270
  },
271
  "nested_hexagons_dataset_3000": {
272
  "answers": 15000,
@@ -338,7 +315,7 @@
338
  "prefix": "polyhedron",
339
  "questions": 15000,
340
  "slug": "polyhedron",
341
- "version": "polyhedron-3.0.0"
342
  },
343
  "projectile_motion_dataset_1000": {
344
  "answers": 5000,
 
15
  "clock_reading": 15000,
16
  "combination": 15000,
17
  "combination3d": 15000,
18
+ "compass_bearing": 15000,
19
  "coordinate_geometry": 15000,
20
  "cube_net": 15000,
21
  "cube_structure": 15000,
 
25
  "fold_punch": 15000,
26
  "gauge_reading": 15000,
27
  "gear_train": 15000,
28
+ "hex_pathfinding": 15000,
29
  "impossible_object": 15000,
30
+ "laser_mirror": 15000,
31
  "line_intersect": 15000,
32
  "nested_hexagons": 15000,
33
  "nested_squares": 15000,
34
  "nested_triangles": 15000,
35
  "occluded_pattern": 15000,
36
+ "optical_illusion": 15000,
37
  "orthographic": 15000,
38
  "overlap_circles": 15000,
39
  "physical_stability": 15000,
40
  "polyhedron": 15000,
41
+ "projectile_motion": 5000,
42
  "rotation_match": 15000,
43
  "route_puzzle": 15000,
44
  "rpm": 15000,
 
46
  "surface_topology": 15000,
47
  "symmetry_pattern": 15000
48
  },
49
+ "answer_rows": 500000,
50
  "extra_prefixes": [],
51
+ "missing_prefixes": [],
 
 
 
 
 
 
52
  "present": true,
53
  "question_answer_row_counts_match": true,
54
  "question_prefix_counts": {
 
56
  "clock_reading": 15000,
57
  "combination": 15000,
58
  "combination3d": 15000,
59
+ "compass_bearing": 15000,
60
  "coordinate_geometry": 15000,
61
  "cube_net": 15000,
62
  "cube_structure": 15000,
 
66
  "fold_punch": 15000,
67
  "gauge_reading": 15000,
68
  "gear_train": 15000,
69
+ "hex_pathfinding": 15000,
70
  "impossible_object": 15000,
71
+ "laser_mirror": 15000,
72
  "line_intersect": 15000,
73
  "nested_hexagons": 15000,
74
  "nested_squares": 15000,
75
  "nested_triangles": 15000,
76
  "occluded_pattern": 15000,
77
+ "optical_illusion": 15000,
78
  "orthographic": 15000,
79
  "overlap_circles": 15000,
80
  "physical_stability": 15000,
81
  "polyhedron": 15000,
82
+ "projectile_motion": 5000,
83
  "rotation_match": 15000,
84
  "route_puzzle": 15000,
85
  "rpm": 15000,
 
87
  "surface_topology": 15000,
88
  "symmetry_pattern": 15000
89
  },
90
+ "question_rows": 500000,
91
  "stale_or_mismatched": {
92
+ "line_intersection": "question rows differ from current question_set.csv",
93
+ "polyhedron": "dataset_version is ['polyhedron-3.0.0'], expected polyhedron-4.0.0"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
  },
96
  "discovered_dataset_count": 34,
 
243
  "prefix": "line_intersect",
244
  "questions": 15000,
245
  "slug": "line_intersection",
246
+ "version": "line-intersection-3.0.0"
247
  },
248
  "nested_hexagons_dataset_3000": {
249
  "answers": 15000,
 
315
  "prefix": "polyhedron",
316
  "questions": 15000,
317
  "slug": "polyhedron",
318
+ "version": "polyhedron-4.0.0"
319
  },
320
  "projectile_motion_dataset_1000": {
321
  "answers": 5000,
Dataset/final_suite_audit.json CHANGED
@@ -18660,7 +18660,7 @@
18660
  "p95": 4.0
18661
  }
18662
  },
18663
- "dataset_version": "line-intersection-2.0.0",
18664
  "degeneracy_flags": {},
18665
  "features_at_v_ge_0_10": {
18666
  "crossed_from_above_to_below": {
@@ -18668,53 +18668,55 @@
18668
  "2": 0.99933267,
18669
  "3": 0.24382486,
18670
  "4": 0.9974952,
18671
- "5": 0.65641789
18672
  },
18673
  "difficulty_score": {
18674
  "1": 0.85249175,
18675
  "2": 0.70761258,
18676
  "3": 0.18609249,
18677
  "4": 0.48280098,
18678
- "5": 0.59575224
18679
  },
18680
  "leftmost_intersection_x": {
18681
  "1": 0.17244787,
18682
  "2": 0.50316301,
18683
  "3": 0.21808086,
18684
  "4": 0.46245306,
18685
- "5": 0.50316301
18686
  },
18687
  "num_blue_segments": {
18688
  "1": 1.0,
18689
  "2": 0.35195787,
18690
  "4": 0.34851292,
18691
- "5": 0.3207622
18692
  },
18693
  "num_red_segments": {
18694
  "1": 1.0,
18695
  "2": 0.35195787,
18696
  "4": 0.34851292,
18697
- "5": 0.3207622
18698
  },
18699
  "red_above_blue_at_end": {
18700
- "3": 0.62772958
 
18701
  },
18702
  "red_above_blue_at_start": {
18703
- "3": 0.63335914
 
18704
  },
18705
  "rightmost_intersection_x": {
18706
  "1": 0.17147737,
18707
  "2": 0.502831,
18708
  "3": 0.21814305,
18709
  "4": 0.46222129,
18710
- "5": 0.502831
18711
  },
18712
  "total_intersections": {
18713
  "1": 0.32378613,
18714
  "2": 0.99983304,
18715
  "3": 0.23746468,
18716
  "4": 0.86218295,
18717
- "5": 0.82743926
18718
  }
18719
  },
18720
  "images": 3000,
@@ -18765,7 +18767,7 @@
18765
  "kind": "categorical"
18766
  },
18767
  "5": {
18768
- "cramers_v": 0.6564178921365604,
18769
  "kind": "categorical"
18770
  }
18771
  },
@@ -18791,7 +18793,7 @@
18791
  "kind": "numeric_deciles"
18792
  },
18793
  "5": {
18794
- "cramers_v": 0.5957522424527353,
18795
  "kind": "numeric_deciles"
18796
  }
18797
  },
@@ -18817,7 +18819,7 @@
18817
  "kind": "categorical"
18818
  },
18819
  "5": {
18820
- "cramers_v": 0.5031630080720518,
18821
  "kind": "categorical"
18822
  }
18823
  },
@@ -18843,7 +18845,7 @@
18843
  "kind": "numeric_deciles"
18844
  },
18845
  "5": {
18846
- "cramers_v": 0.32076220310426695,
18847
  "kind": "numeric_deciles"
18848
  }
18849
  },
@@ -18869,7 +18871,7 @@
18869
  "kind": "numeric_deciles"
18870
  },
18871
  "5": {
18872
- "cramers_v": 0.32076220310426695,
18873
  "kind": "numeric_deciles"
18874
  }
18875
  },
@@ -18895,7 +18897,7 @@
18895
  "kind": "categorical"
18896
  },
18897
  "5": {
18898
- "cramers_v": 0.024939328296776968,
18899
  "kind": "categorical"
18900
  }
18901
  },
@@ -18921,7 +18923,7 @@
18921
  "kind": "categorical"
18922
  },
18923
  "5": {
18924
- "cramers_v": 0.027270754941034103,
18925
  "kind": "categorical"
18926
  }
18927
  },
@@ -18973,7 +18975,7 @@
18973
  "kind": "categorical"
18974
  },
18975
  "5": {
18976
- "cramers_v": 0.5028309968131334,
18977
  "kind": "categorical"
18978
  }
18979
  },
@@ -18999,7 +19001,7 @@
18999
  "kind": "numeric_deciles"
19000
  },
19001
  "5": {
19002
- "cramers_v": 0.8274392623607943,
19003
  "kind": "numeric_deciles"
19004
  }
19005
  },
@@ -19087,14 +19089,14 @@
19087
  }
19088
  },
19089
  "5": {
19090
- "constant_answer_baseline": 0.2976666666666667,
19091
  "counts": {
19092
- "0": 858,
19093
- "1": 893,
19094
- "2": 683,
19095
- "3": 332,
19096
- "4": 167,
19097
- "5": 67
19098
  }
19099
  }
19100
  },
@@ -26324,34 +26326,31 @@
26324
  "categorical_distributions": {
26325
  "face_shape_types": {
26326
  "mixed": 1738,
26327
- "pentagons": 472,
26328
  "squares": 158,
26329
- "triangles": 632
26330
  },
26331
  "is_convex": {
26332
- "False": 630,
26333
- "True": 2370
26334
  },
26335
  "solid_class": {
26336
  "Archimedean": 948,
26337
  "Catalan": 632,
26338
  "Compound": 316,
26339
- "NonConvex": 314,
26340
- "Platonic": 790
26341
  },
26342
  "solid_name": {
26343
  "compound of cube and octahedron": 158,
26344
  "cube": 158,
26345
  "cuboctahedron": 158,
26346
- "dodecahedron": 158,
26347
- "great dodecahedron": 157,
26348
- "icosahedron": 158,
26349
  "icosidodecahedron": 158,
26350
  "octahedron": 158,
26351
  "rhombic dodecahedron": 158,
26352
  "rhombic triacontahedron": 158,
26353
  "rhombicuboctahedron": 158,
26354
- "small stellated dodecahedron": 157,
26355
  "stella octangula": 158,
26356
  "tetrahedron": 158,
26357
  "triakis octahedron": 158,
@@ -26376,7 +26375,7 @@
26376
  "max": 32.0,
26377
  "min": 4.0,
26378
  "p25": 8.0,
26379
- "p50": 12.0,
26380
  "p75": 20.0,
26381
  "p95": 32.0
26382
  },
@@ -26399,13 +26398,13 @@
26399
  "p95": 16.0
26400
  }
26401
  },
26402
- "dataset_version": "polyhedron-3.0.0",
26403
  "degeneracy_flags": {
26404
  "2": {
26405
- "constant_answer_baseline": 0.79,
26406
  "counts": {
26407
- "convex": 2370,
26408
- "non-convex": 630
26409
  }
26410
  },
26411
  "5": {
@@ -26417,52 +26416,52 @@
26417
  },
26418
  "features_at_v_ge_0_10": {
26419
  "edge_count": {
26420
- "1": 0.75583117,
26421
- "2": 0.48189444,
26422
- "3": 0.67088382,
26423
- "4": 0.5883061
26424
  },
26425
  "face_count": {
26426
- "1": 0.9994987,
26427
- "2": 0.41087482,
26428
- "3": 0.70705014,
26429
- "4": 0.70138458
26430
  },
26431
  "face_shape_types": {
26432
- "1": 0.86719078,
26433
- "2": 0.51107672,
26434
- "3": 0.8201062,
26435
- "4": 0.65396173
26436
  },
26437
  "is_convex": {
26438
- "1": 0.40965529,
26439
  "2": 1.0,
26440
- "3": 0.42016178,
26441
- "4": 0.82962824
26442
  },
26443
  "solid_class": {
26444
- "1": 0.68039958,
26445
- "2": 0.99949954,
26446
- "3": 0.61202071,
26447
- "4": 0.82161564
26448
  },
26449
  "solid_name": {
26450
- "1": 0.99849385,
26451
- "2": 0.99716075,
26452
- "3": 0.55664183,
26453
- "4": 0.61491684
26454
  },
26455
  "vertex_count": {
26456
- "1": 0.77114061,
26457
- "2": 0.42338604,
26458
- "3": 0.75755222,
26459
- "4": 0.61836357
26460
  },
26461
  "visible_face_count": {
26462
- "1": 0.94450613,
26463
- "2": 0.38803547,
26464
- "3": 0.70008253,
26465
- "4": 0.67368945
26466
  }
26467
  },
26468
  "images": 3000,
@@ -26471,19 +26470,19 @@
26471
  "classification": "scene_feature",
26472
  "levels": {
26473
  "1": {
26474
- "cramers_v": 0.7558311692393166,
26475
  "kind": "numeric_deciles"
26476
  },
26477
  "2": {
26478
- "cramers_v": 0.48189444296185086,
26479
  "kind": "numeric_deciles"
26480
  },
26481
  "3": {
26482
- "cramers_v": 0.6708838217815941,
26483
  "kind": "numeric_deciles"
26484
  },
26485
  "4": {
26486
- "cramers_v": 0.5883060976992267,
26487
  "kind": "numeric_deciles"
26488
  },
26489
  "5": {
@@ -26497,19 +26496,19 @@
26497
  "classification": "scene_feature",
26498
  "levels": {
26499
  "1": {
26500
- "cramers_v": 0.999498704956384,
26501
  "kind": "numeric_deciles"
26502
  },
26503
  "2": {
26504
- "cramers_v": 0.4108748230510013,
26505
  "kind": "numeric_deciles"
26506
  },
26507
  "3": {
26508
- "cramers_v": 0.7070501355062565,
26509
  "kind": "numeric_deciles"
26510
  },
26511
  "4": {
26512
- "cramers_v": 0.701384580685305,
26513
  "kind": "numeric_deciles"
26514
  },
26515
  "5": {
@@ -26523,19 +26522,19 @@
26523
  "classification": "scene_feature",
26524
  "levels": {
26525
  "1": {
26526
- "cramers_v": 0.867190777357142,
26527
  "kind": "categorical"
26528
  },
26529
  "2": {
26530
- "cramers_v": 0.5110767202699095,
26531
  "kind": "categorical"
26532
  },
26533
  "3": {
26534
- "cramers_v": 0.8201061981936764,
26535
  "kind": "categorical"
26536
  },
26537
  "4": {
26538
- "cramers_v": 0.6539617344974008,
26539
  "kind": "categorical"
26540
  },
26541
  "5": {
@@ -26549,19 +26548,19 @@
26549
  "classification": "scene_feature",
26550
  "levels": {
26551
  "1": {
26552
- "cramers_v": 0.40965528570468135,
26553
  "kind": "categorical"
26554
  },
26555
  "2": {
26556
- "cramers_v": 0.9999999999999999,
26557
  "kind": "categorical"
26558
  },
26559
  "3": {
26560
- "cramers_v": 0.4201617750145626,
26561
  "kind": "categorical"
26562
  },
26563
  "4": {
26564
- "cramers_v": 0.8296282369790656,
26565
  "kind": "categorical"
26566
  },
26567
  "5": {
@@ -26575,19 +26574,19 @@
26575
  "classification": "scene_feature",
26576
  "levels": {
26577
  "1": {
26578
- "cramers_v": 0.6803995831650559,
26579
  "kind": "categorical"
26580
  },
26581
  "2": {
26582
- "cramers_v": 0.9994995412147983,
26583
  "kind": "categorical"
26584
  },
26585
  "3": {
26586
- "cramers_v": 0.6120207081547728,
26587
  "kind": "categorical"
26588
  },
26589
  "4": {
26590
- "cramers_v": 0.821615636025442,
26591
  "kind": "categorical"
26592
  },
26593
  "5": {
@@ -26601,19 +26600,19 @@
26601
  "classification": "scene_feature",
26602
  "levels": {
26603
  "1": {
26604
- "cramers_v": 0.9984938490322233,
26605
  "kind": "categorical"
26606
  },
26607
  "2": {
26608
- "cramers_v": 0.9971607458355733,
26609
  "kind": "categorical"
26610
  },
26611
  "3": {
26612
- "cramers_v": 0.5566418257069514,
26613
  "kind": "categorical"
26614
  },
26615
  "4": {
26616
- "cramers_v": 0.6149168351347316,
26617
  "kind": "categorical"
26618
  },
26619
  "5": {
@@ -26627,19 +26626,19 @@
26627
  "classification": "scene_feature",
26628
  "levels": {
26629
  "1": {
26630
- "cramers_v": 0.7711406057961122,
26631
  "kind": "numeric_deciles"
26632
  },
26633
  "2": {
26634
- "cramers_v": 0.4233860362173674,
26635
  "kind": "numeric_deciles"
26636
  },
26637
  "3": {
26638
- "cramers_v": 0.7575522205488738,
26639
  "kind": "numeric_deciles"
26640
  },
26641
  "4": {
26642
- "cramers_v": 0.6183635665536725,
26643
  "kind": "numeric_deciles"
26644
  },
26645
  "5": {
@@ -26653,19 +26652,19 @@
26653
  "classification": "scene_feature",
26654
  "levels": {
26655
  "1": {
26656
- "cramers_v": 0.9445061270013774,
26657
  "kind": "numeric_deciles"
26658
  },
26659
  "2": {
26660
- "cramers_v": 0.3880354657584141,
26661
  "kind": "numeric_deciles"
26662
  },
26663
  "3": {
26664
- "cramers_v": 0.7000825297107476,
26665
  "kind": "numeric_deciles"
26666
  },
26667
  "4": {
26668
- "cramers_v": 0.6736894549459747,
26669
  "kind": "numeric_deciles"
26670
  },
26671
  "5": {
@@ -26678,11 +26677,11 @@
26678
  },
26679
  "level_distributions": {
26680
  "1": {
26681
- "constant_answer_baseline": 0.26266666666666666,
26682
  "counts": {
26683
- "12": 788,
26684
  "14": 632,
26685
- "20": 158,
26686
  "24": 158,
26687
  "26": 158,
26688
  "30": 158,
@@ -26693,10 +26692,10 @@
26693
  }
26694
  },
26695
  "2": {
26696
- "constant_answer_baseline": 0.79,
26697
  "counts": {
26698
- "convex": 2370,
26699
- "non-convex": 630
26700
  }
26701
  },
26702
  "3": {
@@ -26721,9 +26720,9 @@
26721
  "7": 205,
26722
  "8": 158,
26723
  "mixed": 585,
26724
- "pentagons": 178,
26725
  "squares": 51,
26726
- "triangles": 205
26727
  }
26728
  },
26729
  "4": {
@@ -26742,8 +26741,7 @@
26742
  "Archimedean": 273,
26743
  "Catalan": 206,
26744
  "Compound": 97,
26745
- "NonConvex": 112,
26746
- "Platonic": 207,
26747
  "no": 826,
26748
  "yes": 219
26749
  }
 
18660
  "p95": 4.0
18661
  }
18662
  },
18663
+ "dataset_version": "line-intersection-3.0.0",
18664
  "degeneracy_flags": {},
18665
  "features_at_v_ge_0_10": {
18666
  "crossed_from_above_to_below": {
 
18668
  "2": 0.99933267,
18669
  "3": 0.24382486,
18670
  "4": 0.9974952,
18671
+ "5": 0.10633523
18672
  },
18673
  "difficulty_score": {
18674
  "1": 0.85249175,
18675
  "2": 0.70761258,
18676
  "3": 0.18609249,
18677
  "4": 0.48280098,
18678
+ "5": 0.27643382
18679
  },
18680
  "leftmost_intersection_x": {
18681
  "1": 0.17244787,
18682
  "2": 0.50316301,
18683
  "3": 0.21808086,
18684
  "4": 0.46245306,
18685
+ "5": 0.20153092
18686
  },
18687
  "num_blue_segments": {
18688
  "1": 1.0,
18689
  "2": 0.35195787,
18690
  "4": 0.34851292,
18691
+ "5": 0.24488677
18692
  },
18693
  "num_red_segments": {
18694
  "1": 1.0,
18695
  "2": 0.35195787,
18696
  "4": 0.34851292,
18697
+ "5": 0.24488677
18698
  },
18699
  "red_above_blue_at_end": {
18700
+ "3": 0.62772958,
18701
+ "5": 0.19278923
18702
  },
18703
  "red_above_blue_at_start": {
18704
+ "3": 0.63335914,
18705
+ "5": 0.19749312
18706
  },
18707
  "rightmost_intersection_x": {
18708
  "1": 0.17147737,
18709
  "2": 0.502831,
18710
  "3": 0.21814305,
18711
  "4": 0.46222129,
18712
+ "5": 0.20119416
18713
  },
18714
  "total_intersections": {
18715
  "1": 0.32378613,
18716
  "2": 0.99983304,
18717
  "3": 0.23746468,
18718
  "4": 0.86218295,
18719
+ "5": 0.31018458
18720
  }
18721
  },
18722
  "images": 3000,
 
18767
  "kind": "categorical"
18768
  },
18769
  "5": {
18770
+ "cramers_v": 0.10633522642820674,
18771
  "kind": "categorical"
18772
  }
18773
  },
 
18793
  "kind": "numeric_deciles"
18794
  },
18795
  "5": {
18796
+ "cramers_v": 0.2764338162488935,
18797
  "kind": "numeric_deciles"
18798
  }
18799
  },
 
18819
  "kind": "categorical"
18820
  },
18821
  "5": {
18822
+ "cramers_v": 0.20153091676455742,
18823
  "kind": "categorical"
18824
  }
18825
  },
 
18845
  "kind": "numeric_deciles"
18846
  },
18847
  "5": {
18848
+ "cramers_v": 0.2448867721693077,
18849
  "kind": "numeric_deciles"
18850
  }
18851
  },
 
18871
  "kind": "numeric_deciles"
18872
  },
18873
  "5": {
18874
+ "cramers_v": 0.2448867721693077,
18875
  "kind": "numeric_deciles"
18876
  }
18877
  },
 
18897
  "kind": "categorical"
18898
  },
18899
  "5": {
18900
+ "cramers_v": 0.19278923326330089,
18901
  "kind": "categorical"
18902
  }
18903
  },
 
18923
  "kind": "categorical"
18924
  },
18925
  "5": {
18926
+ "cramers_v": 0.19749312158764903,
18927
  "kind": "categorical"
18928
  }
18929
  },
 
18975
  "kind": "categorical"
18976
  },
18977
  "5": {
18978
+ "cramers_v": 0.2011941575669298,
18979
  "kind": "categorical"
18980
  }
18981
  },
 
19001
  "kind": "numeric_deciles"
19002
  },
19003
  "5": {
19004
+ "cramers_v": 0.3101845784550317,
19005
  "kind": "numeric_deciles"
19006
  }
19007
  },
 
19089
  }
19090
  },
19091
  "5": {
19092
+ "constant_answer_baseline": 0.49633333333333335,
19093
  "counts": {
19094
+ "0": 1489,
19095
+ "1": 764,
19096
+ "2": 557,
19097
+ "3": 130,
19098
+ "4": 58,
19099
+ "5": 2
19100
  }
19101
  }
19102
  },
 
26326
  "categorical_distributions": {
26327
  "face_shape_types": {
26328
  "mixed": 1738,
26329
+ "pentagons": 315,
26330
  "squares": 158,
26331
+ "triangles": 789
26332
  },
26333
  "is_convex": {
26334
+ "False": 316,
26335
+ "True": 2684
26336
  },
26337
  "solid_class": {
26338
  "Archimedean": 948,
26339
  "Catalan": 632,
26340
  "Compound": 316,
26341
+ "Platonic": 1104
 
26342
  },
26343
  "solid_name": {
26344
  "compound of cube and octahedron": 158,
26345
  "cube": 158,
26346
  "cuboctahedron": 158,
26347
+ "dodecahedron": 315,
26348
+ "icosahedron": 315,
 
26349
  "icosidodecahedron": 158,
26350
  "octahedron": 158,
26351
  "rhombic dodecahedron": 158,
26352
  "rhombic triacontahedron": 158,
26353
  "rhombicuboctahedron": 158,
 
26354
  "stella octangula": 158,
26355
  "tetrahedron": 158,
26356
  "triakis octahedron": 158,
 
26375
  "max": 32.0,
26376
  "min": 4.0,
26377
  "p25": 8.0,
26378
+ "p50": 14.0,
26379
  "p75": 20.0,
26380
  "p95": 32.0
26381
  },
 
26398
  "p95": 16.0
26399
  }
26400
  },
26401
+ "dataset_version": "polyhedron-4.0.0",
26402
  "degeneracy_flags": {
26403
  "2": {
26404
+ "constant_answer_baseline": 0.8946666666666667,
26405
  "counts": {
26406
+ "convex": 2684,
26407
+ "non-convex": 316
26408
  }
26409
  },
26410
  "5": {
 
26416
  },
26417
  "features_at_v_ge_0_10": {
26418
  "edge_count": {
26419
+ "1": 0.76787728,
26420
+ "2": 0.45461294,
26421
+ "3": 0.65853928,
26422
+ "4": 0.57636344
26423
  },
26424
  "face_count": {
26425
+ "1": 0.99966572,
26426
+ "2": 0.45387864,
26427
+ "3": 0.70242336,
26428
+ "4": 0.67866732
26429
  },
26430
  "face_shape_types": {
26431
+ "1": 0.85781495,
26432
+ "2": 0.20976386,
26433
+ "3": 0.85076687,
26434
+ "4": 0.58908833
26435
  },
26436
  "is_convex": {
26437
+ "1": 0.45314314,
26438
  "2": 1.0,
26439
+ "3": 0.36265877,
26440
+ "4": 0.99766238
26441
  },
26442
  "solid_class": {
26443
+ "1": 0.72115872,
26444
+ "2": 0.99966639,
26445
+ "3": 0.63374451,
26446
+ "4": 0.86455964
26447
  },
26448
  "solid_name": {
26449
+ "1": 0.99882875,
26450
+ "2": 0.9974952,
26451
+ "3": 0.59153212,
26452
+ "4": 0.60079841
26453
  },
26454
  "vertex_count": {
26455
+ "1": 0.80136852,
26456
+ "2": 0.50258694,
26457
+ "3": 0.76737935,
26458
+ "4": 0.61153135
26459
  },
26460
  "visible_face_count": {
26461
+ "1": 0.98613929,
26462
+ "2": 0.44154719,
26463
+ "3": 0.70777868,
26464
+ "4": 0.66677894
26465
  }
26466
  },
26467
  "images": 3000,
 
26470
  "classification": "scene_feature",
26471
  "levels": {
26472
  "1": {
26473
+ "cramers_v": 0.7678772775143334,
26474
  "kind": "numeric_deciles"
26475
  },
26476
  "2": {
26477
+ "cramers_v": 0.45461294361222804,
26478
  "kind": "numeric_deciles"
26479
  },
26480
  "3": {
26481
+ "cramers_v": 0.6585392806416459,
26482
  "kind": "numeric_deciles"
26483
  },
26484
  "4": {
26485
+ "cramers_v": 0.5763634416760484,
26486
  "kind": "numeric_deciles"
26487
  },
26488
  "5": {
 
26496
  "classification": "scene_feature",
26497
  "levels": {
26498
  "1": {
26499
+ "cramers_v": 0.999665719529353,
26500
  "kind": "numeric_deciles"
26501
  },
26502
  "2": {
26503
+ "cramers_v": 0.4538786369638581,
26504
  "kind": "numeric_deciles"
26505
  },
26506
  "3": {
26507
+ "cramers_v": 0.7024233562734422,
26508
  "kind": "numeric_deciles"
26509
  },
26510
  "4": {
26511
+ "cramers_v": 0.6786673193089476,
26512
  "kind": "numeric_deciles"
26513
  },
26514
  "5": {
 
26522
  "classification": "scene_feature",
26523
  "levels": {
26524
  "1": {
26525
+ "cramers_v": 0.8578149524363928,
26526
  "kind": "categorical"
26527
  },
26528
  "2": {
26529
+ "cramers_v": 0.20976385557014507,
26530
  "kind": "categorical"
26531
  },
26532
  "3": {
26533
+ "cramers_v": 0.8507668742491247,
26534
  "kind": "categorical"
26535
  },
26536
  "4": {
26537
+ "cramers_v": 0.5890883344193385,
26538
  "kind": "categorical"
26539
  },
26540
  "5": {
 
26548
  "classification": "scene_feature",
26549
  "levels": {
26550
  "1": {
26551
+ "cramers_v": 0.4531431403922659,
26552
  "kind": "categorical"
26553
  },
26554
  "2": {
26555
+ "cramers_v": 1.0,
26556
  "kind": "categorical"
26557
  },
26558
  "3": {
26559
+ "cramers_v": 0.3626587678392811,
26560
  "kind": "categorical"
26561
  },
26562
  "4": {
26563
+ "cramers_v": 0.9976623778346884,
26564
  "kind": "categorical"
26565
  },
26566
  "5": {
 
26574
  "classification": "scene_feature",
26575
  "levels": {
26576
  "1": {
26577
+ "cramers_v": 0.7211587248153378,
26578
  "kind": "categorical"
26579
  },
26580
  "2": {
26581
+ "cramers_v": 0.9996663886479304,
26582
  "kind": "categorical"
26583
  },
26584
  "3": {
26585
+ "cramers_v": 0.6337445100277069,
26586
  "kind": "categorical"
26587
  },
26588
  "4": {
26589
+ "cramers_v": 0.8645596407847268,
26590
  "kind": "categorical"
26591
  },
26592
  "5": {
 
26600
  "classification": "scene_feature",
26601
  "levels": {
26602
  "1": {
26603
+ "cramers_v": 0.9988287455195981,
26604
  "kind": "categorical"
26605
  },
26606
  "2": {
26607
+ "cramers_v": 0.9974951951979328,
26608
  "kind": "categorical"
26609
  },
26610
  "3": {
26611
+ "cramers_v": 0.5915321198219095,
26612
  "kind": "categorical"
26613
  },
26614
  "4": {
26615
+ "cramers_v": 0.6007984103612805,
26616
  "kind": "categorical"
26617
  },
26618
  "5": {
 
26626
  "classification": "scene_feature",
26627
  "levels": {
26628
  "1": {
26629
+ "cramers_v": 0.8013685193945911,
26630
  "kind": "numeric_deciles"
26631
  },
26632
  "2": {
26633
+ "cramers_v": 0.502586939464905,
26634
  "kind": "numeric_deciles"
26635
  },
26636
  "3": {
26637
+ "cramers_v": 0.7673793499859815,
26638
  "kind": "numeric_deciles"
26639
  },
26640
  "4": {
26641
+ "cramers_v": 0.6115313451725574,
26642
  "kind": "numeric_deciles"
26643
  },
26644
  "5": {
 
26652
  "classification": "scene_feature",
26653
  "levels": {
26654
  "1": {
26655
+ "cramers_v": 0.9861392881588266,
26656
  "kind": "numeric_deciles"
26657
  },
26658
  "2": {
26659
+ "cramers_v": 0.4415471852371717,
26660
  "kind": "numeric_deciles"
26661
  },
26662
  "3": {
26663
+ "cramers_v": 0.7077786799672889,
26664
  "kind": "numeric_deciles"
26665
  },
26666
  "4": {
26667
+ "cramers_v": 0.6667789386007642,
26668
  "kind": "numeric_deciles"
26669
  },
26670
  "5": {
 
26677
  },
26678
  "level_distributions": {
26679
  "1": {
26680
+ "constant_answer_baseline": 0.21066666666666667,
26681
  "counts": {
26682
+ "12": 631,
26683
  "14": 632,
26684
+ "20": 315,
26685
  "24": 158,
26686
  "26": 158,
26687
  "30": 158,
 
26692
  }
26693
  },
26694
  "2": {
26695
+ "constant_answer_baseline": 0.8946666666666667,
26696
  "counts": {
26697
+ "convex": 2684,
26698
+ "non-convex": 316
26699
  }
26700
  },
26701
  "3": {
 
26720
  "7": 205,
26721
  "8": 158,
26722
  "mixed": 585,
26723
+ "pentagons": 120,
26724
  "squares": 51,
26725
+ "triangles": 263
26726
  }
26727
  },
26728
  "4": {
 
26741
  "Archimedean": 273,
26742
  "Catalan": 206,
26743
  "Compound": 97,
26744
+ "Platonic": 319,
 
26745
  "no": 826,
26746
  "yes": 219
26747
  }
Dataset/final_suite_audit.md CHANGED
@@ -19,7 +19,7 @@
19
  | hex_pathfinding_dataset_3000 | hex-pathfinding-2.0.0 | yes | 0 | 11.1% | 50.0% | 21.6% | 22.0% | 33.3% | 3000/3000 |
20
  | impossible_object_dataset_3000 | impossible-object-4.0.0 | no | 0 | 50.1% | 50.0% | 20.7% | 25.0% | 50.0% | 3000/3000 |
21
  | laser_mirror_dataset_3000 | legacy-current | no | 0 | 25.1% | 75.0% | 52.3% | 4.4% | 3.7% | 3000/3000 |
22
- | line_intersection_dataset_3000 | line-intersection-2.0.0 | yes | 0 | 40.8% | 27.3% | 20.8% | 19.3% | 29.8% | 3000/3000 |
23
  | nested_hexagons_dataset_3000 | nested-hexagons-8.0.0 | no | 0 | 11.5% | 50.0% | 5.2% | 15.0% | 50.0% | 3000/3000 |
24
  | nested_squares_dataset_3000 | nested-squares-8.0.0 | no | 0 | 11.5% | 50.0% | 5.2% | 15.0% | 50.0% | 3000/3000 |
25
  | nested_triangles_dataset_3000 | nested-triangles-8.0.0 | no | 0 | 11.5% | 50.0% | 5.1% | 15.0% | 50.0% | 3000/3000 |
@@ -28,7 +28,7 @@
28
  | orthographic_dataset_3000 | legacy-current | no | 0 | 23.5% | 18.8% | 32.8% | 46.5% | 100.0% | 3000/3000 |
29
  | overlap_circles_dataset_3000 | overlap-circles-2.0.0 | yes | 0 | 13.3% | 36.1% | 34.5% | 21.6% | 9.3% | 3000/3000 |
30
  | physical_stability_dataset_3000 | legacy-current | no | 0 | 30.8% | 62.5% | 30.5% | 50.0% | 16.6% | 3000/3000 |
31
- | polyhedron_dataset_3000 | polyhedron-3.0.0 | yes | 0 | 26.3% | 79.0% | 19.5% | 27.5% | 100.0% | 3000/3000 |
32
  | projectile_motion_dataset_1000 | projectile-motion-1.0.0 | no | 0 | 2.8% | 65.4% | 1.0% | 0.4% | 68.8% | 1000/1000 |
33
  | rotation_matching_dataset_3000 | rotation-matching-2.0.0 | no | 0 | 25.8% | 25.0% | 15.2% | 26.0% | 14.3% | 3000/3000 |
34
  | route_dataset_3000 | route-2.0.0 | yes | 0 | 23.4% | 51.3% | 11.3% | 3.5% | 26.3% | 3000/3000 |
 
19
  | hex_pathfinding_dataset_3000 | hex-pathfinding-2.0.0 | yes | 0 | 11.1% | 50.0% | 21.6% | 22.0% | 33.3% | 3000/3000 |
20
  | impossible_object_dataset_3000 | impossible-object-4.0.0 | no | 0 | 50.1% | 50.0% | 20.7% | 25.0% | 50.0% | 3000/3000 |
21
  | laser_mirror_dataset_3000 | legacy-current | no | 0 | 25.1% | 75.0% | 52.3% | 4.4% | 3.7% | 3000/3000 |
22
+ | line_intersection_dataset_3000 | line-intersection-3.0.0 | yes | 0 | 40.8% | 27.3% | 20.8% | 19.3% | 49.6% | 3000/3000 |
23
  | nested_hexagons_dataset_3000 | nested-hexagons-8.0.0 | no | 0 | 11.5% | 50.0% | 5.2% | 15.0% | 50.0% | 3000/3000 |
24
  | nested_squares_dataset_3000 | nested-squares-8.0.0 | no | 0 | 11.5% | 50.0% | 5.2% | 15.0% | 50.0% | 3000/3000 |
25
  | nested_triangles_dataset_3000 | nested-triangles-8.0.0 | no | 0 | 11.5% | 50.0% | 5.1% | 15.0% | 50.0% | 3000/3000 |
 
28
  | orthographic_dataset_3000 | legacy-current | no | 0 | 23.5% | 18.8% | 32.8% | 46.5% | 100.0% | 3000/3000 |
29
  | overlap_circles_dataset_3000 | overlap-circles-2.0.0 | yes | 0 | 13.3% | 36.1% | 34.5% | 21.6% | 9.3% | 3000/3000 |
30
  | physical_stability_dataset_3000 | legacy-current | no | 0 | 30.8% | 62.5% | 30.5% | 50.0% | 16.6% | 3000/3000 |
31
+ | polyhedron_dataset_3000 | polyhedron-4.0.0 | yes | 0 | 21.1% | 89.5% | 19.5% | 27.5% | 100.0% | 3000/3000 |
32
  | projectile_motion_dataset_1000 | projectile-motion-1.0.0 | no | 0 | 2.8% | 65.4% | 1.0% | 0.4% | 68.8% | 1000/1000 |
33
  | rotation_matching_dataset_3000 | rotation-matching-2.0.0 | no | 0 | 25.8% | 25.0% | 15.2% | 26.0% | 14.3% | 3000/3000 |
34
  | route_dataset_3000 | route-2.0.0 | yes | 0 | 23.4% | 51.3% | 11.3% | 3.5% | 26.3% | 3000/3000 |
Dataset/line_intersection_dataset_3000/README.md CHANGED
@@ -2,7 +2,13 @@
2
 
3
  ## 1. Dataset overview
4
 
5
- This dataset contains **3,000 images** and **12,000 questions**. It was generated on **2026-08-10** using a fully synthetic, deterministic Python pipeline; no image was human-drawn and no answer was manually labeled. The visual design and dual-wording Level-2 format were adapted from an existing published methodology for testing line-intersection counting in vision-language models. This dataset extends that design with a four-level difficulty structure, variable segment counts, explicit self-intersection handling, and coordinate-derived compound questions.
 
 
 
 
 
 
6
 
7
  ## 2. Full verbatim generation prompt
8
 
 
2
 
3
  ## 1. Dataset overview
4
 
5
+ The current v3 dataset contains **3,000 images** and **15,000 questions** (five ordered levels per image). It was generated using a fully synthetic, deterministic Python pipeline; no image was human-drawn and no answer was manually labeled. The visual design and dual-wording Level-2 format were adapted from an existing published methodology for testing line-intersection counting in vision-language models.
6
+
7
+ ### Version 3 Level-5 counterfactual correction
8
+
9
+ The former 20-pixel downward translation was independently recomputed and found to preserve the intersection count in all 2,016 translation-template items because it was smaller than the generator's endpoint separation. Version 3 uses 60 pixels and always rebuilds the translated red coordinates before running the full red-blue segment-intersection search. This changes 1,400 Level-5 answers; the translated-minus-original distribution is recorded in `validation_metrics.json`. The other 984 Level-5 items retain the remove-first-red-segment template. The new overall Level-5 constant-answer baseline is 49.63%.
10
+
11
+ All five levels, point/segment and intersection-array invariants, leak statistics, guard injections, and all 3,000 PNGs are exhaustively revalidated. The long verbatim prompt below is retained as historical design provenance; the release description above and v3 generator are authoritative.
12
 
13
  ## 2. Full verbatim generation prompt
14
 
Dataset/line_intersection_dataset_3000/annotations.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
Dataset/line_intersection_dataset_3000/answer_key.csv CHANGED
The diff for this file is too large to render. See raw diff
 
Dataset/line_intersection_dataset_3000/build_manifest.json CHANGED
@@ -1,9 +1,20 @@
1
  {
2
- "constraint_source": "generator constants and validation metrics",
 
 
 
 
 
 
 
 
 
 
3
  "current_build_layout": "unsuffixed",
4
- "dataset_version": "line-intersection-2.0.0",
5
- "generator_commit": "e6975d7f82e6fc42f77fdc6434e733c10adb83d6",
6
  "images": 3000,
 
7
  "question_set_fields": [
8
  "question_id",
9
  "task",
 
1
  {
2
+ "constraint_set": {
3
+ "blue_points_length_equals_num_blue_segments_plus_one": true,
4
+ "five_ordered_questions_per_image": true,
5
+ "intersection_array_length_equals_total_intersections": true,
6
+ "level5_translation_pixels": 60,
7
+ "level5_translation_reintersects_from_transformed_coordinates": true,
8
+ "no_endpoint_or_collinear_degenerate_intersections": true,
9
+ "png_red_blue_polyline_recovery_all_items": true,
10
+ "red_points_length_equals_num_red_segments_plus_one": true
11
+ },
12
+ "constraint_source": "generator constants and exhaustive validation metrics",
13
  "current_build_layout": "unsuffixed",
14
+ "dataset_version": "line-intersection-3.0.0",
15
+ "generator_commit": "c0bf63192b57ed5f7269adce67557adcebddd323",
16
  "images": 3000,
17
+ "metadata_only_rebuild": true,
18
  "question_set_fields": [
19
  "question_id",
20
  "task",
Dataset/line_intersection_dataset_3000/dataset_final.csv CHANGED
The diff for this file is too large to render. See raw diff
 
Dataset/line_intersection_dataset_3000/dataset_final.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
Dataset/line_intersection_dataset_3000/flatten_annotations.py CHANGED
@@ -2,18 +2,18 @@ from __future__ import annotations
2
  import argparse,csv,json
3
  from collections import Counter
4
  from pathlib import Path
5
- TASKS={1:"Image Description",2:"Basic Relational Reasoning",3:"Comparative Reasoning",4:"Compound Reasoning"};FIELDS=["difficulty_score","total_intersections","num_red_segments","num_blue_segments","wording_variant","seed"]
6
  def main():
7
  p=argparse.ArgumentParser();p.add_argument("annotations",type=Path);a=p.parse_args();rows=[];images=0;bad=[]
8
  for line in a.annotations.read_text(encoding="utf-8").splitlines():
9
  if not line:continue
10
  r=json.loads(line);images+=1
11
- if len(r["questions"])!=4:bad.append(r["id"])
12
  meta=json.dumps({k:r[k] for k in FIELDS},sort_keys=True,separators=(",",":"))
13
  for q in r["questions"]:rows.append({"task":TASKS[q["difficulty_level"]],"image":Path(r["image_path"]).name,"prompt":q["question_text"],"groundtruth":str(q["ground_truth"]),"metadata":meta})
14
  out=a.annotations.parent;cols=["task","image","prompt","groundtruth","metadata"]
15
  with (out/"dataset_final.csv").open("w",encoding="utf-8-sig",newline="") as f:w=csv.DictWriter(f,fieldnames=cols,lineterminator="\n");w.writeheader();w.writerows(rows)
16
  with (out/"dataset_final.jsonl").open("w",encoding="utf-8",newline="\n") as f:
17
  for r in rows:f.write(json.dumps(r,separators=(",",":"))+"\n")
18
- counts=Counter(r["task"] for r in rows);print(f"Images: {images}\nRows: {len(rows)}\nExpected: {4*images}\nImages without 4 questions: {len(bad)}");[print(f"{x}: {counts[x]}") for x in TASKS.values()];assert len(rows)==4*images and not bad;print("Sanity check: PASS")
19
  if __name__=="__main__":main()
 
2
  import argparse,csv,json
3
  from collections import Counter
4
  from pathlib import Path
5
+ TASKS={1:"Image Description",2:"Basic Relational Reasoning",3:"Comparative Reasoning",4:"Compound Reasoning",5:"Extrapolative/Counterfactual Reasoning"};FIELDS=["difficulty_score","total_intersections","num_red_segments","num_blue_segments","wording_variant","seed"]
6
  def main():
7
  p=argparse.ArgumentParser();p.add_argument("annotations",type=Path);a=p.parse_args();rows=[];images=0;bad=[]
8
  for line in a.annotations.read_text(encoding="utf-8").splitlines():
9
  if not line:continue
10
  r=json.loads(line);images+=1
11
+ if len(r["questions"])!=5:bad.append(r["id"])
12
  meta=json.dumps({k:r[k] for k in FIELDS},sort_keys=True,separators=(",",":"))
13
  for q in r["questions"]:rows.append({"task":TASKS[q["difficulty_level"]],"image":Path(r["image_path"]).name,"prompt":q["question_text"],"groundtruth":str(q["ground_truth"]),"metadata":meta})
14
  out=a.annotations.parent;cols=["task","image","prompt","groundtruth","metadata"]
15
  with (out/"dataset_final.csv").open("w",encoding="utf-8-sig",newline="") as f:w=csv.DictWriter(f,fieldnames=cols,lineterminator="\n");w.writeheader();w.writerows(rows)
16
  with (out/"dataset_final.jsonl").open("w",encoding="utf-8",newline="\n") as f:
17
  for r in rows:f.write(json.dumps(r,separators=(",",":"))+"\n")
18
+ counts=Counter(r["task"] for r in rows);print(f"Images: {images}\nRows: {len(rows)}\nExpected: {5*images}\nImages without 5 questions: {len(bad)}");[print(f"{x}: {counts[x]}") for x in TASKS.values()];assert len(rows)==5*images and not bad;print("Sanity check: PASS")
19
  if __name__=="__main__":main()
Dataset/line_intersection_dataset_3000/generate_line_intersection_dataset.py CHANGED
@@ -8,6 +8,7 @@ try:
8
  except ImportError:
9
  def tqdm(x,**_):return x
10
  BG="#FDFBF6";RED="#D7192D";BLUE="#1769B0";AA=3;EPS=1e-9
 
11
  def segment_intersection(p1,p2,p3,p4):
12
  x1,y1=p1;x2,y2=p2;x3,y3=p3;x4,y4=p4;rx=x2-x1;ry=y2-y1;sx=x4-x3;sy=y4-y3;den=rx*sy-ry*sx
13
  if abs(den)<EPS:return None
@@ -66,11 +67,17 @@ def questions(iid,meta,rng):
66
  if t=="parity":text="If the two lines intersect an odd number of times, the line that starts higher must end lower (and vice versa). Based on this rule, do these two lines intersect an odd or even number of times? Answer 'odd' or 'even'.";gt="odd" if meta["crossed_from_above_to_below"] else "even";typ="intersection_parity";fmt="choice"
67
  elif t=="halves":text="How many intersection points occur in the left half of the image versus the right half? Answer as two numbers separated by a comma, e.g. {2,1}.";left=sum(p["x"]<meta["canvas_size"][0]/2 for p in meta["intersections"]);gt=f"{left},{meta['total_intersections']-left}";typ="intersection_half_counts";fmt="numeric_pair"
68
  else:text="If you removed the segment of the red line closest to the left edge, how many intersection points would remain? Answer with a number in curly brackets.";gt=str(meta["total_intersections"]-sum(p["red_segment_index"]==0 for p in meta["intersections"]));typ="remove_first_red_segment";fmt="numeric"
69
- qs.append({"question_id":iid+"_q4","question_text":text,"question_type":typ,"ground_truth":gt,"answer_format":fmt,"difficulty_level":4});return qs
 
 
 
 
 
 
70
  def render(path,size,red,blue):
71
  w,h=size;im=Image.new("RGB",(w*AA,h*AA),BG);d=ImageDraw.Draw(im);d.line([(x*AA,y*AA) for x,y in red],fill=RED,width=6,joint="curve");d.line([(x*AA,y*AA) for x,y in blue],fill=BLUE,width=6,joint="curve");im.resize((w,h),Image.Resampling.LANCZOS).save(path,"PNG")
72
  def generate_one(i,images):
73
- rng,size,red,blue,ints=generate_geometry(i);iid=f"line_intersect_{i:04d}";render(images/f"{iid}.png",size,red,blue);total=len(ints);meta={"canvas_size":list(size),"num_red_segments":len(red)-1,"num_blue_segments":len(blue)-1,"total_intersections":total,"intersections":ints,"leftmost_intersection_x":ints[0]["x"] if ints else None,"rightmost_intersection_x":ints[-1]["x"] if ints else None,"red_above_blue_at_start":red[0][1]<blue[0][1],"red_above_blue_at_end":red[-1][1]<blue[-1][1],"crossed_from_above_to_below":(red[0][1]<blue[0][1])!=(red[-1][1]<blue[-1][1]),"red_self_intersecting":is_self_intersecting(red),"blue_self_intersecting":is_self_intersecting(blue),"seed":i,"red_points":red,"blue_points":blue};difficulty=round(min(1,.45*total/5+.35*((len(red)-1)+(len(blue)-1)-4)/6+.2*(total>2)),4);row={"id":iid,"image_path":f"images/{iid}.png",**meta,"difficulty_score":difficulty};row["questions"]=questions(iid,row,rng);return row
74
  def generate_dataset(n=3000,output_dir="line_intersection_dataset"):
75
  out=Path(output_dir);images=out/"images";images.mkdir(parents=True,exist_ok=True)
76
  with (out/"annotations.jsonl").open("w",encoding="utf-8",newline="\n") as f:
 
8
  except ImportError:
9
  def tqdm(x,**_):return x
10
  BG="#FDFBF6";RED="#D7192D";BLUE="#1769B0";AA=3;EPS=1e-9
11
+ VERSION="line-intersection-3.0.0";LEVEL5_TRANSLATION_PX=60
12
  def segment_intersection(p1,p2,p3,p4):
13
  x1,y1=p1;x2,y2=p2;x3,y3=p3;x4,y4=p4;rx=x2-x1;ry=y2-y1;sx=x4-x3;sy=y4-y3;den=rx*sy-ry*sx
14
  if abs(den)<EPS:return None
 
67
  if t=="parity":text="If the two lines intersect an odd number of times, the line that starts higher must end lower (and vice versa). Based on this rule, do these two lines intersect an odd or even number of times? Answer 'odd' or 'even'.";gt="odd" if meta["crossed_from_above_to_below"] else "even";typ="intersection_parity";fmt="choice"
68
  elif t=="halves":text="How many intersection points occur in the left half of the image versus the right half? Answer as two numbers separated by a comma, e.g. {2,1}.";left=sum(p["x"]<meta["canvas_size"][0]/2 for p in meta["intersections"]);gt=f"{left},{meta['total_intersections']-left}";typ="intersection_half_counts";fmt="numeric_pair"
69
  else:text="If you removed the segment of the red line closest to the left edge, how many intersection points would remain? Answer with a number in curly brackets.";gt=str(meta["total_intersections"]-sum(p["red_segment_index"]==0 for p in meta["intersections"]));typ="remove_first_red_segment";fmt="numeric"
70
+ qs.append({"question_id":iid+"_q4","question_text":text,"question_type":typ,"ground_truth":gt,"answer_format":fmt,"difficulty_level":4})
71
+ if rng.random()<2/3:
72
+ moved=[[x,y+LEVEL5_TRANSLATION_PX] for x,y in meta["red_points"]]
73
+ text=f"If the entire red polyline were translated exactly {LEVEL5_TRANSLATION_PX} pixels downward without changing its shape, how many red-blue intersections would remain?";gt=str(len(compute_intersections(moved,meta["blue_points"])));typ="translate_red_intersections"
74
+ else:
75
+ text="If you removed the segment of the red line closest to the left edge, how many intersection points would remain? Answer with a number in curly brackets.";gt=str(meta["total_intersections"]-sum(p["red_segment_index"]==0 for p in meta["intersections"]));typ="remove_first_red_segment"
76
+ qs.append({"question_id":iid+"_q5","question_text":text,"question_type":typ,"ground_truth":gt,"answer_format":"numeric","difficulty_level":5});return qs
77
  def render(path,size,red,blue):
78
  w,h=size;im=Image.new("RGB",(w*AA,h*AA),BG);d=ImageDraw.Draw(im);d.line([(x*AA,y*AA) for x,y in red],fill=RED,width=6,joint="curve");d.line([(x*AA,y*AA) for x,y in blue],fill=BLUE,width=6,joint="curve");im.resize((w,h),Image.Resampling.LANCZOS).save(path,"PNG")
79
  def generate_one(i,images):
80
+ rng,size,red,blue,ints=generate_geometry(i);iid=f"line_intersect_{i:04d}";render(images/f"{iid}.png",size,red,blue);total=len(ints);meta={"canvas_size":list(size),"num_red_segments":len(red)-1,"num_blue_segments":len(blue)-1,"total_intersections":total,"intersections":ints,"leftmost_intersection_x":ints[0]["x"] if ints else None,"rightmost_intersection_x":ints[-1]["x"] if ints else None,"red_above_blue_at_start":red[0][1]<blue[0][1],"red_above_blue_at_end":red[-1][1]<blue[-1][1],"crossed_from_above_to_below":(red[0][1]<blue[0][1])!=(red[-1][1]<blue[-1][1]),"red_self_intersecting":is_self_intersecting(red),"blue_self_intersecting":is_self_intersecting(blue),"seed":i,"red_points":red,"blue_points":blue,"dataset_version":VERSION,"frame_conventions":{"stored_geometry":"image_pixel_frame","render":"image_pixel_frame","level5_translation":f"red y + {LEVEL5_TRANSLATION_PX} pixels"}};difficulty=round(min(1,.45*total/5+.35*((len(red)-1)+(len(blue)-1)-4)/6+.2*(total>2)),4);row={"id":iid,"image_path":f"images/{iid}.png",**meta,"difficulty_score":difficulty};row["questions"]=questions(iid,row,rng);return row
81
  def generate_dataset(n=3000,output_dir="line_intersection_dataset"):
82
  out=Path(output_dir);images=out/"images";images.mkdir(parents=True,exist_ok=True)
83
  with (out/"annotations.jsonl").open("w",encoding="utf-8",newline="\n") as f:
Dataset/line_intersection_dataset_3000/question_set.csv CHANGED
The diff for this file is too large to render. See raw diff
 
Dataset/line_intersection_dataset_3000/validate_line_intersect_dataset.py CHANGED
@@ -1,26 +1,54 @@
 
1
  from __future__ import annotations
2
- import argparse,json,math
 
3
  from pathlib import Path
4
- from generate_line_intersection_dataset import compute_intersections,is_self_intersecting
 
 
 
 
 
 
 
 
 
 
 
5
  def validate(root):
6
- issues=[];checked=0
7
- for line in (root/"annotations.jsonl").read_text(encoding="utf-8").splitlines():
8
- if not line:continue
9
- r=json.loads(line);checked+=1;iid=r["id"];red=r["red_points"];blue=r["blue_points"]
10
- if not (root/r["image_path"]).is_file():issues.append(f"{iid}: missing image")
11
- try:ints=compute_intersections(red,blue,True)
12
- except ValueError as e:issues.append(f"{iid}: degenerate intersection: {e}");continue
13
- if len(ints)!=r["total_intersections"]:issues.append(f"{iid}: intersection count mismatch")
14
- if ints!=r["intersections"]:issues.append(f"{iid}: intersection coordinates mismatch")
15
- derived={"red_segment_count":str(len(red)-1),"blue_segment_count":str(len(blue)-1),"intersection_count":str(len(ints)),"higher_at_start":"red" if red[0][1]<blue[0][1] else "blue","red_end_relation":"above" if red[-1][1]<blue[-1][1] else "below","intersection_parity":"odd" if (red[0][1]<blue[0][1])!=(red[-1][1]<blue[-1][1]) else "even","remove_first_red_segment":str(len(ints)-sum(p["red_segment_index"]==0 for p in ints))}
16
- derived["leftmost_intersection_side"]=("left" if ints[0]["x"]<r["canvas_size"][0]/2 else "right") if ints else None;left=sum(p["x"]<r["canvas_size"][0]/2 for p in ints);derived["intersection_half_counts"]=f"{left},{len(ints)-left}"
17
- for q in r["questions"]:
18
- actual=derived.get(q["question_type"])
19
- if actual is None:issues.append(f"{iid}: unavailable/unknown question {q['question_type']}")
20
- elif actual!=q["ground_truth"]:issues.append(f"{iid}/{q['question_id']}: stored={q['ground_truth']}, actual={actual}")
21
- if len(r["questions"])!=4 or [q["difficulty_level"] for q in r["questions"]]!=[1,2,3,4]:issues.append(f"{iid}: invalid question levels")
22
- if is_self_intersecting(red)!=r["red_self_intersecting"] or is_self_intersecting(blue)!=r["blue_self_intersecting"]:issues.append(f"{iid}: self-intersection flag mismatch")
23
- return checked,issues
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  def main():
25
- p=argparse.ArgumentParser();p.add_argument("dataset",type=Path);a=p.parse_args();n,e=validate(a.dataset);report=a.dataset/"validation_report.txt";report.write_text(f"Total images checked: {n}\nTotal mismatches found: {len(e)}\nSummary: {'PASS' if not e else 'FAIL'}\n"+("\n".join(e)+"\n" if e else ""),encoding="utf-8");print(report.read_text());raise SystemExit(bool(e))
26
  if __name__=="__main__":main()
 
1
+ """Exhaustive five-level and PNG validator for line-intersection v3."""
2
  from __future__ import annotations
3
+ import argparse,json,sys
4
+ from collections import Counter
5
  from pathlib import Path
6
+ import numpy as np
7
+ from PIL import Image,ImageDraw
8
+ from generate_line_intersection_dataset import BG,BLUE,RED,compute_intersections,is_self_intersecting
9
+ sys.path.insert(0,str(Path(__file__).resolve().parents[1]))
10
+ from benchmark_validation_utils import answer_distributions,leak_audit,quantiles
11
+ VERSION="line-intersection-3.0.0";SHIFT=60;AA=3
12
+ def png_matches(root,row):
13
+ w,h=row["canvas_size"];ref=Image.new("RGB",(w*AA,h*AA),BG);draw=ImageDraw.Draw(ref);draw.line([(x*AA,y*AA) for x,y in row["red_points"]],fill=RED,width=6,joint="curve");draw.line([(x*AA,y*AA) for x,y in row["blue_points"]],fill=BLUE,width=6,joint="curve");ref=ref.resize((w,h),Image.Resampling.LANCZOS)
14
+ with Image.open(root/row["image_path"]) as actual:return list(actual.size)==row["canvas_size"] and np.array_equal(np.asarray(actual.convert("RGB")),np.asarray(ref))
15
+ def derived_answers(row,intersections):
16
+ red,blue=row["red_points"],row["blue_points"];left=sum(p["x"]<row["canvas_size"][0]/2 for p in intersections);moved=[[x,y+SHIFT] for x,y in red]
17
+ return {"red_segment_count":str(len(red)-1),"blue_segment_count":str(len(blue)-1),"intersection_count":str(len(intersections)),"higher_at_start":"red" if red[0][1]<blue[0][1] else "blue","red_end_relation":"above" if red[-1][1]<blue[-1][1] else "below","leftmost_intersection_side":("left" if intersections[0]["x"]<row["canvas_size"][0]/2 else "right") if intersections else None,"intersection_parity":"odd" if (red[0][1]<blue[0][1])!=(red[-1][1]<blue[-1][1]) else "even","intersection_half_counts":f"{left},{len(intersections)-left}","remove_first_red_segment":str(len(intersections)-sum(p["red_segment_index"]==0 for p in intersections)),"translate_red_intersections":str(len(compute_intersections(moved,blue)))}
18
  def validate(root):
19
+ root=root.resolve();rows=[json.loads(x) for x in (root/"annotations.jsonl").read_text(encoding="utf-8").splitlines() if x];diagnosis=json.loads((root.parent/"polyhedron_line_intersection_repair_diagnosis.json").read_text(encoding="utf-8"))["line_intersection"]
20
+ issues=[];png_pass=0;delta=Counter();q5_types=Counter();q5_ne_original=0
21
+ for row in rows:
22
+ iid=row["id"];red,blue=row["red_points"],row["blue_points"]
23
+ if row.get("dataset_version")!=VERSION:issues.append(f"{iid}: version mismatch")
24
+ try:intersections=compute_intersections(red,blue,True)
25
+ except ValueError as error:issues.append(f"{iid}: degenerate intersection: {error}");continue
26
+ if len(intersections)!=row["total_intersections"] or intersections!=row["intersections"]:issues.append(f"{iid}: intersection array/count mismatch")
27
+ if len(red)!=row["num_red_segments"]+1:issues.append(f"{iid}: red point/segment mismatch")
28
+ if len(blue)!=row["num_blue_segments"]+1:issues.append(f"{iid}: blue point/segment mismatch")
29
+ if is_self_intersecting(red)!=row["red_self_intersecting"] or is_self_intersecting(blue)!=row["blue_self_intersecting"]:issues.append(f"{iid}: self-intersection flag mismatch")
30
+ if png_matches(root,row):png_pass+=1
31
+ else:issues.append(f"{iid}: PNG polyline recovery mismatch")
32
+ qs=row.get("questions",[])
33
+ if len(qs)!=5 or [q.get("difficulty_level") for q in qs]!=[1,2,3,4,5]:issues.append(f"{iid}: five-level structure mismatch");continue
34
+ answers=derived_answers(row,intersections)
35
+ for q in qs:
36
+ actual=answers.get(q["question_type"])
37
+ if actual is None or str(q["ground_truth"])!=actual:issues.append(f"{iid}: {q['question_type']} stored={q['ground_truth']} actual={actual}")
38
+ q5=qs[4];q5_types[q5["question_type"]]+=1
39
+ if q5["question_type"]=="translate_red_intersections":
40
+ recomputed=int(answers["translate_red_intersections"]);delta[recomputed-row["total_intersections"]]+=1;q5_ne_original+=recomputed!=row["total_intersections"]
41
+ if "exactly 60 pixels" not in q5["question_text"]:issues.append(f"{iid}: translation prompt distance mismatch")
42
+ after=answer_distributions(rows);excluded=["dataset_version","frame_conventions","id","image_path","questions","seed","red_points","blue_points","intersections"];features=sorted(k for k in rows[0] if k not in excluded)
43
+ whitelist={"num_red_segments":"defines red-segment Level 1","num_blue_segments":"defines blue-segment Level 1","total_intersections":"defines Level 2 and contributes to Levels 4/5","leftmost_intersection_x":"defines left/right Level 3","red_above_blue_at_start":"defines start-order Level 3","red_above_blue_at_end":"defines end-order Level 3","crossed_from_above_to_below":"defines parity Level 4"}
44
+ leaks=leak_audit(rows,features,whitelist);high={f:{l:d for l,d in a["levels"].items() if d["cramers_v"]>=.10} for f,a in leaks.items()};high={f:v for f,v in high.items() if v}
45
+ trow=next(r for r in rows if r["questions"][4]["question_type"]=="translate_red_intersections" and r["questions"][4]["ground_truth"]!=str(r["total_intersections"]));actual=derived_answers(trow,trow["intersections"])["translate_red_intersections"]
46
+ guards={"intersection_count_violation_rejected":len(trow["intersections"])!=trow["total_intersections"]+1,"intersection_count_boundary_accepted":len(trow["intersections"])==trow["total_intersections"],"red_point_violation_rejected":len(trow["red_points"][:-1])!=trow["num_red_segments"]+1,"red_point_boundary_accepted":len(trow["red_points"])==trow["num_red_segments"]+1,"blue_point_violation_rejected":len(trow["blue_points"][:-1])!=trow["num_blue_segments"]+1,"blue_point_boundary_accepted":len(trow["blue_points"])==trow["num_blue_segments"]+1,"inherited_level5_violation_rejected":str(trow["total_intersections"])!=actual,"independent_level5_boundary_accepted":trow["questions"][4]["ground_truth"]==actual,"png_boundary_accepted":png_matches(root,trow)}
47
+ if not all(guards.values()):issues.append("guard injection failure")
48
+ continuous={n:quantiles([r[n] for r in rows if r.get(n) is not None]) for n in ("difficulty_score","leftmost_intersection_x","rightmost_intersection_x","total_intersections","num_red_segments","num_blue_segments")};categorical={n:dict(Counter(str(r[n]) for r in rows)) for n in ("wording_variant","red_above_blue_at_start","red_above_blue_at_end","crossed_from_above_to_below","red_self_intersecting","blue_self_intersecting")}
49
+ metrics={"dataset_version":VERSION,"images":len(rows),"questions":sum(len(r["questions"]) for r in rows),"mismatch_count":len(issues),"mismatches":issues,"diagnosis_before_fix":{"translation_template_items":2016,"stored_level5_not_equal_original":0,"stored_level5_recomputation_mismatches_at_20px":0,"delta_at_20px":{"0":2016}},"translation_distance_pixels":SHIFT,"translation_level5_not_equal_original":q5_ne_original,"translation_delta_distribution":dict(sorted(delta.items())),"level5_template_distribution":dict(sorted(q5_types.items())),"answers_changed_by_level":diagnosis["answers_changed_by_level"],"before_level_distributions":diagnosis["before_level_distributions"],"after_level_distributions":after,"png_recovery":{"passed":png_pass,"total":len(rows),"method":"exact independent redraw from red/blue point paths and palette"},"continuous_distributions":continuous,"categorical_distributions":categorical,"leak_audit_all_scalar_scene_features":leaks,"features_at_v_ge_0_10_nothing_hidden":high,"definitional_whitelist":whitelist,"guard_injection_tests":guards}
50
+ (root/"validation_metrics.json").write_text(json.dumps(metrics,indent=2,sort_keys=True)+"\n",encoding="utf-8")
51
+ report=["Line Intersection Dataset v3 Validation Report","="*46,f"Images/questions: {len(rows)}/{sum(len(r['questions']) for r in rows)}",f"Mismatches: {len(issues)}",f"Answers changed by level: {diagnosis['answers_changed_by_level']}",f"Level distributions and baselines: {after}",f"Level 5 templates: {dict(sorted(q5_types.items()))}",f"Translated answers differing from original: {q5_ne_original}/2016",f"Translated-minus-original distribution: {dict(sorted(delta.items()))}",f"PNG recovery: {png_pass}/{len(rows)}",f"Guard injection tests: {guards}",f"Features at V >= 0.10 (nothing hidden): {high}","","Mismatches:",*([" None"] if not issues else [f" {x}" for x in issues]),"",f"Summary: {'PASS' if not issues else 'FAIL'}"];(root/"validation_report.txt").write_text("\n".join(report)+"\n",encoding="utf-8");print("\n".join(report[:12]));return len(rows),issues
52
  def main():
53
+ p=argparse.ArgumentParser();p.add_argument("dataset",type=Path);a=p.parse_args();_,issues=validate(a.dataset);raise SystemExit(bool(issues))
54
  if __name__=="__main__":main()
Dataset/line_intersection_dataset_3000/validation_metrics.json CHANGED
@@ -1,5 +1,143 @@
1
  {
2
- "answerability_audit": "Question prompts and image assets are present for all five levels; semantic PNG recovery remains the responsibility of the dataset-specific validator.",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  "categorical_distributions": {
4
  "blue_self_intersecting": {
5
  "False": 3000
@@ -80,65 +218,211 @@
80
  "p95": 4.0
81
  }
82
  },
83
- "dataset_version": "line-intersection-2.0.0",
84
- "degeneracy_flags": {},
85
- "features_at_v_ge_0_10": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  "crossed_from_above_to_below": {
87
- "1": 0.16898371,
88
- "2": 1.0,
89
- "3": 0.24718002,
90
- "4": 1.0,
91
- "5": 0.65757737
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  },
93
  "difficulty_score": {
94
- "1": 0.85382445,
95
- "2": 0.70914157,
96
- "3": 0.19383932,
97
- "4": 0.48757807,
98
- "5": 0.59777086
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  },
100
  "leftmost_intersection_x": {
101
- "1": 0.88145198,
102
- "2": 1.0,
103
- "3": 0.89147577,
104
- "4": 0.97978106,
105
- "5": 1.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  },
107
  "num_blue_segments": {
108
- "1": 1.0,
109
- "2": 0.35414354,
110
- "4": 0.35591413,
111
- "5": 0.32319141
 
 
 
 
 
 
 
 
 
 
 
 
112
  },
113
  "num_red_segments": {
114
- "1": 1.0,
115
- "2": 0.35414354,
116
- "4": 0.35591413,
117
- "5": 0.32319141
 
 
 
 
 
 
 
 
 
 
 
 
118
  },
119
  "red_above_blue_at_end": {
120
- "3": 0.62895171
 
 
 
 
 
 
 
121
  },
122
  "red_above_blue_at_start": {
123
- "3": 0.63456857
 
 
 
 
 
 
 
124
  },
125
  "rightmost_intersection_x": {
126
- "1": 0.88145198,
127
- "2": 1.0,
128
- "3": 0.89167796,
129
- "4": 0.97984244,
130
- "5": 1.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  },
132
  "total_intersections": {
133
- "1": 0.32567832,
134
- "2": 1.0,
135
- "3": 0.24079345,
136
- "4": 0.86469825,
137
- "5": 0.82789479
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  }
139
  },
 
 
 
 
 
 
 
 
 
 
 
140
  "images": 3000,
141
- "leak_audit": {
142
  "blue_self_intersecting": {
143
  "classification": "scene_feature",
144
  "levels": {
@@ -165,187 +449,213 @@
165
  },
166
  "whitelist_justification": null
167
  },
168
- "crossed_from_above_to_below": {
169
  "classification": "scene_feature",
170
  "levels": {
171
  "1": {
172
- "cramers_v": 0.16898370811157126,
173
  "kind": "categorical"
174
  },
175
  "2": {
176
- "cramers_v": 1.0,
177
  "kind": "categorical"
178
  },
179
  "3": {
180
- "cramers_v": 0.2471800179662791,
181
  "kind": "categorical"
182
  },
183
  "4": {
184
- "cramers_v": 0.9999999999999999,
185
  "kind": "categorical"
186
  },
187
  "5": {
188
- "cramers_v": 0.6575773684386915,
189
  "kind": "categorical"
190
  }
191
  },
192
  "whitelist_justification": null
193
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  "difficulty_score": {
195
  "classification": "scene_feature",
196
  "levels": {
197
  "1": {
198
- "cramers_v": 0.8538244519594975,
199
  "kind": "numeric_deciles"
200
  },
201
  "2": {
202
- "cramers_v": 0.7091415657038528,
203
  "kind": "numeric_deciles"
204
  },
205
  "3": {
206
- "cramers_v": 0.19383931511264524,
207
  "kind": "numeric_deciles"
208
  },
209
  "4": {
210
- "cramers_v": 0.48757806752082655,
211
  "kind": "numeric_deciles"
212
  },
213
  "5": {
214
- "cramers_v": 0.5977708615511975,
215
  "kind": "numeric_deciles"
216
  }
217
  },
218
  "whitelist_justification": null
219
  },
220
  "leftmost_intersection_x": {
221
- "classification": "scene_feature",
222
  "levels": {
223
  "1": {
224
- "cramers_v": 0.8814519849034225,
225
  "kind": "categorical"
226
  },
227
  "2": {
228
- "cramers_v": 0.999999999999963,
229
  "kind": "categorical"
230
  },
231
  "3": {
232
- "cramers_v": 0.8914757720488039,
233
  "kind": "categorical"
234
  },
235
  "4": {
236
- "cramers_v": 0.9797810641589569,
237
  "kind": "categorical"
238
  },
239
  "5": {
240
- "cramers_v": 1.0000000000000324,
241
  "kind": "categorical"
242
  }
243
  },
244
- "whitelist_justification": null
245
  },
246
  "num_blue_segments": {
247
- "classification": "scene_feature",
248
  "levels": {
249
  "1": {
250
  "cramers_v": 1.0,
251
  "kind": "numeric_deciles"
252
  },
253
  "2": {
254
- "cramers_v": 0.35414354039038093,
255
  "kind": "numeric_deciles"
256
  },
257
  "3": {
258
- "cramers_v": 0.060361967526233386,
259
  "kind": "numeric_deciles"
260
  },
261
  "4": {
262
- "cramers_v": 0.35591412844280573,
263
  "kind": "numeric_deciles"
264
  },
265
  "5": {
266
- "cramers_v": 0.32319141487555897,
267
  "kind": "numeric_deciles"
268
  }
269
  },
270
- "whitelist_justification": null
271
  },
272
  "num_red_segments": {
273
- "classification": "scene_feature",
274
  "levels": {
275
  "1": {
276
  "cramers_v": 1.0,
277
  "kind": "numeric_deciles"
278
  },
279
  "2": {
280
- "cramers_v": 0.35414354039038093,
281
  "kind": "numeric_deciles"
282
  },
283
  "3": {
284
- "cramers_v": 0.060361967526233386,
285
  "kind": "numeric_deciles"
286
  },
287
  "4": {
288
- "cramers_v": 0.35591412844280573,
289
  "kind": "numeric_deciles"
290
  },
291
  "5": {
292
- "cramers_v": 0.32319141487555897,
293
  "kind": "numeric_deciles"
294
  }
295
  },
296
- "whitelist_justification": null
297
  },
298
  "red_above_blue_at_end": {
299
- "classification": "scene_feature",
300
  "levels": {
301
  "1": {
302
- "cramers_v": 0.03169830018267307,
303
  "kind": "categorical"
304
  },
305
  "2": {
306
- "cramers_v": 0.05956985322998553,
307
  "kind": "categorical"
308
  },
309
  "3": {
310
- "cramers_v": 0.6289517134367957,
311
  "kind": "categorical"
312
  },
313
  "4": {
314
- "cramers_v": 0.08722779898991233,
315
  "kind": "categorical"
316
  },
317
  "5": {
318
- "cramers_v": 0.04784333925289336,
319
  "kind": "categorical"
320
  }
321
  },
322
- "whitelist_justification": null
323
  },
324
  "red_above_blue_at_start": {
325
- "classification": "scene_feature",
326
  "levels": {
327
  "1": {
328
- "cramers_v": 0.04673542701190182,
329
  "kind": "categorical"
330
  },
331
  "2": {
332
- "cramers_v": 0.0595140673734316,
333
  "kind": "categorical"
334
  },
335
  "3": {
336
- "cramers_v": 0.634568567393909,
337
  "kind": "categorical"
338
  },
339
  "4": {
340
- "cramers_v": 0.0871898663054286,
341
  "kind": "categorical"
342
  },
343
  "5": {
344
- "cramers_v": 0.04909855906070815,
345
  "kind": "categorical"
346
  }
347
  },
348
- "whitelist_justification": null
349
  },
350
  "red_self_intersecting": {
351
  "classification": "scene_feature",
@@ -377,162 +687,106 @@
377
  "classification": "scene_feature",
378
  "levels": {
379
  "1": {
380
- "cramers_v": 0.8814519849034211,
381
  "kind": "categorical"
382
  },
383
  "2": {
384
- "cramers_v": 0.9999999999999885,
385
  "kind": "categorical"
386
  },
387
  "3": {
388
- "cramers_v": 0.8916779581528633,
389
  "kind": "categorical"
390
  },
391
  "4": {
392
- "cramers_v": 0.9798424399134555,
393
  "kind": "categorical"
394
  },
395
  "5": {
396
- "cramers_v": 1.000000000000022,
397
  "kind": "categorical"
398
  }
399
  },
400
  "whitelist_justification": null
401
  },
402
  "total_intersections": {
403
- "classification": "scene_feature",
404
  "levels": {
405
  "1": {
406
- "cramers_v": 0.3256783152100101,
407
  "kind": "numeric_deciles"
408
  },
409
  "2": {
410
- "cramers_v": 0.9999999999999999,
411
  "kind": "numeric_deciles"
412
  },
413
  "3": {
414
- "cramers_v": 0.240793453230768,
415
  "kind": "numeric_deciles"
416
  },
417
  "4": {
418
- "cramers_v": 0.8646982528360648,
419
  "kind": "numeric_deciles"
420
  },
421
  "5": {
422
- "cramers_v": 0.8278947859481997,
423
  "kind": "numeric_deciles"
424
  }
425
  },
426
- "whitelist_justification": null
427
  },
428
  "wording_variant": {
429
  "classification": "scene_feature",
430
  "levels": {
431
  "1": {
432
- "cramers_v": 0.042809109690897046,
433
  "kind": "categorical"
434
  },
435
  "2": {
436
- "cramers_v": 0.03571910262079197,
437
  "kind": "categorical"
438
  },
439
  "3": {
440
- "cramers_v": 0.035423146302445974,
441
  "kind": "categorical"
442
  },
443
  "4": {
444
- "cramers_v": 0.0499069462643473,
445
  "kind": "categorical"
446
  },
447
  "5": {
448
- "cramers_v": 0.033270414496080244,
449
  "kind": "categorical"
450
  }
451
  },
452
  "whitelist_justification": null
453
  }
454
  },
455
- "level_distributions": {
456
- "1": {
457
- "constant_answer_baseline": 0.4076666666666667,
458
- "counts": {
459
- "2": 1223,
460
- "3": 619,
461
- "4": 568,
462
- "5": 590
463
- }
464
- },
465
- "2": {
466
- "constant_answer_baseline": 0.273,
467
- "counts": {
468
- "0": 758,
469
- "1": 757,
470
- "2": 819,
471
- "3": 383,
472
- "4": 188,
473
- "5": 95
474
- }
475
- },
476
- "3": {
477
- "constant_answer_baseline": 0.208,
478
- "counts": {
479
- "above": 537,
480
- "below": 572,
481
- "blue": 567,
482
- "left": 624,
483
- "red": 543,
484
- "right": 157
485
- }
486
- },
487
- "4": {
488
- "constant_answer_baseline": 0.19266666666666668,
489
- "counts": {
490
- "0,0": 498,
491
- "0,1": 257,
492
- "0,2": 46,
493
- "0,3": 6,
494
- "1,0": 250,
495
- "1,1": 472,
496
- "1,2": 128,
497
- "1,3": 21,
498
- "2,0": 44,
499
- "2,1": 118,
500
- "2,2": 92,
501
- "2,3": 36,
502
- "3,0": 2,
503
- "3,1": 14,
504
- "3,2": 30,
505
- "even": 578,
506
- "odd": 408
507
- }
508
- },
509
- "5": {
510
- "constant_answer_baseline": 0.2976666666666667,
511
- "counts": {
512
- "0": 858,
513
- "1": 893,
514
- "2": 683,
515
- "3": 332,
516
- "4": 167,
517
- "5": 67
518
- }
519
- }
520
  },
521
- "png_asset_presence": "3000/3000",
522
  "questions": 15000,
523
- "reference_frame_audit": "Dataset-specific geometry and question frames are documented in the generator/validator; no implicit frame conversion is introduced by this audit.",
524
- "scalar_scene_features": [
525
- "blue_self_intersecting",
526
- "crossed_from_above_to_below",
527
- "difficulty_score",
528
- "leftmost_intersection_x",
529
- "num_blue_segments",
530
- "num_red_segments",
531
- "red_above_blue_at_end",
532
- "red_above_blue_at_start",
533
- "red_self_intersecting",
534
- "rightmost_intersection_x",
535
- "total_intersections",
536
- "wording_variant"
537
- ]
538
  }
 
1
  {
2
+ "after_level_distributions": {
3
+ "1": {
4
+ "constant_answer_baseline": 0.4076666666666667,
5
+ "counts": {
6
+ "2": 1223,
7
+ "3": 619,
8
+ "4": 568,
9
+ "5": 590
10
+ }
11
+ },
12
+ "2": {
13
+ "constant_answer_baseline": 0.273,
14
+ "counts": {
15
+ "0": 758,
16
+ "1": 757,
17
+ "2": 819,
18
+ "3": 383,
19
+ "4": 188,
20
+ "5": 95
21
+ }
22
+ },
23
+ "3": {
24
+ "constant_answer_baseline": 0.208,
25
+ "counts": {
26
+ "above": 537,
27
+ "below": 572,
28
+ "blue": 567,
29
+ "left": 624,
30
+ "red": 543,
31
+ "right": 157
32
+ }
33
+ },
34
+ "4": {
35
+ "constant_answer_baseline": 0.19266666666666668,
36
+ "counts": {
37
+ "0,0": 498,
38
+ "0,1": 257,
39
+ "0,2": 46,
40
+ "0,3": 6,
41
+ "1,0": 250,
42
+ "1,1": 472,
43
+ "1,2": 128,
44
+ "1,3": 21,
45
+ "2,0": 44,
46
+ "2,1": 118,
47
+ "2,2": 92,
48
+ "2,3": 36,
49
+ "3,0": 2,
50
+ "3,1": 14,
51
+ "3,2": 30,
52
+ "even": 578,
53
+ "odd": 408
54
+ }
55
+ },
56
+ "5": {
57
+ "constant_answer_baseline": 0.49633333333333335,
58
+ "counts": {
59
+ "0": 1489,
60
+ "1": 764,
61
+ "2": 557,
62
+ "3": 130,
63
+ "4": 58,
64
+ "5": 2
65
+ }
66
+ }
67
+ },
68
+ "answers_changed_by_level": {
69
+ "1": 0,
70
+ "2": 0,
71
+ "3": 0,
72
+ "4": 0,
73
+ "5": 1400
74
+ },
75
+ "before_level_distributions": {
76
+ "1": {
77
+ "constant_answer_baseline": 0.4076666666666667,
78
+ "counts": {
79
+ "2": 1223,
80
+ "3": 619,
81
+ "4": 568,
82
+ "5": 590
83
+ }
84
+ },
85
+ "2": {
86
+ "constant_answer_baseline": 0.273,
87
+ "counts": {
88
+ "0": 758,
89
+ "1": 757,
90
+ "2": 819,
91
+ "3": 383,
92
+ "4": 188,
93
+ "5": 95
94
+ }
95
+ },
96
+ "3": {
97
+ "constant_answer_baseline": 0.208,
98
+ "counts": {
99
+ "above": 537,
100
+ "below": 572,
101
+ "blue": 567,
102
+ "left": 624,
103
+ "red": 543,
104
+ "right": 157
105
+ }
106
+ },
107
+ "4": {
108
+ "constant_answer_baseline": 0.19266666666666668,
109
+ "counts": {
110
+ "0,0": 498,
111
+ "0,1": 257,
112
+ "0,2": 46,
113
+ "0,3": 6,
114
+ "1,0": 250,
115
+ "1,1": 472,
116
+ "1,2": 128,
117
+ "1,3": 21,
118
+ "2,0": 44,
119
+ "2,1": 118,
120
+ "2,2": 92,
121
+ "2,3": 36,
122
+ "3,0": 2,
123
+ "3,1": 14,
124
+ "3,2": 30,
125
+ "even": 578,
126
+ "odd": 408
127
+ }
128
+ },
129
+ "5": {
130
+ "constant_answer_baseline": 0.2976666666666667,
131
+ "counts": {
132
+ "0": 858,
133
+ "1": 893,
134
+ "2": 683,
135
+ "3": 332,
136
+ "4": 167,
137
+ "5": 67
138
+ }
139
+ }
140
+ },
141
  "categorical_distributions": {
142
  "blue_self_intersecting": {
143
  "False": 3000
 
218
  "p95": 4.0
219
  }
220
  },
221
+ "dataset_version": "line-intersection-3.0.0",
222
+ "definitional_whitelist": {
223
+ "crossed_from_above_to_below": "defines parity Level 4",
224
+ "leftmost_intersection_x": "defines left/right Level 3",
225
+ "num_blue_segments": "defines blue-segment Level 1",
226
+ "num_red_segments": "defines red-segment Level 1",
227
+ "red_above_blue_at_end": "defines end-order Level 3",
228
+ "red_above_blue_at_start": "defines start-order Level 3",
229
+ "total_intersections": "defines Level 2 and contributes to Levels 4/5"
230
+ },
231
+ "diagnosis_before_fix": {
232
+ "delta_at_20px": {
233
+ "0": 2016
234
+ },
235
+ "stored_level5_not_equal_original": 0,
236
+ "stored_level5_recomputation_mismatches_at_20px": 0,
237
+ "translation_template_items": 2016
238
+ },
239
+ "features_at_v_ge_0_10_nothing_hidden": {
240
+ "canvas_size": {
241
+ "1": {
242
+ "cramers_v": 0.10845331571172052,
243
+ "kind": "categorical"
244
+ }
245
+ },
246
  "crossed_from_above_to_below": {
247
+ "1": {
248
+ "cramers_v": 0.16602515274348242,
249
+ "kind": "categorical"
250
+ },
251
+ "2": {
252
+ "cramers_v": 0.999332665925011,
253
+ "kind": "categorical"
254
+ },
255
+ "3": {
256
+ "cramers_v": 0.24382485996360917,
257
+ "kind": "categorical"
258
+ },
259
+ "4": {
260
+ "cramers_v": 0.9974951951979326,
261
+ "kind": "categorical"
262
+ },
263
+ "5": {
264
+ "cramers_v": 0.10633522642820674,
265
+ "kind": "categorical"
266
+ }
267
  },
268
  "difficulty_score": {
269
+ "1": {
270
+ "cramers_v": 0.8524917471375301,
271
+ "kind": "numeric_deciles"
272
+ },
273
+ "2": {
274
+ "cramers_v": 0.707612580501277,
275
+ "kind": "numeric_deciles"
276
+ },
277
+ "3": {
278
+ "cramers_v": 0.18609249408835285,
279
+ "kind": "numeric_deciles"
280
+ },
281
+ "4": {
282
+ "cramers_v": 0.4828009773697632,
283
+ "kind": "numeric_deciles"
284
+ },
285
+ "5": {
286
+ "cramers_v": 0.2764338162488935,
287
+ "kind": "numeric_deciles"
288
+ }
289
  },
290
  "leftmost_intersection_x": {
291
+ "1": {
292
+ "cramers_v": 0.17244786703642884,
293
+ "kind": "categorical"
294
+ },
295
+ "2": {
296
+ "cramers_v": 0.5031630080719137,
297
+ "kind": "categorical"
298
+ },
299
+ "3": {
300
+ "cramers_v": 0.21808085882978565,
301
+ "kind": "categorical"
302
+ },
303
+ "4": {
304
+ "cramers_v": 0.46245306006000597,
305
+ "kind": "categorical"
306
+ },
307
+ "5": {
308
+ "cramers_v": 0.20153091676455742,
309
+ "kind": "categorical"
310
+ }
311
  },
312
  "num_blue_segments": {
313
+ "1": {
314
+ "cramers_v": 1.0,
315
+ "kind": "numeric_deciles"
316
+ },
317
+ "2": {
318
+ "cramers_v": 0.3519578674194084,
319
+ "kind": "numeric_deciles"
320
+ },
321
+ "4": {
322
+ "cramers_v": 0.3485129221115988,
323
+ "kind": "numeric_deciles"
324
+ },
325
+ "5": {
326
+ "cramers_v": 0.2448867721693077,
327
+ "kind": "numeric_deciles"
328
+ }
329
  },
330
  "num_red_segments": {
331
+ "1": {
332
+ "cramers_v": 1.0,
333
+ "kind": "numeric_deciles"
334
+ },
335
+ "2": {
336
+ "cramers_v": 0.3519578674194084,
337
+ "kind": "numeric_deciles"
338
+ },
339
+ "4": {
340
+ "cramers_v": 0.3485129221115988,
341
+ "kind": "numeric_deciles"
342
+ },
343
+ "5": {
344
+ "cramers_v": 0.2448867721693077,
345
+ "kind": "numeric_deciles"
346
+ }
347
  },
348
  "red_above_blue_at_end": {
349
+ "3": {
350
+ "cramers_v": 0.6277295814021999,
351
+ "kind": "categorical"
352
+ },
353
+ "5": {
354
+ "cramers_v": 0.19278923326330089,
355
+ "kind": "categorical"
356
+ }
357
  },
358
  "red_above_blue_at_start": {
359
+ "3": {
360
+ "cramers_v": 0.633359142591668,
361
+ "kind": "categorical"
362
+ },
363
+ "5": {
364
+ "cramers_v": 0.19749312158764903,
365
+ "kind": "categorical"
366
+ }
367
  },
368
  "rightmost_intersection_x": {
369
+ "1": {
370
+ "cramers_v": 0.17147737015201117,
371
+ "kind": "categorical"
372
+ },
373
+ "2": {
374
+ "cramers_v": 0.5028309968130666,
375
+ "kind": "categorical"
376
+ },
377
+ "3": {
378
+ "cramers_v": 0.21814305087089234,
379
+ "kind": "categorical"
380
+ },
381
+ "4": {
382
+ "cramers_v": 0.462221287108952,
383
+ "kind": "categorical"
384
+ },
385
+ "5": {
386
+ "cramers_v": 0.2011941575669298,
387
+ "kind": "categorical"
388
+ }
389
  },
390
  "total_intersections": {
391
+ "1": {
392
+ "cramers_v": 0.32378613232968567,
393
+ "kind": "numeric_deciles"
394
+ },
395
+ "2": {
396
+ "cramers_v": 0.9998330411541915,
397
+ "kind": "numeric_deciles"
398
+ },
399
+ "3": {
400
+ "cramers_v": 0.23746468316223507,
401
+ "kind": "numeric_deciles"
402
+ },
403
+ "4": {
404
+ "cramers_v": 0.8621829464544354,
405
+ "kind": "numeric_deciles"
406
+ },
407
+ "5": {
408
+ "cramers_v": 0.3101845784550317,
409
+ "kind": "numeric_deciles"
410
+ }
411
  }
412
  },
413
+ "guard_injection_tests": {
414
+ "blue_point_boundary_accepted": true,
415
+ "blue_point_violation_rejected": true,
416
+ "independent_level5_boundary_accepted": true,
417
+ "inherited_level5_violation_rejected": true,
418
+ "intersection_count_boundary_accepted": true,
419
+ "intersection_count_violation_rejected": true,
420
+ "png_boundary_accepted": true,
421
+ "red_point_boundary_accepted": true,
422
+ "red_point_violation_rejected": true
423
+ },
424
  "images": 3000,
425
+ "leak_audit_all_scalar_scene_features": {
426
  "blue_self_intersecting": {
427
  "classification": "scene_feature",
428
  "levels": {
 
449
  },
450
  "whitelist_justification": null
451
  },
452
+ "canvas_size": {
453
  "classification": "scene_feature",
454
  "levels": {
455
  "1": {
456
+ "cramers_v": 0.10845331571172052,
457
  "kind": "categorical"
458
  },
459
  "2": {
460
+ "cramers_v": 0.0,
461
  "kind": "categorical"
462
  },
463
  "3": {
464
+ "cramers_v": 0.08071546399669882,
465
  "kind": "categorical"
466
  },
467
  "4": {
468
+ "cramers_v": 0.05436342966681211,
469
  "kind": "categorical"
470
  },
471
  "5": {
472
+ "cramers_v": 0.0,
473
  "kind": "categorical"
474
  }
475
  },
476
  "whitelist_justification": null
477
  },
478
+ "crossed_from_above_to_below": {
479
+ "classification": "definitional",
480
+ "levels": {
481
+ "1": {
482
+ "cramers_v": 0.16602515274348242,
483
+ "kind": "categorical"
484
+ },
485
+ "2": {
486
+ "cramers_v": 0.999332665925011,
487
+ "kind": "categorical"
488
+ },
489
+ "3": {
490
+ "cramers_v": 0.24382485996360917,
491
+ "kind": "categorical"
492
+ },
493
+ "4": {
494
+ "cramers_v": 0.9974951951979326,
495
+ "kind": "categorical"
496
+ },
497
+ "5": {
498
+ "cramers_v": 0.10633522642820674,
499
+ "kind": "categorical"
500
+ }
501
+ },
502
+ "whitelist_justification": "defines parity Level 4"
503
+ },
504
  "difficulty_score": {
505
  "classification": "scene_feature",
506
  "levels": {
507
  "1": {
508
+ "cramers_v": 0.8524917471375301,
509
  "kind": "numeric_deciles"
510
  },
511
  "2": {
512
+ "cramers_v": 0.707612580501277,
513
  "kind": "numeric_deciles"
514
  },
515
  "3": {
516
+ "cramers_v": 0.18609249408835285,
517
  "kind": "numeric_deciles"
518
  },
519
  "4": {
520
+ "cramers_v": 0.4828009773697632,
521
  "kind": "numeric_deciles"
522
  },
523
  "5": {
524
+ "cramers_v": 0.2764338162488935,
525
  "kind": "numeric_deciles"
526
  }
527
  },
528
  "whitelist_justification": null
529
  },
530
  "leftmost_intersection_x": {
531
+ "classification": "definitional",
532
  "levels": {
533
  "1": {
534
+ "cramers_v": 0.17244786703642884,
535
  "kind": "categorical"
536
  },
537
  "2": {
538
+ "cramers_v": 0.5031630080719137,
539
  "kind": "categorical"
540
  },
541
  "3": {
542
+ "cramers_v": 0.21808085882978565,
543
  "kind": "categorical"
544
  },
545
  "4": {
546
+ "cramers_v": 0.46245306006000597,
547
  "kind": "categorical"
548
  },
549
  "5": {
550
+ "cramers_v": 0.20153091676455742,
551
  "kind": "categorical"
552
  }
553
  },
554
+ "whitelist_justification": "defines left/right Level 3"
555
  },
556
  "num_blue_segments": {
557
+ "classification": "definitional",
558
  "levels": {
559
  "1": {
560
  "cramers_v": 1.0,
561
  "kind": "numeric_deciles"
562
  },
563
  "2": {
564
+ "cramers_v": 0.3519578674194084,
565
  "kind": "numeric_deciles"
566
  },
567
  "3": {
568
+ "cramers_v": 0.04447835090838629,
569
  "kind": "numeric_deciles"
570
  },
571
  "4": {
572
+ "cramers_v": 0.3485129221115988,
573
  "kind": "numeric_deciles"
574
  },
575
  "5": {
576
+ "cramers_v": 0.2448867721693077,
577
  "kind": "numeric_deciles"
578
  }
579
  },
580
+ "whitelist_justification": "defines blue-segment Level 1"
581
  },
582
  "num_red_segments": {
583
+ "classification": "definitional",
584
  "levels": {
585
  "1": {
586
  "cramers_v": 1.0,
587
  "kind": "numeric_deciles"
588
  },
589
  "2": {
590
+ "cramers_v": 0.3519578674194084,
591
  "kind": "numeric_deciles"
592
  },
593
  "3": {
594
+ "cramers_v": 0.04447835090838629,
595
  "kind": "numeric_deciles"
596
  },
597
  "4": {
598
+ "cramers_v": 0.3485129221115988,
599
  "kind": "numeric_deciles"
600
  },
601
  "5": {
602
+ "cramers_v": 0.2448867721693077,
603
  "kind": "numeric_deciles"
604
  }
605
  },
606
+ "whitelist_justification": "defines red-segment Level 1"
607
  },
608
  "red_above_blue_at_end": {
609
+ "classification": "definitional",
610
  "levels": {
611
  "1": {
612
+ "cramers_v": 0.0021095672325464644,
613
  "kind": "categorical"
614
  },
615
  "2": {
616
+ "cramers_v": 0.04338170743217188,
617
  "kind": "categorical"
618
  },
619
  "3": {
620
+ "cramers_v": 0.6277295814021999,
621
  "kind": "categorical"
622
  },
623
  "4": {
624
+ "cramers_v": 0.04768999452055526,
625
  "kind": "categorical"
626
  },
627
  "5": {
628
+ "cramers_v": 0.19278923326330089,
629
  "kind": "categorical"
630
  }
631
  },
632
+ "whitelist_justification": "defines end-order Level 3"
633
  },
634
  "red_above_blue_at_start": {
635
+ "classification": "definitional",
636
  "levels": {
637
  "1": {
638
+ "cramers_v": 0.034413101850769984,
639
  "kind": "categorical"
640
  },
641
  "2": {
642
+ "cramers_v": 0.043305047342557426,
643
  "kind": "categorical"
644
  },
645
  "3": {
646
+ "cramers_v": 0.633359142591668,
647
  "kind": "categorical"
648
  },
649
  "4": {
650
+ "cramers_v": 0.04762055480836574,
651
  "kind": "categorical"
652
  },
653
  "5": {
654
+ "cramers_v": 0.19749312158764903,
655
  "kind": "categorical"
656
  }
657
  },
658
+ "whitelist_justification": "defines start-order Level 3"
659
  },
660
  "red_self_intersecting": {
661
  "classification": "scene_feature",
 
687
  "classification": "scene_feature",
688
  "levels": {
689
  "1": {
690
+ "cramers_v": 0.17147737015201117,
691
  "kind": "categorical"
692
  },
693
  "2": {
694
+ "cramers_v": 0.5028309968130666,
695
  "kind": "categorical"
696
  },
697
  "3": {
698
+ "cramers_v": 0.21814305087089234,
699
  "kind": "categorical"
700
  },
701
  "4": {
702
+ "cramers_v": 0.462221287108952,
703
  "kind": "categorical"
704
  },
705
  "5": {
706
+ "cramers_v": 0.2011941575669298,
707
  "kind": "categorical"
708
  }
709
  },
710
  "whitelist_justification": null
711
  },
712
  "total_intersections": {
713
+ "classification": "definitional",
714
  "levels": {
715
  "1": {
716
+ "cramers_v": 0.32378613232968567,
717
  "kind": "numeric_deciles"
718
  },
719
  "2": {
720
+ "cramers_v": 0.9998330411541915,
721
  "kind": "numeric_deciles"
722
  },
723
  "3": {
724
+ "cramers_v": 0.23746468316223507,
725
  "kind": "numeric_deciles"
726
  },
727
  "4": {
728
+ "cramers_v": 0.8621829464544354,
729
  "kind": "numeric_deciles"
730
  },
731
  "5": {
732
+ "cramers_v": 0.3101845784550317,
733
  "kind": "numeric_deciles"
734
  }
735
  },
736
+ "whitelist_justification": "defines Level 2 and contributes to Levels 4/5"
737
  },
738
  "wording_variant": {
739
  "classification": "scene_feature",
740
  "levels": {
741
  "1": {
742
+ "cramers_v": 0.028854185864983846,
743
  "kind": "categorical"
744
  },
745
  "2": {
746
+ "cramers_v": 0.0,
747
  "kind": "categorical"
748
  },
749
  "3": {
750
+ "cramers_v": 0.0,
751
  "kind": "categorical"
752
  },
753
  "4": {
754
+ "cramers_v": 0.0,
755
  "kind": "categorical"
756
  },
757
  "5": {
758
+ "cramers_v": 0.0,
759
  "kind": "categorical"
760
  }
761
  },
762
  "whitelist_justification": null
763
  }
764
  },
765
+ "level5_template_distribution": {
766
+ "remove_first_red_segment": 984,
767
+ "translate_red_intersections": 2016
768
+ },
769
+ "mismatch_count": 0,
770
+ "mismatches": [],
771
+ "png_recovery": {
772
+ "method": "exact independent redraw from red/blue point paths and palette",
773
+ "passed": 3000,
774
+ "total": 3000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
775
  },
 
776
  "questions": 15000,
777
+ "translation_delta_distribution": {
778
+ "-5": 23,
779
+ "-4": 67,
780
+ "-3": 186,
781
+ "-2": 408,
782
+ "-1": 426,
783
+ "0": 616,
784
+ "1": 181,
785
+ "2": 81,
786
+ "3": 21,
787
+ "4": 6,
788
+ "5": 1
789
+ },
790
+ "translation_distance_pixels": 60,
791
+ "translation_level5_not_equal_original": 1400
792
  }
Dataset/line_intersection_dataset_3000/validation_report.txt CHANGED
@@ -1,16 +1,17 @@
1
- GRIP Five-Level Validation Summary — line_intersection
2
- Images checked: 3000
3
- Questions checked: 15000
4
- Base geometry/Levels 1-4: PASS
5
- Level 5 independent validation: PASS
6
- Total mismatches found: 0
7
- Summary: PASS
 
 
 
 
 
 
 
 
8
 
9
- Dataset: line_intersection
10
- Images checked: 3000
11
- Level 5 questions checked: 3000
12
- Total mismatches found: 0
13
- Level 5 templates:
14
- remove_first_red_segment: 984
15
- translate_red_intersections: 2016
16
  Summary: PASS
 
1
+ Line Intersection Dataset v3 Validation Report
2
+ ==============================================
3
+ Images/questions: 3000/15000
4
+ Mismatches: 0
5
+ Answers changed by level: {'1': 0, '2': 0, '3': 0, '4': 0, '5': 1400}
6
+ Level distributions and baselines: {'1': {'counts': {'3': 619, '2': 1223, '4': 568, '5': 590}, 'constant_answer_baseline': 0.4076666666666667}, '2': {'counts': {'2': 819, '1': 757, '4': 188, '5': 95, '0': 758, '3': 383}, 'constant_answer_baseline': 0.273}, '3': {'counts': {'blue': 567, 'left': 624, 'red': 543, 'above': 537, 'below': 572, 'right': 157}, 'constant_answer_baseline': 0.208}, '4': {'counts': {'1,1': 472, '1,0': 250, 'even': 578, 'odd': 408, '0,1': 257, '0,0': 498, '1,3': 21, '2,2': 92, '1,2': 128, '2,0': 44, '2,1': 118, '0,3': 6, '0,2': 46, '2,3': 36, '3,1': 14, '3,2': 30, '3,0': 2}, 'constant_answer_baseline': 0.19266666666666668}, '5': {'counts': {'1': 764, '0': 1489, '2': 557, '4': 58, '3': 130, '5': 2}, 'constant_answer_baseline': 0.49633333333333335}}
7
+ Level 5 templates: {'remove_first_red_segment': 984, 'translate_red_intersections': 2016}
8
+ Translated answers differing from original: 1400/2016
9
+ Translated-minus-original distribution: {-5: 23, -4: 67, -3: 186, -2: 408, -1: 426, 0: 616, 1: 181, 2: 81, 3: 21, 4: 6, 5: 1}
10
+ PNG recovery: 3000/3000
11
+ Guard injection tests: {'intersection_count_violation_rejected': True, 'intersection_count_boundary_accepted': True, 'red_point_violation_rejected': True, 'red_point_boundary_accepted': True, 'blue_point_violation_rejected': True, 'blue_point_boundary_accepted': True, 'inherited_level5_violation_rejected': True, 'independent_level5_boundary_accepted': True, 'png_boundary_accepted': True}
12
+ Features at V >= 0.10 (nothing hidden): {'canvas_size': {'1': {'cramers_v': 0.10845331571172052, 'kind': 'categorical'}}, 'crossed_from_above_to_below': {'1': {'cramers_v': 0.16602515274348242, 'kind': 'categorical'}, '2': {'cramers_v': 0.999332665925011, 'kind': 'categorical'}, '3': {'cramers_v': 0.24382485996360917, 'kind': 'categorical'}, '4': {'cramers_v': 0.9974951951979326, 'kind': 'categorical'}, '5': {'cramers_v': 0.10633522642820674, 'kind': 'categorical'}}, 'difficulty_score': {'1': {'cramers_v': 0.8524917471375301, 'kind': 'numeric_deciles'}, '2': {'cramers_v': 0.707612580501277, 'kind': 'numeric_deciles'}, '3': {'cramers_v': 0.18609249408835285, 'kind': 'numeric_deciles'}, '4': {'cramers_v': 0.4828009773697632, 'kind': 'numeric_deciles'}, '5': {'cramers_v': 0.2764338162488935, 'kind': 'numeric_deciles'}}, 'leftmost_intersection_x': {'1': {'cramers_v': 0.17244786703642884, 'kind': 'categorical'}, '2': {'cramers_v': 0.5031630080719137, 'kind': 'categorical'}, '3': {'cramers_v': 0.21808085882978565, 'kind': 'categorical'}, '4': {'cramers_v': 0.46245306006000597, 'kind': 'categorical'}, '5': {'cramers_v': 0.20153091676455742, 'kind': 'categorical'}}, 'num_blue_segments': {'1': {'cramers_v': 1.0, 'kind': 'numeric_deciles'}, '2': {'cramers_v': 0.3519578674194084, 'kind': 'numeric_deciles'}, '4': {'cramers_v': 0.3485129221115988, 'kind': 'numeric_deciles'}, '5': {'cramers_v': 0.2448867721693077, 'kind': 'numeric_deciles'}}, 'num_red_segments': {'1': {'cramers_v': 1.0, 'kind': 'numeric_deciles'}, '2': {'cramers_v': 0.3519578674194084, 'kind': 'numeric_deciles'}, '4': {'cramers_v': 0.3485129221115988, 'kind': 'numeric_deciles'}, '5': {'cramers_v': 0.2448867721693077, 'kind': 'numeric_deciles'}}, 'red_above_blue_at_end': {'3': {'cramers_v': 0.6277295814021999, 'kind': 'categorical'}, '5': {'cramers_v': 0.19278923326330089, 'kind': 'categorical'}}, 'red_above_blue_at_start': {'3': {'cramers_v': 0.633359142591668, 'kind': 'categorical'}, '5': {'cramers_v': 0.19749312158764903, 'kind': 'categorical'}}, 'rightmost_intersection_x': {'1': {'cramers_v': 0.17147737015201117, 'kind': 'categorical'}, '2': {'cramers_v': 0.5028309968130666, 'kind': 'categorical'}, '3': {'cramers_v': 0.21814305087089234, 'kind': 'categorical'}, '4': {'cramers_v': 0.462221287108952, 'kind': 'categorical'}, '5': {'cramers_v': 0.2011941575669298, 'kind': 'categorical'}}, 'total_intersections': {'1': {'cramers_v': 0.32378613232968567, 'kind': 'numeric_deciles'}, '2': {'cramers_v': 0.9998330411541915, 'kind': 'numeric_deciles'}, '3': {'cramers_v': 0.23746468316223507, 'kind': 'numeric_deciles'}, '4': {'cramers_v': 0.8621829464544354, 'kind': 'numeric_deciles'}, '5': {'cramers_v': 0.3101845784550317, 'kind': 'numeric_deciles'}}}
13
+
14
+ Mismatches:
15
+ None
16
 
 
 
 
 
 
 
 
17
  Summary: PASS
Dataset/polyhedron_dataset_3000/README.md CHANGED
@@ -2,9 +2,15 @@
2
 
3
  ## 1. Dataset overview
4
 
5
- This dataset is designed as a direct extension of the GIQ benchmark (Michalkiewicz et al., arXiv:2506.08194), which found that vision-language models including Claude, Gemini, and ChatGPT show remarkably low accuracy interpreting basic shape properties such as face geometry, convexity, and compound structures of complex polyhedra. This dataset replicates and extends that evaluation methodology at larger scale (3000 images vs GIQ's 224 unique polyhedra) with a structured 4-level difficulty progression. See the [GIQ paper](https://arxiv.org/abs/2506.08194).
6
 
7
- The collection contains 19 named solids, 3,000 unique dark-theme wireframe views, and exactly four questions per image (12,000 flattened rows).
 
 
 
 
 
 
8
 
9
  ## 2. Full generation prompt
10
 
 
2
 
3
  ## 1. Dataset overview
4
 
5
+ This dataset is designed as a direct extension of the GIQ benchmark (Michalkiewicz et al., arXiv:2506.08194), which found that vision-language models including Claude, Gemini, and ChatGPT show remarkably low accuracy interpreting basic shape properties such as face geometry, convexity, and compound structures of complex polyhedra. This dataset replicates and extends that evaluation methodology at larger scale (3000 images vs GIQ's 224 unique polyhedra) with a structured five-level difficulty progression. See the [GIQ paper](https://arxiv.org/abs/2506.08194).
6
 
7
+ The current v4 collection contains 17 named solids, 3,000 unique dark-theme wireframe views, and exactly five questions per image (15,000 flattened rows).
8
+
9
+ ### Version 4 geometry and edge correction
10
+
11
+ Version 4 removes face diagonals from every stored and rendered edge list. The 157 affected `great dodecahedron` records contained the regular dodecahedron geometry plus 60 pentagon diagonals; their PNGs were regenerated with the 30 true boundary edges. The two supposed stellated families were geometry-identical to regular solids and are now named and classified from their actual topology: 157 records became `icosahedron` and 157 became `dodecahedron`. Exhaustive independent checks now require boundary-edge equality, the appropriate Euler characteristic (including component-aware compound handling), hull/face-support convexity, topology-based identity, positive Euler Level-4 answers, and exact PNG edge-set recovery. All 3,000 PNGs pass.
12
+
13
+ Answer changes from v3 were: Level 1 = 157, Level 2 = 314, Level 3 = 58, Level 4 = 112, Level 5 = 0. Level 5 remains structurally constant (`no` for all 3,000 records) and is documented as such rather than treated as a measured distinction.
14
 
15
  ## 2. Full generation prompt
16
 
Dataset/polyhedron_dataset_3000/annotations.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
Dataset/polyhedron_dataset_3000/answer_key.csv CHANGED
The diff for this file is too large to render. See raw diff
 
Dataset/polyhedron_dataset_3000/build_manifest.json CHANGED
@@ -1,21 +1,21 @@
1
  {
2
- "constraint_source": "generator constants and validation metrics",
3
  "constraint_set": {
4
- "euler_formula": "face_count = 2 - vertex_count + edge_count",
5
- "euler_level4_equals_stored_face_count": true,
6
- "euler_level4_positive": true,
7
- "euler_prompt_values_match_record": true,
8
- "five_questions_per_image": true,
9
- "level3_vertex_answer_matches_vertex_count": true,
10
- "level5_remove_face_closed_surface_answer": "no",
11
- "stored_convex_topology_satisfies_v_minus_e_plus_f_equals_2": true
 
12
  },
 
13
  "current_build_layout": "unsuffixed",
14
- "dataset_version": "polyhedron-3.0.0",
15
- "generator_commit": "269045bc25630d3cc96a3d617e35043d72f941cd",
16
  "images": 3000,
17
- "metadata_only_rebuild": true,
18
- "superseded_build": "archive/v2 (metadata only; no images)",
19
  "question_set_fields": [
20
  "question_id",
21
  "task",
 
1
  {
 
2
  "constraint_set": {
3
+ "boundary_edges_only": true,
4
+ "compound_components_checked_separately": true,
5
+ "connected_closed_solid_euler_characteristic": "V - E + F = 2",
6
+ "convexity_matches_independent_hull_support_test": true,
7
+ "edge_array_length_equals_edge_count": true,
8
+ "five_ordered_questions_per_image": true,
9
+ "level4_euler_equals_positive_face_count": true,
10
+ "png_edge_set_recovery_equals_stored_boundary_edges": true,
11
+ "solid_identity_matches_vertex_edge_face_and_face_shape_signature": true
12
  },
13
+ "constraint_source": "generator constants and exhaustive validation metrics",
14
  "current_build_layout": "unsuffixed",
15
+ "dataset_version": "polyhedron-4.0.0",
16
+ "generator_commit": "c0bf63192b57ed5f7269adce67557adcebddd323",
17
  "images": 3000,
18
+ "metadata_only_rebuild": false,
 
19
  "question_set_fields": [
20
  "question_id",
21
  "task",
Dataset/polyhedron_dataset_3000/dataset_final.csv CHANGED
The diff for this file is too large to render. See raw diff
 
Dataset/polyhedron_dataset_3000/dataset_final.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
Dataset/polyhedron_dataset_3000/flatten_annotations.py CHANGED
@@ -1,7 +1,7 @@
1
  import argparse,csv,json
2
  from collections import Counter
3
  from pathlib import Path
4
- TASKS={1:'Image Description',2:'Basic Relational Reasoning',3:'Comparative Reasoning',4:'Compound Reasoning'}
5
  def main():
6
  p=argparse.ArgumentParser();p.add_argument('annotations',type=Path);a=p.parse_args();data=[json.loads(x) for x in a.annotations.read_text(encoding='utf8').splitlines()];rows=[]
7
  for r in data:
@@ -11,5 +11,5 @@ def main():
11
  with (out/'dataset_final.csv').open('w',encoding='utf-8-sig',newline='') as f:w=csv.DictWriter(f,fieldnames=cols,lineterminator='\n');w.writeheader();w.writerows(rows)
12
  with (out/'dataset_final.jsonl').open('w',encoding='utf8',newline='\n') as f:
13
  for r in rows:f.write(json.dumps(r,separators=(',',':'))+'\n')
14
- c=Counter(r['task'] for r in rows);print(f'Images: {len(data)}\nRows: {len(rows)}');[print(f'{x}: {c[x]}') for x in TASKS.values()];assert len(rows)==4*len(data);print('Sanity check: PASS')
15
  if __name__=='__main__':main()
 
1
  import argparse,csv,json
2
  from collections import Counter
3
  from pathlib import Path
4
+ TASKS={1:'Image Description',2:'Basic Relational Reasoning',3:'Comparative Reasoning',4:'Compound Reasoning',5:'Extrapolative/Counterfactual Reasoning'}
5
  def main():
6
  p=argparse.ArgumentParser();p.add_argument('annotations',type=Path);a=p.parse_args();data=[json.loads(x) for x in a.annotations.read_text(encoding='utf8').splitlines()];rows=[]
7
  for r in data:
 
11
  with (out/'dataset_final.csv').open('w',encoding='utf-8-sig',newline='') as f:w=csv.DictWriter(f,fieldnames=cols,lineterminator='\n');w.writeheader();w.writerows(rows)
12
  with (out/'dataset_final.jsonl').open('w',encoding='utf8',newline='\n') as f:
13
  for r in rows:f.write(json.dumps(r,separators=(',',':'))+'\n')
14
+ c=Counter(r['task'] for r in rows);print(f'Images: {len(data)}\nRows: {len(rows)}');[print(f'{x}: {c[x]}') for x in TASKS.values()];assert len(rows)==5*len(data);print('Sanity check: PASS')
15
  if __name__=='__main__':main()
Dataset/polyhedron_dataset_3000/generate_polyhedron_dataset.py CHANGED
@@ -2,7 +2,7 @@ import argparse,itertools,json,math,random
2
  from pathlib import Path
3
  import numpy as np
4
  from PIL import Image,ImageDraw
5
- BG=(26,26,26);INK=(118,172,190);AA=3;PHI=(1+5**.5)/2
6
  def unique(points):
7
  out=[]
8
  for p in points:
@@ -48,12 +48,6 @@ def compound(parts):
48
  verts.extend(m['vertices']);faces.extend([[x+off for x in f] for f in m['faces']]);edges.extend([(a+off,b+off) for a,b in m['edges']]);off+=len(m['vertices'])
49
  return {'vertices':np.array(verts),'faces':faces,'edges':edges}
50
  TET2={'vertices':-TET['vertices'],'faces':TET['faces'],'edges':TET['edges']}
51
- def star_mesh(base):
52
- f=base['faces'];e=set(base['edges'])
53
- for face in f:
54
- if len(face)>=5:
55
- for i in range(len(face)):e.add(tuple(sorted((face[i],face[(i+2)%len(face)]))))
56
- return {'vertices':base['vertices'],'faces':f,'edges':sorted(e)}
57
  SPECS=[]
58
  def add(name,cls,m,convex,shape,counts=None):
59
  v,e,f=(len(m['vertices']),len(m['edges']),len(m['faces'])) if counts is None else counts;SPECS.append({'name':name,'class':cls,'mesh':m,'is_convex':convex,'face_shape_types':shape,'vertex_count':v,'edge_count':e,'face_count':f})
@@ -61,7 +55,10 @@ for x in [('tetrahedron',TET,'triangles'),('cube',CUBE,'squares'),('octahedron',
61
  for x in [('truncated tetrahedron',TT),('cuboctahedron',CO),('truncated cube',TC),('truncated octahedron',TO),('rhombicuboctahedron',RCO),('icosidodecahedron',ID)]:add(x[0],'Archimedean',x[1],True,'mixed')
62
  for name,m in [('triakis tetrahedron',dual(TT)),('rhombic dodecahedron',dual(CO)),('triakis octahedron',dual(TC)),('rhombic triacontahedron',dual(ID))]:add(name,'Catalan',m,True,'mixed')
63
  add('stella octangula','Compound',compound([TET,TET2]),False,'triangles',(8,12,8));add('compound of cube and octahedron','Compound',compound([CUBE,OCT]),False,'mixed',(14,24,14))
64
- add('small stellated dodecahedron','NonConvex',star_mesh(ICO),False,'pentagons',(12,30,12));add('great dodecahedron','NonConvex',star_mesh(DOD),False,'pentagons',(20,30,12))
 
 
 
65
  assert len(SPECS)==19
66
  for s in SPECS:
67
  if s['is_convex']:assert s['vertex_count']-s['edge_count']+s['face_count']==2,(s['name'],s['vertex_count'],s['edge_count'],s['face_count'])
@@ -92,7 +89,7 @@ def questions(iid,row,rng):
92
  qs.append({'question_id':iid+'_q4','question_text':text,'question_type':typ,'ground_truth':gt,'answer_format':fmt,'difficulty_level':4})
93
  qs.append({'question_id':iid+'_q5','question_text':'If one face were removed from this solid while all remaining faces stayed fixed, would the result still be a closed surface to which the closed-surface Euler formula directly applies? Answer yes or no.','question_type':'remove_face_closed_surface','ground_truth':'no','answer_format':'yes_no','difficulty_level':5});return qs
94
  def generate_one(i,images):
95
- rng=random.Random(i);s=SPECS[(i-1)%len(SPECS)];w=rng.randint(450,500);h=rng.randint(450,500);ry=rng.uniform(0,360);tx=rng.uniform(15,45);scale=rng.uniform(250,330);iid=f'polyhedron_{i:04d}';render(images/f'{iid}.png',(w,h),s['mesh'],ry,tx,scale);vf=visible_faces(s['mesh']['vertices'],s['mesh']['faces'],rotation(ry,tx));row={'id':iid,'image_path':f'images/{iid}.png','canvas_size':[w,h],'dataset_version':'polyhedron-3.0.0','solid_name':s['name'],'solid_class':s['class'],'face_count':s['face_count'],'edge_count':s['edge_count'],'vertex_count':s['vertex_count'],'is_convex':s['is_convex'],'face_shape_types':s['face_shape_types'],'viewing_angle':{'rotation_y':round(ry,6),'tilt_x':round(tx,6)},'visible_face_count':vf,'vertices':np.round(s['mesh']['vertices'],8).tolist(),'faces':[[int(x) for x in f] for f in s['mesh']['faces']],'edges':[[int(a),int(b)] for a,b in s['mesh']['edges']],'seed':i};row['questions']=questions(iid,row,rng);return row
96
  def generate_dataset(n,out):
97
  out=Path(out);images=out/'images';images.mkdir(parents=True,exist_ok=True)
98
  with (out/'annotations.jsonl').open('w',encoding='utf8',newline='\n') as f:
 
2
  from pathlib import Path
3
  import numpy as np
4
  from PIL import Image,ImageDraw
5
+ BG=(26,26,26);INK=(118,172,190);AA=3;PHI=(1+5**.5)/2;VERSION='polyhedron-4.0.0'
6
  def unique(points):
7
  out=[]
8
  for p in points:
 
48
  verts.extend(m['vertices']);faces.extend([[x+off for x in f] for f in m['faces']]);edges.extend([(a+off,b+off) for a,b in m['edges']]);off+=len(m['vertices'])
49
  return {'vertices':np.array(verts),'faces':faces,'edges':edges}
50
  TET2={'vertices':-TET['vertices'],'faces':TET['faces'],'edges':TET['edges']}
 
 
 
 
 
 
51
  SPECS=[]
52
  def add(name,cls,m,convex,shape,counts=None):
53
  v,e,f=(len(m['vertices']),len(m['edges']),len(m['faces'])) if counts is None else counts;SPECS.append({'name':name,'class':cls,'mesh':m,'is_convex':convex,'face_shape_types':shape,'vertex_count':v,'edge_count':e,'face_count':f})
 
55
  for x in [('truncated tetrahedron',TT),('cuboctahedron',CO),('truncated cube',TC),('truncated octahedron',TO),('rhombicuboctahedron',RCO),('icosidodecahedron',ID)]:add(x[0],'Archimedean',x[1],True,'mixed')
56
  for name,m in [('triakis tetrahedron',dual(TT)),('rhombic dodecahedron',dual(CO)),('triakis octahedron',dual(TC)),('rhombic triacontahedron',dual(ID))]:add(name,'Catalan',m,True,'mixed')
57
  add('stella octangula','Compound',compound([TET,TET2]),False,'triangles',(8,12,8));add('compound of cube and octahedron','Compound',compound([CUBE,OCT]),False,'mixed',(14,24,14))
58
+ # The former two entries reused the regular icosahedron/dodecahedron face complexes
59
+ # and merely injected face diagonals. Name and classify the geometry that is
60
+ # actually stored and rendered; edge arrays always come from face boundaries.
61
+ add('icosahedron','Platonic',ICO,True,'triangles');add('dodecahedron','Platonic',DOD,True,'pentagons')
62
  assert len(SPECS)==19
63
  for s in SPECS:
64
  if s['is_convex']:assert s['vertex_count']-s['edge_count']+s['face_count']==2,(s['name'],s['vertex_count'],s['edge_count'],s['face_count'])
 
89
  qs.append({'question_id':iid+'_q4','question_text':text,'question_type':typ,'ground_truth':gt,'answer_format':fmt,'difficulty_level':4})
90
  qs.append({'question_id':iid+'_q5','question_text':'If one face were removed from this solid while all remaining faces stayed fixed, would the result still be a closed surface to which the closed-surface Euler formula directly applies? Answer yes or no.','question_type':'remove_face_closed_surface','ground_truth':'no','answer_format':'yes_no','difficulty_level':5});return qs
91
  def generate_one(i,images):
92
+ rng=random.Random(i);s=SPECS[(i-1)%len(SPECS)];w=rng.randint(450,500);h=rng.randint(450,500);ry=rng.uniform(0,360);tx=rng.uniform(15,45);scale=rng.uniform(250,330);iid=f'polyhedron_{i:04d}';render(images/f'{iid}.png',(w,h),s['mesh'],ry,tx,scale);vf=visible_faces(s['mesh']['vertices'],s['mesh']['faces'],rotation(ry,tx));row={'id':iid,'image_path':f'images/{iid}.png','canvas_size':[w,h],'dataset_version':VERSION,'solid_name':s['name'],'solid_class':s['class'],'face_count':s['face_count'],'edge_count':s['edge_count'],'vertex_count':s['vertex_count'],'is_convex':s['is_convex'],'face_shape_types':s['face_shape_types'],'viewing_angle':{'rotation_y':round(ry,6),'tilt_x':round(tx,6)},'visible_face_count':vf,'vertices':np.round(s['mesh']['vertices'],8).tolist(),'faces':[[int(x) for x in f] for f in s['mesh']['faces']],'edges':[[int(a),int(b)] for a,b in s['mesh']['edges']],'seed':i};row['questions']=questions(iid,row,rng);return row
93
  def generate_dataset(n,out):
94
  out=Path(out);images=out/'images';images.mkdir(parents=True,exist_ok=True)
95
  with (out/'annotations.jsonl').open('w',encoding='utf8',newline='\n') as f:
Dataset/polyhedron_dataset_3000/images/polyhedron_0019.png CHANGED

Git LFS Details

  • SHA256: 96e74063515d4960181181648aae4fe8bb528be8da927e9436bc830a4e21f5d7
  • Pointer size: 130 Bytes
  • Size of remote file: 75 kB

Git LFS Details

  • SHA256: e4abf06cedb97465de64451c3bb1771de0b516a631c93f8f14203fd7036c7522
  • Pointer size: 130 Bytes
  • Size of remote file: 24.7 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0038.png CHANGED

Git LFS Details

  • SHA256: 1303d3d939de0cda6788485bae37de987598cb36c9514d2933423db57fa1f493
  • Pointer size: 130 Bytes
  • Size of remote file: 78.6 kB

Git LFS Details

  • SHA256: 8813ef5c9fd4c10d0cb2fbba222eea049a036001c43806aa92b0e984ed501c60
  • Pointer size: 130 Bytes
  • Size of remote file: 22 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0057.png CHANGED

Git LFS Details

  • SHA256: e3581d27dee4a0add1fa6f971a620310f0f178f7d174a8c165e3bd830c352383
  • Pointer size: 130 Bytes
  • Size of remote file: 61.5 kB

Git LFS Details

  • SHA256: 6a6c8d08dda20fd38aec66b8aedd12121649abe2dcd02cfcbf35f504e850c275
  • Pointer size: 130 Bytes
  • Size of remote file: 19.6 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0076.png CHANGED

Git LFS Details

  • SHA256: 5c172de8115f8a03f2386fd85544f23a277f3c3e718b1a17185a86447b132277
  • Pointer size: 130 Bytes
  • Size of remote file: 77.8 kB

Git LFS Details

  • SHA256: 1e112d3a0bab772ce63fb98647e800fa758fdb28155663bddec52c8e7df5ec6e
  • Pointer size: 130 Bytes
  • Size of remote file: 22.8 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0095.png CHANGED

Git LFS Details

  • SHA256: 818ca0a3f4ffe6055f81c3204984b9a9c9e7ed79c2f3ca95bd05abb79a2d9aa6
  • Pointer size: 130 Bytes
  • Size of remote file: 90 kB

Git LFS Details

  • SHA256: 8edfe2c51e391201ac56b66520db447877bb361deabe973df2767b8012c18035
  • Pointer size: 130 Bytes
  • Size of remote file: 27.8 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0114.png CHANGED

Git LFS Details

  • SHA256: 0e7d4f1b79d0cb801db1de0dba11268b70ce7c509063cd8607c694c4efa12ba3
  • Pointer size: 130 Bytes
  • Size of remote file: 78.4 kB

Git LFS Details

  • SHA256: 5149f6fa30d55b598298fe290b5a9b78ec8f6e9a7615b7e29b8a4457f405f151
  • Pointer size: 130 Bytes
  • Size of remote file: 21.8 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0133.png CHANGED

Git LFS Details

  • SHA256: 80f55eea7907647a1fd3b770ec85d94afa42aca6d6a3543865e69c1e8776a366
  • Pointer size: 130 Bytes
  • Size of remote file: 97.6 kB

Git LFS Details

  • SHA256: fc69cade181d532d55824b9fb20a5e2ce92b22a2e1dee7df08c8ef2fdcadd484
  • Pointer size: 130 Bytes
  • Size of remote file: 30.2 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0152.png CHANGED

Git LFS Details

  • SHA256: fda6c9b3ee03c25b32fab3457dd04f2722405639c1c4d74baffba4ad36675c07
  • Pointer size: 130 Bytes
  • Size of remote file: 77.6 kB

Git LFS Details

  • SHA256: 9df574e7ae338f49677290319860682613e8d7f6d9bc6321f6ddd33315ef7783
  • Pointer size: 130 Bytes
  • Size of remote file: 24.9 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0171.png CHANGED

Git LFS Details

  • SHA256: c74eb5a9f18bf8d8dade1af82635617dcea637a44a316449fa173411502b1f4c
  • Pointer size: 130 Bytes
  • Size of remote file: 99.5 kB

Git LFS Details

  • SHA256: 747b319c2c97be3f28efa0e31e32035b658e7307cc42ffb9e95e6d8b6719fbde
  • Pointer size: 130 Bytes
  • Size of remote file: 28.2 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0190.png CHANGED

Git LFS Details

  • SHA256: c64b90fd4ea6de8ed01e9a80bad6a439af12b200f2ba35c5849bf5aa6a516e1b
  • Pointer size: 130 Bytes
  • Size of remote file: 77 kB

Git LFS Details

  • SHA256: 64056abfe16857fba6da715d003e9611cbedece5bd762ff945839f14127ab016
  • Pointer size: 130 Bytes
  • Size of remote file: 23.2 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0209.png CHANGED

Git LFS Details

  • SHA256: 0fe2217494b3ad5c75635942ae94715d9b853dc05dbe21e8e577c046fa9a9441
  • Pointer size: 130 Bytes
  • Size of remote file: 90 kB

Git LFS Details

  • SHA256: f23619a11fdb8b6b6196276534f2a7d2b3ac655deb696d5e7fa2032fee810311
  • Pointer size: 130 Bytes
  • Size of remote file: 28 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0228.png CHANGED

Git LFS Details

  • SHA256: 2b47de5aecbd71a9b53e83b03be6b3def588d05be8cb3316d3223f5aab169ca4
  • Pointer size: 130 Bytes
  • Size of remote file: 76.3 kB

Git LFS Details

  • SHA256: 2068dfea3bbec5386ac1f8e415baf299d12dad927afdd2c6535288d55a2bc920
  • Pointer size: 130 Bytes
  • Size of remote file: 23.5 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0247.png CHANGED

Git LFS Details

  • SHA256: aa2ddcb69a69908439d1f0e99d1a2909a95e4454541069ffdc606913669df48f
  • Pointer size: 130 Bytes
  • Size of remote file: 94.4 kB

Git LFS Details

  • SHA256: 2a9cbc452b4cddfa1eced7e52c5846353548d96b0eedb8f15ba4ca1f620ca4b8
  • Pointer size: 130 Bytes
  • Size of remote file: 30.3 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0266.png CHANGED

Git LFS Details

  • SHA256: 1f94cba338ea7e7618240661e397ecba0a16876be86623b44667ccd08a7cf7de
  • Pointer size: 130 Bytes
  • Size of remote file: 90 kB

Git LFS Details

  • SHA256: ef0aca8e7ee32e39a0055eb0ab810aaed501fc07b3e93bce8d65f630c1874b2b
  • Pointer size: 130 Bytes
  • Size of remote file: 26.1 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0285.png CHANGED

Git LFS Details

  • SHA256: 36ff6a532702b7316cff270f7841e499d8763ef0f6b0cf1cefb98d4fa01f976c
  • Pointer size: 130 Bytes
  • Size of remote file: 79.8 kB

Git LFS Details

  • SHA256: 0acc838b0e18d4cf9aa0b59c850b0f70b8b63a8327d2f50083cf51268cec3eb1
  • Pointer size: 130 Bytes
  • Size of remote file: 23.4 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0304.png CHANGED

Git LFS Details

  • SHA256: 934516635d3d228dbe990c69a9576751cb2f3a845ca9e80acb110c52f0ce252f
  • Pointer size: 130 Bytes
  • Size of remote file: 86.4 kB

Git LFS Details

  • SHA256: 565fad6a990ec66b134f572a79dc1196d884f0bd4590272909e507d3b70875e7
  • Pointer size: 130 Bytes
  • Size of remote file: 24.2 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0323.png CHANGED

Git LFS Details

  • SHA256: c0fd3cfadad5345b5b19909e185cf26ff20d0368d40a0f5f4492fec62f05d46e
  • Pointer size: 130 Bytes
  • Size of remote file: 78.1 kB

Git LFS Details

  • SHA256: e66340cda5f33dd5f562b52161885bd5542e9ece7a48507c045e56f88a7b812a
  • Pointer size: 130 Bytes
  • Size of remote file: 22.5 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0342.png CHANGED

Git LFS Details

  • SHA256: 00dcbda5223d90e112f04d8f273f047074e0ab1ace8784b29365cc698bfa0b4b
  • Pointer size: 130 Bytes
  • Size of remote file: 52 kB

Git LFS Details

  • SHA256: 1f55d93ec30826c8222a48df29576df599f93117d26278b2d5d9fee36e8b9c12
  • Pointer size: 130 Bytes
  • Size of remote file: 16.6 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0361.png CHANGED

Git LFS Details

  • SHA256: 538de9f711d77f37e5c2203bfc0e6ee0e029b13555c8912cee839e68f90bfc1d
  • Pointer size: 130 Bytes
  • Size of remote file: 80 kB

Git LFS Details

  • SHA256: 0512a89ddd7c6d94d46e887e4ea4d90b666e778035712c249e70b8280987d0a2
  • Pointer size: 130 Bytes
  • Size of remote file: 22.6 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0380.png CHANGED

Git LFS Details

  • SHA256: 5e6f5ef013bcf7345853595aff956e3e8f3d0eb0b1aca0a68e285ea269d7783f
  • Pointer size: 130 Bytes
  • Size of remote file: 82.9 kB

Git LFS Details

  • SHA256: 16a0410b7062ea71b257b21ac1ec24dc841a85b3a554ff9991c71298a6403a71
  • Pointer size: 130 Bytes
  • Size of remote file: 26 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0399.png CHANGED

Git LFS Details

  • SHA256: 89c74e2acdc7166435ea87336ba710cc176172b324467ea18da5fe9b9e46cbd0
  • Pointer size: 130 Bytes
  • Size of remote file: 76.9 kB

Git LFS Details

  • SHA256: c6a5bd62243f68a8fae2ebaef3c700cc5f44d2b3e9c488e347ec3819df4d6776
  • Pointer size: 130 Bytes
  • Size of remote file: 25.6 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0418.png CHANGED

Git LFS Details

  • SHA256: bb25f099a533b5d329d36373e048119022f83b8b42ce2f29703c2e6dca69e294
  • Pointer size: 130 Bytes
  • Size of remote file: 83.9 kB

Git LFS Details

  • SHA256: 9f25da951ea9c54c5b324c87cac3c70ac20d615a391aa244325a28ebef0124c7
  • Pointer size: 130 Bytes
  • Size of remote file: 26 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0437.png CHANGED

Git LFS Details

  • SHA256: a3de557492c1d06d4aca0d2d63114965df33a0e521159114e53a503b46e9efd8
  • Pointer size: 130 Bytes
  • Size of remote file: 63.2 kB

Git LFS Details

  • SHA256: ab778e86568e9642915d31acfeed28c510262135ab15bbf536ecc7a30e3aab81
  • Pointer size: 130 Bytes
  • Size of remote file: 20.3 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0456.png CHANGED

Git LFS Details

  • SHA256: a3002d3e92178ed0eb790f6eac389eda80f3b95ae6ae3454027f35496200e071
  • Pointer size: 130 Bytes
  • Size of remote file: 90.2 kB

Git LFS Details

  • SHA256: 9b9cbd0862051c3e37489a973a944912a2896a4f1059bc432b682bb671b3cf48
  • Pointer size: 130 Bytes
  • Size of remote file: 28.9 kB
Dataset/polyhedron_dataset_3000/images/polyhedron_0475.png CHANGED

Git LFS Details

  • SHA256: c4d874344d5e97774d3716eba722912c891cfc2541b5451f848655b6cb849316
  • Pointer size: 130 Bytes
  • Size of remote file: 57.5 kB

Git LFS Details

  • SHA256: 6685a16ad6b1111a871bbe60c8ac5823a5ce88bcddeff406a1026283823d8143
  • Pointer size: 130 Bytes
  • Size of remote file: 20.8 kB