# Prespecified repeated balanced cross-fitting protocol

Freeze time: 2026-07-17, before execution or inspection of any new seed result  
Status: `FROZEN_FOR_EXECUTION_AMENDED_BEFORE_SENSITIVITY_SEEDS`

## Purpose and authority

This sensitivity analysis addresses fold-assignment and fold-local training
variability in the v2.1 HepG2 unique-target audit. The deterministic seed
`20260717` realization remains the frozen primary analysis. No primary estimate,
feature, target, endpoint, gate or claim is replaced by this protocol.

The analysis is same-dataset L2 evidence only. It is not independent biological
replication and cannot support cross-cell-type, muscle/DMD, mechanistic,
therapeutic, safety or clinical claims.

## Locked inputs

| Input | SHA-256 |
|---|---|
| `results/state_nadig_trade_actual/delta_store/hepg2_trade_hvg_delta_store.npz` | `652b4fc7e795fe61da6bc8e36280c1a97c04193d848c45c0b37884f7acc331c9` |
| `results/gpu_strategy/hepg2_nonleaky_perturbation_features.tsv` | `64ef7dc926afa8c3abacb79557b3eddd569164600fe3fa80948817b230624122` |
| `submission_nar_database/evidence_upgrade_v22/01_repeated_balanced_seed_manifest.tsv` | `4c617b6945e8e2a614f3af3862b9203b997e4816da529e97f53c416210543f16` |

Execution script:
`scripts/run_repeated_balanced_unique_target_crossfit.py`, SHA-256
`d3bd662d0c2290c2aadb6bc75c4367e31b9c24b801d05fc99d3245e17310500a`.

Independent verification script:
`scripts/verify_repeated_balanced_unique_target_crossfit.py`, SHA-256
`24c3aef84aba431deee43d24386b33e18213bd1c4aad97508ef784047369e949`.

Outcome-blind reproduction-tolerance amendment:
`submission_nar_database/evidence_upgrade_v22/02_reproduction_tolerance_debug_log_20260717.md`,
SHA-256 `172d6be575f1984f55cbe69144087ce97e79e7093eac41369e84a1f02d6312a6`.
The amendment was made after the seed-20260717 gate stopped and before any
sensitivity seed was executed.

## Prespecified realizations

- Twenty deterministic seeds: `20260717` through `20260736` inclusive.
- Seed `20260717` is recomputed as an exact reproduction check of the frozen
  primary realization.
- Seeds `20260718`–`20260736` are the 19 new sensitivity realizations.
- Consecutive integers were selected mechanically from the frozen primary seed,
  without using new-seed outcomes.

## Unchanged model and fold design

- Eligible targets: exactly 2,160, minimum 20 cells, excluding non-targeting.
- Outer design: five non-overlapping folds of exactly 432 targets.
- Balance variables: outcome-blind cell-count quintile and external-feature
  availability, as implemented in the corrected v2.1 primary script.
- Features: the same 32 `safe_external_v1` DMD-consensus and priority-v1 fields.
- Excluded: DepMap and dataset-wide outcome-summary fields.
- Inner CV: five folds within each outer-training set.
- Ridge alpha grid: 0.1, 1, 10, 100 and 1000.
- Imputation, scaling and alpha selection remain outer-training-fold local.
- Each target receives exactly one OOF score per realization and model.
- The frozen feature-row, response-row and outcome-coordinate negative controls
  are repeated with the same seed arithmetic.

Full 2,000-dimensional prediction vectors are not duplicated for the 19
sensitivity realizations. Target-level OOF metrics, fold assignments, inner-CV
records, model summaries and negative-control summaries are retained. The
frozen primary full-vector object remains unchanged.

## Prespecified summaries

Across realizations, report distributions for:

1. mean model-minus-zero RMSE;
2. mean model-minus-train-mean RMSE;
3. relative RMSE improvement against each baseline;
4. raw-cosine difference versus train mean;
5. perturbation-specific residual cosine;
6. fold-specific selected alpha;
7. label-invariant pairwise adjusted Rand index for fold assignments;
8. the number and proportion of favorable effect signs;
9. the number of realizations in which any negative control has point RMSE
   support against both baselines.

Report both all 20 realizations and the 19 new sensitivity seeds. The frozen
primary target-bootstrap interval and randomization P value remain the
conditional primary inference; no minimum P value across repeats is selected or
reported as a new primary test.

## Joint target and fold/training sensitivity interval

For each of the four additive effect metrics, generate 10,000 draws using seed
`20260737`. Each draw first samples one of the 20 prespecified realizations and
then resamples 2,160 targets with replacement within that realization. The 2.5th
and 97.5th percentiles form a hierarchical sensitivity interval reflecting both
target sampling and observed fold/training variability.

This is not an independent biological-replication confidence interval.

## Interpretation rules

For an endpoint whose favorable direction is prespecified:

- `STABLE`: at least 18/20 realization means are favorable and the hierarchical
  sensitivity interval lies wholly on the favorable side of zero;
- `MIXED`: 11–17/20 realization means are favorable, or at least 18/20 are
  favorable but the hierarchical interval crosses zero;
- `UNSTABLE`: 10/20 or fewer realization means are favorable.

RMSE and raw direction are interpreted separately. Stable RMSE cannot rescue
mixed or unstable raw direction. Negative-control counts are descriptive and do
not replace the frozen primary negative-control gate.

## Integrity and stopping rules

1. Input and seed hashes must match before execution.
2. No seed may be added, removed or substituted after results are observed.
3. Every realization must have 5×432 folds and one OOF record per target/model.
4. Fresh seed `20260717` outputs must reproduce the frozen primary fold exactly,
   target-level float32 metrics within `1e-4`, and inner-CV/model summaries
   within `1e-6`; text, target, model, fold, alpha and denominator fields remain
   exact. These tolerances were locked before seed `20260718` after the retained
   diagnostic described in the debug log.
5. Failed or incomplete runs remain auditable and are not silently overwritten.
6. The independent verifier must recompute summaries, the hierarchical interval
   and all output hashes before manuscript or resource integration.
