Skip to content

Make Table 1 reproducible and reconcile the paper with the docs - #220

Merged
neuromechanist merged 5 commits into
mainfrom
144-portable-table1-reproduction
Aug 10, 2026
Merged

neuromechanist merged 5 commits into
mainfrom
144-portable-table1-reproduction

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Closes #144.

The problem

paper.md claimed "a third party can re-run Table 1". docs/guides/validation.md said the opposite, in writing: validate_implementations.py's defaults "do not reproduce either row directly", and the script behind the headline numbers "is not yet a portable one-command reproduction". Both could not stand, and reproducibility is the thing JOSS reviewers check hardest.

The script in question, .context/issue-144-parity-data-adequacy/run_5seed_newton0.sh, hardcoded cd ~/pamica-issue144, /tmp output paths, a 24-thread count, and assumed CUDA. It also lived under .context/, which is developer notes, not somewhere a reviewer should have to look.

What changed

benchmarks/reproduce_table1.py, one entry point, two tiers:

  • bundled (default, no download): the Amari distance row, the score-function and sufficient-statistics row, and the multi-model rows, from the committed sample.
  • external: the headline correlation and log-likelihood rows, which need the well-determined recording ($k\approx153$).

It prints each measured value beside the paper row it corresponds to, so a reviewer checks numbers off rather than reverse-engineering the mapping. The device is auto-detected, with an explicit printed fallback to CPU on Apple GPUs since parity runs are float64. The Fortran binary resolves through pamica.native's cross-platform resolver rather than the bundled macOS-only fixture, so this works on Linux.

Replaces four workstation-specific scripts, whose logic it reuses.

Cost is documented rather than glossed. benchmarks/README_dimsweep.md now gives measured wall-clock per tier, download size, hardware assumed, and what changes without a GPU: bundled is ~33 min end to end on a 10-core Apple Silicon laptop, external needs a ~224 MB download and is materially longer.

The paper now says what is true:

The harness, sample data, and reproduction commands ship with the package. All but the two on002718 rows re-run from the bundled sample alone, and the documentation states what each costs to verify.

Deliberately not done

No cheap reduced-budget tier. Below $k\approx60$ the decomposition is under-determined and backends diverge for legitimate reasons, so a faster variant would reproduce a noisier number and invite exactly the misreading this issue exists to prevent. High-k is the protocol because it reduces uncertainty; the honest response to verification being expensive is to state the price, not to invent a cheaper thing to measure.

Verification

Ran the bundled tier here:

  • Score-function row: log-pdf max|diff| 8.88e-16, score max|diff| 1.78e-15, sufficient statistics 2.27e-13, against the paper's "exact, ~1e-15".
  • Single-model path end to end at reduced settings (1 seed, 25 iterations, a pipeline check rather than the protocol): Fortran and pamica both ran, mean correlation 0.9999, Amari 0.0023.
  • Device fallback and cross-platform binary resolution both behaved as intended on Apple Silicon.

The full external tier was not run here; it needs the download and hours of compute. ruff and ty clean.

Paper is 1746 words, within the 750-1750 range.

benchmarks/reproduce_table1.py is a single entry point that reproduces
the paper's parity rows against the Fortran reference: a bundled tier
(no download) for the Amari distance, score-function/sufficient-
statistics, and multi-model rows, and an external tier for the
headline correlation/log-likelihood rows.

No hardcoded paths, thread count, or CUDA assumption: the compute
device is auto-detected with a printed CPU fallback (MPS has no
float64), and the Fortran binary is resolved via pamica.native's
cross-platform release resolver instead of the bundled macOS-only
amica15mac fixture. Each printed row is labeled against the paper's
table so a reviewer can check it off directly.

Removes the four workstation-specific scripts this replaces
(.context/issue-144-parity-data-adequacy/run_5seed_newton0.sh,
run_fortran_only.py, run_ng_only.py, bundled_sample_newton0.py),
whose logic it reuses and adapts; updates a stale cross-reference in
the remaining test_ds002718_32ch.py.
Add a "Reproducing Table 1" section to benchmarks/README_dimsweep.md:
download size, measured bundled-tier wall-clock, and an external-tier
estimate derived from .context/issue-90/ksweep_findings.md's measured
single-fit timing at the same 70-channel/747,750-frame/2000-iteration
configuration, including the CPU-only slowdown. Also adds the missing
full-recording (untruncated) extraction recipe the external tier
needs, alongside the existing 60,000-frame recipe used for the
ms/iteration sweeps.

No cheaper reduced-budget tier is offered: below k~60 the decomposition
is under-determined, so a shorter run would trade accuracy for speed
rather than reproduce the same number faster.
The paper claimed a third party could re-run Table 1; validation.md said
the opposite in writing, that the headline script was 'not yet a portable
one-command reproduction' and that validate_implementations.py's defaults
'do not reproduce either row directly'. Both cannot stand, and
reproducibility is what JOSS reviewers check hardest.

The paper now says what is true: all but the two on002718 rows re-run
from the bundled sample alone, and the documentation states what each
costs. validation.md documents the new single entry point, its two tiers,
and points at the measured cost, replacing references to four
workstation-specific scripts that no longer exist.

Closes #144
@neuromechanist neuromechanist linked an issue Aug 10, 2026 that may be closed by this pull request
5 of 8 tasks
@neuromechanist
neuromechanist merged commit 0c4da39 into main Aug 10, 2026
8 checks passed
@neuromechanist
neuromechanist deleted the 144-portable-table1-reproduction branch August 10, 2026 05:21
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.

Fix do_approx_sphere regression and data-inadequate headline parity dataset

1 participant