GGOSinon commited on
Commit
7ecdca3
·
verified ·
1 Parent(s): 364b438

Upload folder using huggingface_hub

Browse files
notes/RENDER_DATASET.md ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Rendering the CLEVR-10 dataset on another machine
2
+
3
+ Instructions for a Claude agent to reproduce the **`clevr_gen10_1M`** dataset (Blender-rendered
4
+ CLEVR, 10 objects, 320×240) that the SparseWM project trains on. Self-contained: you do **not**
5
+ need access to the machine that produced the original.
6
+
7
+ ---
8
+
9
+ ## 0. What you are producing
10
+
11
+ The pipeline renders CLEVR scenes with Blender and post-processes each batch into three aligned
12
+ `.npy` files per **chunk** of 5,000 scenes. The full set is **200 chunks × 5,000 = 1,000,000 scenes**.
13
+
14
+ Output directory (call it `$OUT`) ends up with, for each chunk `KKKK` = `0000`…`0199`:
15
+
16
+ | file | shape / dtype | meaning |
17
+ |---|---|---|
18
+ | `states_chunk{KKKK}.npy` | `(5000, 10, 7)` float32 | per-object GT state (see below) |
19
+ | `images320_chunk{KKKK}.npy`| `(5000, 240, 320, 3)` uint8 | native Blender render |
20
+ | `images192_chunk{KKKK}.npy`| `(5000, 128, 192, 3)` uint8 | LANCZOS-resized (what training streams) |
21
+
22
+ **State layout** (per object, matches `SparseWM/CLAUDE.md`):
23
+ `[presence, shape, color, size, material, posX, posY]`
24
+ - `presence`: 1.0 if the slot holds an object, else 0.0. Up to 10 objects; extra slots are zero.
25
+ - `shape`: 0=cube, 1=sphere, 2=cylinder
26
+ - `color`: 0..7 = gray, red, blue, green, brown, purple, cyan, yellow
27
+ - `size`: **0=large, 1=small**
28
+ - `material`: 0=rubber, 1=metal
29
+ - `posX, posY`: Blender 3D x/y mapped `[-3,3] → [0.2,0.8]` (clamped). *Not* pixel coords.
30
+
31
+ You can render **fewer** chunks if you don't need the full 1M — the format is identical; just
32
+ render a contiguous range of chunk indices. The downstream loader
33
+ (`SparseWM/scripts/async_chunk_loader.py`) globs whatever `*_chunk*.npy` files exist and holds one
34
+ chunk out as validation.
35
+
36
+ ---
37
+
38
+ ## 1. Prerequisites
39
+
40
+ - **Linux x86_64** with glibc ≥ 2.19 (required by the prebuilt Blender 2.79b binary below).
41
+ On macOS/ARM you must instead download the matching Blender **2.79b** build for your OS — the
42
+ render scripts are 2.79-specific and will *not* run on Blender ≥ 2.8.
43
+ - **Blender 2.79b** (see §2). CLEVR's scripts break on newer Blender.
44
+ - **A separate Python 3** (your normal env, NOT Blender's bundled Python) with `numpy` and
45
+ `Pillow`. This runs the post-processing step. Any recent numpy/Pillow is fine.
46
+ - **GPU (optional but ~10× faster).** CUDA GPU → render with `--use_gpu 1`. No GPU → `--use_gpu 0`
47
+ (CPU CYCLES; correct output, just slow). At `--render_num_samples 128`, GPU is ~seconds/image,
48
+ CPU is ~minutes/image.
49
+ - Disk: full 1M is ~**300 GB** (images320 dominates at ~1.5 GB/chunk). One chunk ≈ 1.85 GB.
50
+ Render to **node-local/fast scratch**, not a network filesystem, then move the `.npy` out.
51
+
52
+ ---
53
+
54
+ ## 2. Get the code + Blender
55
+
56
+ The generator is a lightly patched fork of `facebookresearch/clevr-dataset-gen`. Two things are
57
+ **not** in the upstream repo and must be added: a `--seed`/resume patch to `render_images.py`, and
58
+ a new `postprocess_chunk.py`. Both are given inline below so this doc is self-contained.
59
+
60
+ ```bash
61
+ git clone https://github.com/facebookresearch/clevr-dataset-gen.git
62
+ cd clevr-dataset-gen
63
+
64
+ # Blender 2.79b (Linux x86_64 glibc219). ~145 MB.
65
+ mkdir -p blender_dl && cd blender_dl
66
+ wget https://download.blender.org/release/Blender2.79/blender-2.79b-linux-glibc219-x86_64.tar.bz2
67
+ tar xjf blender-2.79b-linux-glibc219-x86_64.tar.bz2
68
+ cd ..
69
+ # sanity: prints "Blender 2.79 (sub 0)"
70
+ ./blender_dl/blender-2.79b-linux-glibc219-x86_64/blender --background --version
71
+ ```
72
+
73
+ > **Shortcut if you *do* have SSH access to the source machine:** skip cloning/patching entirely and
74
+ > just copy the ready-to-run tree (includes the Blender binary and both custom files):
75
+ > `rsync -a <srchost>:/global/home/users/kwanyoungpark/projects/clevr-dataset-gen/ ./clevr-dataset-gen/`
76
+ > Then jump to §4.
77
+
78
+ ### 2a. Patch `image_generation/render_images.py`
79
+
80
+ Two edits: add a `--seed` argument, seed RNG in `main()`, and make rendering resume-safe.
81
+
82
+ Add after the `--num_images` argument (near the other `parser.add_argument` lines):
83
+ ```python
84
+ parser.add_argument('--seed', default=-1, type=int,
85
+ help="Random seed for reproducible/unique chunks (>=0 seeds random; -1 = time-based)")
86
+ ```
87
+ At the top of `def main(args):` (before `num_digits = 6`):
88
+ ```python
89
+ if args.seed >= 0:
90
+ random.seed(args.seed)
91
+ ```
92
+ Inside the per-image loop in `main`, right after `all_scene_paths.append(scene_path)`:
93
+ ```python
94
+ if os.path.isfile(img_path) and os.path.isfile(scene_path): # resume-safe: skip already-rendered
95
+ continue
96
+ ```
97
+
98
+ ### 2b. Create `image_generation/postprocess_chunk.py`
99
+
100
+ This converts one chunk's temp `{scenes/*.json, images/*.png}` into the three `.npy` arrays and
101
+ deletes the temp. Copy verbatim:
102
+
103
+ ```python
104
+ """Post-process one generated chunk: temp {scenes/*.json, images/*.png} -> aligned npy arrays, then delete temp.
105
+ Outputs states_chunkKKKK.npy (N,10,7), images320_chunkKKKK.npy (N,240,320,3 uint8), images192_chunkKKKK.npy (N,128,192,3 uint8)."""
106
+ import json, glob, os, sys, shutil, numpy as np
107
+ from PIL import Image
108
+
109
+ tmp, K, out = sys.argv[1], int(sys.argv[2]), sys.argv[3]
110
+ COLORS = ['gray', 'red', 'blue', 'green', 'brown', 'purple', 'cyan', 'yellow']
111
+ SHAPES = ['cube', 'sphere', 'cylinder']; SIZES = ['large', 'small']; MATS = ['rubber', 'metal']
112
+ ci = {c: i for i, c in enumerate(COLORS)}; si = {s: i for i, s in enumerate(SHAPES)}
113
+ zi = {z: i for i, z in enumerate(SIZES)}; mi = {m: i for i, m in enumerate(MATS)}
114
+ MAXO = 10
115
+
116
+ scenes = sorted(glob.glob(f"{tmp}/scenes/*.json"))
117
+ images = sorted(glob.glob(f"{tmp}/images/*.png"))
118
+ assert len(scenes) == len(images) and len(scenes) > 0, f"mismatch/empty: {len(scenes)} scenes vs {len(images)} imgs"
119
+ n = len(scenes)
120
+ states = np.zeros((n, MAXO, 7), dtype=np.float32)
121
+ im320 = np.zeros((n, 240, 320, 3), dtype=np.uint8)
122
+ im192 = np.zeros((n, 128, 192, 3), dtype=np.uint8)
123
+ def m01(v): return 0.2 + (min(3.0, max(-3.0, v)) + 3.0) / 6.0 * 0.6 # 3d [-3,3] -> [0.2,0.8]
124
+ for i, (sp, ip) in enumerate(zip(scenes, images)):
125
+ sc = json.load(open(sp))
126
+ for j, o in enumerate(sc['objects'][:MAXO]):
127
+ x, y = o['3d_coords'][0], o['3d_coords'][1]
128
+ states[i, j] = [1.0, si[o['shape']], ci[o['color']], zi[o['size']], mi[o['material']], m01(x), m01(y)]
129
+ im = Image.open(ip).convert('RGB') # 320x240
130
+ im320[i] = np.asarray(im, np.uint8)
131
+ im192[i] = np.asarray(im.resize((192, 128), Image.LANCZOS), np.uint8)
132
+ os.makedirs(out, exist_ok=True)
133
+ kk = f"{K:04d}"
134
+ # write to .tmp then rename (atomic -> resume never sees a half-written chunk)
135
+ for nm, arr in [(f"states_chunk{kk}", states), (f"images320_chunk{kk}", im320), (f"images192_chunk{kk}", im192)]:
136
+ np.save(f"{out}/{nm}.npy.tmp", arr); os.replace(f"{out}/{nm}.npy.tmp.npy", f"{out}/{nm}.npy")
137
+ shutil.rmtree(tmp, ignore_errors=True)
138
+ print(f"CHUNK {K} DONE: {n} imgs -> {out}/*_chunk{kk}.npy", flush=True)
139
+ ```
140
+
141
+ ---
142
+
143
+ ## 3. Smoke test (do this FIRST — ~1–2 min on GPU)
144
+
145
+ Render 8 images and confirm the arrays come out right before committing to a long run.
146
+
147
+ ```bash
148
+ cd image_generation
149
+ BL=../blender_dl/blender-2.79b-linux-glibc219-x86_64/blender
150
+ PY=python3 # your numpy+Pillow python (NOT blender's)
151
+ OUT=/path/to/scratch/clevr_gen10_smoke; rm -rf "$OUT"; mkdir -p "$OUT"
152
+ TMP=/tmp/gensmoke_$$; rm -rf "$TMP"; mkdir -p "$TMP/images" "$TMP/scenes"
153
+
154
+ $BL --background --python render_images.py -- \
155
+ --num_images 8 --start_idx 0 --seed 0 --min_objects 3 --max_objects 10 \
156
+ --use_gpu 1 --width 320 --height 240 --render_num_samples 128 \
157
+ --output_image_dir "$TMP/images" --output_scene_dir "$TMP/scenes" --output_scene_file "$TMP/scenes.json"
158
+
159
+ $PY postprocess_chunk.py "$TMP" 0 "$OUT"
160
+ $PY -c "import numpy as np; s=np.load('$OUT/states_chunk0000.npy'); \
161
+ print('states', s.shape, 'objs/scene', [int((s[i,:,0]>0.5).sum()) for i in range(len(s))])"
162
+ ```
163
+ Expect: `states (8, 10, 7)` and each scene reporting 3–10 present objects. If you see that, the
164
+ pipeline works. (No GPU? use `--use_gpu 0`; it will just be much slower.)
165
+
166
+ ---
167
+
168
+ ## 4. Render one full chunk (5,000 scenes)
169
+
170
+ This is the unit of work. `K` is the chunk index (`0`…`199` for the full 1M).
171
+
172
+ ```bash
173
+ cd image_generation
174
+ BL=../blender_dl/blender-2.79b-linux-glibc219-x86_64/blender
175
+ PY=python3
176
+ OUT=/path/to/scratch/clevr_gen10_1M; mkdir -p "$OUT"
177
+
178
+ K=0
179
+ KK=$(printf %04d $K)
180
+ # resume: skip a chunk that's already fully written
181
+ if [ -f "$OUT/states_chunk${KK}.npy" ] && [ -f "$OUT/images192_chunk${KK}.npy" ]; then
182
+ echo "chunk $K already done"; exit 0
183
+ fi
184
+ TMP=/tmp/gen1M_$$_$K; rm -rf "$TMP"; mkdir -p "$TMP/images" "$TMP/scenes"
185
+ $BL --background --python render_images.py -- \
186
+ --num_images 5000 --start_idx 0 --seed $K --min_objects 3 --max_objects 10 --use_gpu 1 \
187
+ --width 320 --height 240 --render_num_samples 128 \
188
+ --output_image_dir "$TMP/images" --output_scene_dir "$TMP/scenes" --output_scene_file "$TMP/scenes.json"
189
+ $PY postprocess_chunk.py "$TMP" $K "$OUT"
190
+ ```
191
+
192
+ **`--seed $K` is what makes each chunk a different 5,000 scenes** — same seed ⇒ identical scenes.
193
+ Use the chunk index as the seed so chunks never collide and the whole set is reproducible.
194
+
195
+ ---
196
+
197
+ ## 5. Scale up
198
+
199
+ ### Plain shell loop (single machine, sequential)
200
+ ```bash
201
+ for K in $(seq 0 199); do
202
+ KK=$(printf %04d $K)
203
+ [ -f "$OUT/states_chunk${KK}.npy" ] && [ -f "$OUT/images192_chunk${KK}.npy" ] && continue
204
+ TMP=/tmp/gen1M_$$_$K; rm -rf "$TMP"; mkdir -p "$TMP/images" "$TMP/scenes"
205
+ $BL --background --python render_images.py -- \
206
+ --num_images 5000 --start_idx 0 --seed $K --min_objects 3 --max_objects 10 --use_gpu 1 \
207
+ --width 320 --height 240 --render_num_samples 128 \
208
+ --output_image_dir "$TMP/images" --output_scene_dir "$TMP/scenes" --output_scene_file "$TMP/scenes.json"
209
+ $PY postprocess_chunk.py "$TMP" $K "$OUT"
210
+ done
211
+ ```
212
+ Run several of these in parallel over disjoint `K` ranges if you have multiple GPUs. Because each
213
+ chunk is independent and the loop skips completed chunks, you can kill/restart freely.
214
+
215
+ ### SLURM array (how the original 1M was made)
216
+ 40-task array, 5 chunks per task (`K = task*5 + c`), 24h/task, `--requeue`, output to node-local
217
+ `/tmp`. The reference sbatch is on the source machine at
218
+ `~/projects/clevr-dataset-gen/gen_1M_10obj.sbatch` — adapt its `#SBATCH` header (account, partition,
219
+ qos, gres) to your cluster. Its body is exactly the §4 command wrapped in the §5 loop.
220
+
221
+ ---
222
+
223
+ ## 6. Verify the output
224
+
225
+ ```bash
226
+ $PY - <<'PY'
227
+ import glob, numpy as np, os
228
+ OUT=os.environ.get("OUT","/path/to/scratch/clevr_gen10_1M")
229
+ ch=sorted(glob.glob(f"{OUT}/states_chunk*.npy"))
230
+ print("chunks:", len(ch))
231
+ s=np.load(ch[0]); im=np.load(ch[0].replace("states","images192"))
232
+ assert s.shape[1:]==(10,7) and im.shape[1:]==(128,192,3), (s.shape, im.shape)
233
+ pres=(s[...,0]>0.5).sum(1)
234
+ print("states", s.shape, "images192", im.shape, "dtype", im.dtype)
235
+ print("objs/scene min/max:", int(pres.min()), int(pres.max())) # expect 3..10
236
+ print("shape vals:", np.unique(s[...,1][s[...,0]>0])) # {0,1,2}
237
+ print("color vals:", np.unique(s[...,2][s[...,0]>0])) # 0..7
238
+ print("posX range:", float(s[...,5][s[...,0]>0].min()), float(s[...,5][s[...,0]>0].max())) # ~[0.2,0.8]
239
+ PY
240
+ ```
241
+
242
+ Once verified, this directory is a drop-in `--chunk-dir` for
243
+ `SparseWM/scripts/enc_vqa_maskproj.py` / `enc_supervised_gt_clevr.py`
244
+ (`--chunk-img-prefix images192`). To share it, upload as a WebDataset with
245
+ `SparseWM/scripts/clevr_to_webdataset.py` (the 1M set already lives at HF
246
+ `GGOSinon/clevr-1M-128x192`).
247
+
248
+ ---
249
+
250
+ ## 7. Gotchas (these bite)
251
+
252
+ - **Two different Pythons.** Blender runs `render_images.py` with its *own* bundled interpreter
253
+ (has `bpy`, no numpy you control). `postprocess_chunk.py` runs with *your* system Python (needs
254
+ numpy + Pillow). Don't try to `import bpy` outside Blender or `import numpy` inside the render.
255
+ - **Render to local disk.** Writing 5,000 PNGs to a network FS is painfully slow and can stall.
256
+ Render into node-local `/tmp/...`, post-process to `.npy`, then the `.npy` (only ~1.85 GB/chunk)
257
+ goes to shared storage. `postprocess_chunk.py` deletes the temp PNGs automatically.
258
+ - **`--use_gpu 1` needs a working CUDA setup** visible to Blender 2.79's CYCLES (set `CUDA_HOME`,
259
+ `PATH`, `LD_LIBRARY_PATH` for your CUDA install before launching Blender). If GPU init fails
260
+ Blender may silently fall back to CPU or error — check the first image's render time.
261
+ - **`--render_num_samples 128`** is a deliberate speed/quality tradeoff (upstream default is 512).
262
+ Keep 128 to match the existing dataset; raise it only if you want cleaner images (much slower).
263
+ - **Blender must be 2.79b.** 2.8+ removed `user_preferences` / changed the CYCLES API and the CLEVR
264
+ scripts will crash.
265
+ - **Resumability** relies on the atomic `.npy.tmp` → rename in post-processing and the
266
+ skip-if-exists checks. Never point two workers at the same chunk index simultaneously.
267
+ - **Determinism:** seed = chunk index. Same Blender build + same seed ⇒ identical scenes; different
268
+ Blender versions can produce slightly different renders even at the same seed.
269
+ ```
notes/claude-memory/MEMORY.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ - [H100 node setup](h100-node-setup.md) — this is a standalone 4xH100 node; env/data/DDP details
2
+ - [Scale baseline findings](scale-baseline-findings.md) — 96% plateau = encoder position precision at bin boundaries; tpi/decoder throughput numbers
3
+ - [Stage-2 binary protocol](stage2-binary-protocol.md) — default recovery eval: per-value binary bits, 3 tiers (atomic/per-slot/all-slots)
4
+ - [Stage-3 subspace findings](stage3-subspace-findings.md) — atomicity×task-breadth×data grid; +53pt OOD drop in single-task/mixed/infinite cell
5
+ - [Single-literal findings](single-literal-findings.md) — WORKING RECIPE "Y2" (97.5 bitmatch, no privileged info): gate-L0-only + lr-3e-4 re-heat at pinned tau; act-L1 freezes
6
+ - [BC cubecyl findings](bc-cubecyl-findings.md) — red→blue OOD collapse with atomic slots; color-mask/learned gate fixes it; MDN for multimodal demos
7
+ - [DINO backbone](dino-backbone.md) — --backbone dino_{s,b,l} pretrained ViT tower; frozen-B arm launched 2026-09-11 (runs/vqa_bal_dinoB_frozen)
8
+ - [GT-mask & gate findings](gtmask-gate-findings.md) — GT-mask ceilings (no gap for any code), gate 0/1 distributions (7 vs 500-800 open/task), balanced bitmatch, symmetry-breaking explanation
9
+ - [PACS baseline](pacs-baseline.md) — synthetic acceptance (joint L1+entropy collapses; bi-level alone 99.6), real sweep run names, eval-pass caveats
10
+ - [User timezone](user-timezone.md) — local clock is UTC−7; report ETAs in local time
11
+ - [S3 fast matrix](s3fast-matrix.md) — runs/s3fast.py (6 min/task), 8 codes × 15 datasets × tasks matrix launched Sep 16
12
+ - [Robotic replication](robotic-replication.md) — AttrPick Stage-3 matrix replication: design, scripts, launch state (2026-09-19)
13
+ - [HF results upload](hf-results-upload.md) — token at ~/.hidden (never print); results repo GGOSinon/sparsewm-stage3-eval, upload command
notes/claude-memory/bc-cubecyl-findings.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: bc-cubecyl-findings
3
+ description: "Closed-loop BC on cubecyl GT slots: red→blue compositional OOD collapses even with atomic slots; color-masking (oracle or learned L0 gate) eliminates the gap; MDN needed for multimodal demos"
4
+ metadata:
5
+ node_type: memory
6
+ type: project
7
+ originSessionId: fc0a8a62-25d1-45df-8e93-3a8afe205b5a
8
+ modified: 2026-09-07T23:05:57.667Z
9
+ ---
10
+
11
+ BC on cubecyl-lite-pickup GT slots (2026-09-07/08, `scripts/bc_cubecyl.py`, train redcube 156k → eval red/blue, 50 eps × 3 seeds):
12
+
13
+ - **Vanilla (all 10 fields): red 0.58, blue 0.01 — total compositional collapse despite PERFECTLY atomic slots.** Training scenes contain a red cylinder, so `is_cube` alone identifies the target; the policy still binds cube∧red. Atomicity ≠ identifiability of the readout — the closed-loop twin of the Stage-3 c2m lesson.
14
+ - **Oracle color-mask (zero is_red/is_blue/is_green): red 0.61, blue 0.71 — gap gone at zero cost.** With colors masked, bluecube test IS the training distribution (exact invariance; demonstrator actions are color-independent). One seed hit exact equality 0.56/0.56.
15
+ - **Learned stochastic L0 gate (10-dim global gate, λ=0.03 ramped 5k-10k): reproducibly discovers the right mask** (all 3 seeds: colors <0.5, is_cube/xyz open, yaw + is_EEF pruned — both provably redundant). Blue ≥ red in every seed (0.28→0.40, 0.20→0.32, 0.06→0.08) — OOD gap eliminated — but in-dist success is low/variable because gates hover mid-range (xyz stochastically dropped ~20% of forwards). **Gate COMMITMENT is the open problem**, not gate selection.
16
+ - **Policy class matters first**: MSE BC fails in-distribution (red 0.10) — the scripted demonstrator samples random left/right Bézier detours + hidden plan clock → multimodal action conditionals; MSE averages modes. Adding prev-actions makes it WORSE (copycat/causal confusion → 0.00). Fix: **5-component MDN head** (NLL, act = top-weight mean) → red 0.5-0.7. Episode-time feature is safe; action history is not.
17
+ - Rendering on this node: MUJOCO_GL=egl broken (poisons `import mujoco`); **osmesa works** after `apt install libosmesa6`; model needs `vis.global_.offwidth/offheight` raised before mujoco.Renderer; wandb.Video(numpy) needs moviepy.
18
+ - Artifact with results + 60 rollout videos: https://claude.ai/code/artifact/a8685979-64ba-468f-b218-e120a8c53e76 (videos also in `runs/videos/`).
19
+
20
+ **Fine-tuning + rule-only Stage-3 (2026-09-08) — the IDENTIFIABILITY LAW.** Fine-tune Y2 (97.5-bitmatch code) on shape2color-correlated scenes ("how many cubes", data/ft_shape2color = subspace chunks + full-dist eval chunk):
21
+ - Fresh head + gate-L0: train 100 / full-dist 40.4 — gate collapse PRUNED the cube column (hit 100%->0%), entrenching the shortcut. Mistimed sparsity makes it WORSE.
22
+ - Fresh head, no penalty: 51.8, noisy upward drift (dense stochastic gates = readout-level dropout slowly favors the transferable column; unstable).
23
+ - **FULL RESUME (pretrained head + committed gates + opt): 91.3 (peak 96.1)** — committed sparse routing survives fully-correlated fine-tuning; the late dip is continued L0 over-squeeze (8->5->2 open) — FREEZE/DECAY the routing penalty during fine-tune.
24
+ - Encoder code barely moves in all arms (bitmatch 94.7-97.9): fine-tuning corrupts READOUTS, not codes, at lr 1e-5.
25
+ Rule-only Stage-3 frozen-code one-task, 3 head-seeds (Y2 vs Z0-no-penalty, 15k-scene pools): c2m cell no drop for EITHER (Y2 +0.2±0.1, Z0 +0.6±0.2 — vacuous scenes identify the task); s2c or_count cell big drop for BOTH — **Y2 44.9±1.9 vs Z0 37.2±0.7: the DISENTANGLED code drops ~8pt MORE (crisper code = crisper shortcut; a committed rare-consequent bit is the best possible proxy)**. Drop magnitude follows PROXY INFORMATIVENESS (base rates): s2c consequent gray is rare (1/8) → strong cube-proxy → collapse; c2m consequent metal is common (1/2) → useless gray-proxy → no drop. stage3 gotchas: --one-task needs --single-category; --infinite-gen only for GT codes; pass --subspace-dir data/clevr_subspace_ruleonly (default dir is the old 1k pools -> CUDA assert via oversized ntr0); reps are deterministic — use new --head-seed for variance.
26
+ Proxy cells (2026-09-08, --one-task-spec): metal-anchored c2m ("how many metal") = NO drop (Y2 +2.8, Z0 +0.0 — a complete direct feature beats an incomplete rare proxy). Single-clause s2c ("how many cubes"), 3 head-seeds: **Y2 +85.1±0.2 vs Z0 +9.3±1.0** — deterministic, not bimodal. Mechanism: the head on the CRISP code learns the CONJUNCTION cube∧gray (val-perfect since all cubes gray; test counts only gray cubes → ~15%) — the exact readout the BC policy learned (cube∧red). **Crisp correlated bits invite conjunction co-adaptation (redundant ANDing is free in-rule); mushy codes resist because ANDing noisy proxies hurts.** So "crisper code = crisper shortcut" is really "crisper code = free conjunctions". Follow-ups (2026-09-08):
27
+ head-sparsity CANNOT break the conjunction — 5 variants (gate-l1 0/1e-3/1e-2, ramped AND from-step-0) all +84-86;
28
+ it is optimization-PREFERRED (correlated crisp bits = free in-rule ensembling/margin), not a timing artifact.
29
+ **Definitive (GT-bits cells, no encoder at all, 31 perfect fields):** penalty-free fresh head drops +56; adding stochastic
30
+ expected-L0 (the honest Stage-1-form penalty, ramped OR from-step-0) makes it WORSE (+84.7/+85.9) — L0 pressure prunes the
31
+ diluting weight and concentrates the head on the max-margin core = the conjunction. Gate-L0 SELECTS the shortcut, never
32
+ prevents it. **Gate-vector proof (GT-bits + L0 2e-3, "how many cubes"): learned gates = {cube: 1.00, gray: 1.00}, all 60 other columns 0.00 — the sparsity penalty delivered the conjunction verbatim as the 2-gate max-margin optimum, with the 1-gate cube-only solution unpicked.** Margin-vs-penalty economics: the second correlated feature doubles margin per unit norm; any survivable λ loses.
33
+ Also: min-norm/max-margin implicit bias provably splits weight across exactly-redundant features; imperfect (entangled/noisy)
34
+ features break the tie via CE and escape (+9) — "the entanglement migrates from the representation into the readout when data licenses it."
35
+ Dose: threshold not monotone (Y3 98.0-code +69, Y2 97.5-code +85, Z0 83.6-code +9 — crisp collapses, mushy does not).
36
+ **THE FIX: +5% full-dist scenes in the pool -> Y2 drop +85 -> +8.3 (cellB mix5)** — minimal identifying data beats all penalties.
37
+ FT-hot quartet (lr 1e-4, fresh head+gates, no recon, 15k): origin irrelevant — Z0 52.2/code 80.4, Y2 49.3/85.7,
38
+ Y2+gateL0 53.1/82.6, SUPERVISED-GT-trunk 47.1/81.7 — all converge to ~50 full-dist and the ~80-85 code attractor. Also: FT-hot (lr 1e-4, fresh head+gates, no recon) DESTROYS the sparse code either way (Y2 97.5 -> 85.7 no-penalty / 82.6 with gate-L0, full-dist ~50): at hot lr with fresh routing nothing protects.
39
+
40
+ **DISAMBIGUITY SOLVED (2026-09-09 overnight): BUDGETED ROUTING, by projection or search — never by penalty.**
41
+ - GT bits: hard TOP-1 gate (straight-through argmax; --gate-topk) → drop +6.3 (picked the ¬cube column = transferable complement). Dual-ascent λ (SAC-style, k=1) as implemented crushed the head (train 74.7) — tunable but unneeded.
42
+ - Learned code (8192 candidates): naive/annealed top-k UNDERFITS (winner churn, train ~74); **SUPPORT ENUMERATION wins: score every column as a sole count-readout by train acc → bit1685: train 99.0 / test 92.6 / drop +6.4** (runner-up +15.5 = the host-column trap SGD falls into). Scaling rule: projection for small candidate sets, discrete search for large.
43
+ - **BALANCED-POOL CLOSURE (user construction, 2026-09-09): generate scenes from the ORDINARY distribution then force the rule by editing states (all cubes -> gray) — preserves the label distribution exactly (rule-only mining truncates it: 99.7% of scenes <=2 cubes). Balanced GT cells: dense +45.9, stoch-L0 +44.1 (conjunction & penalty verdicts unchanged), TOP-1 = +0.0 — train/val/test all 100.0.** Old GT +56 = ~10 label-shift + ~46 conjunction; both cures together leave zero. `data/clevr_subspace_balanced/`.
44
+ - Y4 FINAL (180k re-heat): bitmatch 98.8 — color/shape/size/material 99.9, posX 98.0, posY 94.9 (0.1 short of the all-≥95 goal; one more short re-heat projected to close). ckpt runs/Y4_final180k.pt. Re-heat gains persist to at least +90k extra steps; keep rolling snapshots (peaks can transiently dip, e.g. 140k).
45
+ - NEXT (running): 2-literal cell — 160 dedup zh_count 2-literal tasks (--sl-two-dedup), Y recipe 4-GPU DDP + chained re-heat; question: does conjunctive supervision still yield atomic codes, or do task-conjunctions become code primitives?
46
+
47
+ **RENDERED balanced pool (2026-09-08, `data/clevr_subspace_rendered/`, 10k Blender scenes, all cubes gray, ordinary label dist):**
48
+ learned-code "how many cubes" cells, 3 head-seeds — **Z0 (mushy) drop +0.5±0.1 (transfer PERFECT); Y4 (crisp 98.8) dense +42.7±17 (bimodal 19/57/52); Y4+Stage-3 stoch-L0 +39.6±4.3 (no rescue)** — label balancing zeroes Z0's rule-only +9 (was pure label shift) and isolates the pure conjunction effect on real images: crisp codes collapse via cube∧gray, penalty selects it. Rendering: Blender 2.79b CYCLES on H100 WORKS with side-by-side CUDA 11.8 (`/usr/local/cuda-11.8`, `CUDA_BIN_PATH` env; CUDA 12 removes texture templates → kernel compile fails; 11.8 only deprecation-warns on `saturate`). ~1.6 s/img/worker, 13 workers ≈ 10k in 40 min; `--force_rule cube:gray` patch in `third_party/clevr-dataset-gen`; `runs/render_10k_gpu.sh`, collator `runs/collate_rendered.py`.
49
+
50
+ **3-LITERAL cells (2026-09-08, rendered pool, task OUTSIDE Stage-1's distribution: "how many small metal cubes" via new `--override-f1`; bank caps f1 at 2 literals):**
51
+ sole-column enum 55.3 (no such column exists — user's in-distribution objection confirmed for the 1-lit case); greedy per-slot AND stalls at 55.3 (joint payoff invisible to marginal gain); **GT-gate ceiling (bitmatch-chosen cols cube=bit1685/small=bit1974/metal=bit1171, slot-AND, test-set oracle): 98.2 — the atomic code COMPOSES**; Y4 dense head +8.1±0.9 (test 91.4); **Z0 dense CANNOT FIT: val 73, test 65 — mushy code fails compositional tasks in-distribution**; Y4 hard top-3: 1/3 seeds hits test 94.2/drop +1.7 (near ceiling), 2/3 underfit (churn). AMENDED LAW: disentanglement is anti-robust only where the entangled code sufficed (1-lit: Z0 +0.5 vs Y4 +43); on compositional tasks it dominates absolutely (91.4 vs 65) and budgeted routing approaches the 98 ceiling when it converges. NEXT: compose Stage-1's OWN single-literal learned gates (union for the question's literals) = fully-learned no-GT router.
52
+ - **COMPOSED ROUTING SOLVED (2026-09-08, `runs/compose_gates.py`): Stage-1's own single-literal gates + train-label calibration = ceiling.** Naive argmax of Stage-1 gate FAILS (33.6/10.8 — open sets hold 4-6 alias columns; argmax picks an alias whose polarity only the Stage-1 answer transformer decodes). Fix: per literal, pick (col, polarity) from the OPEN set by slot-sum count acc on the TRAINING pool (15 candidates, no GT, no test peeking) → cube=bit1685/off0, small=2013/off1, metal=604/off0 → **3-lit AND count 98.08 vs GT-gate ceiling 98.15; 1-lit cube 94.20 = enum = GT choice.** Full 3-lit ladder: blind greedy 55.3 < Z0 dense 65 < Y4 dense 91.4 < Y4 top-3 best-seed 94.2 < composed 98.1 ≈ oracle 98.2. Stage-1 sparsity supplies the routing prior; composition + calibration realize it on OOD tasks — the "carried-in committed routing" leg of the law, made compositional. Stage-1 question tokens for probing: `[CLS=1, fam=3(zh_count), F1M=15, 18+AVOFF[attr]+val, SEP=2]`, AVOFF color0/shape8/size11/material13, head = BinaryMaskProjHead(256,4,8,4096,16,60,29,stoch,pooled).
53
+ - **GROUP-TESTING SUPPORT SEARCH WORKS (2026-09-08, `runs/support_search.py`, user's algorithm + two amendments): support {1685=cube, 1647=~metal, 1713=~large(small, empty-slots-rest-1)} found in 5 rounds / 240 model-trainings, no GT, no OOD access — support-only val 98.2 / OOD 98.15 = the GT-gate oracle exactly; all 3 leave-one-out necessary (val drops to 0.60-0.64).** Amendments REQUIRED for alias-redundant codes: (1) universe peeling — recursion state is the shrinking universe U, NOT the spec's active-group list (under aliases every subgroup passes individually → active list empty → v2 returned {} after correctly cornering U to 256); (2) combined-removal verification + sequential backward elimination when aliases compensate across sibling groups. Oracle: batched per-slot MLP → mean-pool → count-class CE (Q-leading-dim einsum weights = true parallel training); **MSE + sigmoid-slot-sum head FAILS SILENTLY (constant predictor, val 0.32 = P(y=1)) — the affine calibration absorbs all gradient; CE count-classes fixed it (full-code val 99.7 @3k steps)**. Complexity: rounds O(log_{K/k}(d/k)) (needs K>k), queries O(K·log), serial cost = sequential peel in early rounds only. Fixed oracle-gate stage3 cell (`--force-gate-cols`, INTERLEAVED layout: raw bit c -> 2c+1, NOT 4096+c — first attempt hit marginal 65 on garbage cols): tr 100 / val 98.7 / test 98.3±0.1 — committed routing + freely-learned transformer = ceiling; 3-lit ladder final: enum 55 < Z0 65 < Y4dense 91.4 < topk3-best 94.2 < composed 98.08 ≈ clamped+learned 98.3 ≈ oracle 98.15.
54
+ - **50k-POOL RERUN (2026-09-09, `data/clevr_subspace_rendered50k`, 45k train / 5k val, 3-lit task, 3 seeds): Z0 dense 100/82.8/67.5; Y4 dense 100/99.4/87.0 (+12.4); Y4 gate-L0 100/99.5/82.0 (+17.4); support search: SAME support {1647,1685,1713}, 6 rounds/312 models, 98.3/98.25 (+0.05).** New: (1) Z0's in-rule val gap does NOT close with data (73.5@9k -> 82.8@45k, ~+9/5x — compositional sample-complexity wall); (2) **more in-rule data makes the crisp-code drop WORSE (+8.1 -> +12.4 dense) — data sharpens max-margin convergence to the conjunction; only counterexamples or routing help, never quantity**; (3) support search is scale-stable. Render ops: 26 workers+MPS=360/min is the proven point (`nvidia-cuda-mps-control -d` + pipe/log env vars); 39 simultaneous cold-starts mass-crash (stagger launches!); postprocess MUST be gated on expected file count — it deletes its input dir (ate ~8.5k scenes once; rebuilt via `runs/render_topup.sh`).
55
+ - **2-LITERAL code Stage-3 ladder (2026-09-09, twolit_phase2_final90k, bitmatch 98.6): dense 100/99.5/88.5 (+11.0±0.5, same shortcut as Y4, less seed-variance); support search: |S|=5 {3996 small, 3997 ~cyl, 4076 ~sphere, 4070 ~rubber/metal, 4078 helper} val 97.7 / OOD 97.6 (+0.1) — NO dedicated cube column: shape is COMPLEMENT-CODED (cube = ~cyl AND ~sphere), so conjunctive supervision changes the factorization (costs the router 2 extra columns, -0.6 vs Y4) but preserves both the shortcut and the algorithmic-routing rescue.** Full-pool Y-recipe seeds (fullpool_Y_s1-3, all 12 families, 2715 tasks, wandb): bitmatch 93.3/91.9 at 20k (AHEAD of literal-cell pace), s3 regressing 87->78 (bad basin, expected seed variance).
56
+ - **FOUR-CORNER CLOSURE (2026-09-09, twolit_dense = 2-lit NO-penalty Stage-1, bitmatch 94.5 via recombination pressure alone): naive head 92.0±3.9 (drops +6.6/+4.3/+12.0 — BEST naive-head OOD of any code, mushy-resists-conjunctions retained while fitting val 99.6); but SUPPORT SEARCH: |S|=38 (diffuse contiguous band 4035-4093), support-only val barely 95.07, OOD 71.9 (+23) — UNCOMMITTED CODES ARE NOT ROUTABLE.** Complete 2-lit ordering: sparse+search 97.6 > dense+naive 92.0 > sparse+naive 88.5 > dense+search 71.9. COMMITMENT'S ROLE ISOLATED: recombination-rich supervision does the factorizing (83.6->94.5 penalty-free); the penalty+re-heat does the CONCENTRATING (distributed factorization -> routable single columns). Choose: dense for naive-readout robustness, sparse+algorithmic-routing for ceiling. Also both twolit runs concentrate committed columns in the high-index band (~3990-4090) — same init-seed artifact, harmless.
57
+ - **ATTRPICK ENV + ROBOTIC STAGE-1 (2026-09-10): `attrpick-lite-v0`** (5 objects, per-episode shape{cube,cyl,hexprism} x color{r,b,g} x size{1.0,0.75}; superset-geom trick = 4 geoms/body toggled via contype/rgba, NO model rebuilds; hexprism = flat-face-forward mesh, grasps 12/12 like cube; scripted policy robust to 0.5x cube size 15/15; `set_target(i)` success). `scripts/gen_attrpick.py`: pick_lit generator, 14 single-literal tasks (shape3/color3/size2/posX3/posY3 bins), LiteralPickController picks RANDOM matching object (multimodal demos), rejection-sampled scenes; ~60 steps/s CPU. `scripts/enc_bc_attrpick.py`: robotic Stage-1 = per-slot binary bottleneck + task-gate (L0 only) + MDN head, hot recipe (lr 3e-4 const, tau 0.3 pinned), EEF proprio bypass, built-in bitmatch eval. **First probe at 1k steps/task: catastrophic overfit (train NLL -16 / val +45 rising, bitmatch stuck ~75-80, gates never commit at ~90 open) — data starvation, not recipe failure; 20k/task rerun chained.** Robotic task catalogue (designed, not yet built beyond pick_lit): pick/touch/hover_lit, pick_rel/same/ext/or/neg, place_abs/rel, stack, gather_all, pick_if_exists; balance per (attr,value); hover/place families = position-supervision fix. Wrist camera `ur5e/wrist` added in manipulation_env (body-attached, fovy 75, all families verified). Camera: front_pixels ~0.9x + 192x128 recommended; MUST mj_forward after cam_pos edits; ONE osmesa Renderer per process (multi-renderer corrupts frames).
58
+ - **hotB@45k (mid-anneal) search: |S|=135 diffuse cloud (contiguous high-index band), support-only val 0.9501 scraping, OOD 77.4 (+17.6); LOO census = every dim epsilon-contributing (necessary/redundant split only by threshold noise). Confirms: SUPPORT SIZE TRACKS ANNEALING TIME (committed codes k=3-5, twolit-dense k=38, mid-anneal k=135) — |S| is a GT-free concentration meter.** Search scripts now stall-break after 2 zero-peel non-singleton rounds (rounds 5-14 were wasted pre-patch). Plateau-time hotB search auto-chained on the supervisor's PLATEAU marker. hotB dense head (unchanged by search result): 90.9±2.6 (+8.2).
59
+ - **ROBOTIC CLOSED-LOOP 2x2 CORRECTED (2026-09-10): raw-slots unchunked WORKS (~64%, 12-15/20, = original cubecyl); chunk-8 HURTS raw (21% — 8 blind steps forfeit grasp-moment feedback; great val NLL, worse control); ALL bits paths dead (0-2/20) incl. pos-bypass — position precision insufficient as explanation. Revised suspect: TRAIN/EVAL BIT MISMATCH (train = stochastic Bernoulli draws, eval = p>0.5; coincide only on committed codes — this code is mushy p~0.5) — sampled-eval test running. Chunk-NLL lesson: chunked targets AMPLIFY code deficiencies into val-NLL gaps (bits: 71-nat train/val gap; raw: 0) — chunk val-NLL gap = cheap code-sufficiency detector. EVAL-PARITY BUG (cost 2 wrong conclusions): eval must reconstruct model with ckpt's OWN flags (no_bottleneck/pos_bypass/chunk read from ck['args']), never defaults — first A/B evals ran raw-trained weights through the bits path -> false 0/20.**
60
+ - **BITS-FOR-CONTROL ELIMINATION COMPLETE (2026-09-10): every read of the mushy robotic code fails closed-loop (stoch-eval 0/20, det-eval 0/20, DET-TRAINED head 0-1/20, pos-bypass 0-2/20, chunked 0-2/20) while raw slots work (64%) — mismatch hypotheses ALL dead; cause = off-manifold brittleness + position-contaminated attribute columns of an 85-bitmatch code. UNIFIED: commitment is required for routing (VQA), OOD (VQA), AND deployability (robotics).** v2 pipeline launched: 14 singles + ~66 two-literal pairs (recombination pressure, per twolit-dense 83.6->94.5 lesson) x 3k steps, F=1024, pos-bypass geometry channel, closed-loop probe chained (`runs/v2_chain.log`).
61
+ - **v2 verdict (2026-09-10): pairs+F1024 nudged bitmatch 85->88.5/89.1; RECON IS THE POSITION ANCHOR (probeX 50.5 with recon vs 17.3 without — position ATROPHIES without it); size hit 100.0 w/ recon; both arms overfit (vnll ~+1) and closed-loop 0/20. Four-for-four: sub-90-bitmatch codes are closed-loop dead under every patch (chunking, pos-bypass, det-bits, recon). Remaining lever = SCALE+ANNEALING: v3 launched = 8-worker parallel gen (92 tasks x 20k = 1.84M steps, ~40min CPU) -> F=1024/recon/pos-bypass/150k hot steps -> closed-loop probe (`runs/v3_chain.log`). VQA lanes: hotA retired 93.4@90k (tau-anneal control, lost to pinned); hotB plateaued ~95-96 by 20k (!), flat-to-down through 90k — plateau search chained on hotB_90k; autoextend supervisor NEVER FIRED (0-byte log) — hand-rolled log-marker chains are the reliable pattern, supervisor-of-monitors needed if revived. cont-z (continuous pre-sigmoid latent, hot lr, single-literal) training on GPU2 vs contp 82.5 / binary 84-94@60k.**
62
+ - **BOTH OVERNIGHT GOALS RESOLVED (2026-09-11 night): (1) VQA ALL-SIX >=95 ACHIEVED by --balance-values full pool (869 tasks, ~50 per (attr,value)) + hot recipe: all six >=95 BY STEP 20K, @30k MEAN 98.6 / posX 98.1 / posY 95.8 (ckpt GOAL_vqa_balanced_allsix.pt) — VALUE STARVATION was the position/color bottleneck; literal-only families (96.5) helped less than balancing. (2) Robotic multi-task: v3/v4 pos-bypass = 59-60% closed-loop (80% on pos task), raw-slot-ceiling-matching; STRICT all-bits scaling curve 24%(F1024/150k) -> 32.5%(F2048/300k) -> F4096 running; act-noise 0.08 hurt (21%). hotB@90k plateau search: still ~100-dim diffuse support, OOD 77.8 — routability needs ~98+ codes, |S| = commitment meter.**
63
+ - **THE THRESHOLD-PARETO DISCOVERY (2026-09-11, user's suggestion, INVERTED my prediction): support search on the balanced code at theta={0.90, 0.95, 0.98} gives |S|={384, 528, 12} with support-only OOD {73.9, ~, 97.6}. RAISING the oracle bar to 98% collapsed the support 528->12 AT CEILING transfer. Mechanism: theta selects which structure survives the greedy path — at low theta the mixture web compensates for core removals and EATS the crisp atomic core; at high theta only the core reaches the bar, so it is protected and the alias mass peels. PROTOCOL: set THR = full-code oracle val minus ~1pt, never fixed 0.95. The balanced code IS compactly routable (12 cols -> 97.6 OOD = AND-ceiling 94.6-98); the 528 'dissociation' was a search artifact. GT-gate on balanced: crisp cols exist (cube 1629 / ~760 / ~1667, 99.5-99.8), AND readout 94.6 (empty-slot conventions cost ~4pts; sole-column counts unreliable due to rest-state).**
64
+ - **ROBOTIC STAGE-3 ON WORKING CODES (2026-09-11, 320k correlated pool 'pick small cube'/all-cubes-red, frozen v4strict & v4 codes, fresh heads): NO catastrophic collapse — best cells strict/dense 0.52 in-rule / 0.44 OOD, pb/gateL0 0.40/0.28; relative drops ~8-12pts vs GT-slot-era 58->1. CARRIED-IN PRE-CORRELATION REPRESENTATION = closed-loop OOD defense (the law's third leg, now in control). Composed instruction-gates FAIL for control (0.12): they strip geometry columns a policy needs — composed routing for control requires geometry-always-open (pos-bypass row confirms: gateL0+bypass best). VQA fidelity-Pareto complete: sparse-balanced |S|(0.90/0.95/0.98) = 384/464-528/12 with OOD 73.9/85.6/97.6; earlier 20k-pool Stage-3 attempt = data-scale artifact (all ~0).**
65
+ - **GATE-L0'S SURVIVING JOB FOUND (2026-09-11): fidelity-aware search on balanced-DENSE (no penalty, @65k snap): |S|=25, support val 98.4 but OOD only 85.5 — vs balanced-SPARSE k=12 @ 97.6 OOD at matched support fidelity. Balance alone commits AND concentrates; the penalty buys OOD-PURITY of the high-fidelity core (axis-pure columns; dense offers the search rule-contaminated near-equivalents). Invisible in bitmatch/VQA/commitment — visible only in support-transfer. Caveats: 65k-vs-105k maturity confound (rerun at dense 120k pending), single greedy path.**
66
+ - **2x2 COMPLETE + SPARSITY'S ROLE FINALIZED (2026-09-11): at MATCHED 99.4 bitmatch on the balanced pool, gate-L0 vs no-penalty differs at EVERY readout level — naive head +5.1 vs +15.9 drop; fidelity-search core OOD 97.6 (k=12) vs 91.2 (k=62); GT-gate AND 94.6 vs 84.9 (despite dense bitmatch-product 99.8 — best columns equally bit-accurate but NOT equally count-usable: rest-state/convention quality is invisible to per-slot agreement). VERDICT: architecture x balanced-data creates disentanglement; SPARSITY MAKES IT USABLE (purifies the near-optimum every selection procedure samples). Dense's emergent alignment mechanism (3 ablated pressures): 1-bit capacity cap (continuous cells fail — balanced-continuous cell queued), stochastic-gate dropout (alignment + alias mass), balanced multi-task gate-selection (basis choice; Z0 83.6 -> pairs 94.5 -> balanced 99.4). FM CLOSED: v2 (wide vnet, 20 steps) 9% vs MDN 65% at matched trunk/data — MDN stays; caveat: FM-as-code-trainer confound. Ops: chain triggers MUST key on artifacts that provably appear (ckpt step probes) — 'step 120000' log line never prints (runs end logging 119000).**
67
+ - **SWEET-SPOT REVISION (2026-09-11, user's tighter-bar suggestion): fidelity dial is NON-MONOTONE. Sparse: full-1pt 12/97.6, full-0.5pt 10/97.75, full-0.2pt 10/61.1 (COLLAPSE — the last 0.2% of in-rule fidelity anti-selects purity: contaminated cols are MORE predictive in-rule); dense: full-1pt 62/91.2, full-0.5pt 21/98.35 (!CEILING!), full-0.2pt 84/92.4. TUNED search (full-0.5pt) skims a pure core from BOTH codes — the dense 'core-purity deficit' at full-1pt was threshold mistuning. Sparsity's surviving edges: selection-FREE readouts (SGD head +5.1 vs +15.9; fixed AND 94.6 vs 84.9 — no dial to tune), smaller supports (10 vs 21), wider safe band on the dial. Thesis narrowed accordingly; artifact updated (sweet-spot-revision). Protocol: theta = full - 0.5pt, and NEVER tighter than full - 0.5pt (identifiability runs out before fidelity). Sparse full-0.2 collapse single-path — repeat before leaning on it.**
68
+ - **act-L1 ORDERING RESULT (2026-09-11): early ramp = all-six kept (98.2) but ORACLE CEILING POISONED (full-code readout 95.3 vs 98.5-99.6 elsewhere — pruned 'duplicates' carried usable information; alias mass = functional insurance) + its k=6 support contaminated (63.6, bar forced into the full-0.3pt danger zone); late ramp (30k, post-commitment) = BEST ROUTING EVER (|S|=4 @ 98.3 OOD, oracle intact) but shape bitmatch broke to 88.3. Neither dominates gate-L0-only (all-six + k=10 @ 97.75 + oracle 98.5). Near-minimal pure supports EXIST (k=4); ramp scheduling is the open knob. Seed-2 finished 95.0 (posY 88.6 — all-six is currently best-of-seeds; s2 extended to 200k for slow-basin convergence test).**
69
+ - **LATENT-TYPE AXIS COMPLETE (2026-09-12): balanced-CONTINUOUS (gate-L0, 98.9 bitmatch) Stage-3: head 92.2/+7.6 (near sparse-binary!), tuned search 45 cols / 83.2 OOD (NOT routable — superposed columns yield no compact pure core even at sweet-spot bar). FINAL DECOMPOSITION: BALANCE -> disentanglement (any latent); GATE-L0 -> near-optimum purity (protects selection-free readouts); DISCRETENESS -> compact routability (small supports, AND-composition). Each ingredient owns one measured property with its ablation. v5 flagship (3.68M clean slot-steps, 92 tasks, 400k) training; s2-ext posY STUCK at 89.0 through 190k (basin non-convergence — all-six is best-of-seeds; early-detection mitigation: good seeds show positions >=95 by 20k).**
70
+
71
+ **THE LAW (three regimes: BC policies, fine-tuning, frozen readouts): OOD robustness = task identifiability in the training data (counterexamples/vacuous scenes/diversity) OR a committed sparse routing prior carried in. Disentanglement alone never suffices; it makes the routing fix POSSIBLE (1-field solutions exist to select/carry).**
72
+
73
+ Related: [[stage3-subspace-findings]], [[single-literal-findings]], [[h100-node-setup]].
notes/claude-memory/dino-backbone.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: dino-backbone
3
+ description: "VLM-scale slot encoders in enc_vqa_binary — DinoBase (--backbone dino_*) and merged UnifiedSlotViT (--slot-module unified, uvit_*/udino_*); scale ladder queued 2026-09-11"
4
+ metadata:
5
+ node_type: memory
6
+ type: project
7
+ originSessionId: fc0a8a62-25d1-45df-8e93-3a8afe205b5a
8
+ modified: 2026-09-11T18:10:09.563Z
9
+ ---
10
+
11
+ Two ways to scale the Stage-1 encoder (both in `sanity_synclevr_encoder_slot.py`, wired in `scripts/enc_vqa_binary.py`):
12
+ - `--backbone dino_{s,b,l}` + `--slot-module detr`: `DinoBase` = timm DINOv2 tower (input x1.75 → 224x336 → 16x24 tokens) feeding DETRSlots.
13
+ - `--slot-module unified --backbone uvit_{s,b,l} | udino_{s,b,l}`: `UnifiedSlotViT` = ONE transformer over patch tokens +
14
+ 11 learned slot tokens (merged conv-encoder + DETR). `--unify-inject k` inserts slots before block k; `--unify-mask`
15
+ (auto-on for udino) lets patches see only patches so pretrained weights keep meaning; `--grad-ckpt` for ViT-B scratch.
16
+ - `--backbone-lr-scale s`: pretrained tower gets its own AdamW group at lr*s (0 = frozen). Param groups carry `lr_scale`.
17
+ - Log line now prints `mem=` (peak allocated). timm installed via `uv pip install timm`.
18
+
19
+ Cost facts (measured, shared GPUs): head cost = B x tpi x K sequences — with K=16 it is ~5x a ViT-B tower at tpi 32.
20
+ Hold tpi*K fixed: tpi32/K4 = same mem/it-s as tpi8/K16 (udino_b b24: 12.3G, 5.5 it/s). Encoder pays 1 fwd/bwd per step
21
+ regardless of K (draw grads sum at `probs`). Peak mem @b48: detr256 12.9G, uvit_s ~15G, uvit_b(ckpt) 16G, udino_b 21G.
22
+
23
+ Queue `runs/queue_scale.sh` (PID-keyed waits; memory thresholds misfire during eval dips): udinoB_i8 (GPU0 after
24
+ detr-512), uvitB + uvitS (GPU1 after cont_dense), s2_tpi32k4 control (GPU3 after actB_s3). Markers in runs/lane_scale.log.
25
+ The frozen dino_b+DETR-1024 arm was killed at ~6k (its 35G co-tenancy OOM'd detr-512 at the 20k eval; detr-512 resumed
26
+ from the 20k ckpt). Lesson: never co-tenant a >25G job next to a batch-192 Stage-1 run — the 20k-frame eval spikes memory.
27
+
28
+ **Why:** user wants a VLM-scale (merged) slot encoder; step-0 bitmatch on frozen DINO is already 75.8 (color/pos ~87).
29
+ **How to apply:** compare on seed 2 against the detr-512 rescue (posY 92.9 @17k vs 89.0 stuck at d=256); bar all-six ≥95 by 20k.
30
+ Related: [[single-literal-findings]], [[h100-node-setup]].
31
+
32
+ **2026-09-12 (user decision):** scaling paused — all ViT/DINO arms (udinoB_i8 @61k: 98.4 bitmatch but posY 94; uvitB @49k: 94.6;
33
+ uvitS @21k: 92.9) were killed at the user's request; code paths stay. detr-1024 (lr 1e-4) and the tpi32/K4 control kept running.
34
+ Next line: MI-loss sweep (runs/mi_sweep.sh, w = 3e-8..3e-5 on the sparse recipe; trained sparse code has MI sum ~4.5e5 nats/batch).
notes/claude-memory/gtmask-gate-findings.md ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: gtmask-gate-findings
3
+ description: GT-mask Stage-3 ceilings, task-gate open-probability distributions, balanced bitmatch, and the symmetry-breaking explanation for no-penalty disentanglement (2026-09-12)
4
+ metadata:
5
+ type: project
6
+ ---
7
+
8
+ Stage-3 with the gate clamped to the 3 bitmatch-best columns (runs/gtmask_s3.sh; `--force-gate-cols` now accepts "~c" =
9
+ negated column → index 2c): in-rule val ≈ OOD for ALL codes (no transfer gap once selection is given). Learned-head OOD:
10
+ sparse 96.4 · continuous 95.8 · continuous-no-penalty 92.7 · dense 91.8. Pure AND readout: 97.5 / 83.4 / 48.5 / 84.9 —
11
+ columns are ≥99.7 bitmatch on present objects but no-penalty codes carry garbage on empty slots.
12
+
13
+ Task-gate distributions (runs/gates_<run>.npy via DUMP_GATES=path env on an eval-only run `--steps <ckpt step>`): gates are
14
+ hard 0/1 in every cell (<0.6% in 0.05–0.95) even with gate-L0 = 0. Per-task open columns: 7–8 with penalty vs 474 (cont) /
15
+ 791 (dense) without; union over 869 tasks: 67–101 vs 2202–2881. → the stochastic coordinate-wise gate is the symmetry
16
+ breaker (with the elementwise sigmoid) that makes even penalty-free continuous codes axis-aligned; the L0 term only makes
17
+ routing shared+minimal (purity). "Continuous" cells keep the STOCHASTIC gate; only the code sampling is removed.
18
+
19
+ Balanced bitmatch (mean TPR/TNR, `[bitmatch-bal]` line, floor 50): sparse 98.3, dense 98.3, cont 98.9, cont-no-pen 99.2;
20
+ raw bitmatch has a majority-class floor (87.5 color/pos, 66.7 shape) — random init scores raw ~80 / balanced ~56.
21
+ Early-rise run (batch 64, eval/500): order learned size → material → color → position → shape.
22
+
23
+ **How to apply:** report balanced next to raw; cite the gate histogram when asked "why does dense disentangle".
24
+ Related: [[single-literal-findings]], [[dino-backbone]], [[stage3-subspace-findings]].
25
+
26
+ **Presence bitmatch** (added 2026-09-12; `presence=` on both bitmatch lines; best single column for "slot holds an object",
27
+ scored on ALL slots, raw floor 59): sparse 98.5 · dense 91.7 · continuous 90.2 · continuous-no-penalty 86.8 · detr-512 91.5.
28
+ This is the rest-state cleanliness that explains the AND-readout failures (all over-counts from empty slots firing);
29
+ bitmatch on present objects is blind to it. detr-512's Stage-3 collapse (+25 head drop, search stall @310) is NOT dirty
30
+ columns (GT-mask head 92.0, 11 gates/task, union 89) → alias/composite-column web from the wider readout.
31
+ Control `vqa_bal_s2_tpi32k4` (DETR-256 seed 2, only tpi32/K4): posY 98.8 @60k vs 89.0 stuck at tpi8/K16 → task diversity
32
+ per encoder step rescues the seed basin without width. actB seeds 2/3: compact supports (5–6 cols) but OOD 64–74 (not reproducible).
33
+
34
+ **MI sweep (2026-09-12/13, runs/MI_TUNE_PLAN.md):** pairwise-MI penalty (sum over 8.4M pairs; trained sparse code ~5e5 nats)
35
+ on the sparse recipe at tpi32/K4/b128/60k. Head OOD is seed-noise dominated (±6): 3e-7 = 95.4/83.1/88.0 vs w=0 85.4/92.7 →
36
+ no robust head gain. Robust regime at w ≥ 1e-6: 5-column supports transferring at 97.6–99.2 + head collapse to 70–80
37
+ (MI minimized via near-zero marginals: mean p 0.012, 99% saturated; at 3e-6 instead p pinned ~0.88, 5% saturated).
38
+ Gate union stays ~90–120 columns for all sparse codes. 60k/b128 is weaker than 120k/b192 (w=0 control there: 94.7 / 26 cols @98.8).
39
+ **4-column GT mask (3 literals + presence column, `WITH_PRESENCE=1 runs/gtmask_s3.sh`):** every code 96–99 with ~0 drop →
40
+ codes equivalent given perfect selection; the 3-column variant was measuring empty-slot polarity luck (control 18.6 AND / 58 head).
41
+
42
+ **Learned sparse head (Stage-3 gate-L0 2e-3, `runs/chain_s3_gate.sh`, 3 seeds, 2026-09-13):** OOD sparse 84.5 · dense 81.0 ·
43
+ cont 93.1 · cont-no-pen 87.8 · MI0 84.3 · MI3e-7 95.0 · MI3e-5 63.8 · b192-control 80.2 — worse/noisier than the
44
+ selection-free head for binary codes (a selector fit in-rule picks spurious aliases). Confirms the user's protocol: no Stage-3 gate-L0.
45
+ **Balanced pool facts:** --balance-values flattens only f1-literal counts (target 50 = median; 869 tasks; pos bins end 17–39);
46
+ base/f2 filters unbalanced (~3 more literal mentions/task); natural per-task support 3–5 (count/exist) to 7–12 (query/hop) columns.
47
+
48
+ **No-gate baseline (`--gate-mode none`, gate ≡ 1, no penalties, tpi32/K4/b128/60k, 2026-09-13):** continuous code still
49
+ disentangles (bitmatch 99.2, presence 87.9) → coordinate gate NOT needed for literal features to exist; binary no-gate slower
50
+ (94.7 @60k, posY 87.3). But neither is usable w/o selection: head 86.0 / 67.3, search 18 @90.3 / 42 @68.9. MI > 1e-4 destroys
51
+ the code (3e-4/1e-3/3e-3 at floor). Reframed contribution: balanced multi-task supervision through a slot bottleneck creates the
52
+ features; gate-L0/MI/discreteness make them dominant & routable; search recovers them w/o OOD data.
53
+
54
+ **Linear code (`--lin-code`, RMS-normalised pre-sigmoid z, gate≡1, no penalties, 2026-09-13):** VQA 98 but bitmatch 87.1 /
55
+ balanced 78.8 flat from 10k (presence 79.7); head 75.1 (+24.5); search 28 @70.1 → features exist but not on the axes: one
56
+ elementwise sigmoid is the symmetry breaker (x↔Ax). **MI without gate-L0** (1e-6 ×2, 3e-5): 84% bits active, head 60–73,
57
+ searches spurious (14 @60.1, 37 @63.5, 504 @67.2) → gate-L0 and MI complementary (L0 picks columns, MI decorrelates them).
58
+ Artifact v18 has all rows. Correlation-dataset catalogue rendering: runs/render_rules.sh → data/clevr_corr10k/<name>/ (13×10k).
59
+
60
+ **Linear + stochastic gate (2026-09-14):** bitmatch 99.6 (no penalty) / 98.6 (gate-L0) vs 87.1 gate-free → ANY coordinate-wise op
61
+ (Bernoulli mask or sigmoid) breaks x↔Ax; but linear codes still not routable (search 36 @83.8, 52 @66.3; heads 89). Dense @60k
62
+ recipe (2 seeds): bitmatch 96.7/99.5, head 89.8 mean, search 345 @87.9 / 17 @85.1 — "none" ≈ "sparse" on the head, worse on search.
63
+ **Multi-task OOD-query Stage-3 (scripts/stage3_ood_multitask.py + ood_task_bank.py, sparsest-solution filter):** with ~1.7k jointly
64
+ trained tasks every code (incl. linear) reads out 96–99 OOD, zero-shot queries 97–98; with-alias drop only 1–3 pts; MI worst.
65
+ Shared literal tokens dissolve the alias. NB "small metal cubes" is NOT an exact in-rule alias (gray ⊉ cube) — a partial shortcut.
66
+
67
+ **Column census (runs/column_census.py; ≥98% agreement with a 1-literal or 2-literal Boolean fn on 19.5k matched objects):**
68
+ gate-USED columns → literal / composite / unexplained: sparse 101 → 42/5/53; sparse+MI 99 → 45/0/54; dense 2881 → 302/51/2298;
69
+ dense60k 3220 → 332/105/2603; cont 67 → 30/3/33; cont-no-pen 2202 → 258/31/1850; MI-only 1628 → 124/18/776; lin+gate 2406 → 192/28/2161.
70
+ Composites are ≤3% everywhere and ~80–95% SAME-attribute coarsenings (x6∨x7, gray∨brown); cross-attribute entangled (red∧cube)
71
+ columns: 1–14 per code. Duplicates per literal: 2–3 (sparse, MI) vs 5–53 (dense). MI-only code has NO position literals at 98%.
72
+ => No code learns cross-attribute entangled features in meaningful numbers; dense codes = many copies + loose copies, not z1⊕z2.
73
+ **3-literal census (THREE=1, 184k fns):** 1–99 further composites per code, ALL same-attribute negated value sets (¬x5∧¬x6∧¬x7,
74
+ ¬red∧¬blue∧¬purple); ZERO cross-attribute at 2 or 3 literals except 0–2 posX∧posY cells / cyan∨x0 / brown∧x7 / red∨y0.
75
+ (Bug fixed 09-14: attr classifier parsed "yellow" as posY — earlier cross-attr counts were inflated.)
76
+
77
+ **Overnight-2 (2026-09-14→15, user asleep; goal: find where correlated/redundant features hurt so sparse+MI wins):**
78
+ runs/OVERNIGHT2_PLAN.md + runs/ovn2.sh (4 lanes, after v2 grid) → runs/ovn2/, markers runs/lane_ovn2.log, summary runs/ovn2_summary.py.
79
+ New tools: runs/support_search_task.py (env SUBSPACE/TASK/NTR/NVA/THR_DELTA/OUT_JSON, TASK="shape=0,size=1,material=1", '!' negates);
80
+ stage3_ood_multitask.py --single-task "count:shape=0" (1-task head), --rule for targeted alias tasks, disagreement-set metric
81
+ ("with-alias-DIS": accuracy on OOD scenes where an in-rule alias disagrees; alias must disagree on ≥1% OOD scenes);
82
+ renderer two-way region rules "shape=cube<=>posx=b7|posy=b0"; datasets cube_region, cube_red rendering (runs/render_adv.sh).
83
+ Findings so far: Stage-3 learned gate (+L0) hurts in multi-task too; zero-shot queries need ~500 shared tasks (46→64→85→96→97.5);
84
+ old "with-alias OOD" metric was diluted (aliases disagree on ~10–20% of OOD scenes) → replaced by disagreement accuracy.
85
+ **Overnight-2 results (2026-09-14/15):** single-task probes on cube→red / cube⇔region / multi3 collapse every redundant code
86
+ (heads 40–70, searches 18–146 cols @28–89 test at ALL bars −0.2/−0.5/−1.0); composite adversary confirmed (dense60k's x7∨y0
87
+ column: 22 @ 49.7 vs dense 11 @ 86). sparse: bar-robust on cube→red/multi3 (2–7 cols @95–97). sparse+MI: bar-robust on
88
+ cube⇔region (3–4 @ 97) and cube→gray tight bar (4 @ 98), best at 500 scenes (head 95.1), but flips literal↔alias with the bar on
89
+ cube→red (22→98) and multi3 (95→53) — equal-sparsity alias, greedy peel decides. Multi-task v2 (disagreement metric): 8–512
90
+ tasks → DIS 50–85; full ~1.7k → 95–96 for sparse/dense/cont; MI codes 84–88; gate+L0 47–78. Artifact v25 has all of it.
91
+
92
+ **Night 3 (2026-09-15) automation:** GPU job queue `runs/gpuq.py` (jobs in runs/gpuq_jobs.txt "<mem_gb> :: cmd {GPU}", state
93
+ runs/gpuq_state.json, log runs/gpuq.log, stop via runs/gpuq.stop); `runs/job_s1.sh <name> <gpu> <cont> <flags>` = 60k-recipe Stage-1
94
+ + main-table chain_s3. Queued: seeds mi1e-6_s4, nogate_lin_s2-4, mi0_s3-4; VAE low-β extension (b1e-4, b1e-5, tcvae_t1e-3 w/ β1e-4);
95
+ `runs/vae_pick.sh` picks best β-VAE/TC-VAE by bitmatch and queues seeds 2-4. `runs/seed_summary.py` = mean±std tables.
96
+ VAE first sweep: codes lose task info (VQA 61–76 vs 98 linear; KL→0 at β≥1e-2), bitmatch at floor 72–75.
97
+ PACS synthetic (runs/pacs_synth.py): unregularised bi-level already reaches 97.9 bitmatch w/ 1–3 duplicates at 10k steps; CE-head
98
+ variant (--ce) sweep running (runs/pacs_synth_ce.out). enc_pacs.py still needs: standardisation + 1/λmax inner step + CE heads.
99
+ User (asleep) wants: best VAE/TC-VAE ×4 seeds + Stage-3 in artifact; PACS working + sweep + 4 seeds; mean±std in artifact.
100
+
101
+ **Ops (Sep 15 2026):** the GPU queue (`runs/gpuq.py`) must keep a ≥16 GB margin and ≤2 Stage-1-class (>20 GB)
102
+ processes per GPU — batch-128 Stage-1 runs spike at eval/compile and a third co-tenant OOM-kills existing runs
103
+ (lost nogate_lin_s4 to 30k, two β-VAE runs, and several lin_rerun pieces on Sep 15). Requeued jobs need a distinct
104
+ line (comment suffix) since the queue hashes the line.
notes/claude-memory/h100-node-setup.md ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: h100-node-setup
3
+ description: "This machine is a 4xH100 node (not Savio); env, data paths, and DDP training setup live here"
4
+ metadata:
5
+ node_type: memory
6
+ type: project
7
+ originSessionId: fc0a8a62-25d1-45df-8e93-3a8afe205b5a
8
+ modified: 2026-09-01T04:01:20.105Z
9
+ ---
10
+
11
+ This working machine (as of 2026-09-01) is a standalone 4×H100 80GB node (104 cores, 885GB RAM, 11TB disk) — NOT the Savio cluster; no SLURM here, run things directly with nohup/torchrun.
12
+
13
+ - `.venv`: uv-managed, torch 2.6.0+cu124 installed via `uv pip install` (CLAUDE.md rules followed); scipy+pillow added.
14
+ - Data: HF `GGOSinon/clevr-1M-128x192` tars in `data/clevr-1M-128x192/`; converted to the chunk layout at `data/clevr_gen10_1M/` (200× states/images192 chunks) via `scripts/wds_to_chunks.py` (inverse of clevr_to_webdataset.py). HF token in `~/.hidden`.
15
+ - `enc_vqa_maskproj.py` now supports multi-GPU via torchrun (WORLD_SIZE detection): identical-seed init + manual grad all-reduce, rank-0-only eval/ckpt/wandb/prints, per-rank AsyncChunkLoader seed, `--tf32` flag.
16
+ - Long runs: launch scripts + ckpts + logs in `runs/` (gitignored), e.g. `runs/launch_vanilla4gpu.sh` → `runs/vanilla4gpu_b1024.{pt,log}`.
17
+
18
+ **OCBench (2026-09-04):** `third_party/ogbench_plus` installed editable (+mujoco/dm_control). Block-lite scripted policy analyzed: plan-and-track hierarchy, per-step deps = proprio + hidden phase clock; per-action-dim structure DIAGONAL in ee space (destroyed by diff-IK in default 'joint' mode — use action_mode='ee'). Cube 0 = BLUE, cube 1 = RED. `scripts/gen_ocbench_slots.py` generates GT-slot datasets (5 slots × 9: type one-hots + xyzyaw; gripper in proprio_extra; phase annotations logged) → `data/ocbench_slots/block-lite-double-task1-*` (197k/20k transitions, ee actions).
19
+
20
+ **CubeCyl env (2026-09-05):** added `cubecyl-lite-pickup-v0` to ogbench_plus (cubecyl_env.py + cylinder XMLs): 1 cube (color = `cube_color` make-kwarg) + 3 cylinders (red/blue/green fixed), task = pick up the cube (success = cube z ≥ 0.10, terminates), no goals. PickupController in gen_ocbench_slots.py (10% cylinder-mistake segments); CubePrimitive works unchanged (cylinder dims = cube dims, yaw-snap is a valid cylinder grasp). Slots 5×10 [is_EEF,is_cube,is_cylinder,is_red,is_blue,is_green,x,y,z,yaw]. Datasets: `data/ocbench_slots/cubecyl-pickup-{redcube,bluecube}-*` (156k/26k transitions, oracle success 1.00 both) — train on redcube (cube⇔red correlated), test on bluecube = manipulation analog of the shape2color one-task cell.
21
+
22
+ **Ops rule (bitten twice):** process-exit watchers must use patterns that CANNOT match monitor tails, e.g. `pgrep -f 'torchrun.*<name>'` (monitors never contain 'torchrun') or check nvidia-smi memory — plain `pgrep -f <name>` matches the log-tailing monitor forever and the chain never fires. Same family as the pkill self-match rule: kill/launch/watch commands must never contain the bare run-name pattern they target.
23
+ **pgrep/pkill self-match (bit 3x on 2026-09-09): ANY shell whose command text contains the pattern matches itself — this includes watcher scripts doing `until ! pgrep -f X` where X appears in the watcher's own relaunch command (deadlocks forever, GPUs sit idle). Rules: kill by explicit PID from `ps | awk` with a pattern that can't match the killer; verify kills via `nvidia-smi --query-compute-apps` showing memory actually released; watcher completion checks should key on LOG CONTENT (step markers) not process existence; after kill, old training procs can hold ~63GB for >1 min — wait for release before relaunching or the new run OOMs.**
notes/claude-memory/hf-results-upload.md ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: hf-results-upload
3
+ description: "Where the HuggingFace token lives on the H100 node and where Stage-3 results are uploaded (repo, path, command)"
4
+ metadata:
5
+ node_type: memory
6
+ type: reference
7
+ originSessionId: fc0a8a62-25d1-45df-8e93-3a8afe205b5a
8
+ modified: 2026-09-21T00:30:32.266Z
9
+ ---
10
+
11
+ HF token on the H100 node: `~/.hidden` (38-byte file, the bare `hf_...` token; never print it). Use it as
12
+ `export HF_TOKEN=$(tr -d '[:space:]' < ~/.hidden)`; account `GGOSinon`.
13
+ Stage-3 results repo: private dataset `GGOSinon/sparsewm-stage3-eval`; upload with
14
+ `.venv/bin/python3 stage3_eval/hf_transfer.py upload-results --repo GGOSinon/sparsewm-stage3-eval --name h100-node`
15
+ (idempotent; puts `results/s3/*.json` under `results/h100-node/`). Uploaded 2026-09-21: all 576 single-seed CLEVR cells
16
+ (8 codes x 72). Other machine folders (579 files) pre-existed from earlier partial uploads. See [[s3fast-matrix]].
notes/claude-memory/pacs-baseline.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: pacs-baseline
3
+ description: PACS (Fumero 2023) baseline on the slot encoder — synthetic acceptance results, formulation decisions, run/queue names (Sep 15 2026)
4
+ metadata:
5
+ type: project
6
+ ---
7
+
8
+ PACS baseline = same encoder (linear RMS code, F=4096) + pooled features u=mean_s z_s + per-task linear heads fit by
9
+ unrolled inner GD (support/query split, features standardised from support stats, step = inner_lr/λmax(support Gram)).
10
+ `scripts/enc_pacs.py` (flags `--ce` C-way CE heads, `--prox` proximal L1, `--alpha` L1, `--beta` sharing-entropy);
11
+ synthetic test `runs/pacs_synth.py` (K=8 factors, x=Wz*+noise).
12
+
13
+ Synthetic acceptance (10k steps): bi-level alone (α=β=0) recovers factors: CE 99.6 bitmatch (5–8 duplicates/factor),
14
+ regression 99.4 (2–4 dups). L1 alone (α≤3e-2) or entropy alone (β≤3e-1): still 99.4–99.6. **L1 + entropy jointly**
15
+ (even α=1e-3, β=1e-2) collapses to ~80 bitmatch, 0 duplicates, best-feature corr ~0.6 (mixed features) — joint term
16
+ is what breaks it; prox variants same. So the regularisers never *reduce* duplicates without destroying alignment.
17
+
18
+ **Sep 15 evening — solver fixes.** (1) task loss must be SUM over tasks (mean made each head's step T× too small); (2) L1
19
+ is the plain sum (mean made α inert at M=4096); (3) working per-head step for unrolled GD is 0.04/λmax. Even then the
20
+ unrolled-GD inner solve stalls on the REAL encoder (correlated features → spread Gram spectrum; outer ≈0.8–0.9 after 20k,
21
+ chance=1.0; 12-way CE heads never leave chance). Fix that passes both synthetic regimes: `--inner irls` = exact kernel-ridge
22
+ inner solve + IRLS for α·L1 (per task) + β·group-lasso across tasks (shared features), differentiable via linalg.solve.
23
+ Synthetic: paper regime α=1e-2..1e-1 → 99.5–99.6 bitmatch with 6–10-feature heads; M4096/N32 α=1e-2..1e-1 → 99.6, α=1
24
+ collapses (75.9). Real IRLS sweep: `vqa_bal_pacs_irls_{a0,a1e-2,a1e-2_b1e-2,a3e-2,a1e-1}` (+ GD references
25
+ `vqa_bal_pacs_p0`, `vqa_bal_pacs_p0_b256`). Kill helper: `runs/killrun.sh <name>` (never `pkill -f` from the tool shell —
26
+ it matches the tool shell's own cmdline and kills the session, happened 4× today).
27
+
28
+ Real sweep queued via `runs/gpuq.py` as `runs/job_pacs.sh` (train → eval-only bitmatch pass through enc_vqa_binary
29
+ (loader skips placeholder head/sae/opt when ckpt args has "pacs") → chain_s3 --cont-code): runs
30
+ `vqa_bal_pacs_ce_{a0_b0,a1e-2_b0,a0_b1e-1,a1e-3_b1e-2}`. Pick best by bitmatch → 3 more seeds → artifact.
31
+ VQA column of the eval pass is meaningless for PACS (untrained head); report bitmatch / Stage-3 only.
32
+
33
+ **Why:** user asked for PACS with the same encoder + linear heads, verified on a synthetic linear task first
34
+ ("acceptable if it passes the test"; unrolled differentiation OK).
35
+ **How to apply:** report the joint-regulariser collapse honestly; the "PACS" row in the artifact is the best sweep
36
+ config by bitmatch (may be α=β=0 = pure bi-level). See [[gtmask-gate-findings]] for the ops lessons (queue margin).
37
+
38
+ **Real IRLS results (Sep 15 night):** a0 (pure ridge bi-level) bitmatch 79.7 raw / 58.6 bal, Stage-3 head 56/55.5, search
39
+ empties; a1e-2 81.5/63.0, heads ~56 OOD; a1e-2+b1e-2 82.3/65.4. Outer loss stalls ≈0.6–0.85 (chance 1.0) at 60k for
40
+ all — the bi-level signal through a 32-sample linear fit is too weak to shape this encoder (same floor profile as β-VAE).
41
+ Pending: a3e-2, a1e-1, t128 (128 tasks/step), b256 (128-sample support), GD refs p0 / p0_b256.
42
+
43
+ **Sep 16 00:30:** batch-256 (128-sample support) is the lever: IRLS ridge b256 fits the query tasks (count-acc 99.1,
44
+ exist 97.4) yet bitmatch stays 82.2/65.2 → the code is linearly decodable but not axis-aligned (linear heads are
45
+ rotation-invariant); with L1 (a1e-2_b256, nnz/head ~120) the alignment question is decided at its eval. GD refs all at
46
+ floor (p0 b64, p0_b256 73.8). More tasks/step (t128) no help (82.7). VAE pick done manually (picker stuck: tcvae_t1e-1 /
47
+ tcvae_t1 ckpts were only 45k/50k — vae_sweep.sh had no 60k guard; resumes queued): β-VAE best b1e-5 (88.7 = inert KL ≈
48
+ linear code), TC-VAE best t1e-3 (80.8); seeds 2–4 of both queued (job_s1 chains).
49
+ - a1e-2_b256 eval: bitmatch 81.8 / 67.0 bal with heads fitting query tasks at 94% and nnz/head 132 → PACS codes here are
50
+ linearly task-decodable but NOT axis-aligned; sparse heads did not force literal features. All 8 evaluated configs sit
51
+ in 77.8–82.7 (floor band; differences are noise). Pending a3e-2_b256 (nnz/head 3 at 45k, fit 75%), a1e-2_b512.
52
+ - a3e-2_b256: bitmatch 81.9 / 67.5 with nnz/head 2 (fit 78%) — 2-feature heads still do not make literal features. Only a1e-2_b512 pending.
53
+ - a1e-2_b512 (256-sample support): bitmatch 84.2 / 67.2 bal, fit 99.0/96.2, nnz/head 62 — best of the 10-config sweep; picker seeds it (s2–s4, ~6 h each). Sweep range 77.8–84.2: support size helps a little, no config aligns.
54
+ - VAE rows in artifact (v28/v29): β-VAE 1e-5 ×4: bitmatch 88.8±1.1, head 89.5±5.3, search 45±9 @74.2. TC-VAE γ=1e-3 (β 1e-4) ×4:
55
+ bitmatch 88.0±2.8 (seed-1 final 92.7 — the 80.8 at pick time was a 14k eval), head 63.3±2.7 (drop +35), search 39±16 @68.2.
56
+ - PACS row in artifact (v31): a1e-2_b512 ×4 seeds: bitmatch 83.3±0.7 / head 65.4±4.6 (drop +4.8) / search 375±386 cols @63.0, in-rule val 64.8 — code carries almost none of the 3-literal task. 'nothing' now 4 seeds (v30): 98.3±1.0 / 84.6±6.9 / 105±139 @80.6. only-MI (miNoL0_1e-6) s3/s4 added Sep 16; row pending s4 chain.
57
+ - **Sep 16 08:20 local: all overnight work complete**, node idle, artifact v32 has 4-seed mean±std rows for sparse+MI, only sparse, nothing, only MI, vanilla, β-VAE 1e-5, TC-VAE 1e-3, PACS b512. Monitors stopped. Next: user's call (paper writing / new probes).
notes/claude-memory/robotic-replication.md ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: robotic-replication
3
+ description: Robotic (AttrPick / ogbench_plus) replication of the Stage-3 support-search matrix — design, scripts, launch state (2026-09-19)
4
+ metadata:
5
+ type: project
6
+ ---
7
+
8
+ **Goal (user, 2026-09-19):** repeat the CLEVR Stage-3 experiment (8 codes x correlation datasets x tasks, transformer probe + gate-population
9
+ support search, train/val/test/|S|) on the robotic AttrPick dataset.
10
+
11
+ **Design (my assumptions, stated to the user):** Stage-1 input = GT object slots (the repo's established robotic pipeline; no rendering),
12
+ supervision = instruction-conditioned BC (MDN NLL) on `data/attrpick_4M/lit1.npz` (92 pick tasks: 14 single + 78 pair literals, 3.68M frames).
13
+ Codes: `scripts/enc_bc_attrpick.py` now has `--code {bits,cont,vae} --gate-mode {stoch,none} --mi-weight --vae-beta --tc-beta`
14
+ (pairwise MI, KL, MWS-TC ported from enc_vqa_binary). PACS = `scripts/enc_pacs_attrpick.py` (cont code, per-task IRLS sparse linear heads
15
+ predicting per-object literal match from GT attrs, recon; no action head; saved in BCModel format). Recipe: F=4096, d128, batch 512, lr 3e-4,
16
+ tau 0.3, recon 5, gate-L0 2e-3, MI 1e-6, bvae 1e-5, tcvae 1e-4/1e-3, PACS alpha=beta=ridge=1e-2, 64 support frames.
17
+ Stopping at **100k steps** (reference run bc_ap_v5strict: bitmatch 95.5@100k = 95.6@300k, val NLL degrades after; 300k would take 6-12 h with
18
+ 2 runs/GPU). `runs/rob_pipeline.sh` kills each run at 100k, dumps universes (`runs/dump_gates_rob.py` -> `stage3_eval/universes_rob/`), then
19
+ launches `stage3_eval/run_matrix.py --domain rob --local --gpus 0,1,2,3 --out results/s3rob --seeds 1` in phases (ante; +conj,rel; all).
20
+
21
+ **Datasets:** `scripts/gen_attrpick_corr.py` -> `data/attrpick_corr/<rule>/states.npy` (20k first-frame scenes; 15 rules: cube_red, cube_small,
22
+ red_cube, red_small, small_cube, small_red, cyl_blue, blue_large, green_hex, hex_large, multi2, multi3, cube_left, red_front, cube_region;
23
+ attribute rules via env `_attr_rule` balanced edit, position rules by rejection) + `data/attrpick_ood/states.npy` (6k unconstrained).
24
+ Env reset = 1.2 ms/scene.
25
+
26
+ **Tasks (`stage3_eval/tasks_rob.txt`):** per dataset pick:ante ; pick:cons ; pick:ante,unrelated ; pick:ante,!lit (neg) ; pickleft:ante (rel).
27
+ `runs/s3fast.py --ckpt-kind bc`: "pick:<lits>" = per-slot logit head, train label = random matching object, accuracy = argmax is a match;
28
+ scenes without a match dropped per task before the 8k/2k/2k split; Sn=5; literals in `scripts/attrpick_lits.py` (shape 0 cube/1 cyl/2 hex,
29
+ color 0 red/1 blue/2 green, size 0 large/1 small, posx/posy thirds). Smoke test on early ckpts passed (pick:shape=0 head 100/100 at step 4k —
30
+ early codes are ~raw slots; final codes may differ).
31
+
32
+ **Why:** the user wants the paper's downstream matrix repeated in the robotic domain; closed-loop success is too slow / not accuracy-valued
33
+ for the search protocol, so the matrix uses the pick-target readout; closed-loop verification of found supports is a possible follow-up
34
+ (`scripts/stage3_attrpick.py` machinery, `data/attrpick_s3_big` 320k-step cube→red demo pool exists).
35
+ **How to apply:** results land in `results/s3rob/*.json`; summarise with `stage3_eval/summarize.py --out results/s3rob` (kind() needs
36
+ "pick"/"pickleft" mapping). Stage-1 seeds 2-4 not yet launched. See [[bc-cubecyl-findings]], [[stage3-subspace-findings]].
37
+
38
+ **NLL protocol (user, 2026-09-19 night: "same thing with the validation loss"):** `runs/s3bc.py` (+ `run_matrix.py --domain rob --metric nll`,
39
+ demo pools `scripts/gen_attrpick_s3demos.py` -> `data/attrpick_s3demos/<ds>__<task>/{in,ood}.npz`, 5000/1000 eps, ~3x faster than the
40
+ 60 steps/s estimate). Findings while iterating: (1) raw per-frame MDN NLL is useless — a proprio-only head (no code) beats the full-code head
41
+ (-11.2 vs -11.15) because after the first step the scripted motion is predictable from the arm state; (2) the first 3 frames are not decision
42
+ frames either (actions ~0, sigma collapse gives NLL -14 to the floor); the demo direction tracks the target from t=1 (cos 0.97-1.0, R^2 0.4-0.6
43
+ for 1<=t<12) but action std is only 0.02-0.18, so learned-sigma NLL is dominated by sigma fitting/overfitting (train -10.4 / val -7.7).
44
+ Fix in use: fixed per-dim sigma (train action std on scored frames, >=0.02), scoring window frames 1..11, all 4000 train eps, wd 0.01;
45
+ rollout heads 20k steps batch 512. 4000-step / 15k-step heads had ~0-25% closed-loop success even in-rule (earlier working heads: ~50%).
46
+ Accuracy matrix early read (52 cells, antecedent picks): every code ~100 head OOD except sparseMI (93.5 head OOD, but 1-col support 99.5 OOD);
47
+ PACS 1-col supports fail OOD (74). Table script: `runs/s3rob_tables.py`.
48
+ **NLL protocol v3 (launched 2026-09-19 ~11:10 UTC, `results/s3rob_nll`, runner `run_matrix.py --domain rob --metric nll`):** fixed-sigma mixture NLL
49
+ on frames 1..11, object geometry (x,y,z,yaw) side-channel to the probe (`--pos-bypass 1`, floor = proprio+geometry-only head), 4000 train eps,
50
+ wd 0.01, bar = full + 5% of (floor - full) (1% was below seed noise for continuous codes), no rollouts in the matrix (`--rollouts-only` pass
51
+ writes closed_loop into the JSON later). With bypass: sparseMI/onlysparse supports collapse to |S|=1 and the 1-column head beats the full head
52
+ (sparseMI cube_red pick cube: full val -6.74 / OOD -6.18 (< floor OOD -6.47 = alias), 1-col -7.12 / -6.90); vanilla needs 39-65 columns.
53
+ Closed-loop success of 20k-step heads is still weak/noisy (0-0.4 at 10 eps) — needs a dedicated pass with more episodes.
54
+ **Closed-loop (2026-09-19 ~15:00 UTC, `runs/cl_debug.py`): NOT solved — a head recipe / precision problem, not the code.** Expert through the
55
+ same rollout loop = 30/30. Fresh BC heads (stage3_attrpick-style d128/2-layer MDN, 15-20k steps, batch 512) reach only 3-20% in-rule even on
56
+ RAW GT slots (open-loop cos(xy) 0.44-0.58; verbose rollout: steers to the right object, overshoots ~5 cm on final approach, grasps beside it);
57
+ frozen sparseMI code heads 3-5%. More frames (100k -> 250k) helped raw slots 3% -> 20%. Raw-slot head OOD 0% (takes the red alias too).
58
+ Historic context: Stage-1 policies themselves were 24-60% here. Left as an open item; matrices (accuracy + NLL) are the deliverable.
59
+ Pitfall: `import torch._dynamo` must precede MuJoCo/osmesa imports (lazy import afterwards segfaults, exit 139, no traceback).
60
+ **Closed-loop recipe found (2026-09-19 ~21:30 UTC):** the historical "0.52" was one noisy 25-ep snapshot (neighbours 0.04 / 0.36); today's exact
61
+ reproduction gives 0.04 -> nothing broke. Levers tested on raw GT slots (cube_red, pick small cube, 5000 eps): more data (40k eps) 0%, longer
62
+ training 10-25%, unique-target task mixed (leftmost 40%, small cube 0%), CLEAN deterministic expert (no +-3cm jitter, one speed) 20% with the
63
+ MDN-mode policy, **clean demos + SAMPLED MDN policy = 55% in-rule** (mode policy stalls near the object); DAgger noise 0.05 hurt (10%).
64
+ Raw-slot BC head OOD ~0-5% (it takes the red alias too). `gen_attrpick_s3demos.py --clean [--act-noise]`, `cl_debug.py --sample --support-json`.
65
+ **Closed-loop matrix v1 (2026-09-19 22:30 UTC, `runs/cl_matrix.py`, `results/s3rob_cl/`, 40 eps, clean demos, sampled MDN policy, geometry
66
+ side-channel, GATHERED support columns = essential (masked-in-4096 inputs start ~60x weaker than geometry: vanilla 42-col support 0.30 -> 0.55)):**
67
+ conj cells: sparseMI acc-support (3 cols = cube + small + small literals) 0.33/0.38, 0.68/0.30, 0.47/0.25 (in/OOD); PACS 1-col support
68
+ 0.53/0.42, 0.38/0.07; vanilla sup 0.15/0.15, 0.42/0.20; raw slots 0.38/0.12, 0.40/0.15 (raw-slot BC takes the alias). Leftmost cube:
69
+ vanilla/sup 0.78/0.07, pacs/sup 0.45/0.03, sparseMI/sup 0.35/0.38 (no drop). Single-literal picks are low for every head (~0.1-0.4, multimodal
70
+ targets). NLL-protocol supports are literal-INCOMPLETE (kept "cube" only for small cube: the full-head bar is loose because the 4096-input head
71
+ overfits; even a best-relative bar gives 30-40-col supports) -> use accuracy-protocol supports for closed-loop; NLL matrix = secondary.
72
+ Stage-1 policies themselves: vanilla 0.30/0.27, sparseMI 0.07/0.17 (100k, no bypass). pos-bypass Stage-1 runs: rob_{sparseMI,vanilla}_pb_s1.
73
+ **100-episode closed-loop (2026-09-20 00:30 UTC, `results/s3rob_cl100/`, in/OOD):** small cube: raw .33/.13, sparseMI-sup(3) .21/.19, vanilla-sup(1)
74
+ .09/.11, pacs-sup(1) .38/.30 | leftmost cube: raw .55/.12, sparseMI(10) .31/.30, vanilla(4) .69/.27, pacs(7) .40/.11 | blue cube: raw .41/.17,
75
+ sparseMI(3) .55/.29, vanilla(1) .34/.09, pacs(1) .41/.12 | red cyl: raw .59/.20, sparseMI(3) .55/.22, vanilla(1) .41/.25, pacs(1) .07/.03.
76
+ Mean OOD: sparseMI .25 > vanilla .18 > raw .155 > pacs .14; mean drop sparseMI -16, raw -32, vanilla -22, pacs -18. Absolute rates stay <0.7.
77
+ **pos-bypass sparse+MI code (rob_sparseMI_pb_s1, 100 gate-used cols, 3-5 open/task, compositional: 1516=cube, 1517=small shared across tasks)**:
78
+ accuracy-protocol supports 1-4 cols with 99-100 OOD on 5/6 cells (leftmost 15 cols, 93.6); its own Stage-1 policy is a dead controller (0-3%,
79
+ also with stochastic read) while vanilla_pb's is .38/.35 — Stage-3 fresh heads are what count (closed-loop on pb codes queued, `runs/cl_matrix.py
80
+ --codes sparseMI_pb,vanilla_pb`).
81
+ **IMAGE pipeline (user request 2026-09-20 00:20 UTC: "render the dataset in 192x128", kill prior jobs):** osmesa only (EGL: no NVIDIA vendor lib;
82
+ mesa EGL installed but useless); free camera dist 1.0 / elev -70 / azim 180 / lookat (0.41,0,0.02) covers the whole sampling area
83
+ (`scripts/attrpick_render.py`); default 'front_pixels' camera cuts off far corners. Render cost ~12 fps and ~2.5 cores per process ->
84
+ run 40 concurrent (96 oversubscribed to 200 fps aggregate). Datasets: `data/attrpick_img/stage1/shard_<i>/{lit1.npz,images192.npy}` (92 tasks x
85
+ 20k frames, memmap uint8), `data/attrpick_img/corr/<rule>/{states,images192}.npy` (20k first frames), `data/attrpick_img/ood/`,
86
+ `data/attrpick_img/s3demos_clean/<ds>__<task>/{in,ood}{.npz,_images192.npy}` (6 cells). Queue: `runs/render_all.sh` (jobs in
87
+ runs/render_jobs_s1.txt / _demos.txt; logs runs/render_logs/, RENDER S1 DONE marker in runs/render_all.log).
88
+ Trainers: `scripts/enc_bc_attrpick_img.py` (CLEVR slot encoder resnet18nomp16+DETR, 8 slots, code bits/cont/vae, gate, MI, recon; ckpt
89
+ {"enc","head","args"(robimg=True)}), `scripts/enc_pacs_attrpick_img.py` (28 count/exist literal tasks); launcher `runs/robimg_launch.sh` (waits for
90
+ frames, 2 runs/GPU, names robimg_<code>_s1). Stage-3: `s3fast.py --ckpt-kind bc` auto-detects robimg ckpts (encodes images192.npy); image tasks
91
+ must be scene-level (counts, `leftbin:<lits>`); pick tasks need aligned slots (state codes only). Note: heavy CPU load starves GPU jobs (the
92
+ image-trainer smoke test hung until run with nice -10 via sudo).
93
+ **Bypass-code closed-loop (100 eps, 2026-09-20 01:00 UTC, `results/s3rob_cl100/*pb*`):** sparseMI_pb acc-support heads .31/.32 (small cube, 4 cols),
94
+ .25/.26 (leftmost, 15), .59/.25 (blue cube, 2), .32/.10 (red cyl, 3) vs its 100-col universe head .12/.06, .26/.07, .16/.03, .33/.11;
95
+ vanilla_pb full head .16/.05, .46/.18, .35/.14, .26/.22. Compact literal supports = best OOD and no in->OOD drop on the cube_red cells.
96
+ Render throughput with fast flags: 727 fps aggregate at 80 procs (Stage-1 pool ~42 min).
97
+ **Image Stage-1 (launched 02:14 UTC 2026-09-20; ~5-7 it/s, tcvae 3.3, pacs 2.4):** with the state-code gate schedule (warmup 2000 / ramp 4000)
98
+ the gated image codes COLLAPSED (open cols 2000 -> 0.2-3 by step 8k: BC NLL barely benefits from an immature image code, so L0 closes the
99
+ gate before the code is useful; the state codes kept ~50 open). Restarted sparseMI/onlysparse at 02:41 with --gate-warmup 20000 --gate-ramp 10000
100
+ (logs of the collapsed runs kept as runs/robimg_*_collapsed.log). If it collapses again: halve gate-l1. Rendering total 328 GB
101
+ (`data/attrpick_img`, demos incl.). Image pipeline driver `runs/robimg_pipeline.sh` waits for 8 " DONE " lines in runs/robimg_lane.log.
102
+ **User decision (2026-09-20 03:00 UTC): robotic Stage-3 = CONTROL (closed-/open-loop), not VQA counting.** Image driver `runs/robimg_pipeline.sh`
103
+ now runs `runs/s3bc.py` (image-aware: encodes `<split>_images192.npy`, renders at rollout; `--pos-bypass 0`; `--bar best:0.02` = smallest candidate
104
+ within 0.02 nats of the best candidate's val NLL, because the full-code head overfits and makes the full-head bar loose) over 6 rendered demo
105
+ cells x 8 image codes with 30-episode rollouts -> `results/s3robimg_cl/`. Stage-1 = BC (MDN action NLL) end to end; PACS = literal heads.
106
+ **2026-09-20 04:15 UTC:** with --gate-warmup 20000 --gate-ramp 10000 the gated image codes keep ~8 (sparseMI) / ~4 (onlysparse) open columns per task
107
+ through the ramp with improving NLL (no collapse). Driver `runs/robimg_pipeline.sh` is now per-code (launches S3-control on the code's GPU when
108
+ "robimg_<code>_s1 DONE" appears in runs/robimg_lane.log; results `results/s3robimg_cl/`, logs runs/s3robimg_cl_<code>.log; tables via
109
+ `runs/s3rob_tables.py --nll results/s3robimg_cl`). Paper appendix/downstream updated + committed (09de07f).
110
+ **Image codes at 192x128 DO NOT individuate objects (2026-09-20 05-07 UTC):** Hungarian bitmatch (`runs/bitmatch_robimg.py`, also logged by the
111
+ trainer now) = chance for shape/color/pos (balanced ~50-55), size only 75-90; slot decoder reconstructs arm + table regions, objects (5-10 px)
112
+ blurred away. Tried at 6-10k steps: full-res 128x192 recon fg x20/x50, 16 slots, DINOv2-S backbone, chroma-weighted recon (`--recon-chroma-weight`,
113
+ saturated pixels = objects; got shape/color to ~60-70 only), slot attention: none fixes it. Root cause = object size in the frame.
114
+ Fix in progress: render at 384x256 (`ATTRPICK_RES=384x256`, `data/attrpick_img384/`, Stage-1 10k frames/task, objects 15-20 px like CLEVR);
115
+ `runs/robimg384_launch.sh` trains robimg384_sparseMI_s1 (+ vanilla) when the render finishes. Trainer takes --img-size/--img-w.
116
+ **384x256 alone did not fix perception (07:15 UTC): shape/color/pos still chance at 6k steps; recon masks track the ARM (dominant moving
117
+ distractor).** Next: objects-only view (`ATTRPICK_HIDE_ARM=1` in attrpick_render: alpha=0 for all non-object, non-world geoms; policy keeps proprio)
118
+ -> `data/attrpick_img384h/`, launcher `runs/robimg384h_launch.sh` (sparseMI GPU2, vanilla GPU3). The plain 384 runs keep training on GPUs 0/1.
119
+ **Objects-only 384x256 WORKS in principle (07:55 UTC):** at 4k steps recon shows per-object blobs + elliptical per-slot masks; balanced bitmatch
120
+ color 68 / shape 59 (rising). Killed the with-arm 384 runs; now on 384h: sparseMI (GPU2), vanilla (GPU3), onlysparse (GPU0), pacs (GPU1),
121
+ names robimg384h_<code>_s1. s3bc.py + PACS trainer are resolution-aware (attrpick_render W, --img-size/--img-w). Control Stage-3 on 384h codes
122
+ must run with ATTRPICK_RES=384x256 ATTRPICK_HIDE_ARM=1 in the env (render at rollout) and --demos-dir data/attrpick_img384h/s3demos_clean.
123
+ **KEY BUG/DESIGN GAP (08:20 UTC): the image trainer reconstructed from the CONTINUOUS slot vectors h, so recon never trained the bits; BC alone
124
+ gives the bits nothing (scene-level ridge probe from pooled bits = constant baseline at 8k). CLEVR got away with it because VQA drove the bits;
125
+ the state-based robotic trainer reconstructs FROM THE BITS. Added `--recon-from-code 1` (zproj F->slot_dim on the ST code sample, saved as
126
+ "zproj") and restarted sparseMI/vanilla/onlysparse on 384h with it (logs of the old runs: *_reconslots.log). PACS unchanged (linear heads on z).
127
+ **09:20 UTC: recon-from-code bits SATURATED into constants by 10-12k steps (0% mushy columns, per-column activation ~all-0/all-1 over slots,
128
+ probe back to baseline, recon plateau 0.17) — tau=0.3 fixed from step 0 kills ST gradients under weak BC supervision. Added --tau-start 2.0
129
+ --tau-anneal 20000 (geometric to 0.3) and restarted sparseMI (GPU2) / onlysparse (GPU0) on 384h; vanilla (cont) and PACS untouched.
130
+ Old logs: *_tau03.log.
131
+ **10:00 UTC: tau anneal did NOT prevent the collapse** (at 6k, tau 1.1: mushy 0.1%, columns constant across slots, probe at baseline): recon from
132
+ noisy ST samples has a degenerate optimum (constant bits + mean image). Switched to `--recon-from-code 2` = decode from the SOFT code 2p-1
133
+ (policy still uses ST samples); restarted sparseMI/onlysparse (old logs *_hardrecon.log). Vanilla (cont, recon from its RMS z) unaffected.
134
+ **10:25 UTC: soft recon also collapsed by 2k (bits identical across slots, within-scene std 0.001; columns constant).** Cause = BC loss: Bernoulli
135
+ bits are noise for a policy that can use proprio, so it drives the code to constants. Added `--bc-detach-steps 10000` (encoder gets no BC
136
+ gradient early; recon shapes the code first) and restarted sparseMI/onlysparse (old logs *_softrecon.log). If this fails too: deterministic ST bits
137
+ for the policy path and/or recon weight >> 10.
138
+ **10:45 UTC: BC-detach works so far** — at 4k (tau 1.37, BC detached) bits are alive: mushy 89%, within-scene std 0.30, column std 0.32; probe from
139
+ probabilities color 62 / posy 58 / size 51 / posx 48 (baselines 33/37/31/39). Watch the 12-16k checkpoints (BC gradients re-attach at 10k).
140
+ **11:30 UTC, 20k steps (tau 0.3):** code informative (probe from probs color 59 / posy 64 / posx 60; single-column bitmatch color 80-84, size 90,
141
+ pos ~60) but bits are UNCOMMITTED (95% mushy: soft-code recon has no pressure to saturate). Plan: if still >80% mushy at ~26k, kill and RESUME
142
+ the same checkpoint with `--recon-from-code 1` (hard ST recon) now that the code carries information; the trainer resumes from --ckpt.
143
+ **12:15 UTC, sparseMI 384h @40k (hard recon since 26k, gate ~8 open/task):** probes from probs color 78 / posx 68 / posy 68 / size 58 (hard bits
144
+ 69/62/64/49), shape still chance; mushy 88% (slow commitment). Vanilla 384h finished 12:03 -> control Stage-3 launched by the driver.
145
+ Recipe that works so far: 384x256 objects-only frames, chroma-weighted recon at 128x192, recon from the code (soft 2p-1 for the first 26k steps,
146
+ then hard ST), tau 2.0->0.3 over 20k, BC detached from the encoder for 10k, gate warmup 20k / ramp 10k.
147
+ **12:30 UTC:** vanilla 384h control cell = head == floor (code unused by the policy, closed-loop 0). Shape never decodable at 128x192 recon
148
+ (objects ~9 px) -> added `--recon-up 1` (x2 upsample: recon target 256x384) + `--recon-hard-from 26000` (in-run soft->hard switch); launched
149
+ robimg384h_sparseMIhr_s1 (GPU 0, replaced the onlysparse ablation) with the working recipe + hi-res recon. Its control Stage-3 is NOT in the
150
+ driver's list (run manually: same s3bc command with --ckpt runs/robimg384h_sparseMIhr_s1.pt). Main sparseMI 384h run ends ~13:30 UTC.
151
+ **13:00 UTC:** hi-res-recon variant (recon-up) COLLAPSED to constant bits by 6k even with soft recon + BC detach (killed). Main sparseMI 384h
152
+ continues: at 60k a frozen copy `runs/robimg384h_sparseMI_s1_60k.pt` is made (driver runs S3-control on it) and training resumes to 100k
153
+ (`runs/robimg384h_continue.sh`, GPU 0). Driver now waits for the frozen copy for sparseMI.
154
+ **15:15 UTC, image sparse+MI 60k control cells (results/s3robimg384h_cl, tag robimg384h_sparseMI_s1):** head beats the proprio floor in-rule in
155
+ every cell (0.05-0.17 nats) and drops OOD on cube tasks (alias); supports 47-60 cols (shape not literal); closed-loop full head 0.03-0.37 in-rule
156
+ (pick cube 0.37/0.13 with sampled policy), support heads ~0. Fixes applied to s3bc: sampled MDN policy (--policy-sample 1), W1 init scaled to
157
+ |S| (support heads were ~9x under-scaled). Rollout redo of the 5 cells running on GPU 3 (monitor); vanilla image code = floor everywhere.
158
+ Continuation to 100k running (shape bitmatch 55-65 now); `runs/robimg384h_s3_100k.sh` evaluates the 100k code (tag robimg384h_sparseMI100k_s1).
159
+ Committed 4b231d1.
160
+ **15:55 UTC — FIRST WORKING IMAGE-BASED CLOSED-LOOP CONTROL from the sparse+MI code (60k, objects-only 384x256):** red_cube / pick red: full-code
161
+ head NLL -7.12 vs floor -6.69, OOD -7.01 (no alias drop), closed-loop 0.40 in-rule / 0.27 OOD (sampled policy). Cube tasks weaker (shape missing).
162
+ Support heads (47-60 cols) dead in closed loop even with scaled init -> suspect the decision-frame scoring window (1..11) drops columns needed
163
+ for later approach/grasp; testing the self-supervised slot-geometry side-channel (`--slot-geom 1 --pos-bypass 1`, decoder-mask centroids of
164
+ the frozen model, tag robimg384h_sparseMIgeom_s1, chain runs/robimg384h_geomtest.sh) on pick red + pick cube. Alternative: score-steps 1:40.
165
+ **16:50 UTC: the sparseMI image code COLLAPSED late (between ~96k and 100k): final ckpt 99% mushy, bits identical across slots (probe = baseline).
166
+ The frozen 60k copy (`runs/robimg384h_sparseMI_s1_60k.pt`) is the usable code. 100k control chain killed. Lesson: keep snapshots
167
+ (`--snapshot-every` added) and treat >60k as unstable under the BC pressure. Slot-geometry side-channel test did NOT help (head at floor).
168
+ Long scoring window (1:60) makes the NLL blind to the code (0.03 nats) -> keep 1:12. Dead support heads: dropout fix under test.**
169
+ **2026-09-20 17:00-20:00 UTC — POSITION PRECISION is the image-code bottleneck (`runs/posprobe_robimg.py`, unique-target scenes, target (x,y)
170
+ from code tokens):** sparseMI 60k: bits 6.6 cm val / 7.2 OOD, soft 5.9, pre-bottleneck slot vectors h 3.8 (object half-extent 3 cm; a grasp
171
+ needs ~1-2 cm); vanilla and PACS image codes = chance (~34 cm) on every input; pick-cube target = chance (shape not encoded). Stage-1 image
172
+ policy itself 0/0 in closed loop in all decoding modes (`runs/cl_stage1_img.py`; the state sparseMI Stage-1 policy was ~0 too, so not diagnostic
173
+ alone). DETR cross-attention is peaked per head (layers 0-4) but NOT on objects (centroids add nothing). GT-geometry bypass is impossible for
174
+ image codes (8 slots vs 5 objects, no assignment). Support heads without column dropout: still ~0 (0.17/0.00, 0.07/0.03, 0.03/0.00).
175
+ Decoder masks of the 60k code: median matched centroid error 6.0 cm, 23% of objects within 3 cm (`runs/where_eval.py`: affine fit + Hungarian) —
176
+ recon = big blurry blobs (~3x object) = the decoder hedging over position uncertainty.
177
+ **Self-supervised per-slot WHERE (the image analogue of the state pos-bypass; policy consumes it DETACHED):** v1 (`--where 1`, head on the slot
178
+ vector + tanh) saturated at (+1,-1) with zero variance (decoder absorbed the constant shift); v1b (linear zero-init + `--where-consistency` to
179
+ the mask centroid) tracked the centroids (6.3 cm at 10k) but once the BC gradient reached it (10k) it became a free policy feature (29 cm at
180
+ 20k) -> the where must get NO BC gradient. v2 (`--where 2`, scripts/robimg_where.py: soft-argmax of a learned key/query attention of each slot
181
+ over the 32x48 DETR token grid, decoder coordinate channels relative to it, consistency 0.3, where detached for the head) launched 19:56 UTC as
182
+ robimg384h_sparseMIwa_s{1,2} (GPUs 3/2), snapshot waiter evaluates 10k/20k/... (where_eval, posprobe --where 1, cl_stage1_img).
183
+ Consumers: `robimg_geom.load_where(ck, dev, enc)` -> callable(h); s3bc `--slot-geom 2 --pos-bypass 1` uses it as the geometry side-channel.
184
+ Other: onlysparse 384h collapsed by 14k (no MI -> 2-3 distinct columns; killed); one sparseMI-where seed blew up at 8.4k (pairwise MI 500 ->
185
+ 60000, recon 0.09 -> 0.18, never recovered) = the recipe's stochastic instability (keep snapshots, expect ~1 in 3 seeds to die).
186
+ PACS 384h image code: control cells all 0/0 (5/6 done), position probe = chance. Plain sparseMI seed 2 (robimg384h_sparseMI_s2) at 44k, healthy.
187
+ **21:30 UTC — ROOT CAUSE of the image-code position problem: the bits are MUSHY (72% of p in (0.2,0.8)) and Stage-3 read THRESHOLDED bits.** With the
188
+ camera calibrated (`runs/cam_calib.py` -> stage3_eval/cam_calib_384x256.json, affine, 0.9 cm residual; the self-fitted affine in where_eval was
189
+ stretched 1.3x by bad matches -> use `--calib`), the 60k code's decoder masks are precise from the SOFT code (2p-1): weighted recon 0.047 vs
190
+ mean-image 0.183, mask-centroid error median 1.5 cm, 74% of objects within 3 cm; from thresholded bits: recon WORSE than the mean image
191
+ (0.219), centroids 12.8 cm. So: s3bc `--code-read soft` (policy/probe input = 2p-1) and `--slot-geom 3 --pos-bypass 1` (saturation-weighted
192
+ centroids of the SOFT-decoded masks = self-supervised geometry channel); the old slot-geom (hard bits) was garbage, which is why it "didn't help".
193
+ Launched control chains on the 60k code: tags robimg384h_sparseMIsoft_s1 (soft read) and robimg384h_sparseMIsoftgeom_s1 (soft + geometry)
194
+ (`runs/robimg384h_control.sh <ckpt> <tag> <gpu> [universe] "<extra flags>"`). Learned-where runs (v1/v2/v2b) all abandoned: tanh saturation /
195
+ BC gradient hijack / trivial global-centroid solution / seed collapse. Plain sparseMI seeds 3,4 launched (GPUs 3/2); seed 2 is a weak seed (bits
196
+ probe at chance, control cells at floor). Matched-recipe vanilla (robimg384h_vanillaM_s1: cont code + bc-detach 10k) has color 81-86 balanced by
197
+ 10-18k = the old vanilla's failure was the recipe (no bc-detach), NOT the code type -> the image table must use matched-recipe baselines.
198
+ **2026-09-21 02:00 UTC — image sparse+MI SEED STATISTICS (plain recipe, 60k):** s1 good (the reference 60k code); s2 weak (color 52 at 60k, control at floor);
199
+ s3 dead at 18k; s4 oscillated (color 81@20k -> 50-72 -> 53@60k; control at floor); s5 dead at 42k (40k snapshot color 66, chain running on GPU3).
200
+ Collapses = pairwise-MI blow-up (columns identical) in the 8-10k window (BC reattach) or the 20-30k window (gate ramp + soft->hard recon).
201
+ Stabiliser test: robimg384h_sparseMImi3_s6 (MI 3e-6, else identical) on GPU 2. Snapshot selection rule for the table: best validation
202
+ balanced bitmatch among 10k..60k snapshots (no OOD data); s1 has only its 60k copy.
203
+ **Soft read + soft-mask geometry (`--code-read soft --slot-geom 3 --pos-bypass 1`) on the s1 60k code, 30 eps:** support heads 0.43/0.43 (pick red,
204
+ 39 cols), 0.43/0.17 (cube, 16), 0.20/0.10 (small cube, 18), 0.30/0.03 (leftmost, 17), 0.03/0.03 (blue cube, 43), 0.40/0.10 (red cyl, 25) vs
205
+ full heads 0.07-0.27; 100-ep redo (tag sparseMIsoftgeom100_s1): pick red support 0.51/0.52 vs full 0.37/0.31; cube 0.30/0.19 vs 0.24/0.10.
206
+ Soft read WITHOUT geometry: supports ~0 on conjunctions -> the geometry channel is the essential ingredient. PACS + geometry: still floor (0/0).
207
+ Matched-recipe vanilla (robimg384h_vanillaM_s1): balanced bitmatch peaks 68 @10k (color 86) and ends 62 @60k (color 59); control chains with
208
+ geometry running for both snapshots (tags vanillaMgeom10k_s1 / vanillaMgeom_s1). Table script: `runs/s3robimg_tables.py --tags ...`.
209
+ Ops: ONE s3bc chain per GPU when the geometry decode is on (two chains OOM at 80 GB); queue script in the scratchpad (queue_chains.sh).
210
+ **2026-09-21 07:30 UTC — USER PRIORITY: beefed search on the CLEVR baselines (bvae/tcvae/pacs; vanilla appended last), seeds 1-4, over the
211
+ robotic work.** Driver `stage3_eval/moresearch_baseline_cmds.py` (failed cells = search OOD < 0.85 from results/s3 (s1) and
212
+ hf_results/results/savio-a5000 (s2-4, downloaded from GGOSinon/sparsewm-stage3-eval); 120-model population 24 x {0.5,1,2,4,8}e-4, bs 256,
213
+ --cont-code, out results/s3_moresearch, per-job logs runs/moresearch_logs/). 518 jobs (bvae 101, tcvae 165, pacs 179, vanilla 73), queued
214
+ seed-major on `runs/gpuq.py` (48 GB/job, 1 job per GPU; GPUs join as the robotic jobs free them). Compare with
215
+ `stage3_eval/compare_moresearch.py [codes]` (OLD_HF now = hf_results/results). The git pull that brought moresearch_* left s3fast.py in
216
+ conflict; resolved in a567601 (local VQA/robotic branches kept + remote code cache). Robotic lr2e-4 seeds: s7 done (60k best, bal 69.5,
217
+ control chain on GPU3), s9 done, s10 training on GPU0 — their control chains are deferred until the beefed queue drains.
218
+ **Beefed search on the baselines, interim (2026-09-21 19:45 UTC, 208/518 cells; seeds 1-2 of bvae/tcvae/pacs done, vanilla s1 done):**
219
+ bvae 37 cells mean d=+2.4 (12 recovered >+8, 4 worse); tcvae 61 cells +1.6 (8/3); pacs 89 cells -0.3 (3/3); vanilla 21 cells -1.2 (4/6).
220
+ Supports barely change size; swings of +-8..22 in both directions = re-selection noise; heads on the failed cells are low (tcvae 58 mean)
221
+ -> baselines are ENCODER-limited, not search-limited. ~17 min/cell on an H100 at bs 256 (4 GPUs -> ~14 cells/h).
222
+ **Search-population experiments, combined (2026-09-22 03:40 UTC; `stage3_eval/moresearch_summary.py` -> results/s3_moresearch_summary.{md,tex}):**
223
+ HF folders: savio-a5000-beefed (gated codes, 120-pop for sparseMI / 60 for the ablations, same lambdas 5e-5..8e-4, bs 128),
224
+ savio-a5000-sparse-A/B (gated codes, pop 64-128, WIDER/STRONGER lambda grid 2e-4..6.4e-3; B = subset of A's cells), results/s3_moresearch
225
+ (this node: continuous baselines, 120-pop, bs 256). Mean delta OOD on failed cells: sparseMI +17 (beefed) / +25 (grid A, 9/14 recovered,
226
+ 0 worse, |S| 6.8->4.4); onlyMI +13 / +40; nothing +5 / +14; onlysparse +2.5 / +13; continuous baselines +2.1 (bvae), +1.7 (tcvae),
227
+ -0.3 (pacs), +1.2 (vanilla) with |S| unchanged. => gated codes' failures are SEARCH-limited (bigger population / stronger sparsity
228
+ recovers them with smaller supports); continuous baselines are ENCODER-limited. compare_moresearch.py: MORESEARCH_NEW=<dir>, old = default sweep only.
229
+ **2026-09-22 05:30 UTC — NO-FALLBACK rule adopted (user: "that is unfair").** Cells with no bar-passing candidate report the FULL CODE
230
+ (|S| = universe, accuracies = head). s3fast `--gate-fallback none` (search_mode "gate-full"); summarize.py/compare/moresearch_summary apply
231
+ the rule to old JSONs (search_mode == "gate-best"). Paper tables regenerated by `stage3_eval/paper_tables.py --dir results/s3_seeds1234`
232
+ (symlinked seeds 1-4 JSONs: results/s3 + hf_results/results/savio-a5000): results/s3matrix.tex, s3matrix_head.tex, s3matrix_avg.tex,
233
+ s3_ablation_matrix.tex (new), s3_pacs_vs_ours*.tex; 4-seed headline: ours support OOD 92.6±2.6 / |S| 6.9 (2 full-code cells of 288);
234
+ Vanilla 88.7 (51), bVAE 85.7 (89), TC-VAE 76.3 (114), PACS 76.2 (11); ablations 90.9 / 87.9 / 83.4 with 97 / 151 / 189 full-code cells.
235
+ Beefed search re-read under the rule: only OURS gains (+17, |S| 10.7->6.7); baselines/ablations ~0. s3_maintask.tex / s3_ablation.tex
236
+ (single main task, 45k scenes) are a different experiment and were NOT regenerated.
237
+ **2026-09-22 12:30 UTC:** beefed baseline queue done (517/518 + last cell running); finisher script regenerates results/s3_moresearch_summary and
238
+ uploads results/s3_moresearch to HF as results/h100-node-beefed. Paper tables (all from `stage3_eval/paper_tables.py`): s3matrix (+_ablation,
239
+ +_head OOD-only), s3matrix_avg, s3_ablation_matrix, s3_maintask / s3_ablation = matrix AVERAGE rows (user's choice; the 45k single-task
240
+ experiment is retired), s3_pacs_vs_ours(+_2x2), s3_rules (Test: no sparsity rule = head vs sparsity rule = support). Robotic lr2e-4 seeds:
241
+ control chains launched s7 (60k, resume), s9 (60k, bal 70.7, 79 cols), s10 (30k snapshot by val bitmatch 65.0, 138 cols) with soft read +
242
+ geometry; results tags robimg384h_sparseMIlr2geom_s{7,9,10}.
243
+ **2026-09-22 15:30 UTC — image control table (results/s3robimg_cl.tex; 30 eps; soft read + geometry):** sparse+MI seeds s1(plain 60k), s7/s9/s10
244
+ (lr2e-4): support in/OOD means 0.30/0.14, 0.11/0.04, 0.28/0.17, 0.32/0.17 (|S| 26-48); full heads 0.11-0.28 / 0.06-0.13. 4-seed mean:
245
+ support 0.25±0.10 / 0.13±0.06 vs full 0.17±0.08 / 0.09±0.03. Best cells: pick red support 0.43-0.63 in-rule with no OOD drop (s1/s9/s10);
246
+ cube/conjunction cells 0.1-0.4 in-rule, OOD 0-0.2 (alias). Baselines same protocol: matched vanilla 10k 0.10/0.04 (its 60k 0/0), PACS 0.02/0.
247
+ Seed 7 is the weak lr2e-4 seed despite the best bitmatch (color 88): bitmatch does not predict control success. Beefed baseline run complete:
248
+ vanilla +0.0, bvae +0.1, tcvae +0.7, pacs +0.0 (4 seeds, no fallback) vs ours +17 -> encoder-limited baselines; JSONs on HF results/h100-node-beefed.
249
+ **2026-09-23 — LINEAR-HEAD ablation of our code (user request):** enc_vqa_binary `--head-mode linear` (LinearTaskHead: per-task weight row over
250
+ fields, slot-sum, ordinal logits; sparsity = --prox-wl1), same recipe otherwise (MI 1e-6, 60k, 20 it/s). Runs vqa_bal_linhead_mi{,_wl1e-3,_wl1e-2}_s1:
251
+ bitmatch 77.1 / 79.7 / 71.6 (vs 98.7 transformer head), task acc ~65% (query/hop families ~0). Stage-3 matrix on the wl1e-3 variant
252
+ (checkpoints/linheadMI_s1.pt, codes.txt tag linheadMI, results/s3_linhead, HF results/h100-node-linhead): head 90.8/77.4, NO bar-passing
253
+ support in 66/72 cells -> support OOD 77.3 at the full code (PACS-like regime). Tables: results/s3_linhead.tex (stage3_eval/linhead_tables.py);
254
+ bitmatch table has a dagger row (1 seed). Pitfall: a trailing "# comment" on a codes.txt line is passed into the shell command and comments out
255
+ the COMMON flags -> wrong protocol; keep comments on their own line.
notes/claude-memory/s3fast-matrix.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: s3fast-matrix
3
+ description: fast single-task Stage-3 tool (runs/s3fast.py) and the 8-code × 15-dataset × 2–4-task matrix launched Sep 16 2026
4
+ metadata:
5
+ type: project
6
+ ---
7
+
8
+ `runs/s3fast.py --ckpt X --dataset DIR --tasks "a=v;a=v,b=w" [--cont-code]`: encodes the (dataset, checkpoint) code once
9
+ (6 s for 12k scenes), then per task runs the support search (same protocol as support_search_delta: bar = full-code val −
10
+ 0.005, peeling + verification + backward elimination + LOO) with all query×seed probes trained as ONE batched model
11
+ (mask on first-layer weights, kept zero in-place; input restricted to the current universe U; bf16; 4000 steps). "head" =
12
+ the full-code per-slot-MLP probe (3 seeds, median) — NOT the transformer head of the main table (sparse+MI: MLP head 90.7
13
+ OOD vs transformer 70). ~6 min per task (was ~30 min); 4000 steps are required (2000 → under-fit probes, val 90 vs 99).
14
+ Protocol: 8k in-rule train / 2k in-rule val / 2k full-distribution test; cells = train/val/test (|S|).
15
+
16
+ Matrix: codes = seed-1 ckpts of sparseMI, onlysparse, onlyMI, nothing, vanilla, bvae(1e-5), tcvae(1e-3), pacs(b512)
17
+ (`runs/s3matrix_codes.txt`); tasks per correlation dataset in `runs/s3matrix_tasks.txt` (antecedent, consequent,
18
+ antecedent∧unrelated literal); 120 gpuq jobs (8 GB each), outputs `runs/s3fast/<tag>__<dataset>__<task>.json`, logs
19
+ `runs/s3fast/<tag>__<dataset>.log`. Launched 15:50 UTC Sep 16, ETA ~5 h.
20
+
21
+ **Why:** user wants Stage-3 repeated over many downstream tasks and dataset categories; the old chain was too slow.
22
+ **How to apply:** summarise with a script over the JSONs (head ood, |S|, search train/val/test) → artifact matrix section;
23
+ seeds later only for cells that matter. See [[pacs-baseline]], [[gtmask-gate-findings]].
24
+
25
+ **Results (Sep 17 02:00 local; 344/344 cells, artifact v33, results/s3matrix*.tex):** compact-and-transferring (|S|≤10, test≥94):
26
+ sparse+MI 36/43 (fails only on 5 shape/size-aliasing ANTECEDENT tasks — alias support 4–8 cols @ 20–59 test), PACS 28 (1–4 cols
27
+ @ 98–100 on 28/30 single-literal tasks incl. the aliasing antecedents, but cannot fit ANY conjunction task even in-rule — val 55–79
28
+ — scene-level count features, not per-slot literals), only MI 20, only sparse 12 (10–100× larger, seed-dependent supports),
29
+ nothing / vanilla / β-VAE / TC-VAE 0 (|S| 9–2229). PACS's pretraining tasks ARE single-literal counts → those cells are in-distribution for it.
30
+
31
+ **Non-linear task categories (Sep 17 ~05:00 local):** added to s3fast: `!lit` negated conjunctions; `distinct:<attr>|<lits>`;
32
+ `leftofbin:<lits>` (# objects whose x-bin < leftmost-L x-bin; continuous-x version is capped ~80 by 8-bin positions even on GT).
33
+ Probes: `--probe ctx` (per-slot MLP → max-pool context broadcast → 2nd per-slot layer) + `--pool meanmax` + lr 1e-3, 8000 steps
34
+ is the protocol for distinct/leftofbin (ours: head val 95 / 83; attn probe fails on 4096-wide input: 70; padded-noise oracle
35
+ is not diagnostic). GT-code oracle: distinct 99.7, leftofbin(attn) 100. 360 jobs queued → runs/s3fast2/, gpuq MAX_PER_GPU=4.
36
+
37
+ **Sep 17 ~08:30 local — probe family changed to TRANSFORMER per user ("MLP-probe results are trash").** `--probe tf` = per-slot
38
+ projection 4096→256 + input LayerNorm (`--in-ln`), 4 pre-LN blocks (4 heads, MLP 512), mean-pool (meanmax for leftofbin),
39
+ warmup 200 + cosine, lr 3e-4 (1e-3 unstable), 4000 steps, batch 256, torch.compile with shape bucketing (`--compile`), search
40
+ with `--kq 16 --peel-seeds 2 --loo 16`. In-rule val on our code: single-literal counts 98–99.5, conjunctions 98–99, leftofbin
41
+ 88–89; DISTINCT-VALUE ~82 (train 98–99 with a gate; transformer memorises on the 4096-wide input; GT code 99.8) → category
42
+ DROPPED by user. Old MLP-probe results: runs/s3fast (keep for reference only; not in paper). New outputs runs/s3tf/
43
+ (240 jobs, 584 cells = 43 original + 15 negated-conj + 15 leftofbin per code × 8 codes; paper methods first). ~10 min/task alone.
44
+ - Protocol update (Sep 17 ~10:30 local): transformer probe seed spread ~1.5 pt > 0.5-pt bar → peel stalled (count spheres: 140 cols). Fix: `--seeds 3 --peel-seeds 3 --agg max` (decisions/reports use the best-trained seed) → 3 cols @ 98.5. gpuq MAX_PER_GPU=1 (2/GPU was 3–4× slower each). ~14 min/task alone; 584 cells relaunched 10:35 local, paper methods first (~21 h).
45
+ - Sep 17 ~13:30 local: user chose bar = full − 1.0 pt (`--thr-delta 0.01`) for the transformer protocol → full matrix re-queued into runs/s3tf10/ (the −0.5 pt partial run in runs/s3tf/ kept for reference: sparse+MI supports inflated 25–405 cols, 2 extra conj flips).
46
+ - Sep 17 ~15:00 local: ROOT CAUSE of transformer-probe seed spread = global grad-norm clipping impossible / no clipping: the empty-support model's input-LN gradient explodes (1e22); without clipping ~1/3 of seeds collapsed to the floor. Fix: PER-MODEL grad clipping (`--clip 1.0`) → seeds within 0.3 pt (98.7–99.9). Protocol reverted to bar −0.5 pt, median seeds, peel-seeds 2; matrix re-queued into runs/s3tfc/ (584 cells).
47
+ - Sep 17 19:40 UTC: user: restrict the search universe to Stage-1-used columns. Gate-used (gate>0.5 in any of 869 eval tasks): sparseMI 99, onlysparse 122, onlyMI 1628, nothing(dense60k_s1) 3096 cols → runs/universe_*.json, s3fast --universe-file (head stays full-code; falls back to full universe if the restricted probe misses the bar). PACS: IRLS heads never zero exactly — union of per-task used columns is 4096 even at |phi|>10% of max (each task uses a different ~100) → PACS keeps the full universe; vanilla/VAEs have no Stage-1 selection → full universe. Matrix re-queued into runs/s3tfc/.
48
+ - Sep 17 22:30 UTC: per-task profile (41 sparse+MI cells): median 5 rounds, 151 probes, 14 min; >50% of time was 20–30 tiny sequential elimination batches (24–49 s each). Replaced with a single-batch bisection-tree evaluation (accept the largest passing subtree per round). Seed-variance check queued: 6 flip-prone tasks × sparse+MI seeds 2–4 (universes 85/90/100 cols) + seed-1 probe-seed repeat → tags sparseMI_s{2,3,4}, sparseMI_rep in runs/s3tfc/.
49
+
50
+ **Gate-based search (user's idea, Sep 18 ~03:00 UTC) — WORKS.** `--search gate`: population of 96 gated transformer probes
51
+ (4 λ × 24 inits; stochastic straight-through binary gate on code columns — a plain sigmoid gate + L1 is scale-invariant under the
52
+ input LN and collapses; gate needs its own lr 0.03; penalty λ·Σσ(g), useful λ 1e-4…5e-4), candidate supports = open gates,
53
+ re-scored with clean probes vs the −0.5 bar, pick the smallest passing. Seed-1 sparse+MI aliasing cells: cube→gray 4 cols @97.8,
54
+ multi2 spheres 3 @98.7, cube→red 5 @98.0, multi3 4 @97.4 (peel: coin-flips / alias). ~150 models/task. Validating on ungated codes.
55
+ Peel seed-variance (sparse+MI, 4 encoders + probe-seed repeat): non-aliasing failures = search randomness; cube→red alias 4/4;
56
+ cube→gray / multi2 / multi3 literal in ~40% of runs; in-rule val cannot select (identical by definition), |S| partly can.
57
+ - Gate search validated on other codes (cube→gray count cubes): only-sparse / nothing / vanilla → no candidate passes → peel fallback
58
+ (9 @51, 1596 @35); PACS → with the singleton stage (top-32 most-kept columns as size-1 candidates) finds its 1-col count feature
59
+ @99.0. sparse+MI cube→red → 4 cols @97.9. Peel literal rate on encoder 1 over 5 probe seeds: aliasing antecedents 0–2/5,
60
+ non-aliasing 3–4/5. Awaiting user decision on relaunching the matrix with `--search gate` (peel fallback).
61
+
62
+ **Seed-1 gate-protocol sweep COMPLETE (Sep 19 ~04:00 UTC): 576 cells = 8 codes × 72 tasks (ante 15, cons 12, conj 15, neg 15, rel 15).**
63
+ Results in results/s3/*.json (tags <code>_s1), uploaded to HF results/h100-local/, LaTeX results/s3_gate_seed1_families.tex.
64
+ Compact&transfer (≤10 cols, ≥94 OOD) over the 57 non-relation cells: sparseMI 55, onlysparse 37, onlyMI 17, nothing 5, vanilla 13,
65
+ bvae 4, tcvae 21, pacs 26 (all 26 = single-literal; 0/29 non-linear). Family OOD/|S|: sparseMI conj 98.7/6, neg 98.3/6, single 95.4/5
66
+ (misses = cube→red alias, cube⇔region 87); PACS single 96.6/2 but conj 62. Relation: sparseMI 87.4 @10 cols (bin ceiling ~89),
67
+ others 16–37 cols. Seeds 2–4 left to the external run (stage3_eval/AGENT.md). Protocol: gate population 48 (λ 1e-4,2e-4,4e-4 ×16),
68
+ rescoring 2 seeds, bar = head−0.5, best-val fallback, no LOO. Head-val bars: min 93.9 (literal codes) / 82 (nothing); fixed bar 95 ≈ equivalent.
notes/claude-memory/scale-baseline-findings.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: scale-baseline-findings
3
+ description: "4xH100 unconstrained baseline results — 96% plateau is encoder position precision at bin boundaries, not capacity/interference/data"
4
+ metadata:
5
+ node_type: memory
6
+ type: project
7
+ originSessionId: fc0a8a62-25d1-45df-8e93-3a8afe205b5a
8
+ modified: 2026-09-01T19:04:06.210Z
9
+ ---
10
+
11
+ Findings from the 2026-09-01 4×H100 unconstrained-baseline campaign (see [[h100-node-setup]]):
12
+
13
+ - Vanilla run (no sparsity/MI, resnet18nomp, eff. batch 1024, tpi 32, lr 3e-4 const, 1M chunk stream): plateaued at ~94.1–95.4 MEAN for 140k+ steps (~200M images) — scale does NOT break the ~96% ceiling; not data/step starvation.
14
+ - User-run GT-slots with this architecture: 100% → head + task setup + code layout exonerated; bottleneck is encoder→code formation.
15
+ - `scripts/diag_pos_margin.py` (accuracy vs distance-to-G-bin-boundary, 4-GPU sharded): hop_query 77%@margin<0.05 → 99.4%@margin>0.3 (22-pt swing; posfree control only 98.2→100). **The plateau is encoder position precision at bin boundaries.** Train tasks ≈ held-out tasks (83.4 vs 83.9 hop_query) → task generalization irrelevant.
16
+ - Throughput on 4×H100 (B=256/GPU): tpi 8/16/32/64 → 6.7/5.7/4.4/3.0 it/s; tpi=32 is the knee. 64×96 recon decoder: ch64/L3 fits (−42% it/s); ch96/L4+ OOMs at full batch (per-slot broadcast = B×11 maps; each conv AND GELU output stored ≈ 6.6GB per ch96 tensor).
17
+ - Recon target was aspect-squished (128×192→32×32); now 32×48 via `--recon-w`. Recon renders cubes cylinder-ish partly because cube yaw is randomized in Blender but absent from the 7-field state (verified visually) — irreducible for the decoder, don't chase it.
18
+ - wandb: account ggosinon, project sparsewm; float image arrays must be ×255-uint8 (modern wandb doesn't rescale).
19
+ - Next lever (running as `r16_tpi32_lr1e4`): resnet18nomp16 finer feature map + lr 1e-4 const.
20
+
21
+ **Update 2026-09-02 — slot attention was the encoder bottleneck.** Supervised GT recovery (`enc_supervised_gt_clevr.py`, now DDP-capable, `--slot-module detr`): resnet18nomp16 + slot attention capped at posX 83.5/posY 84.8 after 100k steps (categoricals ≥95); ViT backbone (vit_p8_d384_l12, rectangular ViT + sized parsing added) was far worse (shape ~58 — inductive bias, not capacity). Swapping slot attention for a DETR-style query decoder (`DETRSlots` in sanity_synclevr_encoder_slot.py: 11 learned queries, 6-layer transformer decoder over the same CNN tokens) hit ALL attrs ≥95 by 20k steps (positions 96+, categoricals ~100) — slot attention's soft-mask averaging, not the 8-px feature grid, was the position ceiling. `enc_vqa_maskproj.py` also supports `--slot-module detr` now; run `vqa_detr_mlpread` tests whether it breaks the ~96% VQA ceiling. Caveat: DETR queries lack slot attention's competition → unsupervised binding pressure weaker; check slot decomposition in recon/Stage-2 before relying on it for the disentanglement story.
22
+
23
+ **Stage-1 LR rule (user default, 2026-09-04):** lr 1e-4 with COSINE decay to 0 over 100k steps (no --lr-const, --steps 100000). Replaces the const-lr + manual 3e-5-tail-at-95k recipe — the DETR runs showed everything interesting happens by ~100-120k and the cosine endgame subsumes the tail. enc_vqa_binary.py defaults updated; launch script updated. Tau anneal should be set to complete within the same 100k (tau_at uses --steps, so it follows automatically).
24
+
25
+ **Binary code is the DEFAULT Stage-1 (user, 2026-09-04):** `enc_vqa_binary.py` (per-field sigmoid + straight-through, F=64 bits/slot, native-Bernoulli MI, baked-in [bitmatch]) replaces enc_vqa_maskproj.py for new runs. Launcher: `runs/launch_binary.sh` (NAME/GATE_L1/WEIGHT_L1/MI env vars). Eval scripts accept `--binary-code` (stage2_recovery_clevr.py, stage3_subspace_multitask.py): bits are presented as [1-b,b] so all F x 2 protocols run unchanged. Old softmax ckpts still evaluable via the existing flags.
26
+
27
+ **Fast profile (2026-09-04):** enc_vqa_binary.py now supports --bf16 (default on; MI fp32, eval fp32), --compile (torch.compile of train-path enc/head; ~2x), recon skipped at --recon-weight 0, fused AdamW, --eval-scenes. Measured 4xH100 rates (b256, binary DETR stack): tpi32+compile+no-recon = 12.4 it/s -> 100k in 2.25h (vs 2.2 it/s original). Recon-on compiles poorly (4.0 it/s). launch_binary.sh defaults: compile, TPI=32, RECON_W=0 — note recon-off is a semantics change (no completeness anchor); re-enable with RECON_W=10 when the task pool is narrow.
28
+
29
+ **wandb restart gotcha:** wandb-name doubles as run id (resume="allow") — a FRESH restart under the same name gets its early steps silently dropped until it passes the dead attempt's max step (monotonic-step rule), leaving the old data in the charts below that point. Rule: same id only for true ckpt continuations; config-changed restarts get a new name (-r2 …). Local runs/*.log is always ground truth.
notes/claude-memory/single-literal-findings.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: single-literal-findings
3
+ description: "Single-literal (31 count-task) disentanglement: gate-L0-only recipe works; act-L1 freezes codes; stochastic gates act as dropout-disentangler"
4
+ metadata:
5
+ node_type: memory
6
+ type: project
7
+ originSessionId: fc0a8a62-25d1-45df-8e93-3a8afe205b5a
8
+ modified: 2026-09-06T16:25:16.591Z
9
+ ---
10
+
11
+ Single-literal cell (31 "how many {value} objects?" tasks, `--sl-count-dedup --n-tasks 6144 --task-split-frac 1.0`), F=4096 stochastic bits (K=16) + stochastic gates, pooled gate arch, batch 256 single-GPU (2026-09-06 overnight):
12
+
13
+ - **Winning recipe: act-L1 = 0, gate-L0 = 2e-3 (F-invariant sum-over-fields form), standard ramp** → VQA 98.0, bitmatch 94.0 (color 97.3 / size 98.3 / material 98.1 / shape 92 / pos ~89) vs 79.4 for the act-L1 baseline. Stronger gate (2e-3) beat weaker (5e-4): 94.0 vs 91.1.
14
+ - **act-L1 is a code-FREEZER in this regime**: every arm with it froze bitmatch at ~80-86 right when the ramp engaged; gate-only arms kept purifying through and after gate collapse. (act-L1 was calibrated as a duplicate-pruner on the full task pool — do not carry it into narrow-task runs.)
15
+ - **Dense stochastic gates ≈ dropout on code columns** → anti-co-adaptation pushes the code toward atomic single-column solutions (penalty-free arm improved bitmatch fastest pre-ramp, 85.8@20k, while its VQA *suffered* from routing noise; VQA recovered instantly when gates committed). The penalty ramp is a COMMITMENT EVENT: it freezes whatever code exists (with act-L1) or continues purifying (gate-only).
16
+ - Late/slow ramp (warmup 25k, ramp 20k) gave the best positions (posX 95.0, posY 98.8) but with act-L1 still froze material at ~73. Attribute allocation varies run-to-run (which attrs clear 95 differs across arms with same recipe) — pos ≥95 IS reachable (not an encoder ceiling).
17
+ - **Batch sufficiency**: single-GPU batch 256 ≥ DDP global 1024 on this problem (replica final bitmatch 85.8 vs 79.4) → 4 parallel single-GPU arms is the right use of the node. `--init-seed` reseeds model init after task construction for true seed replicates.
18
+ - F=4096 width alone does NOT escape the entangled basin (baseline 79.4 ≈ F=64's 83) but gives better early code (82 vs 71 @10k); the F-invariant penalty form is `sum(-1).mean()` with coeffs act 8e-4 / gate 5e-4 ≈ old F=64 5e-2 / 3e-2.
19
+ - Perf: gate_part (question-only) hoisted out of the K-draw loop (was 16x recomputed, OOM at F=4096); `--gate-arch pooled` = CLS→linear D→F. Eval prints `[gate] open/task, hit%` (hit is a LOWER bound — duplicate detector columns alias the bitmatch-chosen one).
20
+
21
+ **THE WORKING RECIPE (user-designated, 2026-09-08) — "Y2": bitmatch 97.5, five of six attrs ≥95 (posY 91.6 the only miss), NO privileged info anywhere.**
22
+ Phase 1 (60k): 31 count tasks (`--sl-count-dedup --n-tasks 6144 --task-split-frac 1.0`), F=4096 stochastic ST bits K=16,
23
+ learned stochastic binary gates (`--gate-mode stoch --gate-arch pooled`), ONLY penalty `--gate-l1 2e-3` (F-invariant),
24
+ recon 10, lr 1e-4 cosine, tau 2->0.3, batch 256 tpi 8, single GPU (seed 4; seed variance large: 84-94 at this phase).
25
+ Phase 2 — the breakthrough (60k->90k): resume with **constant lr 3e-4 (3x the original peak!) + tau pinned 0.3**:
26
+ the re-heat at committed tau is the ONLY intervention ever observed to IMPROVE a committed code (93.0 -> 95.3 -> 97.5,
27
+ monotone through 30k extra steps). VQA sits ~91 under the hot lr; a short low-lr tail restores it separately.
28
+ Contrast: low-lr tails (1e-5) never moved a committed code (D-tail flat); the high-lr re-heat purifies steadily.
29
+ Ckpt: `runs/Y2_final90k.pt`. Stage-3 joint readout (frozen code, full 2715-pool heads): 95.4/95.4/95.1 vs
30
+ no-penalty control Z0 90.0/89.9/89.6 — +5.4 absolute readability at equal architecture.
31
+
32
+ Related: [[stage2-binary-protocol]], [[scale-baseline-findings]], [[h100-node-setup]], [[bc-cubecyl-findings]].
notes/claude-memory/stage2-binary-protocol.md ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: stage2-binary-protocol
3
+ description: Default Stage-2 (state recovery) protocol — per-value BINARY metrics at 3 tiers (atomic bit-match / per-slot MLP / all-slots MLP)
4
+ metadata:
5
+ node_type: memory
6
+ type: feedback
7
+ originSessionId: fc0a8a62-25d1-45df-8e93-3a8afe205b5a
8
+ modified: 2026-09-01T23:48:32.383Z
9
+ ---
10
+
11
+ For Stage-2 state recovery, the user wants (requested 2026-09-01, "from now, by default") per attribute-VALUE **binary** classification — one-vs-rest bits [color8|shape3|size2|material2|posX_G|posY_G], mean binary accuracy per property — NOT multi-class per attribute. Report three tiers:
12
+ 1. **atomic bit-match**: no readout — best code dim per GT bit (all F×C one-hot dims as candidates = both polarities for C=2, "max of p_i, 1−p_i"), selected on fit set, scored on eval.
13
+ 2. **per-slot MLP**: MLP(one slot code → bits) + continuous-position Hungarian matching.
14
+ 3. **all-slots MLP**: MLP([own slot | all slots] → bits), same matching.
15
+ Tier gaps localize failure: (2)−(1)=within-slot entanglement, (3)−(2)=object-separation failure, 100−(3)=missing info.
16
+
17
+ **Why:** binary per-value matches the code's per-value binary field layout and the gate rule; the 3 tiers separate disentanglement / slot separation / content.
18
+ **How to apply:** implemented in `scripts/stage2_recovery_clevr.py` (CLEVR chunk mode; slot↔object matching for tier 1 reuses tier 2's probe; always print the always-majority baseline row — bits are imbalanced). Related: [[scale-baseline-findings]], [[h100-node-setup]].
19
+
20
+ **Reaffirmed + extended (2026-09-04):** NO multi-class classification anywhere in Stage-2 — every metric is per-INSTANCE binary (one-vs-rest bit, matched object): accuracy of a single binary prediction against a single GT bit. Polarity is handled by including both cats of each field as candidate dims (= max(p,1−p)), with selection on a fit split and scoring on a held-out split (never max at scoring time — winner's-curse leakage with 128 candidates). Baselines: always-majority per bit (color/pos ~87.5, shape 66.7, size/material ~50). The in-training `[bitmatch]` metric in enc_vqa_maskproj.py `evaluate()` (count-bootstrap → per-scene Hungarian → per-object binary scoring) follows this protocol and logs to wandb as `bitmatch/*`. Legacy multi-class paths (ood_recovery.recovery_report, eval_task_split linear recovery) are deprecated for Stage-2 reporting.
21
+
22
+ **Stage-3 head protocol (user, 2026-09-08): probe heads ALWAYS use the Stage-1 stochastic-binary gate head (expected-L0 on open probabilities, pooled arch) — never the legacy |logit|-gate+L1 (split-invariant across redundant fields; caused the cellB conjunction immunity). Legacy only via --legacy-head for reproduction.**
23
+
24
+ **Rule-only label-shift caveat (2026-09-09):** rule-only pools truncate antecedent-count labels (shape2color: 99.7% of scenes have <=2 cubes vs 36% >=3 in full-dist — each in-rule cube costs ~1/8 probability). Antecedent-count probes therefore cap ~94% at test from count-range extrapolation alone, even with perfect features+routing (GT top-1: +6.3 is ALL label shift). For clean 100% ceilings, rebalance pools by count or use exist/threshold probes.
notes/claude-memory/stage3-subspace-findings.md ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: stage3-subspace-findings
3
+ description: Stage-3 subspace OOD battery results — atomicity × task-breadth × data grid; GF(2)-mixed GT codes; +53-pt drop in the single-task infinite cell
4
+ metadata:
5
+ node_type: memory
6
+ type: project
7
+ originSessionId: fc0a8a62-25d1-45df-8e93-3a8afe205b5a
8
+ modified: 2026-09-02T06:55:44.709Z
9
+ ---
10
+
11
+ Stage-3 subspace results (2026-09-02, `scripts/stage3_subspace_multitask.py`, dataset `data/clevr_subspace/` = 30 A→B rules mined from the 1M set; identifiability: tasks must not read both A and B). Key numbers (shape2color = "every cube is gray"; val=subspace, test=full-dist):
12
+
13
+ - **Learned vanilla encoder @200k**: joint multi-task val 94.3 / test 93.7 (+0.6). GT slots joint: 100/100 (+0.0, sparsity on head irrelevant).
14
+ - **Atomic GT, single-category, fully overfit (800 scenes, CE=0)**: 100/100/+0.0 — overfitting an atomic code costs nothing.
15
+ - **GF(2)-mixed GT** (z'=Az, A invertible, shared across slots; `--gt-mix`, dense or `--gt-mix-minrow/maxrow` sparse rows): dense = unlearnable floor ~72 (train=val=test; 5x budget no change — SQ-hardness of 15-bit parities). Row-weight 4–6 = learnable-but-treacherous middle: single-cat ∞-data reaches val ~100 with a persistent ~14-pt test hole.
16
+ - **Single-task (A-dep, B-indep) cells**: atomic 800sc = +2.8 drop (first nonzero atomic drop — multi-task pressure was protective); mix4-6 800sc = val 46.9/test 31.9; **mix4-6 + infinite data (`--infinite-gen`) = train=val=100.0, test 47.0, drop +53** — perfect on-support decode that is simply the wrong function.
17
+ - Quantified: multi-task protection ≈ 39 test points at fixed code/data (86 vs 47); joint-30-category training dilutes correlations (union of subspaces ≈ full dist), so per-category heads/single-task are the sharp probes.
18
+ - Mining note: all 30 rules had ≥6.6k qualifying scenes in the 995k train chunks; converse-violator guarantee breaks reverse shortcuts in-scene.
19
+
20
+ Related: [[scale-baseline-findings]], [[stage2-binary-protocol]].
21
+
22
+ **Update 2026-09-03 — DETR@120k battery + controls.** VQA DETR run smashed the ceiling (99.0 MEAN @120k, hop_query 97; lr 3e-5 tail from 95k settled the 1e-4 jitter). Stage-2 on its code: atomic 92.4 / per-slot 99.3 (vs vanilla 86.8/95.6) — cleaner code without any sparsity. Stage-3: joint 99.1/99.0 (+0.1); single-cat drops ~0-2. One-task cells NEED big scene pools (`data/clevr_subspace_big/`: shape2color all 15,330; color2material 50k of 211k) — at 800 scenes the −20.6 "drop" was mostly memorization (val 85); at 14.3k it's −4.4 (vs GT atomic −2.8). CRITICAL control: color2material one-task collapses −43.5 IDENTICALLY for GT-atomic (∞ gen) and learned code — a cross-attribute semantic shortcut (metal⇒not-gray, via the atomic material bit) that NO representation format can prevent; single-task OOD failure under correlated data is task-unidentifiability, fixed only by task breadth/coverage. Net: learned DETR code is atomic-equivalent on every probe at matched data; disentanglement's protective scope = within-feature entanglement only.
23
+
24
+ **DEFAULT Stage-3 protocol (user-set, 2026-09-03):** use the big-pool setup — mine ALL qualifying scenes per category (`data/clevr_subspace_big/`, `make_subspace_big.py`), one-task cells trained with ≥15k scenes (small 800-scene pools give memorization artifacts: val≪100 muddies the drop), report train/val/test, and for any surprising drop run the GT-atomic ∞-gen control on the SAME task to separate code-entanglement effects from task-unidentifiability (cross-attribute semantic shortcuts hit atomic codes too, e.g. c2m −43.5 on both).
25
+
26
+ **Variance warning (2026-09-04):** one-task Stage-3 drops are HIGH-VARIANCE when small: sparse@120k gave −23.3 on s2c-big but the statically identical code @125k (Stage-2 tiers within 0.05) gave −3.6 — a 20-pt swing from head stochasticity alone. Never compare one-task drops from single runs; require ≥3 head seeds (and ideally ≥3 task instances) with error bars. Large drops (c2m −43 floor) are trustworthy; small ones are coin-flips. The sparse-vs-vanilla "sparsity hurts narrow OOD" surprise was noise — at 125k sparse ≈ vanilla (−4.4) ≈ GT (−2.8) on this cell.
27
+
28
+ **RENEWED pairing rule (user, 2026-09-04) + support-shift discovery:** the old mining guarantees (≥1 antecedent, ≥1 converse-violator) caused a SUPPORT SHIFT that dominated the c2m one-task collapse: every training scene contained a gray object, so the head never learned gray-free behavior — test acc pinned at P(∃gray)=56.4% for GT/vanilla/sparse/±gate-L1 alike (minimal task "∃gray?" = constant label in-pool; confirmed exactly). The earlier "metal⇒not-gray cross-attribute shortcut" attribution was wrong as the dominant mechanism. NEW DEFAULT: **rule-only subspaces** — scenes need only satisfy the implication (vacuous scenes included; both guarantees dropped; `--rule-only` in stage3 infinite-gen and make_subspace_big.py → `data/clevr_subspace_ruleonly/`); tasks keep the identifiability filter and receive natural degenerate labels (count 0/no/null) on vacuous scenes. Under rule-only, the only test novelty is the correlation break itself, making gate-L1 rescue testable (prediction: vanilla ~76 on ∃gray, gate-L1 ~100).
notes/claude-memory/user-timezone.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: user-timezone
3
+ description: user's local clock is UTC−7 (Pacific Daylight Time); report ETAs in local time
4
+ metadata:
5
+ type: user
6
+ ---
7
+
8
+ The user's local time is UTC−7 (8:24 PM local = 03:24 UTC on 2026-09-16). The H100 node logs in UTC.
9
+
10
+ **Why:** the user asked to "recalibrate the time" when I quoted UTC ETAs.
11
+ **How to apply:** convert run ETAs and timestamps from the node's UTC logs to local (UTC−7, or UTC−8 after the
12
+ November DST change) before reporting them.