Upload folder using huggingface_hub
Browse filesFiles changed (4)
- CHANGES.mdAdded+159
- balance_report.jsonAdded+539
- intervened/questions/questions_train.json
- intervened/questions/taxonomy.json+260-170
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159# CLEVRER-style descriptive questions (v2)
Drop-in replacement for the **descriptive** questions in`jimchen2/temp-jimchen2-pendulum-shift`, covering both the parental dataset(`questions/`) and the causal-intervention subset (`intervened/questions/`).Explanatory / predictive / counterfactual questions are **untouched** — copiedbyte-identical from the shipped files.
## What changed
The shipped descriptive questions had three defects:
1. **38.8% were multiple choice** despite `info.answer_convention` declaring descriptive = free-form string.2. **Four phrasings had exactly one possible answer dataset-wide**, including both counting questions (always `"13"`, because `length_m` and `gravity_m_s2` are pinned for all 2,400 train videos).3. **No `question_subtype` / `question_family_index`**, so CLEVRER tooling cannot group or analyse them.
Result: a model that never watched a video scored **65.6%** on train descriptive.
## Result
| split | n | no-video baseline before | after | families | phrasings || --- | --- | --- | --- | --- | --- || root/train | 4,800 | 65.6% | **44.3%** | 12 | 36 || root/val | 1,200 | 64.0% | **43.0%** | 12 | 36 || intervened/train | 1,200 | 59.7% | **49.1%** | 14 | 36 || **CLEVRER descriptive (reference)** | 54,990 | — | **41.6%** | — | 7,475 |
## New schema
```json{ "question_type": "descriptive", "question_subtype": "query_light", "question_family_index": 9, "question_family": "query_light_travel", "question": "How far does the orange light source travel during the video?", "answer": "medium", "question_id": 0 }```
No `choices`. Every answer is one token from `answer_vocab.json` (44 tokens).Each family carries 3 paraphrases, mirroring CLEVRER's multiple text templatesper question family.
## Families
Sub-types follow CLEVRER's (`count` / `exist` / `query_*`):
| family | subtype | answers || --- | --- | --- || `count_swing_wide` | count | `0`–`15` || `count_swing_very_wide` | count | `0`–`13` || `count_turning_points` | count | `0`–`22` || `query_release_side` | query_side | left / right || `query_initial_direction` | query_direction | left / right / still || `query_release_amplitude` | query_amplitude | small / medium / large || `query_mid_amplitude` | query_amplitude | small / medium / large || `query_end_direction` | query_direction | left / right / still || `query_end_side` | query_position | left / right || `query_light_travel` | query_light | small / medium / large || `query_light_direction` | query_direction | left / right || `exist_still_swinging` | exist | yes / no || `query_intervention_target` | query_type | light / bob *(intervened only)* || `query_intervention_invariant` | query_invariant | bob / light *(intervened only)* || `query_energy_at_cut` | query_energy | smooth / jumps *(intervened only)* |
### Dropped
- `q_shadow_direction` — the shadow always moves with the bob. One answer, 652×.- `q_fastest_point` — the bob is always fastest at the bottom. One answer, 628×.- `q_bottom_passes` — always `"13"`; the period is fixed because `length_m = 1.0` and `g = 9.81` for every train video. Replaced by `count_swing_wide` / `count_swing_very_wide`, which count swings above an amplitude threshold and therefore **do** vary with damping (13–15 distinct answers).- `query_energy_end` — every train video loses 86–99.9% of its energy (γ ∈ 0.15–0.50), so the answer is near-constant.
## How it was built
No videos were downloaded or re-rendered. Re-simulating from `index.csv` with therepo's own `pendulum_gen.simulate` reproduces the shipped timeseries CSVs**bit-exactly** (max abs diff `0.0` on `theta_rad`, `theta_deg`, `omega_rad_s`,`light_angle_deg`, `energy_j_per_kg`, `bob_x_world`, `shadow_left_world`, `mid`),so parental facts are exact. For the intervened subset the shipped`intervened/timeseries/*.csv` are used directly, because the `torque_push`impulse could not be reproduced to better than 0.30° from `intervention_params`alone.
Intervention facts are computed on frames **0–95 only** (pre-intervention), and`exist_still_swinging` is gated off for that window — over 8 s the bob is alwaysstill swinging, which would make the answer constant.
Answers are balanced by a greedy sampler that prefers the currentlyleast-represented `(family, answer)` pair across the split. Thresholds thatproduce a binary answer are set at the empirical train median(`OMEGA_STILL = 0.196` rad/s) rather than a round number, which is what makes`exist_still_swinging` exactly 50/50.
A `MARGIN_DEG = 0.25` / `MARGIN_OMEGA = 0.01` gate skips any question whosedeciding value sits within the margin of a threshold; without it `video_10595`flipped `count_swing_very_wide` between 4 and 5 at 96 vs 192 Hz.
## Files
```questions_v2.py family definitions + balanced samplerregenerate_descriptive.py writes out/**verify_descriptive.py schema / vocab / balance gatescrosscheck_answers.py answers vs independent ground truthresolution_check.py answers vs 2x integration resolutionbalance_report.json per-family distribution, per split```
Reproduce:
```bashpython3 regenerate_descriptive.pypython3 verify_descriptive.pypython3 crosscheck_answers.pypython3 resolution_check.py```
## Verification
| check | result || --- | --- || question count per video unchanged (8 / 8 / 14) | PASS || non-descriptive questions byte-identical | PASS, 0 videos differ || no descriptive question has `choices` | PASS (7,200) || all answers single-word and in vocabulary | PASS || all have `question_subtype` + `question_family_index` | PASS || no family 100% guessable | PASS (worst: 54.7%) || answers vs independent recomputation from CSVs | 0 mismatches / 1,280 || answers vs 2× integration resolution (192 Hz) | 0 changed / 7,200 |
The independent recomputation deliberately does not import `questions_v2`; itderives velocity by finite-differencing the angle series rather than using theintegrated `omega_rad_s` column, so agreement is real evidence. It initiallydisagreed on 69 answers, all off-by-one counts — the checker was wrong, not thegenerator: a bob released at max displacement with a small outward velocityturns around *inside the first frame interval* (e.g. `video_00150`, turn atframe 0.2, amplitude 33.32°), which a pure-difference detector cannot see.
## Known limitation
The counting questions still cannot reach CLEVRER's answer diversity, because`length_m` and `gravity_m_s2` are constant across train. Fixing that needs are-render: one line in `pendulum_gen.sample_config`(`cfg.length_m = rng.uniform(0.5, 2.0)` in the `ID` branch) would spread theswing period and therefore every count. Note that `scene_geometry` draws the armat the constant `DRAW_LENGTH = 8.0` and never reads `length_m`, so the pixelswould be unchanged while the labels' `bob_x_m` / `energy_j_per_kg` would acquirean `L` dependence — decide whether to scale `DRAW_LENGTH` too before doing it.
Functional programs (`program` / `my_program`) are still absent. Adding themrequires a DSL and executor over pendulum state and is out of scope here.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539[ { "tag": "root/train", "family": "query_release_side", "n": 454, "distinct_answers": 2, "majority": 0.5022, "phrasings": 3, "distribution": { "right": 228, "left": 226 } }, { "tag": "root/train", "family": "query_release_amplitude", "n": 426, "distinct_answers": 3, "majority": 0.3521, "phrasings": 3, "distribution": { "medium": 150, "small": 143, "large": 133 } }, { "tag": "root/train", "family": "count_turning_points", "n": 426, "distinct_answers": 2, "majority": 0.5023, "phrasings": 3, "distribution": { "13": 214, "14": 212 } }, { "tag": "root/train", "family": "query_initial_direction", "n": 424, "distinct_answers": 3, "majority": 0.4788, "phrasings": 3, "distribution": { "left": 203, "right": 196, "still": 25 } }, { "tag": "root/train", "family": "query_end_direction", "n": 421, "distinct_answers": 3, "majority": 0.4869, "phrasings": 3, "distribution": { "still": 205, "left": 109, "right": 107 } }, { "tag": "root/train", "family": "query_end_side", "n": 417, "distinct_answers": 2, "majority": 0.5444, "phrasings": 3, "distribution": { "left": 227, "right": 190 } }, { "tag": "root/train", "family": "query_light_travel", "n": 416, "distinct_answers": 3, "majority": 0.3774, "phrasings": 3, "distribution": { "medium": 157, "small": 137, "large": 122 } }, { "tag": "root/train", "family": "exist_still_swinging", "n": 376, "distinct_answers": 2, "majority": 0.516, "phrasings": 3, "distribution": { "no": 194, "yes": 182 } }, { "tag": "root/train", "family": "count_swing_very_wide", "n": 373, "distinct_answers": 10, "majority": 0.2869, "phrasings": 3, "distribution": { "0": 107, "2": 68, "1": 57, "3": 54, "4": 37, "5": 23, "6": 17, "7": 6, "8": 3, "9": 1 } }, { "tag": "root/train", "family": "query_light_direction", "n": 368, "distinct_answers": 2, "majority": 0.5082, "phrasings": 3, "distribution": { "left": 187, "right": 181 } }, { "tag": "root/train", "family": "query_mid_amplitude", "n": 366, "distinct_answers": 3, "majority": 0.5137, "phrasings": 3, "distribution": { "medium": 188, "small": 163, "large": 15 } }, { "tag": "root/train", "family": "count_swing_wide", "n": 333, "distinct_answers": 13, "majority": 0.2042, "phrasings": 3, "distribution": { "3": 68, "2": 59, "4": 53, "5": 37, "1": 37, "6": 27, "7": 16, "0": 16, "8": 9, "9": 6, "11": 3, "10": 1, "12": 1 } }, { "tag": "root/val", "family": "query_initial_direction", "n": 126, "distinct_answers": 3, "majority": 0.4841, "phrasings": 3, "distribution": { "left": 61, "right": 58, "still": 7 } }, { "tag": "root/val", "family": "query_release_side", "n": 118, "distinct_answers": 2, "majority": 0.5169, "phrasings": 3, "distribution": { "right": 61, "left": 57 } }, { "tag": "root/val", "family": "count_turning_points", "n": 116, "distinct_answers": 13, "majority": 0.3448, "phrasings": 3, "distribution": { "13": 40, "14": 31, "12": 11, "6": 8, "5": 6, "8": 5, "21": 5, "9": 3, "15": 3, "20": 1, "18": 1, "11": 1, "16": 1 } }, { "tag": "root/val", "family": "query_end_direction", "n": 109, "distinct_answers": 3, "majority": 0.3761, "phrasings": 3, "distribution": { "left": 41, "still": 36, "right": 32 } }, { "tag": "root/val", "family": "exist_still_swinging", "n": 106, "distinct_answers": 2, "majority": 0.6604, "phrasings": 3, "distribution": { "yes": 70, "no": 36 } }, { "tag": "root/val", "family": "query_mid_amplitude", "n": 100, "distinct_answers": 3, "majority": 0.41, "phrasings": 3, "distribution": { "medium": 41, "large": 31, "small": 28 } }, { "tag": "root/val", "family": "query_release_amplitude", "n": 100, "distinct_answers": 3, "majority": 0.45, "phrasings": 3, "distribution": { "large": 45, "medium": 32, "small": 23 } }, { "tag": "root/val", "family": "query_light_travel", "n": 96, "distinct_answers": 3, "majority": 0.375, "phrasings": 3, "distribution": { "large": 36, "medium": 32, "small": 28 } }, { "tag": "root/val", "family": "query_end_side", "n": 91, "distinct_answers": 2, "majority": 0.5055, "phrasings": 3, "distribution": { "right": 46, "left": 45 } }, { "tag": "root/val", "family": "count_swing_wide", "n": 90, "distinct_answers": 15, "majority": 0.1444, "phrasings": 3, "distribution": { "2": 13, "13": 13, "3": 9, "0": 8, "1": 8, "14": 7, "6": 7, "4": 6, "12": 4, "7": 4, "9": 4, "5": 3, "11": 2, "10": 1, "8": 1 } }, { "tag": "root/val", "family": "query_light_direction", "n": 78, "distinct_answers": 2, "majority": 0.5385, "phrasings": 3, "distribution": { "right": 42, "left": 36 } }, { "tag": "root/val", "family": "count_swing_very_wide", "n": 70, "distinct_answers": 14, "majority": 0.2857, "phrasings": 3, "distribution": { "0": 20, "2": 8, "12": 8, "1": 7, "13": 7, "3": 5, "7": 4, "5": 3, "14": 2, "6": 2, "8": 1, "10": 1, "4": 1, "9": 1 } }, { "tag": "intervened/train", "family": "query_intervention_target", "n": 240, "distinct_answers": 2, "majority": 0.5, "phrasings": 1, "distribution": { "light": 120, "bob": 120 } }, { "tag": "intervened/train", "family": "query_intervention_invariant", "n": 240, "distinct_answers": 2, "majority": 0.5, "phrasings": 1, "distribution": { "bob": 120, "light": 120 } }, { "tag": "intervened/train", "family": "query_energy_at_cut", "n": 240, "distinct_answers": 2, "majority": 0.5, "phrasings": 1, "distribution": { "smooth": 120, "jumps": 120 } }, { "tag": "intervened/train", "family": "query_release_side", "n": 52, "distinct_answers": 2, "majority": 0.5192, "phrasings": 3, "distribution": { "right": 27, "left": 25 } }, { "tag": "intervened/train", "family": "count_turning_points", "n": 51, "distinct_answers": 2, "majority": 0.5294, "phrasings": 3, "distribution": { "7": 27, "8": 24 } }, { "tag": "intervened/train", "family": "query_initial_direction", "n": 51, "distinct_answers": 3, "majority": 0.549, "phrasings": 3, "distribution": { "left": 28, "right": 21, "still": 2 } }, { "tag": "intervened/train", "family": "query_end_side", "n": 49, "distinct_answers": 2, "majority": 0.5102, "phrasings": 3, "distribution": { "right": 25, "left": 24 } }, { "tag": "intervened/train", "family": "count_swing_very_wide", "n": 46, "distinct_answers": 6, "majority": 0.2609, "phrasings": 3, "distribution": { "0": 12, "2": 9, "3": 8, "1": 8, "4": 7, "5": 2 } }, { "tag": "intervened/train", "family": "query_release_amplitude", "n": 45, "distinct_answers": 3, "majority": 0.4222, "phrasings": 3, "distribution": { "medium": 19, "small": 18, "large": 8 } }, { "tag": "intervened/train", "family": "query_light_travel", "n": 41, "distinct_answers": 3, "majority": 0.4634, "phrasings": 3, "distribution": { "medium": 19, "small": 16, "large": 6 } }, { "tag": "intervened/train", "family": "count_swing_wide", "n": 40, "distinct_answers": 9, "majority": 0.2, "phrasings": 3, "distribution": { "4": 8, "3": 7, "1": 7, "2": 5, "6": 3, "8": 3, "0": 3, "5": 3, "7": 1 } }, { "tag": "intervened/train", "family": "query_mid_amplitude", "n": 36, "distinct_answers": 3, "majority": 0.8056, "phrasings": 3, "distribution": { "medium": 29, "large": 5, "small": 2 } }, { "tag": "intervened/train", "family": "query_end_direction", "n": 36, "distinct_answers": 3, "majority": 0.5, "phrasings": 3, "distribution": { "left": 18, "right": 16, "still": 2 } }, { "tag": "intervened/train", "family": "query_light_direction", "n": 33, "distinct_answers": 2, "majority": 0.5152, "phrasings": 3, "distribution": { "left": 17, "right": 16 } }]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173{"question_types": {"descriptive": [{"template": "q_release_side","doc": ""},{"template": "q_bottom_passes","doc": ""},{"template": "q_end_motion","doc": ""},{"template": "q_envelope","doc": ""},{"template": "q_shadow_direction","doc": ""},{"template": "q_light_motion","doc": ""},{"template": "q_energy_shape","doc": ""},{"template": "q_fastest_point","doc": ""},{"template": "q_intervention_detect","doc": "intervention-focused question (v2)"},{"template": "q_intervention_invariant","doc": "intervention-focused question (v2)"},{"template": "q_energy_at_cut","doc": "intervention-focused question (v2)"},{"template": "q_light_rate_post_cut","doc": "intervention-focused question (v2)"}],"explanatory": [{"template": "q_why_decay","doc": ""},{"template": "q_why_stop_top","doc": ""},{"template": "q_shadow_cause","doc": ""},{"template": "q_no_return","doc": ""},{"template": "q_fastest_bottom_why","doc": ""},{"template": "q_beats_cause","doc": ""},{"template": "q_large_angle_slow","doc": ""},{"template": "q_shadow_light_coupling","doc": "intervention-focused question (v2)"},{"template": "q_push_causality","doc": "intervention-focused question (v2)"}],"predictive": [{"template": "q_next_peak","doc": ""},{"template": "q_eventual","doc": ""},{"template": "q_after_direction","doc": ""},{"template": "q_cross_next_second","doc": ""},{"template": "q_shadow_future","doc": ""},{"template": "q_push_state_comparison","doc": "intervention-focused question (v2)"}],"counterfactual": [{"template": "q_cf_no_damping","doc": ""},{"template": "q_cf_add_damping","doc": ""},{"template": "q_cf_gravity","doc": ""},{"template": "q_cf_rod","doc": ""},{"template": "q_cf_mass","doc": ""},{"template": "q_cf_light","doc": ""},{"template": "q_cf_steeper","doc": ""},{"template": "q_cf_double_damping","doc": ""},{"template": "q_cf_drive_off","doc": ""},{"template": "q_cf_vacuum_quad","doc": ""},{"template": "q_cf_gravity_planet","doc": ""},{"template": "q_no_light_switch","doc": "intervention-focused question (v2)"},{"template": "q_no_push","doc": "intervention-focused question (v2)"}]},"answer_convention": "descriptive may be a free-form string or an index into 'choices' (legacy); explanatory/predictive/counterfactual = index into 'choices'"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263{"descriptive_style": "CLEVRER-style: open-ended, single-word, family-indexed, sub-typed, answer-balanced","descriptive_families": [{"question_family_index": 20,"question_subtype": "query_type","question_family": "query_intervention_target","question_templates": ["Around the 8-second mark, which part of the scene is directly changed?"],"answers": ["bob","light"]},{"question_family_index": 21,"question_subtype": "query_invariant","question_family": "query_intervention_invariant","question_templates": ["Around the 8-second mark, which part of the scene stays the same?"],"answers": ["bob","light"]},{"question_family_index": 22,"question_subtype": "query_energy","question_family": "query_energy_at_cut","question_templates": ["At the 8-second mark, what happens to the bob's mechanical energy?"],"answers": ["jumps","smooth"]},{"question_family_index": 10,"question_subtype": "query_direction","question_family": "query_light_direction","question_templates": ["At the beginning, which direction is the light source moving?","Which way does the light source set off at the start?","Which way is the orange light source drifting at the start of the video?"],"answers": ["left","right"]},{"question_family_index": 2,"question_subtype": "count","question_family": "count_turning_points","question_templates": ["How many times does the bob stop and turn around in this video?","Count the moments when the bob reverses direction in this video.","How many turning points does the bob reach in this video?"],"answers": ["7","8"]},{"question_family_index": 1,"question_subtype": "count","question_family": "count_swing_very_wide","question_templates": ["How many swings in this video are wider than 20 degrees?","Count the swings that reach more than 20 degrees in this video.","How many of the bob's swings in this video exceed 20 degrees?"],"answers": ["0","1","2","3","4","5"]},{"question_family_index": 9,"question_subtype": "query_light","question_family": "query_light_travel","question_templates": ["How much does the orange light source move in this video?","Over the video, how large is the light source's sweep?","How far does the orange light source travel during the video?"],"answers": ["large","medium","small"]},{"question_family_index": 0,"question_subtype": "count","question_family": "count_swing_wide","question_templates": ["How many swings in this video are wider than 15 degrees?","Count the swings that reach more than 15 degrees in this video.","How many of the bob's swings in this video exceed 15 degrees?"],"answers": ["0","1","2","3","4","5","6","7","8"]},{"question_family_index": 8,"question_subtype": "query_position","question_family": "query_end_side","question_templates": ["Which side of the pivot is the bob on in the last frame of the video?","At the end of the video, is the bob on the left or the right?","Which side of the pivot does the bob finish on?"],"answers": ["left","right"]},{"question_family_index": 4,"question_subtype": "query_direction","question_family": "query_initial_direction","question_templates": ["Which way is the bob moving at the very start of the video?","Which way does the bob set off at the start of the video?","At the first frame, which direction is the bob travelling?"],"answers": ["left","right","still"]},{"question_family_index": 6,"question_subtype": "query_amplitude","question_family": "query_mid_amplitude","question_templates": ["Around the middle of the video, how wide is the swing?","How wide is the swing at the midpoint of the video?","How wide is the bob's swing halfway through the video?"],"answers": ["large","medium","small"]},{"question_family_index": 7,"question_subtype": "query_direction","question_family": "query_end_direction","question_templates": ["In the last second, which direction is the bob travelling?","Which way is the bob moving during the final second of the video?","Which way is the bob swinging as the video ends?"],"answers": ["left","right","still"]},{"question_family_index": 3,"question_subtype": "query_side","question_family": "query_release_side","question_templates": ["At the beginning of the video, is the bob on the left or the right?","Which side of the pivot was the bob released from at the start of the video?","Which side of the pivot does the bob start on?"],"answers": ["left","right"]},{"question_family_index": 5,"question_subtype": "query_amplitude","question_family": "query_release_amplitude","question_templates": ["How wide is the bob's first swing?","How wide is the swing the bob starts with?","How large is the bob's initial swing?"],"answers": ["large","medium","small"]}],"other_question_types": ["explanatory","predictive","counterfactual"],"answer_convention": "descriptive: single-word string from answer_vocab.json; others: index into 'choices'","answer_vocab": ["0","1","10","11","12","13","14","15","16","17","18","19","2","20","21","22","23","24","25","26","27","28","29","3","30","31","4","5","6","7","8","9","bob","jumps","large","left","light","medium","no","right","small","smooth","still","yes"]}
CHANGES.mdAdded+159
balance_report.jsonAdded+539
intervened/questions/questions_train.json
intervened/questions/taxonomy.json+260-170