Delete CHANGES.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159# 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.CHANGES.mdDeleted-159