Skip to content

DRAFT: anisotropic puffball + quantile force-away (transverse-spin placement knobs, opt-in) - #271

Draft
oshaughnessy-junior wants to merge 2 commits into
rift_O4dfrom
rift_O4d_transverse_bundle
Draft

oshaughnessy-junior wants to merge 2 commits into
rift_O4dfrom
rift_O4d_transverse_bundle

Conversation

@oshaughnessy-junior

Copy link
Copy Markdown
Owner

What this adds (opt-in, defaults unchanged)

Two commits cherry-picked from the transverse-spin study branch rift_O4d_puff_anisotropic_forceaway onto current rift_O4d (70b3e39):

  • util_ParameterPuffball.py
    • --puff-factor-parameter NAME:SCALE (repeatable): per-coordinate scaling of the puff covariance, cov -> D cov D, on top of the global --puff-factor. Lets the puff stay wide in the transverse coordinates while pulling in the mass/aligned-spin directions where the likelihood is sharp.
    • --force-away-quantile Q + --force-away-unpuffed: force-away threshold set as a target rejection fraction measured in the unpuffed grid metric. The shipped --force-away 0.05 is measured in the puffed metric and rejects exactly zero points at d=8 (study record FORCEAWAY_GEOMETRY_2026-08-12.md); a bare distance cannot transfer across dimension or puff shape.
  • util_RIFT_pseudo_pipe.py: --internal-puff-anisotropic (fixed scales mc,eta x1/32; s1z_bar,s2z_bar x1/16; requires --internal-puff-transverse) and --internal-puff-force-away-quantile Q, appended after the existing force-away string surgery so they are not clobbered.

Everything else the transverse work needs (js_lame + auto thresholds, --internal-cip-transverse-tails, tail-guard append, --reflect-parameter) is already on rift_O4d via #69.

Evidence so far

  • Mutation check on a real grid (zero-noise INJ-A iteration-1 grid, 833 points, d=8): anisotropic scales applied as printed; quantile mode rejects 40% at 1.71 grid-sigma (percentiles 0.84/1.31/1.97/2.78/4.19); tail-guard appends 491 points at fraction 1.0, 0 at fraction 0.0; control run (transverse puff, no new flags) unchanged.
  • Exercised end to end by the pre-registered four-arm ablation on the zero-noise injection venue (study results_triage/PREREG_ABLATION_ZERONOISE_2026-09-06.md), container rift_o4d-transverse_bundle_cc60-90_cuda118_20260906.sif built from this branch @ 5bb721a. Paper-side record: RIFT_roboto_paper analyses/transverse_convergence/.

Not yet done / review items

  • No unit test yet for the two puffball options (a small fixture on a synthetic grid asserting the printed rejection fraction and the per-coordinate covariance scaling would do).
  • The anisotropic scales are hard-coded in pseudo_pipe (they reproduce the study's measured configuration); a per-coordinate override is not exposed.
  • Hold in draft until the ablation campaign reports which knobs earn their place (RO'S 2026-09-06: find the belt-and-suspenders combination and ablate it).

🤖 Generated with Claude Code

oshaughnessy-junior and others added 2 commits September 6, 2026 16:41
…orks

Three additions to util_ParameterPuffball.py, all opt-in and inert unless used.

--puff-factor-parameter NAME:VALUE (repeatable) applies cov -> D cov D with
D = diag(s_i), so each coordinate gets its own scale on top of --puff-factor.
Scaling the covariance this way preserves the correlation structure and stays
positive semi-definite, which the downstream icov/force-away logic relies on.
Motivation, measured on a real S240629by grid: the isotropic puff reaches
chi1_perp > bilby-p90 at 20.7% (grid: 1.0%) but sits at median Mahalanobis 6.15
from the lnL shell in (mc,eta,chi_eff), with only 0.97% of its points within 1.
The reach is delivered off-peak.  Narrowing the constrained directions while
keeping the transverse spread gives 14x the top-decile-likelihood fraction at
2.5x lower cost per point (3000 ILE evaluations per arm).

--force-away-unpuffed measures --force-away in the raw grid covariance instead
of the puffed one.  cov_orig was copied after the puff-factor scaling, so
--force-away R meant R * puff_factor grid-sigma and changing --puff-factor
silently rescaled an unchanged --force-away.

--force-away-quantile Q sets the threshold to the Q quantile of the measured
puffed-to-grid nearest-neighbour distances, i.e. specifies the target rejection
fraction rather than a distance.  A distance cannot transfer: rejection goes as
1-exp(-(r/delta)^d), whose 10-90 window is only a factor 1.47 wide at d=8, and
delta ~ sqrt(2e)[Gamma(d/2+1)/N]^(1/d) moves from 0.23 at d=4 to 1.01 at d=8.
It also depends on the puff shape (measured puffed-to-grid median 2.385 for an
isotropic factor-2 puff vs 0.956 anisotropic), so one number means 5% rejection
for one shape and 54% for another.  With the shipped --force-away 0.05 at d=8 the
filter rejects exactly zero points.  Set correctly it removes core duplicates
while the sparse tail survives -- rejection 57.6% at chi1_perp<0.15 against 21.7%
beyond 0.57 -- raising the transverse reach from 0.201 to 0.289.

Percent signs in the new help strings are escaped; argparse %-formats help text.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
--internal-puff-anisotropic (requires --internal-puff-transverse) narrows the
puff in the tightly-constrained directions and leaves the transverse spread at
the global --puff-factor.  Expressed as scales RELATIVE to that factor, so the
transverse reach is unchanged by construction and only the parallel block moves;
this is the configuration measured against 3000 true ILE likelihoods per arm.

--internal-puff-force-away-quantile Q sets force-away by target rejection
fraction against the unpuffed grid covariance.

Both are appended to puff_args AFTER the existing --force-away string surgery.
That is load-bearing: unsafe_parse_arg_string splits on '--' and returns the
first chunk merely CONTAINING 'force-away', so --force-away-quantile and
--force-away-unpuffed would be matched and silently overwritten by the
internal_use_force_away branch whenever the helper did not already emit a plain
--force-away.  Appending late makes them immune, as --manual-extra-puff-args is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@oshaughnessy-junior
oshaughnessy-junior deployed to private-review-dispatch-rift September 7, 2026 00:14 — with GitHub Actions Active
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.

1 participant