Appendix RRR — NPZ Validation & Unified Scoring (Killer Test A)
Appendix RRR — NPZ Validation & Unified Scoring (Killer Test A)
\labelapp:RRR
Purpose and scientific role of this appendix
This appendix documents a single, sharply-defined objective: to validate the NPZ-based evaluation pipeline for Killer Test A and to formalize a unified scoring functional that ranks all simulation runs in a reproducible, non-handwavy manner.
The intent is not merely to report a “good-looking” rotation curve from a single run. The intent is to establish traceable evidence that:
- The pipeline ingests NPZ outputs deterministically and reconstructs the relevant observable proxies.
- The same measurement protocol is applied across all runs and across checkpoints (steps).
- The evaluation yields objective metrics for (i) flatness in a specified rotation band, (ii) rotation amplitude, and (iii) a lensing-normalization proxy.
- A single scalar score function produces a global ordering (ranking) with transparent weighting and controlled dynamic range.
- The identified winner is not a coincidence: it emerges as the best under both the raw score and a lens-normalized variant, and is stable at the terminal step.
This appendix is therefore an evidence artifact: it operationalizes a key empirical claim of the framework—namely that the model can produce (within the tested configuration family) rotation-curve flatness and amplitude concurrently with a non-pathological lensing proxy—while protecting against selection bias.
Computational Artifacts and Reproducibility
All numerical results reported in this appendix were generated using a fully deterministic and auditable Python pipeline. Each script has a well-defined logical role within the validation chain and can be executed independently. Together, these scripts form an executable proof of the claims evaluated in Appendix ‘§app:RRR‘.
\begintabularx\linewidth>X >X
Script & Purpose \
‘killer_test_A_from_npz.py‘ & Loads NPZ simulation outputs, reconstructs operational observables (, ), computes all primary metrics, and writes per-run reports and summary tables. \
‘RRR_unified_scoring.py‘ & Implements the unified scoring functional defined in Eqs. (‘§eq:flat_factor‘)–(‘§eq:unified_score‘), ranks all runs deterministically, and produces leaderboard CSV artifacts. \
‘RRR_lens_normalized_ranking.py‘ & Evaluates the lens-normalized score variant (Eq. ‘§eq:lensnorm_score‘) as a robustness and sanity check against lensing-dominated ordering. \
‘winner_packet_export.py‘ & Collects the top-ranked run, associated figures, reports, and tables into a self-contained audit packet suitable for review or archival. \
\endtabularx
Reproducibility guarantee. No script performs manual filtering, visual tuning, or post-hoc selection. All rankings and winners emerge solely from the predefined scoring function and fixed analysis protocol.
Data products and directory structure (NPZ-first)
NPZ inputs.
The validation is NPZ-first: the script reads per-run NPZ files (in a directory, e.g. ‘raw_npz/‘) that contain the primitive simulation fields. The essential inputs are:
- A density-like field (via a chosen NPZ key; e.g. ‘rho_key = I‘).
- A velocity component field (e.g. ‘v_key = vx‘) used to derive a local or band velocity magnitude proxy.
- A run identifier that maps to an external table providing (circular/characteristic velocity) for calibration.
External calibration table ().
A CSV table provides per run (or per run family), enabling a deterministic scaling mode:
In our recorded runs, the calibration mode was:
Outputs (summary + per-run report + figures).
Each run and checkpoint writes:
- A global summary table: ‘killer_test_A_summary.csv‘ (one row per ).
- A per-run JSON report: ‘report.json‘ containing metrics, provenance keys, and meta parsing.
- Diagnostic figures: ‘rotation_curve.png‘, ‘lensing_proxy.png‘.
A canonical outdir layout:
OUT/
killer_test_A_summary.csv
gamma_0.1/
rep_0/
steps_160000/
steps_320000/
steps_640000/
report.json
figs/rotation_curve.png
figs/lensing_proxy.png
Killer Test A: what is being tested (operationally)
Killer Test A is defined here in operational terms: given a run checkpoint, extract a rotation curve proxy and quantify:
- Flatness in a target band: the coefficient of variation (CV) of restricted to a band .
- Amplitude in that band: the mean value of over the same band.
- Lensing normalization proxy: a scalar proxy (e.g. or ) derived deterministically from the reconstructed operational density .
The practical meaning is simple: a run passes the spirit of the test if it yields a flat rotation curve (low scatter) at a non-trivial amplitude while not producing an absurd lensing proxy.
Primary metrics (definitions used in the reports)
Let be the discrete radii at which the rotation proxy is evaluated in the band, and let
Define the band mean:
<a id="eq-eq-band-mean" />
the band standard deviation:
<a id="eq-eq-band-std" />
and the coefficient of variation:
<a id="eq-eq-band-cv" />
Here is a small stabilizer to prevent division by zero in degenerate cases. In the scoring functional we used .
We denote:
The lensing proxy is recorded as:
where is a central (or reference) surface-density-like quantity and is its maximal recorded value under the proxy map. In our winner record, , indicating a specific normalization structure in that case.
Unified scoring: design principles and final formula
A single scalar score must do three things simultaneously:
- Reward flatness: smaller must increase the score strongly.
- Reward amplitude: larger must increase the score linearly (first-order).
- Include lensing normalization without domination: should matter, but it must not overwhelm flatness/amplitude.
Flatness factor.
We define a strictly positive “flatness gain”:
<a id="eq-eq-flat-factor" />
This makes the scoring sensitive to improvements in flatness while avoiding blow-up at CV .
Amplitude factor.
We define:
<a id="eq-eq-amp-factor" />
Lensing factor (compressed dynamic range).
We define:
<a id="eq-eq-lens-factor" />
The logarithm provides a deliberate compression: an order-of-magnitude variation in does not create an order-of-magnitude swing in .
Unified score.
The final score used for ranking is:
<a id="eq-eq-unified-score" />
Lens-normalized variant (sanity check)
To ensure that lensing cannot subtly dominate the ranking, we also evaluate a median-normalized lensing factor:
<a id="eq-eq-lensnorm-score" />
This preserves ordering pressure from flatness and amplitude while forcing lensing to act as a gentle regularizer. In our results, the top ranking remains stable under this transformation, strengthening the claim that the winner is not an artifact of scaling.
Evaluation protocol (steps, stability, and “no cherry-picking”)
The pipeline produces metrics at multiple checkpoints (e.g. steps 160k, 320k, 640k). We enforce two analysis modes:
Mode 1 (terminal-step stability).
Filter rows at the terminal checkpoint:
compute and rank. This emphasizes stability and maturity of the dynamics.
Mode 2 (any-step optimum per run).
Compute at all checkpoints and determine, for each run , the maximum score achieved and the earliest step at which it is achieved. This creates a “time-to-quality” diagnostic:
In the captured data, the top runs achieve their maxima at the terminal step, i.e. they are not transient spikes.
Key results (winner + leaderboard summary)
Best overall at terminal step (640k).
The best entry under at 640k steps is:
- , ,
- (very flat within the band)
- (strong amplitude)
- (highest observed)
Interpretation.
Two facts matter most:
- The winner is not merely high-amplitude; its CV is the smallest among top contenders, and the flatness factor dominates appropriately.
- The score increases monotonically with step for the strongest candidates (160k 320k 640k), indicating genuine convergence rather than noise.
Figures (rotation and lensing proxies)
This appendix expects the following figure files to be available in your “winner packet” directory. Replace paths as needed.
\beginfigure[H]
[figure: see original PDF] WINNER_PACKET_unifiedScore_640k_gamma_0.1_rep0/rotation_curve.png Figure: Killer Test A winner: rotation-curve proxy at , rep 0, steps 640k. The evaluation band metrics and are computed deterministically from this curve (restricted to the designated band). \labelfig:RRR_rotation_curve \endfigure
\beginfigure[H]
[figure: see original PDF] WINNER_PACKET_unifiedScore_640k_gamma_0.1_rep0/lensing_proxy.png Figure: Killer Test A winner: lensing-normalization proxy (e.g. via / ) derived from . The logarithmic compression used in scoring prevents lensing from dominating the ranking while still penalizing pathological normalizations. \labelfig:RRR_lensing_proxy \endfigure
Tabulated artifacts (what to cite in the paper)
For clean scientific traceability, we recommend citing filenames (not just screenshots). The minimal set of tables to reference:
- Full ranked table at 640k: ‘killer_test_A_summary_640k_with_score.csv‘
- Top-15 at 640k: ‘top15_640k_unified_score.csv‘
- Best per gamma at 640k: ‘best_per_gamma_640k.csv‘
- Gamma leaderboard stats: ‘gamma_leaderboard_640k.csv‘
- Any-step best per run: \beginitemize
- ‘best_per_run_ANYSTEP.csv‘
- ‘per_run_maxscore_and_when.csv‘
\item Lens-normalized top50: ‘TOP50_overall_ALLsteps_lensNorm.csv‘ \enditemize
A compact “paper-ready” summary table.
Below is a template you can fill (manually or via an auto-generated LaTeX table) with the Top-5 entries:
\begintable[H]
Figure: Top candidates under unified score at steps = 640k. (Populate from ‘top15_640k_unified_score.csv‘.) \labeltab:RRR_top5
| Score | | rep | | CV | | steps | | — | — | — | — | — | — | — | | 3809.8599 | 0.100 | 0 | 62.2887 | 0.1120 | 944.8723 | 640000 | | 3384.6345 | 0.020 | 0 | 63.2197 | 0.1310 | 1107.9894 | 640000 | | 3330.5109 | 0.018 | 0 | 65.4396 | 0.1415 | 1342.4388 | 640000 | | 3291.2944 | 0.026 | 0 | 65.3328 | 0.1424 | 1305.3461 | 640000 | | 3269.1438 | 0.030 | 0 | 65.9318 | 0.1446 | 1296.9872 | 640000 | | |
\endtable
Reproducibility: canonical commands (copy/paste)
(1) Run the NPZ validator (example).
Adjust paths to your machine. This is the canonical pattern:
python /Users/fcp/Desktop/STRUCTURAL_STABILITY_SERIES/validation_results_big/killer_test_A_from_npz.py \
--npz_dir /Users/fcp/Desktop/STRUCTURAL_STABILITY_SERIES/validation_results_big/raw_npz \
--mu 0.03 \
--rho_key I --v_key vx \
--Vc_table /Users/fcp/Desktop/STRUCTURAL_STABILITY_SERIES/validation_results_big/orbit_runs_enriched_with_Vc.csv \
--c_mode from_v_over_Vc \
--outdir /Users/fcp/Desktop/STRUCTURAL_STABILITY_SERIES/validation_results_big/out_A_npz_REDO2_YYYYMMDD_HHMMSS \
--write_every 10
(2) Compute 640k-only score and Top-15.
OUT="/Users/fcp/Desktop/STRUCTURAL_STABILITY_SERIES/validation_results_big/out_A_npz_REDO2_20260117_180544"
OUT="$OUT" python3 - <<'PY'
import os, pandas as pd, numpy as np
OUT=os.environ["OUT"]
df=pd.read_csv(f"{OUT}/killer_test_A_summary.csv")
d=df[df["steps"]==640000].copy()
cv = d["vrot_band_cv"].astype(float)
amp = d["vrot_band_mean"].astype(float)
sig = d["Sigma_0"].astype(float)
flat = 1.0/(cv + 1e-6)
lens = np.log1p(np.maximum(sig, 0.0))
d["score"] = flat * amp * lens
d = d.sort_values("score", ascending=False)
full_out=f"{OUT}/killer_test_A_summary_640k_with_score.csv"
top_out=f"{OUT}/top15_640k_unified_score.csv"
d.to_csv(full_out, index=False)
d.head(15).to_csv(top_out, index=False)
print("WROTE:", full_out)
print("WROTE:", top_out)
print("BEST_OUTDIR:", d.iloc[0]["outdir"])
PY
(3) Winner packet creation (minimal).
OUT="/Users/fcp/Desktop/STRUCTURAL_STABILITY_SERIES/validation_results_big/out_A_npz_REDO2_20260117_180544"
BEST="$OUT/gamma_0.1/rep_0/steps_640000"
WIN="$OUT/WINNER_PACKET_unifiedScore_640k_gamma_0.1_rep0"
mkdir -p "$WIN"
cp "$OUT/killer_test_A_summary_640k_with_score.csv" "$WIN/"
cp "$OUT/top15_640k_unified_score.csv" "$WIN/"
cp "$BEST/report.json" "$WIN/"
cp "$BEST/figs/rotation_curve.png" "$WIN/"
cp "$BEST/figs/lensing_proxy.png" "$WIN/"
What this appendix does (and does not) claim
What it establishes.
This appendix establishes that, under the tested NPZ-derived conditions and calibration protocol, the system produces runs for which:
- rotation curves within the evaluation band are demonstrably flat (low CV),
- amplitudes remain substantial (non-trivial band mean),
- lensing proxy normalization remains controlled (log-compressed contribution),
- and a winner emerges via objective ranking rather than manual selection.
What it does not establish by itself.
This appendix does not, by itself, constitute a full universal proof of the theory. Instead, it is a validation module—an empirical/algorithmic checkpoint that complements the theoretical derivations and other appendices. Its strength is methodological: it makes the evaluation falsifiable, repeatable, and machine-auditable.
Recommended citation in the main text
In the main paper, you can cite this appendix succinctly as: \beginquote “NPZ-based validation and unified scoring for Killer Test A are provided in Appendix ‘§app:RRR‘, including reproducible ranking tables and winner packets.” \endquote
Appendix RRR status: NPZ ingestion validated; unified scoring implemented; winner packet exported; tables saved as CSV artifacts for audit.
Gravity as a Temporally Closed Dynamical Phase/67_Appendix RRR — NPZ Validation & Unified Scoring (Killer Test A).TEX in the verified v2 revision. Found an issue with this section? Submit a criticism.Cite this section
Plain text
Hassan, A. (2026). Appendix RRR — NPZ Validation & Unified Scoring (Killer Test A). In Gravity as a Temporally Closed Dynamical Phase, The Complete Structural Selection Corpus. Nuronova Genix Corp. https://structuralselection.org/book/appendix/appendix-rrr-npz-validation-and-amp-unified-scoring-killer-test-a
BibTeX
@incollection{hassan2026appendixrrrnpzvalida,
author = {Hassan, Akram},
title = {Appendix RRR — NPZ Validation & Unified Scoring (Killer Test A)},
booktitle = {The Complete Structural Selection Corpus},
publisher = {Nuronova Genix Corp},
year = {2026},
url = {https://structuralselection.org/book/appendix/appendix-rrr-npz-validation-and-amp-unified-scoring-killer-test-a}
}RIS
TY - CHAP AU - Hassan, Akram TI - Appendix RRR — NPZ Validation & Unified Scoring (Killer Test A) T2 - The Complete Structural Selection Corpus PB - Nuronova Genix Corp PY - 2026 UR - https://structuralselection.org/book/appendix/appendix-rrr-npz-validation-and-amp-unified-scoring-killer-test-a ER -