Skip to content

Unify experiment comparison protocol + real-data grid figure pipeline - #50

Open
johmathe wants to merge 3 commits into
mainfrom
johmathe/consistent-experiment-comparison
Open

Unify experiment comparison protocol + real-data grid figure pipeline#50
johmathe wants to merge 3 commits into
mainfrom
johmathe/consistent-experiment-comparison

Conversation

@johmathe

Copy link
Copy Markdown
Collaborator

Summary

Addresses the figure feedback and unifies the comparison protocol across all three experiments (PCam, OrganMNIST3D, Spherical MNIST). No experiments were run in this PR — sweeps are meant to run on separate GPU machines (see experiments/README.md for the run matrix, tmux commands, and rsync instructions).

Unified protocol

  • Non-equivariant CNN baselines are augmentation-trained (train_mode R) and labeled "Aug. CNN" everywhere (feedback Update general API and add cg coefficients #3).
  • Invariant models are canonical-trained (train_mode C); rotation (OOD) evaluation is always on.
  • All line plots report the rotated test metric ("Rotated test AUC/accuracy") — no more "NR/R" jargon (feedback Add pre commit and actions #1).
  • Every bar method appears in both line plots of its row, as a single point when it has no capacity axis (feedback Fix indices in the bsp #4 generalized).
  • One power spectrum only: power_spectrum_matched removed; the capacity sweep now extends the regular power-spectrum curve to the bispectrum's max budget (feedback Fix indices in the bsp #4).
  • Cohen S²CNN stays a dashed published-reference line with a legend entry and a caption justification (feedbacks Add code #2, Revert "Fix indices in the bsp" #5): rows 1–2 already contain G-equivariant architectures; S²CNN appears in row 3 only as the canonical published spherical-image architecture (cited, not re-run).

Code changes

  • PCam: new norm_pool model variant — equivariant DenseNet with the previously-unused GroupNormPool as final invariant pool (matched-architecture incomplete-invariant ablation, analog of Organ3D's norm_pool / SMNIST's power spectrum). Wired into train.py and both sweep scripts.
  • Spherical MNIST: new run_capacity_sweep.sh (2 models × 5 widths × 3 seeds, C-trained); PS widths reach ~550K params to cover the bispectrum budget (~529K). Matched-run concept removed from analyze_results.py.
  • Organ3D: all 4 models (incl. norm_pool and R-trained standard) now covered in the data-efficiency and capacity sweeps, 3 seeds each; redundant run_tier1_sweep.sh deleted; skip-check dir names fixed to match train.py output naming.
  • Grid figure: experiments/make_grid_figure.py replaces make_mock_grid_panels.py — same render path fed by results.json loaders, --mock flag for layout previews (watermarked), emits caption.txt with the S²CNN justification.
  • Docs: experiments/README.md with the full run matrix for external GPU machines.

Sanity checks run (no training)

  • norm_pool model builds, forward/backward, exact C8 invariance (gap = 0.0), param count matches fourier_elu (109,815).
  • make_grid_figure.py --mock renders; real-data path verified end-to-end against a synthetic results tree exercising every runner's output layout.
  • ruff check clean; bash -n on all runner scripts.

Test plan

  • Run the 8 sweeps on the GPU machines per experiments/README.md
  • rsync results back and run python experiments/make_grid_figure.py
  • Check panel coverage warnings (loader prints a WARNING for any missing method/panel)

Made with Cursor

johmathe and others added 3 commits July 16, 2026 22:49
…pipeline

Addresses figure feedback: consistent "Aug. CNN" (R-trained) baselines and
OOD y-labels across rows, a single power-spectrum entry whose capacity curve
covers the bispectrum budget, norm-pool (power-spectrum analog) baseline for
PCam, full method coverage in every panel, and a caption justifying the
Cohen S2CNN published-reference line.

- pcam: new norm_pool model variant (GroupNormPool as final invariant pool),
  sweep scripts retrained per protocol (standard=R, invariants=C, rotation
  eval always on)
- spherical_mnist: new run_capacity_sweep.sh (accuracy-vs-params curves);
  matched power-spectrum concept removed
- organ3d: all 4 models in data-efficiency and capacity sweeps, 3 seeds;
  redundant run_tier1_sweep.sh removed
- experiments/make_grid_figure.py: single figure entry point with
  results.json loaders + --mock layout preview, replaces
  make_mock_grid_panels.py; emits caption.txt
- experiments/README.md: run matrix, tmux commands, rsync instructions for
  external GPU machines

Co-authored-by: Cursor <cursoragent@cursor.com>
…ks hatchling builds)

Co-authored-by: Cursor <cursoragent@cursor.com>
…ers)

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.46%. Comparing base (88ae4df) to head (a9dd551).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #50   +/-   ##
=======================================
  Coverage   95.46%   95.46%           
=======================================
  Files          11       11           
  Lines        2227     2227           
=======================================
  Hits         2126     2126           
  Misses        101      101           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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