Skip to content

JAX ILE: --d-prior cosmo and cosmo_sourceframe - #378

Merged
oshaughn merged 3 commits into
rift_O4dfrom
claude/cosmo-sourceframe-jax
Oct 1, 2026
Merged

oshaughn merged 3 commits into
rift_O4dfrom
claude/cosmo-sourceframe-jax

Conversation

@oshaughnessy-junior

@oshaughnessy-junior oshaughnessy-junior commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

The JAX ILE now honors --d-prior cosmo and --d-prior cosmo_sourceframe. Before this change it printed "accepted but IGNORED" and integrated against d², and AV/portfolio refused both priors.

RIFT/likelihood/jax_ile/distance_prior.py tabulates the Planck15 ln p(d_L) − 2 ln d_L once and interpolates it with numpy or jax.numpy. It is used by:

  • every distance grid (uniform, adaptive, log-uniform)
  • AV/portfolio distance draws and density
  • the driver's 6-D prior, including --limit-distance

The prior is traceable under jit and grad.

GH distance quadrature (--distance-gh-nodes > 0), --angle-marg-scheme multipeak[-jax] and --direct-marginalization-policy assume d², so the driver refuses them with these priors. pseudo_cosmo is unchanged; its pre-existing silent drop under AV + --distance-marginalization is left for a separate PR.

Validation (b4321b5, clean tree):

check result
density vs astropy closed form 1e-6
density vs batchmode ILE interpolant 3e-5
CPU gate, one file per process (citlogin6) 945/945, 53 files
affected files, A100 and Blackwell (pcdev2, jax 0.9.2 CUDA) 162/162 each
review mutations round 1: 11/14 caught, the 3 misses now pinned; round 2: 6/6 caught
distmarg lnL vs redshift-built weights, same nodes < 1e-5 nats

End-to-end on the A100 (3646c83): zero-noise injection at 2.5 Gpc, d in [10, 10000] Mpc, 3 seeds.

run lnZ
distmarg, Euclidean 15.92
distmarg, cosmo_sourceframe 17.00 ± 0.08
AV 6-D, Euclidean 16.02
AV 6-D, cosmo_sourceframe 17.09 ± 0.07

Both paths shift lnZ by 1.07 nats. Reweighting the AV-Euclidean fair draws predicts 1.118 ± 0.013.

🤖 Generated with Claude Code

New RIFT/likelihood/jax_ile/distance_prior.py tabulates the Planck15
ln p(d_L) - 2 ln d_L once and interpolates it with numpy or jax.numpy, so
one density serves the distance grids, AV/portfolio, the driver's 6-D
prior and traced code.  The driver forwards the prior to every marginalized
likelihood; it was previously ignored with a note.  The per-sample GH
distance quadrature and the direct-marginalization policy refuse it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oshaughnessy-junior
oshaughnessy-junior deployed to private-review-dispatch-rift October 1, 2026 10:15 — with GitHub Actions Active
Adversarial review: --angle-marg-scheme multipeak integrates its local
branch against d^2 and normalized with the cosmo grid, so it now refuses
non-volumetric priors.  New tests pin the driver's d_prior forwarding
(AST), AV prior draws, the table support check and the multipeak refusal;
each fails under the corresponding mutation.  d_min = 0 is accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oshaughnessy-junior
oshaughnessy-junior deployed to private-review-dispatch-rift October 1, 2026 10:58 — with GitHub Actions Active
Second review round: the driver now refuses a cosmological --d-prior with
the per-sample GH distance quadrature or either multipeak scheme before the
precompute, instead of late in the wrapper.  The AST wiring test also pins
distance_prior= on the AV call.  Both fail under their mutations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oshaughnessy-junior
oshaughnessy-junior deployed to private-review-dispatch-rift October 1, 2026 11:10 — with GitHub Actions Active
@oshaughnessy-junior
oshaughnessy-junior marked this pull request as ready for review October 1, 2026 11:55
@oshaughnessy-junior
oshaughnessy-junior deployed to private-review-dispatch-rift October 1, 2026 11:55 — with GitHub Actions Active

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent automated review completed at the recorded exact commit. Detailed findings were withheld from public output by the private-context egress policy and require private human declassification.

@oshaughn
oshaughn merged commit bdefbd0 into rift_O4d Oct 1, 2026
36 checks passed
@oshaughn
oshaughn deployed to private-review-dispatch-rift October 1, 2026 18:48 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
private-review-dispatch-rift — b4321b57 Deployed Oct 1, 2026 by oshaughn via Dispatch exact RIFT PR generation #1456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants