Skip to content
Structural Selection
Part VIAppendix10 min read·1,936 words

Appendix RRR — NPZ Validation & Unified Scoring (Killer Test A)

Reading widthWidth
Text sizeText

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:

  1. The pipeline ingests NPZ outputs deterministically and reconstructs the relevant observable proxies.
  2. The same measurement protocol is applied across all (γ,rep)(\gamma,\mathrm{rep}) runs and across checkpoints (steps).
  3. The evaluation yields objective metrics for (i) flatness in a specified rotation band, (ii) rotation amplitude, and (iii) a lensing-normalization proxy.
  4. A single scalar score function produces a global ordering (ranking) with transparent weighting and controlled dynamic range.
  5. 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 (ρop\rho_{\mathrm{op}}, vrotv_{\mathrm{rot}}), 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 ρ(x,t)\rho(\mathbf{x},t) (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 VcV_c (circular/characteristic velocity) for calibration.

External calibration table (VcV_c).

A CSV table provides VcV_c per run (or per run family), enabling a deterministic scaling mode:

ρop(r)  =  c(r)ρ(r),c(r) constructed from vVc  under a specified mode.\rho_{\mathrm{op}}(r)\;=\;c(r)\,\rho(r), \qquad c(r)\ \text{constructed from}\ \frac{|v|}{V_c}\ \ \text{under a specified mode.}

In our recorded runs, the calibration mode was:

c_mode = from_v_over_Vc,c_source: from_ratio(|v|/Vc),Vc_source: from_table: orbit_runs_enriched_with_Vc.csv.\texttt{c\_mode = from\_v\_over\_Vc}, \quad \texttt{c\_source: from\_ratio(|v|/Vc)}, \quad \texttt{Vc\_source: from\_table: orbit\_runs\_enriched\_with\_Vc.csv}.

Outputs (summary + per-run report + figures).

Each run and checkpoint writes:

  • A global summary table: ‘killer_test_A_summary.csv‘ (one row per (γ,rep,steps)(\gamma,\mathrm{rep},\text{steps})).
  • 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 vrot(r)v_{\mathrm{rot}}(r) and quantify:

  1. Flatness in a target band: the coefficient of variation (CV) of vrot(r)v_{\mathrm{rot}}(r) restricted to a band r[r1,r2]r\in[r_1,r_2].
  2. Amplitude in that band: the mean value of vrot(r)v_{\mathrm{rot}}(r) over the same band.
  3. Lensing normalization proxy: a scalar proxy (e.g. Σ0\Sigma_0 or Σmax\Sigma_{\max}) derived deterministically from the reconstructed operational density ρop\rho_{\mathrm{op}}.

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 {ri}\{r_i\} be the discrete radii at which the rotation proxy is evaluated in the band, and let

vivrot(ri),i=1,,N.v_i \equiv v_{\mathrm{rot}}(r_i), \qquad i=1,\dots,N.

Define the band mean:

<a id="eq-eq-band-mean" />

μv1Ni=1Nvi,\mu_v \equiv \frac{1}{N}\sum_{i=1}^N v_i,

the band standard deviation:

<a id="eq-eq-band-std" />

σv1Ni=1N(viμv)2,\sigma_v \equiv \sqrt{\frac{1}{N}\sum_{i=1}^N (v_i-\mu_v)^2},

and the coefficient of variation:

<a id="eq-eq-band-cv" />

CVbandσvμv+ε.\mathrm{CV}_{\mathrm{band}} \equiv \frac{\sigma_v}{\mu_v + \varepsilon}.

Here ε\varepsilon is a small stabilizer to prevent division by zero in degenerate cases. In the scoring functional we used ε=106\varepsilon=10^{-6}.

We denote:

vrot_band_meanμv,vrot_band_cvCVband,vrot_maxmaxrvrot(r).\texttt{vrot\_band\_mean} \equiv \mu_v, \qquad \texttt{vrot\_band\_cv} \equiv \mathrm{CV}_{\mathrm{band}}, \qquad \texttt{vrot\_max} \equiv \max_r v_{\mathrm{rot}}(r).

The lensing proxy is recorded as:

Sigma_0, Sigma_max,\texttt{Sigma\_0},\ \texttt{Sigma\_max},

where Σ0\Sigma_0 is a central (or reference) surface-density-like quantity and Σmax\Sigma_{\max} is its maximal recorded value under the proxy map. In our winner record, Σ0=Σmax\Sigma_0=\Sigma_{\max}, indicating a specific normalization structure in that case.

Unified scoring: design principles and final formula

A single scalar score must do three things simultaneously:

  1. Reward flatness: smaller CVband\mathrm{CV}_{\mathrm{band}} must increase the score strongly.
  2. Reward amplitude: larger μv\mu_v must increase the score linearly (first-order).
  3. Include lensing normalization without domination: Σ\Sigma should matter, but it must not overwhelm flatness/amplitude.

Flatness factor.

We define a strictly positive “flatness gain”:

<a id="eq-eq-flat-factor" />

F    1CVband+106.F \;\equiv\; \frac{1}{\mathrm{CV}_{\mathrm{band}} + 10^{-6}}.

This makes the scoring sensitive to improvements in flatness while avoiding blow-up at CV 0\to 0.

Amplitude factor.

We define:

<a id="eq-eq-amp-factor" />

A    μv=vrot_band_mean.A \;\equiv\; \mu_v = \texttt{vrot\_band\_mean}.

Lensing factor (compressed dynamic range).

We define:

<a id="eq-eq-lens-factor" />

L    log ⁣(1+max(Σ0,0)).L \;\equiv\; \log\!\big(1+\max(\Sigma_0,0)\big).

The logarithm provides a deliberate compression: an order-of-magnitude variation in Σ0\Sigma_0 does not create an order-of-magnitude swing in LL.

Unified score.

The final score used for ranking is:

<a id="eq-eq-unified-score" />

S    FAL  =  μvlog ⁣(1+max(Σ0,0))CVband+106.S \;\equiv\; F\,A\,L \;=\; \frac{\mu_v\,\log\!\big(1+\max(\Sigma_0,0)\big)}{\mathrm{CV}_{\mathrm{band}} + 10^{-6}}.

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" />

LnormLmedian(L)+1012,SlensNormFALnorm.L_{\mathrm{norm}} \equiv \frac{L}{\mathrm{median}(L)+10^{-12}}, \qquad S_{\mathrm{lensNorm}} \equiv F\,A\,L_{\mathrm{norm}}.

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 Σ\Sigma 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:

steps=640000,\texttt{steps} = 640000,

compute SS and rank. This emphasizes stability and maturity of the dynamics.

Mode 2 (any-step optimum per run).

Compute SS at all checkpoints and determine, for each run (γ,rep)(\gamma,\mathrm{rep}), the maximum score achieved and the earliest step at which it is achieved. This creates a “time-to-quality” diagnostic:

Smax(γ,rep)maxstepsS(γ,rep,steps),andstepfirsthit=min{steps:S=Smax}.S_{\max}(\gamma,\mathrm{rep}) \equiv \max_{\text{steps}} S(\gamma,\mathrm{rep},\text{steps}), \quad \text{and}\quad \text{step}_{\mathrm{first\,hit}} = \min\{\text{steps}: S = S_{\max}\}.

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 SS at 640k steps is:

  • γ=0.1\gamma=0.1, rep=0\mathrm{rep}=0, steps=640000\text{steps}=640000
  • vrot_band_cv0.1120\texttt{vrot\_band\_cv} \approx 0.1120 (very flat within the band)
  • vrot_band_mean62.289\texttt{vrot\_band\_mean} \approx 62.289 (strong amplitude)
  • Σ0944.872\Sigma_0 \approx 944.872
  • score3809.860\texttt{score} \approx 3809.860 (highest observed)

Interpretation.

Two facts matter most:

  1. The winner is not merely high-amplitude; its CV is the smallest among top contenders, and the flatness factor FF dominates appropriately.
  2. The score increases monotonically with step for the strongest candidates (160k \to 320k \to 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 γ=0.1\gamma=0.1, rep 0, steps 640k. The evaluation band metrics μv\mu_v and CVband\mathrm{CV}_{\mathrm{band}} 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 Σ0\Sigma_0 / Σmax\Sigma_{\max}) derived from ρop(r)=c(r)ρ(r)\rho_{\mathrm{op}}(r)=c(r)\rho(r). 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 SS at steps = 640k. (Populate from ‘top15_640k_unified_score.csv‘.) \labeltab:RRR_top5

| Score SS | γ\gamma | rep | μv\mu_v | CV | Σ0\Sigma_0 | 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.

Source: 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 &amp; 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 &amp; 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 &amp; 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  -