Repository navigation
Ablation power calibration (PR 0): can adhesion_v1 adjudicate anything? - #179
Merged
Merged
Conversation
Answers one question before any component is built: how large an improvement would a component have to make before the frozen benchmark could tell? If the answer is "larger than anything plausible", the finding is that the benchmark is too small and curation outranks harness work. No real component is tested here. Synthetic signals of known strength are run through the real decision rule and the rejection rate is measured. Shaped by an independent review that implemented the original 2b design and measured it. Three of its findings changed this code: Pooling out-of-fold scores across folds is incoherent, not merely uncalibrated: length-only AUC is 0.912 in Saccharomycetes and 0.327 in Eurotiomycetes, so two folds learn "long => adhesin" and the third learns the opposite, and 47% of pooled pairs compare contradictory scores. The primary metric is now within-fold stratified concordance, which never compares across folds. The specified baseline was beaten by one of its own inputs: log length alone scores AP 0.690 against 0.551 for the 21-feature model. The bar is now the best of a declared family with C tuned by inner cluster-grouped CV. Delta = 0 is the wrong null and the error scales with feature count, so the dimensionality bias is measured and reported rather than assumed away. Also corrects two errors in my own plan, both verified: there are ZERO mixed-label clusters inside the scorable folds (so the showcase hydrophobin pairs are outside C1 and decide nothing), and the D-A leakage table only reproduces with the training pool set to all 166 proteins, which was never declared. Both are now pinned by tests against the real benchmark. One bug found in development and pinned by two regression tests: the bar and the component model must be fitted at the SAME regularisation. Fitting the bar with a tuned C while components ran at a fixed C=1.0 made a pure-noise component appear to cost 0.15 concordance. 63 tests, added to the no-torch CI job (which gains scikit-learn). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…versions The first HPCC run of both calibrations died on `import numpy` while reporting exit code 0, because the ssh wrapper swallowed the failure. Cause: `-I` implies `-s`, which drops user site-packages, and on the HPCC numpy, scipy and scikit-learn live in ~/.local/lib/python3.12/site-packages. The other -I scripts in this repo are stdlib-only, so this never came up. My capability check was the real mistake: it ran `python3 -c "import numpy"` without -I and reported success. Checking that imports work is not enough -- they have to be checked with the flag the run will actually use. Since the result therefore depends on packages outside the repo and outside the benchmark digest, baseline.json now records numpy, scipy and scikit-learn versions beside the Python version. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The serial run took over 30 minutes for ONE training pool at 200 replicates on a login node and was killed unfinished. Every (shape, effect, replicate) is independent, so the simulation now runs as a flat task list over a process pool, with --workers on the CLI and 16 cores in the job script. Replicate count matters for the number this is meant to produce: a power estimate near 0.8 from 200 draws has a standard error of about 2.8%, and the minimum detectable effect inherits that noise. The sbatch defaults to 1000 replicates and 1000 permutations instead. Parallelising forced a correctness fix. The serial version shared one random generator across the replicates of a grid point, so a result depended on the order they ran in. Each task now carries its own seed and builds its own component from it, which makes a run reproducible whatever the worker count. A test pins that serial and parallel give identical results. The job script runs BOTH declared training pools, since which one to use was an undeclared assumption in the original plan and it changes the leakage drop counts. It refuses to run on a benchmark that fails its SHA256SUMS, on a dirty or unpinned commit, or into an existing output directory, and it checks the imports with the interpreter the run will use. 71 tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Answers one question before any component is built or tested:
If that minimum detectable effect is large, the finding is that the benchmark is too small, and curation outranks harness work. Deciding that cheaply, before building the full harness, is the whole point. No real component is tested here — synthetic signals of known strength are run through the real decision rule and the rejection rate is measured.
Why PR 0 exists at all
An independent review implemented the original 2b harness design and measured it. Ten findings were blocking; four were re-verified independently before being accepted. Three changed this code:
Corrections to my own plan, both verified and pinned by tests
--train-poolflag, recorded in every output, with both values pinned by a test.Two bugs found while building it
C=1.0, so the difference measured the regularisation change, not the component — a pure-noise component appeared to cost 0.15 concordance. Caught because the smoke run's null delta was implausible.choose_barnow returns its per-fold C; two regression tests pin it. Null delta is now −0.003 at one dimension.The smoke run already reproduces finding 4: the dimensionality penalty runs −0.003 → −0.021 → −0.046 as a noise component goes 1 → 5 → 20 features.
Contents
analysis/ablation_power/:benchmark_data.py(load, verifySHA256SUMS, strict-cluster splits),model.py(the bar),stats.py(stratified concordance, paired cluster permutation test, BCa),simulate.py(three signal shapes, type-I, power curves),run_power.py(CLI),README.md(everything declared in advance).63 tests in
tests/ablation_power/, added to the no-torch CI job (which gains scikit-learn). Ruff 0.3.5 clean.What has NOT been run
The real calibration — 200 replicates × 400 permutations across three signal shapes — is an HPCC run and has not been done. The numbers in this PR are from an 8-replicate smoke run and are not results.
Expectation worth stating in advance: based on the review's measurements I expect the realistic (clade-heterogeneous) and binary signals never to reach 80% power on the grid. If that holds,
adhesion_v1cannot adjudicate any plausible component and curation is the next thing worth compute.🤖 Generated with Claude Code