Skip to content

Phase 1 design for the #263 detector campaign (proposed) - #270

Closed
jonfroehlich wants to merge 1 commit into
mainfrom
docs/detector-phase1-263
Closed

jonfroehlich wants to merge 1 commit into
mainfrom
docs/detector-phase1-263

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Design document for Phase 1 of the #263 detector campaign: the recipe arms to train on the restaged GSV dataset once the decision point passes. Proposed; nothing has run. docs/detector_phase1_263.md, plus its row in docs/README.md.

What it settles

  • Two pre-checks before any arm: the control-arm scores now running on analysis/control-arm-263 (the fine-tune seed SD at n=3, and whether the Training augmentation is a single horizontal flip: measure downscale / photometric jitter as a transfer lever (downstream of #84) #82 transfer loss replicates), and a merged-pair separation histogram against the 8-px head cell and 2σ (a small extension of miss_taxonomy.py; the committed JSON has only the median, 12.2 px).
  • Six arms with the defect, ceiling and warm-start status for each: target σ 10 → 6; a geometric zoom augmentation (does not exist yet; the downscale op is resolution degradation); the stride-16 head, gated on the pre-check; circular padding as a rider that cannot be scored until the seam GT is merged; flat-ramp supervision deferred; and the fine-tune LR as a control for the screen.
  • Two rungs: a 2,000-step fine-tune screen paired against the control263 seeds with the Training augmentation is a single horizontal flip: measure downscale / photometric jitter as a transfer lever (downstream of #84) #82 scorer unchanged, then a from-scratch 1-epoch run of the best bundle against Campaign B's nine replicates (s_B 0.0094). Primary readout US7 + manual_gold paired ΔF1 at seed-selected thresholds; no-regression readout on the four non-GSV splits with laurens_gsv as the same-town control; per-bucket readout from the miss taxonomy so an arm is judged on the bucket it was built for.
  • Cost: about 400–460 GPU-h on klone ckpt, $0, about a week. Two durability items on the critical path: rampnet_dataset_v2 purges around 2026-11-11 if untouched, and /gscratch/makelab has about 5 GB free.

What it leaves to Jon (§6)

Whether rung 1 opens before the decision point (the #263 body says sigma and head return after it), the σ value, the zoom range, and the primary pool.

Fixes it asks for before submission

aug_finetune_82.py's "US7" pool holds eight splits; run_train_seed.slurm still defaults to the deleted dataset path; Campaign B and control263 have no ledger rows on main.

Every number is cited to the committed doc or JSON it came from. No scripts in this PR.

🤖 Generated with Claude Code — Fable 5.1, claude-fable-5-1

Arms (sigma, zoom aug, stride-16 head, circular padding, fine-tune LR),
two pre-checks, two rungs with paired readouts, cost and the decisions
left to Jon. docs/README.md row.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@jonfroehlich

Copy link
Copy Markdown
Member Author

Deep review of c3dcb25

Verdict: superseded, close it. Both of its pre-checks have since run (#271 merged; #295 open), and the 2026-11-15 plan that #295 executes (detector-phase1-horizon-2x-2026-11-15.md, which #295's doc cites) revises the arm order, drops D, unschedules C and replaces the readout. Three of this doc's numbers are wrong, and the dataset it plans to train on was purged on 2026-11-12. The still-useful content should go into a committed version of that plan at the same path, docs/detector_phase1_263.md, in #295 or a small docs PR. #295's horizon_band_263.md cites that path as "the Phase 1 design", so keeping the path keeps its link valid once the line is updated. Items to carry over: the arm table's defect / ceiling / warm-start columns, the zoom op spec (a geometric op, not downscale), the cost table with its sources, the durability section and §6. Apply findings 1 to 12 below as they carry over. The 2026-11-15 plan repeats the MDE error (finding 3). If Jon prefers to keep this PR as the record instead, the same findings are the fix list.

A. Is it still current? Each design choice against what landed after 2026-10-22

choice in the doc later result status
Pre-check A, the control-arm scores Done, #271 (merged 2026-11-01). The #82 loss replicates: laurens_mapillary max-F1 −0.050 [−0.073, −0.025], every seed. Open-rig 4 max-F1 is −0.004 [−0.015, +0.004] against a seed SD of 0.008 (0.691 / 0.700 / 0.684), so by the doc's own rule (§2) arm F does not move first. Seeds mostly move the operating point (open-rig 4 F1 at 0.55 runs 0.571 to 0.658), hence #271's proposed reading rule: same-seed control, max-F1 beside every fixed threshold. answered; changes §2 and the arm order
Pre-check B, merged-pair histogram The binding count was already committed on 2026-10-22: 24 of 124 pairs under 8 px Chebyshev (19%), open_rig_misses_258.md merged-pair table and data_scaling_59.md §0b. #295 commits the per-pair list: 25 of 136 (18%) on eight splits, so C is not triggered. answered (#295)
Arm A, σ 10 → 6 #295's gate (≥ 30 pairs at ≥ 12 px outside paterson) reads 38, so it runs under the newer plan. Its reachable ceiling is smaller than stated (finding 2). On the open rigs merged is 2 to 14% of misses (open_rig_misses_258.md), so A is an in-domain arm only. stands; ceiling restated
Arm B, zoom augmentation Still unimplemented: rampnet/augment.py on main has downscale and pixel-statistics ops only. The doc's guess that zoom is "most likely to move the open rigs" is weakened by the Lyon audit (#277): 464 of 677 sure misses (69%) are within about 24 m, 77% tilt-corrected, and recall is 0.38 even under about 7 m. The frozen 2× sweep lowered recall in exactly that band (0–8 m, 0.841 → 0.611). stands for the in-domain far field; open-rig hypothesis changes (finding 10)
Arm C, stride-16 head Not triggered (above). The 2026-11-15 plan does not schedule it. moot for Phase 1
Arm D, circular padding At the seam there is about 0.001 F1 to win. Production recall there is already 0.96 (24 of 25, rampnet1_findings.md). seam_nms_default_248.md (#291, merged 2026-11-16) finds that seam wrapping removes 7 of 3,351 city peaks and 8 of 3,981 manual_gold peaks at 0.30, and moves F1 by +0.00066 [+0.00006, +0.00135] under GT-B. Both are more than ten times below any effect this design can detect. The "cannot be scored until the seam GT is merged" blocker is also gone, because that study scores against an in-memory merge (GT-B). The 2026-11-15 plan drops D. moot
Arm F, fine-tune LR The 2026-11-15 plan runs F first, whatever pre-check A says, with its own LR rule. changes
Rung 2 baseline and primary readout The 2026-11-15 plan switches to macro US7 at each checkpoint's sao_paulo threshold, with a manual_gold gate on rung 1 and a ship rule against the shipped checkpoint. That fixes finding 4. changes
§6, "whether Phase 1 opens before the decision point" Both inputs that the #263 decision point waited on are in: the Lyon review (#277, all four groups eligible, recall 0.26) and the control arm (#271). No decision has been posted on #263 since 2026-10-22. still Jon's call; the inputs are complete
#276 VLM prompt work, #35 cascade (#289, #293), crosswalk (#275), Argon teacher (#294, stopped at Stage 0) None of these touches a recipe arm. #294 stopped, so no Argon pseudo-labels exist for arm B. no effect

The three fixes the PR body asks for, on origin/main at 1c3a55e:

  1. aug_finetune_82.py's "US7" pool holds eight splits: still true (lines 62–64 include laurens_mapillary). The label "US7 (miss_decomposition.US_SPLITS)" is now wrong a second way, because US_SPLITS has nine splits since juneau was added.
  2. run_train_seed.slurm defaults to the deleted dataset: still true (line 126, DATA_ROOT=…/rampnet_dataset). rampnet_dataset_v2 is now purged too (finding 1), so changing the default alone is not enough.
  3. No ledger rows for Campaign B or control263: half true. control263 has 11 rows (37.29 GPU-h, from #263 control arm: three GSV-only fine-tunes scored on 14 splits #271). Campaign B still has none: compute_log.jsonl (4,123 rows) holds no klone job submitted in September 2026, and the three replicates are jobs 39880702/03/06 plus six more. sacct retention is finite, so these should be recovered now (slurm_usage.py, sacct -D).

B. Findings, in severity order

1. The training data is gone (§5, lines 145–147). The doc says rampnet_dataset_v2 purges around 2026-11-11 unless something reads it. It did. Checked on klone today: train/, val/ and test/ under /gscratch/scrubbed/jfroehli/rampnet_dataset_v2 hold 0 entries (directory times 2026-11-12 11:46–11:49 PT); only _quarantine/ is left. Both rungs need a re-stage first. Replace lines 145–147 with:

rampnet_dataset_v2 was purged on 2026-11-12: on 2026-11-16 its train/, val/ and test/ were empty and only _quarantine/ remained. Every rung needs a re-stage first (stage_two/run_restage_parquet_263.slurm; job 42090420 took 4 h 14 m plus 37 m on CPU, $0, and needs about 431 GB of shard cache beside 462 GB of output on scrubbed, restage_263.md), and the first training job has to read it within 21 days of that.

The Campaign B checkpoints (nine best plus nine epoch_1_step_9378, /gscratch/makelab/jonf/seedvar/) and the three control263 checkpoints are still there.

2. Pre-check B and arm A's ceiling leave out min_distance (§2 lines 46–52, §3 line 63, §4 lines 130–131). The doc keeps min_distance at 10 for arm A (line 63). The extractor suppresses any peak within Chebyshev 10 px of a stronger one (data_scaling_59.md §0b). So the 46 pairs at 10 px or less stay merged whatever σ is, and the band that "arm A can reach" (line 51) starts at 10 px, not 8. With min_distance kept, arm A's ceiling is the 78 pairs above it, 0.038 recall points, not 124 pairs and 0.060. Paterson holds 80 of the 124 pairs (miss_taxonomy.json, per_city.paterson.counts.merged), and only 35 pairs outside paterson are above min_distance (open_rig_misses_258.md, "#46 reference without paterson"). Checked against analysis_out/miss_taxonomy.json and those two docs. Replace line 51's "the fraction between 8 px and 2σ_new is what arm A can reach" with "the fraction above min_distance (10 px Chebyshev) and under 2σ_new is what arm A can reach while min_distance stays 10". Replace the arm A ceiling cell with "merged = 29.0% of misses, 124 pairs (0.060 recall points); with min_distance 10 kept, at most the 78 pairs above it (0.038), 35 of them outside paterson". In line 131, after "(124 of 2,060 GT at pooled recall 0.793, analysis_out/miss_taxonomy.json)", add "; 0.038 for the 78 pairs above min_distance, and 80 of the 124 are paterson's". Line 47's "the committed JSON has only the median" should also say that the under-8-px count (24 of 124) was already in open_rig_misses_258.md.

3. The minimum detectable effect is wrong (§4, lines 128–129). "a seed-mean Welch test resolves about 0.015 F1 at 80% power" is not right. With s_B 0.0094, n = 3 against n = 9, SE = 0.0094·√(1/3 + 1/9) = 0.0063 on 3.5 Welch df. Checked with scipy.stats.nct: power is 0.42 at 0.015 and 0.80 at about 0.025. The normal approximation gives 0.018, and a pooled t on 10 df gives 0.020. Replace with:

With s_B = 0.0094 and n = 3 against n = 9, a seed-mean Welch test (3.5 df) has 80% power at about 0.025 F1; at 0.015 its power is about 0.42.

The 2026-11-15 plan's "MDE about 0.015 at rung 2" needs the same correction. With finding 2, arm A's whole merged ceiling (0.038 recall points) is about the size of this MDE in F1 or below it. Arm A therefore rests on the per-bucket and paired-pano reads, not on the Welch test.

4. The primary statistic does not match the seed SD it relies on (§4 lines 115–118, §6 lines 160–162). The doc proposes ΔF1 on "the seven US splits plus manual_gold, pooled over panos" because "the seed SD exists for it" (line 160). It does not. s_B = 0.0094 is the SD of macro US7 F1, the mean of seven per-split F1s, and manual_gold is "not pooled" there (seed_variance_51_135.md, the table footnote after line 74). "3 arm seeds against 3 control seeds" (line 116) also contradicts rung 2's baseline of nine replicates (line 107) and the n = 3 against n = 9 MDE (line 128). Replace lines 115–118 up to "in its favour." with:

Primary readout (proposed): macro US7 F1 (the mean of the seven per-split F1s, as in Campaign B), each checkpoint at its own sao_paulo-selected threshold, with F1 at 0.30 and 0.55, max-F1 and each seed's own contrast beside it. Rung 1: same-seed arm minus control263, paired pano bootstrap stratified by split. Rung 2: Welch over seed means, 3 arm seeds against Campaign B's nine, with the paired pano bootstrap per seed beside it. manual_gold is a secondary read, not pooled in.

In §6, replace "US7 + manual_gold is proposed because the seed SD exists for it" with "Macro US7 is proposed because Campaign B measured its seed SD; manual_gold was not pooled there".

5. The no-regression pool is mislabelled, includes a held-out split, and has no from-scratch seed SD (§4, lines 118–121). "the four non-GSV splits" is wrong: annapolis, clovis, morgantown and richmond are Mapillary too. #263 calls these four "the open-rig splits". The pool includes budapest_district5, which miss_decomposition.HELD_OUT holds out for low-confidence single-rater GT, and line 126 says "HELD_OUT stays held out". For rung 2, "the control seed SD" on this pool does not exist: Campaign B scored only US7, sao_paulo and manual_gold (seed_variance_51_135.md, driver block near line 672), and on makelab2, while the arms would be scored on klone. Replace lines 118–121 up to "regardless of the primary." with:

No-regression readout: open-rig 3 (laurens_mapillary, bayonne, juneau; budapest_district5 is in HELD_OUT), with open-rig 4 and laurens_gsv shown beside it, as in control_arm_263.md. Rung 1: an arm is rejected if its same-seed contrast there is below zero by more than control263's seed SD, whatever the primary says. Rung 2: first score the nine Campaign B checkpoints (/gscratch/makelab/jonf/seedvar/, about 7 GPU-h) on these splits, and re-score them on US7, sao_paulo and manual_gold in the same pass as the arms, so that every rung 2 contrast goes through one scorer on one GPU type, as #271 did.

6. The σ rationale does not match the code (§3, lines 74–77). generate_heatmap_from_points combines ramps with a per-pixel max (stage_two/train.py, line 307), not a sum. So the σ=10 target already has two modes for any two ramps. At the median separation (12 px) the dip between them falls to exp(−6²/(2σ²)) = 0.84 of the peak at σ=10 and 0.61 at σ=6. For a sum of two Gaussians, two modes need a separation above 2σ; at exactly 2σ the sum has a single flat top. So "2σ … first show two modes with a clear dip" is wrong under either rule. What merges a pair is the model's output, a bilinear ×8 upsample of the stride-32 map whose peaks fall on an 8-px lattice (subcell_decode_221.md). Two peaks that both survive min_distance 10 therefore sit about 16 px apart. Replace lines 74–77 up to "where pre-check B says the head cannot follow." with:

Why σ = 6 and not a sweep. The target is a per-pixel max of Gaussians (stage_two/train.py), so it already has two modes for any pair. A smaller σ deepens the dip between them: at the median separation (12 px), from 0.84 of the peak at σ=10 to 0.61 at σ=6. What merges the pair is the output: a bilinear ×8 upsample of the stride-32 map, whose peaks sit on an 8-px lattice (subcell_decode_221.md), so two peaks that survive min_distance 10 are about 16 px apart. Whether a deeper target dip moves the output is what the merged-bucket readout tests. σ=4 would put the target under the 8-px cell.

The same "cannot represent an adjacent pair as two modes" wording is in data_scaling_59.md §0b, on main. That is outside this PR, but it is the source of the error.

7. The cost table understates scoring cost and its total does not add up (§5, lines 136–143). "scoring about 1.75 GPU-h per checkpoint" is wrong. #82 measured 5.87 GPU-h for nine checkpoints (0.65 each, aug_transfer_82.md Compute). #271 measured 0.53 to 0.81 GPU-h per checkpoint on 14 splits (compute_log.jsonl, jobs 42152649–52). The rows as written sum to 353 GPU-h with no preemption, or 463 with rung 2 at 1.67×, so the lower bound "about 400" matches neither. Pre-check A is now measured: 3.10 GPU-h, done. "56 GPU-h per epoch" and "1.67×" come from stage2_training_cost.md, which the table does not cite. With the arms as written (F, A, B on rung 1), replace the table with:

step GPU-h calendar notes
pre-check A (control263 scoring) 3.10, done 2026-10-22 measured, compute_log.jsonl (#271)
pre-check B 0 done in #295 CPU
rung 1, one arm, 3 seeds about 36 (47 at 1.3×) about 3 h per seed #82: 11.7–14.2 GPU-h per uninterrupted run, 1.3× with preemption; control263: 9.4–11.9
rung 1, arms F, A, B + scoring about 115 (147) 1–2 days scoring about 0.75 GPU-h per checkpoint on 14 splits (#271: 0.53–0.81)
rung 2, one bundle, 3 seeds about 170 (280 at 1.67×) Campaign B: 6 replicates within 5 h 15 min 56 GPU-h per epoch and 1.67× preemption overhead: stage2_training_cost.md
rung 2 tie-in seed about 56 (93)
Campaign B re-score (finding 5) about 7 hours 9 checkpoints
Phase 1 total, from here about 350 to 530 about a week lower: no preemption; upper: 1.3× on rung 1, 1.67× on rung 2. All paid: false.

The README hook's "about 400 to 460 GPU-h" changes with it.

8. Pre-check A is written as running (§2 lines 38–44, §5 line 138). Replace lines 38–44 with the result:

Pre-check A: the control-arm scores (done, control_arm_263.md, #271). The #82 transfer loss replicates: laurens_mapillary max-F1 −0.050 [−0.073, −0.025], every seed. On open-rig 4, max-F1 is −0.004 [−0.015, +0.004] against a seed SD of 0.008, so by this section's rule the 1e-5 screen is usable and arm F does not have to move first. Seeds move the operating point more than the ranking (open-rig 4 F1 at 0.55: 0.571 to 0.658), so every arm is read against its same-seed control, with max-F1 beside each fixed threshold.

9. Arm D is moot (§3 line 66, §4 lines 103 and 105, §6 lines 163–164). See section A: seam recall is already 0.96 (24 of 25), and removing seam duplicates moves F1 by +0.00066 under GT-B. Replace the D row's status with "dropped: about 0.001 F1 is at stake at the seam (rampnet1_findings.md, seam_nms_default_248.md), far below this design's MDE". Delete "D rides along on rung 2 only" (line 103), "and D as a rider" (line 105) and the last §6 bullet. A rider would also be confounded with the bundle it rides on.

10. The zoom arm's open-rig sentence predates the Lyon result (§3, lines 86–88). Replace "It is also the arm most likely to move the open rigs, … not as the target." with:

On the open rigs the deficit is mostly near-field: on Lyon, 69% of sure misses are within about 24 m (77% tilt-corrected) and recall is 0.38 even under about 7 m (lyon_review_159.md §10), the band where the frozen 2× sweep lost recall. So zoom is not expected to close the open-rig gap; the open pool is read as no-regression.

11. Arm C's ceiling cell claims more than its source (§3, line 65). "the Gaussian decode already took most of it (−0.727 px, +1 TP)" is not supported. The decode gains one TP per operating point on manual_gold and moves no detection metric (subcell_decode_221.md, decode_e2e_221.md). The localization bucket is 9 US7 misses, and nothing measures how many of them the decode recovers. Replace with "localization is 2.1% of misses (9); the Gaussian decode moves positions by −0.727 px but no detection metric (subcell_decode_221.md)".

12. Stale or misdated text.

  • §5 lines 147–149: /gscratch/makelab was at 968 of 1,024 GB and 969,056 of 1,000,000 files on 2026-11-16 (hyakstorage). The file count is now the tighter limit.
  • §5 lines 149–151: control263 has its ledger rows (11, from #263 control arm: three GSV-only fine-tunes scored on 14 splits #271). Keep only the Campaign B half, with the job ids above.
  • §4 lines 98–100: the reason given for the US7 fix is wrong for rung 1. Rung 1 is read against control263, so Campaign B's seed SD does not apply there. The fix still matters because the pool's label names a seven-split pool, and US_SPLITS now has nine. Suggested: "rename the pool and define US7 explicitly as the seven splits of seed_variance_51_135.md".
  • §6 line 161: the comment that names "open-rig splits + manual_gold" is dated 2026-10-21 (issuecomment-6314763289), not 2026-10-22.
  • §1 lines 25–26: "51 of 407 … 16 of 1,360" cites an issue comment. The same numbers are in a committed doc (open_rig_misses_258.md), which the PR body's "every number is cited to a committed doc" requires.
  • Line 7: "Every choice marked proposed is open" implies that unmarked choices (rung structure, 3 seeds, 0.30, the one-third trigger) are settled. Replace with "Every choice in this document is proposed and open until Jon decides it." The PR body's heading "What it settles" has the same problem.
  • §4, rung 1: add #263 control arm: three GSV-only fine-tunes scored on 14 splits #271's unmeasured caveat that scoring GPU type differs by seed (released, s1 and s2 on A40, s3 on L40S). Score each arm on its same-seed control's GPU type, or measure the difference on one split.

Checked and found sound

  • Merge: git merge-tree --write-tree origin/main c3dcb25e gives tree c073c134 with no conflicts. tests/test_docs_index.py passes (12 of 12) on both the branch and the merged tree. The row sits in "RampNet 2.0 planning" with kind plan/proposal and status proposed, as the column key requires.
  • Numbers re-derived from their cited sources:
    • Miss buckets: 427 misses at 29.0 / 38.9 / 2.1 / 30.0%; 124 pairs, 78 above min_distance, 87% within 2σ; median 12.2 px Euclidean and 11.4 px Chebyshev; 124 / 2,060 = 0.060 at recall 0.793 (miss_taxonomy.json, data_scaling_59.md).
    • Open rigs: 52.6% / 38.5%, +0.178 / +0.127, +0.051 [−0.008, +0.109]; 51 of 407 and 16 of 1,360.
    • Training augmentation is a single horizontal flip: measure downscale / photometric jitter as a transfer lever (downstream of #84) #82: −0.057 [−0.085, −0.034], +0.005 in domain, control spread +0.029; 11.7–14.2 GPU-h per run; 1.3× preemption ((79.51 + 23.13) / 79.51).
    • Resolution sweep: 0.543 → 0.750, 0.273 → 0.558, 0.841 → 0.611; r4096 and u4096 indistinguishable; +10 points saturating near 0.88, untested.
    • Head and seam: −0.727 px; 12 of 25 against 0 of 77; 72 pairs at 0.30 over 8,000 pano-checkpoints, about 0.2%; 8 of 10 double-marks.
    • Recipe settings: crop σ 12 on 256×88; --preset finetune = 3e-6.
    • Campaign B: 0.8227, s_B 0.0094 [0.0064, 0.0180], released 0.8427 at 2.1 s_B, compared not pooled; sao_paulo thresholds; 9,378 steps at LR 1e-5 on 16 GPUs; 5 h 15 min; the s1–s3 commit is unrecorded.
    • Control launcher: ckpt-all, 4 GPUs, 2,000 steps. A best-model checkpoint is 360 MB (360,358,458 bytes).
  • Scope: the proposal stays inside the RampNet 2.0: open-rig detector campaign, phase 0 (miss buckets, Lyon review, training plumbing) #263 body's scope (σ and head after the decision point, left to Jon in §6). Every step is on klone ckpt at $0, and no paid model is used.
  • Zoom op: no zoom op exists on main, and downscale is resolution degradation, as the doc says.

🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5

@jonfroehlich

Copy link
Copy Markdown
Member Author

Superseded by #306, which commits the 2026-11-15 Phase 1 plan as docs/detector_phase1_263.md and carries over this design's arm-table columns, zoom op spec, cost table, durability section and §6, with all twelve findings of the review above applied. Closed at Jon's request; the branch is kept.

🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant