Update README.md
Browse files12343 unmodified lines474849505152535476 unmodified lines131132133134135---license: mitlanguage: en43 unmodified lines├── wds/│ ├── train/pendulum-train-000000.tar ... 000018.tar # 19 train WebDataset shards (128/shard)│ └── val/pendulum-val-000000.tar ... 000004.tar # 5 val WebDataset shards (128/shard)├── model/ # Videosaur DINOv2 model checkpoints & logs│ └── pendulum-videosaur-20261022-194905/│ └── videosaur_pendulum/20261022-194905_pendulum_dinov2/│ ├── checkpoints/ # step=34000.ckpt, step=100000.ckpt│ ├── metrics/ # version_1/metrics.csv, version_2/metrics.csv76 unmodified linesTrained **Videosaur** (`dinov2`) object-centric video model on the pendulum dataset (`model/pendulum-videosaur-20261022-194905/videosaur_pendulum/20261022-194905_pendulum_dinov2/`):- **Checkpoints**: `checkpoints/step=34000.ckpt`, `checkpoints/step=100000.ckpt`- **Config**: `settings.yaml`- **Logs**: `metrics/version_1/metrics.csv`, `metrics/version_2/metrics.csv`, and TensorBoard event logs under `tb/`123443 unmodified lines4849505152535455565776 unmodified lines134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259```markdown---license: mitlanguage: en43 unmodified lines├── wds/│ ├── train/pendulum-train-000000.tar ... 000018.tar # 19 train WebDataset shards (128/shard)│ └── val/pendulum-val-000000.tar ... 000004.tar # 5 val WebDataset shards (128/shard)├── model/ # Videosaur DINOv2 model checkpoints, logs & extracted slots│ └── pendulum-videosaur-20261022-194905/│ ├── extraction/│ │ └── pendulum_videosaur_4slots_step=100000.pkl # Extracted 4-slot embeddings (train + val)│ └── videosaur_pendulum/20261022-194905_pendulum_dinov2/│ ├── checkpoints/ # step=34000.ckpt, step=100000.ckpt│ ├── metrics/ # version_1/metrics.csv, version_2/metrics.csv76 unmodified linesTrained **Videosaur** (`dinov2`) object-centric video model on the pendulum dataset (`model/pendulum-videosaur-20261022-194905/videosaur_pendulum/20261022-194905_pendulum_dinov2/`):- **Checkpoints**: `checkpoints/step=34000.ckpt`, `checkpoints/step=100000.ckpt`- **Extracted Slots**: `extraction/pendulum_videosaur_4slots_step=100000.pkl` (4-slot embeddings for parental `train` + `val`)- **Config**: `settings.yaml`- **Logs**: `metrics/version_1/metrics.csv`, `metrics/version_2/metrics.csv`, and TensorBoard event logs under `tb/`---## Part 4: 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** — copied byte-identical from the shipped files.### What changedThe 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 templates per question family.### FamiliesSub-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 builtNo videos were downloaded or re-rendered. Re-simulating from `index.csv` with the repo'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 always still swinging, which would make the answer constant.Answers are balanced by a greedy sampler that prefers the currently least-represented `(family, answer)` pair across the split. Thresholds that produce 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 whose deciding 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`; it derives velocity by finite-differencing the angle series rather than using the integrated `omega_rad_s` column, so agreement is real evidence. It initially disagreed on 69 answers, all off-by-one counts — the checker was wrong, not the generator: a bob released at max displacement with a small outward velocity turns around *inside the first frame interval* (e.g. `video_00150`, turn at frame 0.2, amplitude 33.32°), which a pure-difference detector cannot see.### Known limitationThe counting questions still cannot reach CLEVRER's answer diversity, because `length_m` and `gravity_m_s2` are constant across train. Fixing that needs a re-render: one line in `pendulum_gen.sample_config` (`cfg.length_m = rng.uniform(0.5, 2.0)` in the `ID` branch) would spread the swing period and therefore every count. Note that `scene_geometry` draws the arm at the constant `DRAW_LENGTH = 8.0` and never reads `length_m`, so the pixels would be unchanged while the labels' `bob_x_m` / `energy_j_per_kg` would acquire an `L` dependence — decide whether to scale `DRAW_LENGTH` too before doing it.Functional programs (`program` / `my_program`) are still absent. Adding them requires a DSL and executor over pendulum state and is out of scope here.```
README.md+125-1