MATCHED-REGIME VALIDATION: EXACT IMPLEMENTATION AND REPORTING NOTES

Purpose and scope
The added experiments distinguish finite-sample MI magnitude accuracy from permutation-test size/power. Each dataset contains N=78 independent rows and blocks C in R^4 and D in R^3, matching the dimensions and row count of the observational example. They do not reproduce the full Galactic distribution, observational covariance, catalogue selection, abundance rounding, or original data-derived strata. These analyses were added during revision; they are not preregistered or independent confirmatory observations.

Replications and random numbers
Each of seven scenarios uses 500 independent sample draws. Each sample is evaluated against B=199 permutations, plus the unpermuted identity; the shared-stratum scenario has both global and within-stratum permutation schemes. For every method, reject at p <= 0.05 where p=(1+sum[T_perm>=T_obs])/(B+1). The seed is 20261003. NumPy SeedSequence([seed,scenario_index,replicate_index]).spawn(3) assigns separate streams to data, global permutations and restricted permutations. Methods share permutation indices within a sample. All 12,000 method/scenario/scheme replicate rows are retained in matched_regime_replicates.csv. (There are 3,500 independent generated datasets; each method is evaluated 4,000 times because the 500 shared-stratum datasets have two null schemes.)

Generative scenarios
All base C_j and E_j are mutually independent standard normals, except the deterministic fixed stratum layout described below.
1. Independent: D=E; exact I=0.
2-4. Gaussian matched pairs: D_j=rho*C_j+sqrt(1-rho^2)*E_j, j=1,2,3, with rho=0.3, 0.6 or 0.9. C_4 is an independent nuisance feature. Exact I=-(3/2)log(1-rho^2): respectively 0.1414660192, 0.6694306539 and 2.4910968102 nats.
5. Triangular: generate the rho=0.6 Gaussian data, then replace C_2 by C_2+1.2*(C_1^2-1). This invertible within-C transformation preserves exact MI=0.6694306539 nats but changes dependence geometry.
6. Quadratic: D_j=(C_j^2-1)/sqrt(2)+0.75*E_j for j=1,2,3. The blocks are dependent while linear cross-covariances vanish in the population. No exact MI magnitude is assigned to this case. Bias/RMSE are therefore not reported.
7. Shared-stratum-only: six fixed groups of 13 rows, with a=(-1.5,-0.9,-0.3,0.3,0.9,1.5). Set C=C0+a_Z*(1,0.7,0.5,0.3) and D=E+a_Z*(1,0.6,-0.4). Residual C0 and E are independent conditional on group Z. Global permutation tests marginal independence, which is false in this mixture. The within-group permutation preserves Z and is calibrated under its conditional-exchangeability construction. High global rejection is NOT a false-positive rate for marginal independence; it demonstrates the consequence of using that null to make a residual-pairing claim.

Statistics
GC is the uncorrected plug-in Gaussian-copula score, in nats: transform each feature by Phi^{-1}[(midrank-0.5)/N], calculate sample covariance with ddof=1, then use half the log-determinant ratio of marginal to joint covariance. Reordering entire D rows preserves the marginal transform; scores can be whitened once and cross-covariance recomputed for each permutation. No analytic finite-N bias correction is applied, matching the original source script.
KSG5 is the source's KSG algorithm-1 estimate, in nats, k=5: standardise every original coordinate using its sample mean and ddof=1 standard deviation, use maximum/Chebyshev distances in both blocks and their joint space, choose the fifth joint neighbour excluding self, count neighbours strictly inside that radius, and apply psi(k)+psi(N)-mean[psi(nx+1)+psi(ny+1)]. Floating point strictness is implemented with nextafter(radius,0). Estimates are not truncated at zero. The benchmark uses precomputed pairwise distance matrices, mathematically matching the cKDTree algorithm. check_backend_equivalence.py and backend_equivalence.json document exact KSG agreement on continuous N=78,250,1000 samples (identity plus ten permutations each), GC differences below 2.5e-16, and exact KSG agreement for rounded stars when both backends use the same fixed standardisation. The original source recomputes standardisation after reordering each D block; altered floating-point summation order can change strict counts at exact tied distances. On the rounded-star eleven-permutation check, this changes some KSG values by up to .0010684 nats. The original observed scores and original seeded global/stratified p values nevertheless agree. We do not assert bitwise equivalence of the rounded null samples.
dCor2 is squared, biased sample distance correlation, used only as an additional dependence statistic and not as an MI estimate. Standardise each original coordinate as for KSG. Construct Euclidean-distance matrices within the two blocks and double-centre each by subtracting row and column means and adding the grand mean, giving A and B. T=sum(A*B)/sqrt(sum(A*A)*sum(B*B)). This is the usual squared distance-correlation V-statistic; its non-zero finite-sample null expectation is permutation-calibrated. It has no nats units. Permutations reorder complete D rows and corresponding B rows and columns.

Reported uncertainty and loss
The summary reports rejection counts/fractions and two-sided 95% Wilson binomial intervals using z=1.959963984540054; these intervals describe Monte Carlo uncertainty over 500 independently generated samples, not uncertainty in the observational MI. Estimator means, sample standard deviations, bias and RMSE are computed against exact MI only in scenarios 1-5 and only for GC/KSG. No estimator confidence intervals or coverage claim is made.

Original-data cross-check and independent benchmark
The unchanged source code was copied into original_star_reproduction, run, and its three output CSVs and JSON summary compared with the original. They matched exactly in that reproduction; the distributed interpretation string has since been updated to the revised scientific wording without changing numerical outputs. The independent pairwise implementation repeats the original global stream (seed 20260829, B=1000) and restricted stream (seed 20260929, B=2000), and independently reproduces GC/KSG5 scores and p values. It additionally calculates dCor2 using those same permutations. This added benchmark is exploratory and does not establish a unique physical mechanism or catalogue-wide independence/association.

Runtime
benchmark_runtime.py times 20 warmed standalone evaluations at each N=78,250,1000, C dimension 4, D dimension 3. It includes rank/scale preprocessing and the estimator computation; it excludes data generation and permutation construction/evaluation. Timings are wall-clock observations on the recorded shared runtime and are descriptive, not portable performance guarantees. GC involves marginal sorting and covariance operations. The cKDTree KSG implementation has data- and dimension-dependent complexity. The distance-correlation implementation requires O(N^2) memory. The batched Monte Carlo backend uses O(B*N^2) temporary memory and is intended for small matched-regime validation, not an asserted survey-scale solution; chunking permutations bounds memory. The original cKDTree KSG script avoids materialising all pairwise distances.

Execution
python validate_matched_regime.py --workers 4 --reps 500
python benchmark_runtime.py
python independent_star_benchmark.py
python check_backend_equivalence.py
The latter imports validate_matched_regime and uses original_star_reproduction/nissen_schuster_2010_star_level.csv. Preserve that relative path when packaging or amend DATA explicitly.

Rounding sensitivity
The frozen original analysis is accompanied by two post hoc sensitivity sets using 200 independently perturbed inputs each and the same B=199 restricted permutations across perturbations. Chemical epsilon perturbations are uniform +/-1e-6 dex. Full rounding-cell perturbations are independent uniform +/-0.005 dex in four chemical features and +/-0.5 km/s in three velocities. The original sample and six strata are held fixed; they are not recomputed from perturbed metallicity. KSG5 remains significant in every full rounding perturbation (p=.005-.025), while GC never rejects (p=.39-.60). These are numerical sensitivity checks conditional on original membership/strata, not independent observations, measurement-error corrections, or replacement primary probabilities. Methods and results are in the accompanying scripts, CSV and JSON files in original_star_reproduction/.
