Binary-aware IMF recovery validation¶
Two validated layers. The orbital mechanics (progenax.binaries) are covered
by tests/validation/test_binary_physics.py (Kepler’s laws,
periapsis/apoapsis, energy, momentum, differentiability; see the
test dashboard for the live per-suite count). The binary-aware IMF
recovery — the headline — is regenerated by scripts/validate_binaries.py using a
fast differentiable MLE of the marginalised likelihood (no MCMC), so it runs in
seconds and prints PASS/FAIL. The full Bayesian (numpyro NUTS) cross-check remains
offline at validation/imf/validate_binary_aware_recovery.py. Theory at
Binary-aware IMF recovery; likelihood derivation at
Binary-aware likelihood.
What is verified¶
Orbital rows map to test_binary_physics.py; recovery rows are regenerated by
scripts/validate_binaries.py (Maschberger , Moe+17 binaries,
; binary-aware MLE + observed-Fisher ).
Property | Tolerance (as tested) | Measured | Anchor |
|---|---|---|---|
Kepler III: | rel | 0 (machine) | Kepler’s third law |
roundtrip | 0 (machine) | inverse consistency | |
Orbit geometry , | exact (1.000, 3.000) | Kepler’s equation | |
Orbital energy | rel | vis-viva / energy | |
Moe+17 sampler vs implemented PDF (KS) | 0.0021 / 0.0019 | Moe & Di Stefano (2017) Table 13 | |
Mass-dependent twin fraction () | decreases with | () () | Moe+17 twin excess |
Naive fit “confidently wrong” at | , | biased single-star model | |
Binary-aware recovery at | within of truth | () | marginalised likelihood |
Bias vanishes at | , monotonic in | -0.006 () () | bias is binary contamination |
Recovery-likelihood differentiability (AD vs FD) | rel err | NLL |
Figures¶
Generated by scripts/validate_binaries.py (PASS/FAIL per panel; PNG + PDF vector).

Figure 1:The “confidently wrong” result. Recovered slope vs sample size for a naive single-star fit (vermilion) and the binary-aware marginalised likelihood (blue), bands. Both CIs shrink as , but the naive estimate shrinks around the wrong value — from the truth at — while the binary-aware estimate tracks the true (dashed) to within at every .

Figure 2:Why, and the cure’s reach. (a) The “wrongness significance” grows for the naive fit (the bias is fixed while shrinks), crossing near ; the binary-aware fit stays at . (b) The naive bias scales with binary fraction and extrapolates to zero at — confirming the bias is binary contamination, not a sampling artefact.

Figure 3:Orbital-mechanics oracles. (a) Kepler’s third law over five decades in (max rel error 0, machine precision). (b) A bound orbit with its focus at the binary COM; periapsis and apoapsis recovered exactly. (c) The resolved two-body energy equals to .

Figure 4:Moe & Di Stefano (2017) mass-ratio distribution. Sampled (filled) overlays the implemented (solid) for (a) a and (b) a primary; KS in both. The excess at (the “twin” fraction) drops from to with primary mass — the mass-dependent twin excess that the period-averaged Moe+17 model encodes.

Figure 5:Gradient validation. Autodiff (line) vs central finite difference (circles) for (a) the Kepler transform (rel err ) and (b) the binary-aware recovery likelihood NLL (rel err ) — so the binary-aware slope can be inferred by gradient descent / HMC.
How to run¶
# orbital-mechanics physics tests (~3 s on CPU)
pytest tests/validation/test_binary_physics.py -q
# regenerate the five figures with PASS/FAIL tables (seconds; MLE, no MCMC)
python scripts/validate_binaries.py
# optional full Bayesian (numpyro NUTS) cross-check (offline; minutes-hours)
python validation/imf/validate_binary_aware_recovery.pyHonest scope¶
The headline figure uses a maximum-likelihood point estimate with an observed-Fisher ; the offline numpyro script provides the full posterior (credible intervals, , ESS) and reaches the same conclusion.
The recovery fixes the Moe+17 binary statistics (, ) and infers only the IMF slope ; jointly inferring the binary parameters is future work.
KS rows validate the sampler against the implemented Moe PDF, which is itself grounded in Moe+17 Table 13 (held PDF) — not against raw survey histograms.
References¶
Moe & Di Stefano (2017) (binary statistics), Moe et al. (2019) (metallicity caveat), Sana et al. (2012) (O-star binaries), Maschberger (2013) (IMF). The methodology chapter is Binary-aware IMF recovery; the likelihood derivation Binary-aware likelihood; the Moe calibration Multiplicity statistics (Moe & Di Stefano 2017).
- Moe, M., & Di Stefano, R. (2017). Mind your Ps and Qs: The interrelation between period (P) and mass-ratio (Q) distributions of binary stars. The Astrophysical Journal Supplement Series, 230, 15. 10.3847/1538-4365/aa6fb6
- Moe, M., Kratter, K. M., & Badenes, C. (2019). The close binary fraction of solar-type stars is strongly anticorrelated with metallicity. The Astrophysical Journal, 875, 61. 10.3847/1538-4357/ab0d88
- Sana, H., de Mink, S. E., de Koter, A., Langer, N., Evans, C. J., Gieles, M., Gosset, E., Izzard, R. G., Le Bouquin, J.-B., & Schneider, F. R. N. (2012). Binary interaction dominates the evolution of massive stars. Science, 337, 444–446. 10.1126/science.1223344
- Maschberger, T. (2013). On the function describing the stellar initial mass function. Monthly Notices of the Royal Astronomical Society, 429, 1725–1733. 10.1093/mnras/sts479