# C4 conditional chromatic numerical preflight

Status: bounded numerical preflight complete, 2026-10-04. Owner: restricted_preflight under model_campaign. Central index: parent epsf_model_closure_20261004 entry.

Question: are existing 17 chromatic coefficients stationary conditional on saved ePSF/WCS and nuisance template values, and are their profile responses identifiable?

Input: paper_dataset_20261001/C4/fit params.npz and flux_solved.npz, unchanged scene_boot. Immutable archived renderer 3609d467a7f17c9ed56a434d71f131ca5cf15528. Script in isolated dev codex/epsf-model-closure-20261004 worktree, model_closure_20261004/restricted_preflight.py. No source pin or production edits.

The native renderer stops gradients through nuisance profiles but still changes their values when chromatic parameters move. We compare native directional finite differences with native AD, then hold actual nuisance template values fixed for a differentiable conditional objective. Only its scalar data-loss sum and SciPy state use float64; renderer stays float32. The original objective coefficients and exact generated make_model function are archived. Existing ePSF penalties are constant in this conditional fit. Exact saved flux state, priors, support and profile coefficients seed the run; baseline replay parity is measured.

Command: `source /home/kshukawa/miniforge3/etc/profile.d/conda.sh; source /home/kshukawa/miniforge3/etc/profile.d/mamba.sh; mamba activate syndiff; OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 taskset -c 8-15 /usr/bin/time -v python /home/kshukawa/syndiff_pipeline/dev/.claude/worktrees/epsf-model-closure-20261004/model_closure_20261004/restricted_preflight.py > run.log 2>&1`.

Bounded L-BFGS-B: 120 iterations / 250 requested function calls, 17 scaled variables; sampled 120,000 unique active owned pixels for profiled residual Jacobian Gram/SVD. Objective history and checkpoints are archived. No new magnitude term yet.

Conclusion (pending): numerical controls only. No held-out improvement, joint stationarity or model completeness can be inferred. Full native residual exports and standard grids must accompany interpretation.

## First bounded numerical control (completed)

Saved-state replay under x64-enabled JAX differed by at most0.015625 e-/s in source flux and0.011719 in per-star core chi-square; these are absolute maxima, not a bitwise parity claim. Renderer buffers remain float32, but x64-enabled default intermediates can alter rounding. The parent baseline replay is the strict native reference.

The native nuisance policy is an intentional **quasi-gradient**: nuisance values follow the current chromatic parameters, while their derivatives are excluded. A finite difference of the whole native objective therefore need not equal that estimating direction. It is not automatically an implementation bug. Anchors suppress only ePSF/mode gradients; their chromatic gradients remain live. All suppressed ePSF leaves are fixed in this17D control.

Central directional differences use steps0.01,0.001,0.0001,0.00001 in coefficient space, along normalized initialAD and two seeded random unit directions. At step0.0001, frozen-nuisance FD/AD relative discrepancies are0.128%,0.0186%,0.0115%. Native moving-nuisance FD/AD ratios are3.280,20.678,13.912. Smaller steps begin to expose float32 rounding; larger steps show nonlinearity.

![Directional derivative evidence](gradient_checks.png)

The conditional profiled residual Jacobian uses120,000 random unique active owned pixels out of2,317,814, deterministic seed3104. All17 normalized singular values are positive; condition28.13. Blur/dilation and radial-polynomial columns remain highly correlated. This is conditional local identifiability, not joint ePSF/WCS identifiability.

![Jacobian correlations](jacobian_correlation.png)

L-BFGS-B terminated **ABNORMAL**, success=false, after19 iterations /120 calls. Objective27.867741303→27.866245403, raw gradient norm23.2256→0.085139, scaled gradient norm0.00052127. Repeated identical rendered values and small nonzero gradients are consistent with a float32 line-search plateau, but do not prove its cause. Strict stationarity was NOT achieved.18m03s wall, maximum6.27GiB RSS, CPUs8–15 only.

![Objective and derivative history](numerical_controls.png)

![Actual residual stacks and paired differences](residual_stacks.png)

The measured residual morphology is nearly unchanged on the common±3permille baseline-flux scale; smaller chromatic core changes appear in difference rows on±0.15permille. The stacks use actual Gaia-XPu split0.96 and catalogueTmag9–11,11–12,12–13. Counts are on each panel;14,777 positive-flux free trainees are available overall. Residuals are normalized by each star's fixed saved flux, preserving a common denominator. Native-refreshed versus frozen-nuisance predictions at optimized parameters differ by0.02461noise RMS across the2,317,814 active unique pixels. This cannot be inferred from all-pixel RMS, which is dominated by excluded pixels.

Conclusion (2026-10-04): the saved17-coefficient solution is not conditionally stationary, and the actual nuisance policy is an estimating-direction update rather than the gradient of the fully refreshed scalar loss. A precision-limited conditional optimization changes mean residual profiles slightly; it does not support an added model term or improved photometry. A matched100-step Adam policy comparison is running; any later model selection needs genuine held-out training, scene-accounting controls, and joint convergence evidence.

Independent review qualification: the initial derivative agreement does not transfer to the final smaller gradient. At step 0.0001, final random-direction finite differences differ by about 6% and 43%; smaller steps are worse. This finite-difference floor prevents a high-precision stationarity certificate. Rank is conditional on frozen ePSF/WCS/nuisance templates, and does not establish identifiability against those other leaves or an added brightness generator.

Required standard grids (all inspected) use legacy BP-RP and saved-flux-derived Tmag bins, distinct from the primary XP-u/catalogue-Tmag figure above:

![Conditional standard residual grid](conditional/resgrid_closure_C4_fixed17_lbfgs.png)

![Conditional relative standard residual grid](conditional/resgrid_closure_C4_fixed17_lbfgs_rel.png)

![Native replay standard residual grid](standard/resgrid_closure_C4_fixed17_native_replay.png)

![Native replay relative standard residual grid](standard/resgrid_closure_C4_fixed17_native_replay_rel.png)

## Matched 100-step Adam policy control (completed)

Both arms use exactly the saved 17 coefficients, fixed ePSF/WCS, saved masks/free flags/priors, learning rate 0.0001, Adam beta1 0.9, beta2 0.999, epsilon 1e-8, and 100 updates. Both scalar sums and Adam state are float64; renderer remains native float32. Only nuisance forward values differ: native refreshes them, fixed caches their saved values. The per-arm histories and endpoint checkpoints are preserved under `native_adam100/` and `fixed_adam100/`. Neither arm is a new physical model or a held-out test.

The resulting coefficient vectors differ by only 2.60e-7 in Euclidean norm. Native/fixed final estimating-direction norms are 0.13388 / 0.13293. Cross-evaluation of both endpoints under both policies separates coefficient changes from forward nuisance differences:

| Optimizer policy | Native-refreshed evaluation loss | Fixed-nuisance evaluation loss | Active unique pixel policy-difference RMS, noise units |
|---|---:|---:|---:|
| Native Adam100 | 27.869973896 | 27.866249009 | 0.024201 |
| Fixed Adam100 | 27.869960615 | 27.866249057 | 0.024224 |

All evaluations use 2,317,814 common active owned pixels; loss also contains constant ePSF penalties and the log-variance term. These policy losses must not be ranked as scientific model quality. The native objective initially falls and later rises while its estimating-direction norm shrinks, which is possible for this intentional quasi-gradient.

![Matched objective histories](paired_histories.png)

![Measured matched policy residual stacks](paired_residual_stacks.png)

Conclusion (2026-10-04): in this fixed-ePSF/WCS C4 numerical control, the intended native nuisance policy and the explicitly frozen-nuisance objective produce essentially identical coefficient updates. The earlier finite-difference mismatch is therefore not evidence that native parameter learning is wrong. Retain the native estimator for the next paired scene-input control. The runs still stop at a 100-step cap with nonzero gradients; no stationarity, model completeness, held-out improvement, or new brightness term is established. Full derivative optimization, if considered, is a distinct nuisance-learning policy and was not tested.

A reusable exact-support native control is prepared in `model_closure_20261004/fit_native17.py`, with `--scene-dir`, `--fit-dir`, `--out-dir`, `--steps` and `--lr`. It uses the original native scalar dtype/estimator, asserts unchanged masks, source IDs, positions, noise and overlap graph, and retains the old fit's initialization and saved state. New/old scene comparisons must both run through that same script; do not compare its float32 update directly to the x64-enabled numerical arms as though only the input image changed.

![Native Adam standard grid](native_adam100/resgrid_closure_C4_native_adam100.png)

![Native Adam relative grid](native_adam100/resgrid_closure_C4_native_adam100_rel.png)

![Fixed nuisance Adam standard grid](fixed_adam100/resgrid_closure_C4_fixed_adam100.png)

![Fixed nuisance Adam relative grid](fixed_adam100/resgrid_closure_C4_fixed_adam100_rel.png)

All 14 figures were inspected before this handoff. Shared residual-grid publication is serialized by the parent model campaign to preserve other agents' manifest entries; the external Claude Artifact mirror is not republished by this child.

Final conclusion: retain the existing native estimator for the authorized scene-input comparison. The 17 coefficients have locally independent responses conditional on fixed ePSF/WCS, but neither bounded optimizer establishes stationarity. Existing residual morphology remains. Do not add or select a magnitude/colour term from these in-sample numerical controls.
