Simulated weak-lensing convergence field from gevolution
Weak lensing
RHINO horn under construction at Jodrell Bank, with the Lovell telescope behind
Radio & 21-cm cosmology

From Stochastic Physics
to Cosmological Inference

Yale University · 20 Oct

With support from

ERC grant agreement No. 948764  ·  RadioForegroundsPlus GA 101135036

Convergence: gevolution simulation   |   RHINO photo credit: Phil Bull

Part 1 · Path-integral weak lensing · The observable

A decade of weak lensing is arriving

Rubin / LSST

The real LSST Camera installed on the Simonyi Survey Telescope in March 2025, with technicians alongside

~2 billion galaxy shapes

Ground-based · optical

Euclid

The Euclid spacecraft in a cleanroom before launch, June 2023

~1.5 billion galaxy shapes

Space-based · optical shapes

Roman

The assembled Roman observatory and two technicians in NASA Goddard's cleanroom, November 2025

~0.4 billion galaxy shapes

Space-based · near-infrared shapes

Paper schematic: a curved null-geodesic light bundle from the observer, its local screen and tetrad, and the expansion theta and shear sigma-plus and sigma-cross distortions

\(\kappa\): convergence · magnification
\(\gamma\): shear · shape distortion

Target: per-cent precision

Expected survey samples. Hardware photos: Rubin (2025), NSF–DOE Rubin Observatory/NOIRLab/SLAC/AURA/B. Quint; Euclid (2023), ESA; Roman (2025), NASA/Jolearra Tshiteya.

Light-bundle geometry and screen distortions: Zhang et al., Statistical Field Theory for Weak Gravitational Lensing, Fig. 1 (2026).

Part 1 · Path-integral weak lensing · The standard picture

Everything rests on a linear hierarchy

Matter density slices weighted by the lensing efficiency kernel q along a line of sight

\[\kappa(\hat n)=\int_0^{\chi_s}d\chi\,q(\chi)\,\delta(\chi\hat n,\chi)\]

\[\xi_\kappa\leftarrow P_{\mathrm m}(k)\]

\[\zeta_\kappa\leftarrow B_{\mathrm m}(k_1,k_2,k_3)\]

Nothing mixes.

Part 1 · Path-integral weak lensing · Motivation

But the projection is an approximation

Known corrections, each in its own formalism:

post-Born & lens–lens coupling

beyond-Limber radial mixing

reduced shear & magnification bias

nonlinear growth of the matter field

What does the projection throw away?

Does a two-point measurement still read only the matter two-point function?

Part 1 · Path-integral weak lensing · Back to the geometry

A photon bundle focuses and shears

\[\dot\theta=-\theta^2-\sigma_+^2-\sigma_\times^2+\textcolor{#b75b18}{\Phi_{00}}\qquad\dot\sigma_{+,\times}=-2\,\theta\,\sigma_{+,\times}+\textcolor{#2867a3}{\mathcal W_{1,2}}\]

Sachs optical scalars: expansion and shear of a light bundle, driven by Ricci focusing and Weyl tides; expansion feeds the convergence, shear the shear

Sachs (1961)

Part 1 · Path-integral weak lensing · Reframing

The spacetime is a random field

Static density, potential, Ricci and Weyl slices from the field animation

\[\dot{\mathcal X}_a=\underbrace{A_{ab}\mathcal X_b}_{\text{drift}}+\underbrace{\textcolor{#b75b18}{F_{abc}\mathcal X_b\mathcal X_c}}_{\text{Sachs vertex}}+\underbrace{\textcolor{#2867a3}{\varphi_a}}_{\text{driving field}}\qquad \mathcal X=(\delta\theta,\sigma_+,\sigma_\times),\ \ \varphi=(\Phi_{00},\mathcal W_1,\mathcal W_2)\]

Part 1 · Path-integral weak lensing · From dynamics to a path integral · 1 / 3

Random curvature in, random optical histories out

driverhistoryobserver · fixed startsourceprobability of driverprobability of history

Part 1 · Path-integral weak lensing · From dynamics to a path integral · 2 / 3

Averaging out the driver leaves only its cumulants

observer
source
\(\textcolor{#2867a3}{\varphi}\)
\(\mathcal X\)
obeys the equation
\(\widetilde{\mathcal X}\)
response
field
\(\textcolor{#2867a3}{\varphi_a}\)
\(\textcolor{#2867a3}{\varphi_b}\)
\(\textcolor{#2867a3}{\mathcal K^{(2)}}\)
\(\textcolor{#75519c}{\mathcal K^{(3)}}\)
equation of motion
one point
\(\mathcal X\)
\(\textcolor{#23785e}{r}\)
\(\widetilde{\mathcal X}\) = wavenumber

Only the history obeying the equation is allowed.

\(\mathcal P[\mathcal X|\varphi]=\delta\big[r[\mathcal X,\varphi]\big]\)

A response field enforces the equation at every point.

\(\delta[r]=\int\!\mathcal D\widetilde{\mathcal X}\;e^{-i\int \widetilde{\mathcal X}r}\)

Average over the random driver.

\(\big\langle e^{i\int \widetilde{\mathcal X}\varphi}\big\rangle_\varphi=e^{W_\varphi[i\widetilde{\mathcal X}]}\)

Dynamics + driver statistics become an action.

\(\mathcal P[\mathcal X]=\int\!\mathcal D\widetilde{\mathcal X}\;e^{-S[\mathcal X,\widetilde{\mathcal X}]}\)

Part 1 · Path-integral weak lensing · From the action to diagrams

Expand around a Gaussian reference; pair the fields.

Part 1 · Path-integral weak lensing · The engine

Building blocks: two propagators, two kinds of vertices

\(R\)

causal response: how a kick at \(\lambda'\) moves the bundle at \(\lambda>\lambda'\)

\(C=\iint R\,\mathcal K^{(2)}R\)

the driver covariance, propagated to both ends

\(F\)

the Sachs vertex: nonlinear propagation, present even in a Gaussian universe

\(K_n=\mathcal K^{(n)},\ n\ge3\)

the driver's non-Gaussianity: a connected \(n\)-point cumulant, nonlocal

Part 1 · Path-integral weak lensing · sft-wick

sft-wick: Wick contractions and diagrams by machine

Exampletwo-point function \(\langle\mathcal X(\lambda_1)\,\mathcal X(\lambda_2)\rangle\) at second order
42 pairings \(\to\) 8 diagrams
Eight order-two topologies of the two-point function from sft-wick, in the dictionary colours, with multiplicities: six with two F vertices and two with one F vertex and one K3 vertex

Part 1 · Path-integral weak lensing · A test where the answer is known

Demonstration

Does sft-wick work?

One-point histograms of the two drives: Gaussian, skewness -0.01; shot noise, skewness +0.62 with a heavy positive tail

Both drives feed the same system

\(\dot{\mathcal X}_0=-\Gamma\,\mathcal X_0+\textcolor{#b75b18}{s\,\mathcal X_1^2}+\textcolor{#2867a3}{\eta_0}\)

\(\dot{\mathcal X}_1=-\Gamma\,\mathcal X_1+\textcolor{#b75b18}{s\,\mathcal X_0\mathcal X_1}+\textcolor{#2867a3}{\eta_1}\)

\(\Gamma=1,\ \ \textcolor{#b75b18}{s=0.2}\)

\(\xi_{01}\equiv\langle\mathcal X_0\mathcal X_1\rangle\)\(\;=\;\)\(\textcolor{#b75b18}{F}\textcolor{#75519c}{\mathcal K^{(3)}}+\textcolor{#b75b18}{F^3}\textcolor{#75519c}{\mathcal K^{(3)}}\)\(\propto\) skewness +0.62\(\;+\;\textcolor{#b75b18}{F^3}\textcolor{#75519c}{\mathcal K^{(5)}}+\cdots\)

Gaussian drive: \(\xi_{01}=0\) by symmetry

xi01 versus time for the shot-noise drive: the leading F script-K3 term (dashed), the sum with F^3 script-K3 and F^3 script-K5 (solid) and an independent six-seed simulation (points) agree within 0.90 sigma; the Gaussian drive gives zero

≤ 0.90 σ

theory vs simulation, all six times

github.com/StatFieldTheory/sft-wick · examples/demo3

Part 1 · Path-integral weak lensing · Back to the sky

A weak-lensing toy model

Matter fluctuations drive the Sachs equations along unperturbed light rays.

DRIVING STATISTICS

\[P_{\rm lin}\ \longrightarrow\ \mathcal K^{(2)}\]

\[B_{\rm tree}\ \longrightarrow\ \mathcal K^{(3)}\]

Power spectrum and bispectrum of matter

LENSING OBSERVABLES

\[\kappa=-\!\int_0^{\lambda_s}\!\delta\theta\,d\lambda\]

\[\gamma_{+,\times}=-\!\int_0^{\lambda_s}\!\sigma_{+,\times}\,d\lambda\]

Convergence and shear from the Sachs scalars

Born rays · linearised observable map · linear / tree-level driving statistics

Part 1 · Path-integral weak lensing · Two-point statistics

The textbook kernel is the leading diagram

Order 0: one \(C\) line, no vertex

\[\langle\kappa\,\kappa\rangle_0=\int\!\!\int\mathcal W\,\mathcal W\;\textcolor{#2867a3}{\mathcal K^{(2)}}\]

\[\begin{aligned}\mathcal W(\lambda,\lambda_s)&=\bar D^2\!\int_\lambda^{\lambda_s}\!\frac{d\lambda_1}{\bar D^2(\lambda_1)}\\&=\underbrace{a^2\,\frac{\chi(\chi_s-\chi)}{\chi_s}}_{\substack{\text{textbook lensing}\\\text{efficiency}}}\end{aligned}\]

Order-0 convergence correlation function from 0.5 to 2000 arcmin; open points where it is negative Order-0 convergence correlation function on the PyCCL non-Limber curve from 0.5 to 2000 arcmin, with the ratio panel: median difference 0.22% below 175 arcmin

PyCCL: Chisari et al. (2019)

Part 1 · Path-integral weak lensing · The structural result

Which cumulant reaches which observable, and at what order?

Mixing hierarchy: driving-field cumulants on the left reach two- and three-point observables on the right; the script-K 3 routes in violet, each step costing one F vertex

Hierarchy

\(\mathcal K^{(n+j)}\to n\)-point: \(j\) vertices \(\textcolor{#b75b18}{F}\)

Selection rule

first mixing: \(\textcolor{#b75b18}{F}\,\mathcal K^{(n+1)}\) only

For \(\xi\): \(\textcolor{#75519c}{\mathcal K^{(3)}}\), the bispectrum

Part 1 · Path-integral weak lensing · The 2PCF at order 2

At the next order exactly two channels survive

FF · nonlinear propagation

FK · hierarchy mixing

One topology of each surviving order-two channel of the lensing two-point function between X at lambda 1 and X at lambda 2: FF with two Sachs vertices and FK with one Sachs vertex and the driver three-point cumulant
NHFP Figure 1a: two light bundles a and b cross a simulated cosmic web. Two close vermilion points on a are ringed as small-scale variance and linked to a third point on b; propagation distortions are magnified 200 times and bundle separation is schematic.
Hubble proposal, Fig. 1a · gevolution slab
Distortions ×200 · bundle separation not to scale

The bispectrum inside a two-point signal

Two close points on \(a\):
small-scale variance

Correlated with a point on \(b\):
its environment

The FK channel carries this three-point information into the lensing two-point function.

Static companion: FF and FK topologies retained beside the physical FK illustration

Part 1 · Path-integral weak lensing · Shear correlations

The FK contribution is present in both shear correlations

Shear xi plus and xi minus: Order-0 blue circles, FF vermilion triangles, FK green squares, and their total as a gray line. Filled markers are positive and hollow markers negative. The shaded interval spans 2.06 to 10.77 arcminutes.

\(\xi_\pm=\langle\gamma_t\gamma_t\rangle\pm\langle\gamma_\times\gamma_\times\rangle\) · shaded: 2–11′ · filled / open: positive / negative

\(z_s=5\), linear \(P\), tree-level \(B\), \(\ell_{\max}=15360\) · linearized shear readout

Part 1 · Path-integral weak lensing · Input models

The shear correction depends on the input bispectrum

Comparison of the FK corrections to the shear correlations xi plus and xi minus, using tree-level and BiHalofit input bispectra with matched source plane, vertex support and multipole cutoff.

Fixed \(P_{\rm lin}\) · \(z_s=5\) · finite \(\ell_{\max}=15360\)

BiHalofit: Takahashi et al. (2020)

Part 1 · Path-integral weak lensing

SFT-WL

statistical field theory for weak lensing

Needed for precision weak lensing

Probes non-Gaussianity with the two-point function

Where does randomness enter the path integral?

Quantum transition amplitude: paths between fixed endpoints weighted by a phase
Large-scale structure: random initial fields followed by deterministic evolution
SFT-WL: fixed observer state, random curvature driving the bundle along the entire ray

SFT-WL averages optical histories driven by random curvature all along the ray.

arXiv:2606.19472 · MSR/Janssen response-field construction · LSS: Crocce & Scoccimarro (2006), Izumi & Soda (2007), Valageas (2008)

Radio cosmology

RHINO

The Remote HI eNvironment Observer

An independent approach to the
sky-averaged 21-cm signal

Horn antenna
Directive, shielded, chromatic

Hybrid continuous-wave calibration
Less switching, different systematics

Horn structure with the Lovell telescope behind it, reproduced from the supplied RHINO overview

RHINO overview, P. Bull, slides 2–4 · Bull et al. (2025)

RHINO in the field

The horn frame standing among trees, supplied photograph

An imagined view of RHINO

Artistic version of the horn scene with blue light and mist

Part 2 · Moment expansion · Faint signals

Faint cosmological signals share a foreground problem

Representative Galactic synchrotron brightness, the CMB intensity spectrum and the global 21-cm signal scale. Four science targets: global 21-cm, radio background excess, CMB B-mode polarisation and CMB spectral distortions. CMB target bands indicate frequency ranges, not signal amplitudes.

Global 21-cmmean intensity

Radio excessabsolute intensity

CMB B-modespolarisation

Spectral distortionsCMB intensity spectrum

LFSM, GSM and GSM16 models of the Galactic radio sky, reproduced from P. Bull's RHINO overview after Irfan et al.

Illustrative frequency ranges; CMB bands do not indicate signal amplitudes.

Existing low-frequency sky models disagree at the 10% level

Connect the spectrum to the emitting population.

Pritchard & Loeb (2012) · Dowell & Taylor (2018) · BICEP/Keck (2021) · Abitbol et al. (2017) · Sky maps: Irfan et al. (2023), via P. Bull

Part 2 · Moment expansion · One electron first

One electron radiates lines; a channel sees them move

\[\mathcal K_{S,\omega}(\boldsymbol p)=\sum_{m\ge1}S_m(\boldsymbol p)\,\delta(\omega-\omega_m)\]

\[\omega_m=\frac{m\,\omega_B}{1-\beta\cos\alpha\cos\theta}\]

\(\boldsymbol p=(\gamma,B,\cos\alpha,\cos\theta)\): energy, field, pitch angle, viewing angle. Each harmonic is fully polarised, \(I_m^2=Q_m^2+V_m^2\); the projected-field azimuth \(\phi\) rotates \(Q\) into \(Q+iU=e^{2i\phi}Q^{\rm nat}\).

Stronger field: harmonic lines grow and shift; received power in a fixed band oscillates, while holding frequencies fixed gives a spurious B-squared scaling
\(\gamma=20\): a 20% stronger field moves lines through the band; holding their frequencies fixed is wrong by up to 28%

Zhang & Chluba (in prep.)

Part 2 · Moment expansion · From one electron to the sky

Many electrons, one joint population

\[P_j^{\rm obs}=\mathcal N_{\rm src}\,\big\langle e^{2i\phi}\,\mathcal K^{\rm ch}_{P,j}(\boldsymbol p,\Psi)\big\rangle_{\mathcal P_{\rm F}}\]

Average the channel response over energy, field, angles and Faraday depth.

Three emission sites at different Faraday depths: their Q-U vectors add head to tail and cancel at long wavelength
Emission and Faraday rotation can overlap along the same ray.

Zhang & Chluba (in prep.)

Part 2 · Moment expansion · Finite joint statistics

Physics fixes the basis; the population fixes the moments

\[P_j^{\rm obs}=\mathcal N_{\rm src}\sum_A\widetilde P_{jA}\,M_A+\epsilon_{P,j}\]

Response coefficients \(\widetilde P_{jA}\)Fixed by radiation physics and channels.

Joint moments \(M_A\)Encode the population and its correlations.

Direct channel integration and the moment approximation for Stokes I and Q/I. The lower panel compares channel errors at zeroth and second Taylor order.
Correlated harmonic-model population · \(L=8\), \(N=2\)

Zhang & Chluba (in prep.)

Part 2 · Moment expansion · Spectral fitting

The linear basis can fit an SED

Synthetic Stokes I, Q and U spectra: the direct population model, forward moments and fitted SED, with residuals on withheld channels.
Synthetic \(I,Q,U\) spectra · fitted channels and withheld-channel checks

SyncMoments 0.4.0 · saved continuum-population validation

Part 2 · Moment expansion

SyncMoments

a moment expansion of channel-integrated synchrotron emission

Kernel + derivative spectra = a linear basis for the SED

Moments are its coordinates; data fix a few combinations

Zhang & Chluba (in prep.) · SyncMoments 0.4.0 · syncmoments.readthedocs.io

Part 3 · Bayesian analysis at scale · The problem

From 24 to two million parameters in one posterior

number of parameters in one posterior10110210310410510610724noise-wave temperaturesof one horn receiver871foreground coefficients+ 21-cm parametersof one drift scan (864 + 7)2,195,472a 21-cm cube: foregroundcoefficients and covariance,HI modes, bandpowersone generic chain over all of them

a dense covariance: \(4.8\times10^{12}\) numbers, 39 TB in float64
a random-walk chain mixes slower with every dimension

and yet: under 30 s per sweep on one 32-core node

Murphy et al. (2026), MNRAS 551, 1503

Part 3 · Bayesian analysis at scale · Gibbs sampling

One block at a time; the chain still targets the joint

\(y\)
\(x\)
\(p(x,y\,|\,d)\)
\((x_0,y_0)\)
\(p(y\,|\,x_0,d)\)
\(p(x\,|\,y_1,d)\)
\(y_1\)
\(x_1\)
\(y_2\)
\(x_2\)
\(y_3\)
\(x_3\)
\(y_4\)
\(x_4\)
\(y_1\sim p(y\,|\,x_0,d)\)
\(x_1\sim p(x\,|\,y_1,d)\)
\((x_i,y_i)\ \to\ p(x,y\,|\,d)\)
coupled blocks: correlation along the chain

affine block + Gaussian noise ⇒ Gaussian conditional, solved or drawn exactly at any dimension

schematic after K. Glasscock, RHINO overview (P. Bull) · Wandelt, Larson & Lakshminarayanan (2004)

Part 3 · Bayesian analysis at scale · One sweep: map-making

Gains, temperatures, noise, sky map: one sweep in 12 s

posterior mean

posterior mean map of the 2 times TOD, 1 calibration source run, colour scale 5 K to 14 K
5 K14 K

residual

residual map of the 2 times TOD, 1 calibration source run, colour scale −0.2 K to 0.2 K
−0.2 K0.2 K

uncertainty

uncertainty map of the 2 times TOD, 1 calibration source run, colour scale 0 K to 0.2 K
0 K0.2 K

Z-score

Z-score map of the 2 times TOD, 1 calibration source run, colour scale −3 to 3
−33
againsper TODblocal temperatureper TODc1/f noiseper TODparallel over ranksdsky mapone global Gaussian draw given (a), (b), (c)i = i + 1

2,000 sweeps at 12 s · diode 15.0 K recovered as 14.994 K · a second scan geometry was decisive

Zhang, Bull, Santos & Nasirudin (2026), RASTI · hydra-tod

Part 3 · Bayesian analysis at scale · The family

Hydra: a family of Gibbs samplers

Hydra logo

Hydra · several heads

2023 → 2024

hydra-pspec · 2023

Visibilities + power spectra
Kennedy et al.

hydra-beam I · 2024

Parametric HERA beam model
Wilensky et al.

2025

hydra-beam II

Beam inference from visibilities
Wilensky et al.

Foreground-map recalibration

Nasirudin & Bull

2026

Component separation

Murphy et al.
2.2m parameters · <30 s / sweep

hydra-tod

Calibration + sky map · Zhang et al.

Systematics

Dutta et al.

Commander
BeyondPlanck

CMB map, power spectrum and foregrounds drawn in turn

Planck LFI: calibration and component separation in an end-to-end Gibbs analysis

Eriksen et al. (2004, 2008)
BeyondPlanck (2023)

Exploit the model's Gaussian conditionals inside a joint analysis

Kennedy+ 2023 · Wilensky+ 2024, 2025 · Nasirudin & Bull 2025 · Murphy+, Zhang+, Dutta+ 2026 · Eriksen+ 2004, 2008 · BeyondPlanck 2023 · images: P. Bull

Part 3 · Model → plan → inference

Designing a sampler for the model

BlackJAX · NumPyro

Powerful sampling
and posterior analysis.

One model: field + nonlinear shape + gain + noise

Saved synthetic composed-process observations: random field, nonlinear bump, background, gain and signal-dependent noise

BLOCKSWhich parameters
should move together?

METHODSWhat can be sampled
or integrated exactly?

PROPOSALSHow do we make the
hard updates tractable?

For each large model, we engineer the Gibbs plan again.

Months of bespoke work before the first useful chain.

Bayesmith

Analyse the model. Compile its sampling plan.

Reusable design, before sampling.
Numerical backends execute the updates.

Model definition → Bayesmith planning → backend execution

Part 3 · Model → plan → inference

Model structure guides the sampling strategy

Draw a whole field.

Gaussian constrained realisations
One update, all coordinates.

For a Gaussian full conditional.

Analytic Gaussian field example: noisy measurements, a posterior mean and three joint conditional draws, including a gap in coverage

Change coordinates.

Products become sums.
Power laws become linear.

Exact log-space GCR needs a Gaussian log-data law.

The same saved synthetic spectra on brightness and log-brightness axes, with the amplitude-index-curvature mean

Sample less.

Integrate out a compatible
nuisance block analytically.

Retain its uncertainty and normalisation.

Analytic correlated Gaussian illustration: joint signal and nuisance density projected onto the signal marginal

Make priors explicit.

A “flat” prior depends
on the coordinates.

Inspect the choice. Keep the declared prior.

Analytic illustration: uniform in scale versus uniform in log scale, both normalised on the same finite support

Let the graph form the blocks.

Actual traced model, coloured by its returned field/background and nonlinear/hyperparameter blocks

Field + background
Structured proposal + MH

Shape + gain + power + noise
NumPyro NUTS

Actual generated plan · update each block conditional on the other.

Propose an easier move.

GLS · log-linear
Gauss–Newton
Correct against the original target.

MH retains the model, priors and support.

Analytic target versus local Gaussian proposal, next to the actual saved composed-model posterior prediction

Whole-field draws

Gaussian conditionals

Log-space structure

Products → linear form

Analytic collapse

Fewer sampled variables

Prior analysis

Explicit choices

Automatic blocking

A model → a sweep

Structured proposals

Easier moves + correction

One model. A reusable sampling plan.

Field draws

Log space

Collapse

Priors

Blocks

Proposals

Supported conditional structure · exact updates where eligible · corrected proposals where needed

Part 3 · Model → plan → inference

Sky and instrument in one model

Bayesmith
Rheplicant
A DAG isa Bayesian model.an observation.
The same graph language, carried into the observing system.

Model declaration → physical composition

Part 3 · Model → plan → inference

RHINO observation and inference

Rheplicant

Compose a data model
from differentiable operators.

Sky signal and foregrounds add and pass through instrument, receiver and measurement operators; a grouped overview using Rheplicant’s native graph style

Bayesmith

Turn model structure
into a sampling strategy.

Analyse dependencies → group parameters → choose updates

Part 3 · Bayesian sky inference

A synthetic sky and its observation

Saved generating spectral index and curvature maps, and the simulated 70 MHz data map with its missing patch
Two saved log spectra after subtracting amplitude and index; remaining curvature is modelled jointly

Joint inference
across the survey

Brightness · spectral shape
All positions together

Rheplicant simulation + Bayesmith field inference · synthetic narrow-beam survey · adopted Gaussian log-space model

Part 3 · rheplicant + bayesmith · Synthetic narrow-beam survey · Posterior maps

One posterior draw is a whole sky

Spectral index and curvature maps: the beam-averaged truth and the posterior mean side by side, the hole outlined and a dotted cut through it Posterior standard deviation maps of the spectral index and the curvature: stripes of one and four visits and a bright unobserved hole The cut through the hole: truth, five exact posterior draws and the two-standard-deviation band for the spectral index and the curvature

Joint sky maps · independent draws · uncertainty follows coverage

12,288 jointly inferred coordinates · Gaussian log-space posterior · synthetic narrow-beam survey

Conclusions

From stochastic models to inference

Stochastic optics

Connect matter statistics
to light propagation.

Astrophysical emissions

Connect population statistics
to observable spectra.

Bayesian inference

Connect executable models
to reusable samplers.

Make the physics explicit.
Let the model guide the inference.

Thank you. Questions welcome.

European Union and European Research CouncilRadioForegroundsPlusThe University of Manchester

ERC, EU Horizon 2020, grant 948764 · RadioForegroundsPlus, HORIZON-CL4-2023-SPACE-01, GA 101135036

Discussion · Technical backup

Choose a layer to open

Backup · Part 1 · The toy model

Gaussian baseline: the diagram sum approaches the simulation

\[\dot\phi_a=-\gamma\,\phi_a+s\,F_{abc}\,\phi_b\phi_c+\eta_a\]

Two coupled fields on a line: the same shape as the Sachs system, but small enough to integrate directly. For now the drive \(\eta\) is Gaussian: \(\mathcal K^{(n)}=0\) for \(n\ge3\), so there are no cumulant vertices.

Two-point function of the toy system: diagram sum at orders 0, 0+2 and 0+2+4 approaching a direct Langevin simulationTwo-point function of the toy system: the diagram sum to order 4 beside the direct Langevin simulation

Each order brings the sum closer to the simulation. At order 4 the simulation still lies above it at 12 of 14 times, by up to 3.0 Monte-Carlo error bars. A Gaussian drive cannot show the effect we are after.

sft-wick demo 1

Backup · Part 1 · The toy model

Where truth is known, we hit it exactly

Three-point function at F=0: sft-wick equals the closed form to machine precision and agrees with an event-exact simulation

\(1.4\times10^{-16}\)

sft-wick vs closed form

0.64 σ

vs an event-exact simulation, 1.2×10⁶ realisations

Backup · Propagation variables

Jacobi and Sachs describe the same propagation

Jacobi map \(D\)

\[D''=\mathcal T D\]

linear in \(D\), random multiplicative tidal matrix; angular separation at the observer → transverse separation at the source

Optical rates \(S\)

\[S'+S^2=\mathcal T\]

Riccati form: additive forcing, quadratic drift; the Sachs scalars are the components of \(S\)

\[S=D'D^{-1},\qquad \mathcal A=D/\bar D,\qquad \mu=(\det\mathcal A)^{-1}\]

A rate integral recovers the matrix map only through ordered evolution; magnification and reduced shear are readouts of \(\mathcal A\), not of \(\int S\).

Backup · Optical readout

Rates, maps and image observables differ beyond leading order

\[\mathcal A=(1-\kappa_A)I-\gamma_+\sigma_3-\gamma_\times\sigma_1+\omega\epsilon\]

\[g=\frac{\gamma}{1-\kappa_A},\qquad \mu=(\det\mathcal A)^{-1}\]

\[\kappa=-\int_0^{\lambda_s}\delta\theta\,d\lambda,\qquad \kappa_{\ln}=-\ln(D_A/D_0)\]

The two-point slides compute \(\langle\kappa\kappa\rangle\) with this \(\kappa\), the paper's linear-order convergence. Beyond linear order the same integral equals \(\tfrac12\ln\mu\) at fixed affine endpoint on the positive-parity branch and differs from \(\kappa_A\). All of these coincide at leading order and differ beyond it.

Backup · Response construction

The auxiliary field enforces the optical equation

\[1=\int\mathcal D\mathcal X\;\delta\big[f[\mathcal X]-\textcolor{#2867a3}{\varphi}\big]\,\mathcal J,\quad f=\dot{\mathcal X}-A\mathcal X-\textcolor{#b75b18}{F\mathcal X\mathcal X},\quad \mathcal J=\mathrm{Det}\,\frac{\delta f}{\delta\mathcal X}\]

\[\delta(r)=\int\!\frac{d\widetilde{\mathcal X}}{2\pi}\,e^{-i\widetilde{\mathcal X}r},\qquad \textcolor{#2867a3}{W[J]}=\sum_{n\geq2}\frac{1}{n!}\int \mathcal K^{(n)}(1,\ldots,n)\,J_1\cdots J_n\]

\[S=i\!\int\!\widetilde{\mathcal X}(\dot{\mathcal X}-A\mathcal X-\textcolor{#b75b18}{F\mathcal X\mathcal X})-\textcolor{#2867a3}{W[i\widetilde{\mathcal X}]}\]

\[\langle\mathcal X\widetilde{\mathcal X}\rangle_0=-iR,\quad\langle\mathcal X\mathcal X\rangle_0=R\mathcal K^{(2)}R^{\mathsf T},\quad\langle\widetilde{\mathcal X}\widetilde{\mathcal X}\rangle_0=0\]

Fixed initial state at the observer; mean driver matched to the background. Pre-point (Itô) slicing: the Jacobian \(\mathcal J\) is field-independent, and in the time-sliced form it is 1, so \(\langle1\rangle=1\).

Backup · Counting conventions

Several independent order counts, and a one-line mixing identity

CountExample
Matter perturbationslinear \(P\), tree-level \(B\) from gravity
Driver cumulants\(\mathcal K^{(2)},\mathcal K^{(3)},\mathcal K^{(4)},\ldots\)
Optical insertions\(FF\), \(FK_3\), \(F^3K_3\), \(F^3K_5\)
Source-field order\(\gamma^{(1)},\gamma^{(2)},\ldots\) in the readout

Why a two-point output reads higher input statistics, in one line: take a centred unit-variance \(X\) with cumulants \(c_3,c_4\) and a quadratic response \(Y=X+a(X^2-1)\).

Exact for the polynomial map; a toy for the structure, not an optical coefficient.

\[\mathrm{Var}\,Y=1+\underbrace{2a\,c_3+a^2c_4}_{\text{non-Gaussian driver}}+\underbrace{2a^2}_{\text{Gaussian, nonlinear}}\]

Backup · Inputs

Driving-field statistics from one input

From the matter power spectrum to the driver two- and three-point cumulants

\(P_\delta\to B_\delta\) (tree-level SPT) \(\to B_\Phi\) (Poisson) \(\to(\Phi_{00},\Psi_0)\) through screen-Hessian multipliers \(L^2/\chi^2\) and \(\sqrt{L^2(L^2-2)}/\chi^2\) \(\to\) driver cumulants by a parity-even Gaunt sum. Exact Wigner-3j below \(\ell=60\), Limber above; FFTlog double-Bessel radial integrals.

Backup · The toy model

One dial moves the non-Gaussianity and nothing else

Third moment of the toy field versus events per correlation volume at fixed second cumulant: closed form, sft-wick and event-exact simulation agree

Backup · The toy model

What is computed, and what is left

Channel budget of the toy cross-correlation on a log axis: computed F cubed script-K3 and F cubed script-K5 channels and the estimated O(F to the fifth) term; F to the fourth script-K3 script-K3 is not estimated

The \(\mathcal K^{(5)}\) ladder is computed: 0.09% of the leading channel at \(t=3\).

Not computed: \(F^4\mathcal K^{(3)}\mathcal K^{(3)}\), the next order the selection rule and the symmetry allow, and \(\mathcal O(F^5)\), estimated geometrically at 0.6% at \(t=3\).

The three-point check at \(F=0\) and the two-point leak test the expansion, the enumeration and the evaluation. They do not test the lensing vertex table, the Limber reduction, the cutoff or the bispectrum model.

Backup · Two-point scope

The saved FF/FK calculation has a precise boundary

Statisticraw \(\langle\kappa_1\kappa_2\rangle\) and \(\xi_+\), \(\kappa=-\int\delta\theta\,d\lambda\) at linear order; FF includes an induced-mean product
Path & referenceBorn-path Sachs sector, fixed affine endpoint 2313.03 Mpc; nominal \(z_s=5\)
Inputlinear \(P\), tree-level \(B\); Limber equal-shell \(\mathcal K^{(3)}\); vertex cutoff 15360
FK / Order-0, \(\xi_\kappa\)1.79% (0.5′) · 1.46% (2.06′) · 1.47% (5.30′) · 1.43% (10.77′) · 1.42% (27.7′) · 1.28% (56.3′)
FK / Order-0, \(\xi_+\)1.08% · 0.71% · 0.56% · 0.44% · 0.34% · 0.31%
Codesft-wick pinned at a4befdc with the nonlocal-coupling leg-order fix; anchors reproduced at rtol \(10^{-12}\)

Backup · How solid

UV sensitivity of the collapsed configuration, and a Monte-Carlo check of the fold

FK over Order-0 of the convergence correlation against the vertex cutoff from 960 to 15360 at 0.5 and 5.3 arcmin: tree level rising slowly, BiHalofit steeply
post-fix cutoff ladder (5 Oct), a separate product
(true z = 5 plane): tree level 1.34–1.40% in 2–11′
Monte-Carlo integration of the stochastic Sachs equation divided by the diagram fold, consistent with unity
direct Monte Carlo of the Sachs equation vs the diagram fold

Left: SFT-lensing-paper-analyses, reproduce/active_products.json (5 Oct 2026) · BiHalofit: Takahashi et al. (2020)

Backup · E/B

Field order and vertex order are different counts

\[\gamma=\gamma^{(1)}+\gamma^{(2)}+\cdots,\qquad B^{(1)}=0\]

\[\Delta C_\ell^{BB}=\epsilon^4\langle B^{(2)}B^{(2)*}\rangle+2\epsilon^5\,\mathrm{Re}\langle B^{(2)}B^{(3)*}\rangle+\cdots\]

ChannelVertex orderSource-field orderBB status
\(FK_3\)23zero: one external linear B leg
Gaussian \(FF\)24first allowed \(\langle B^{(2)}B^{(2)*}\rangle\); legacy amplitude not promoted
\(FFK_4\)34allowed; not computed
\(FFFK_3\)45first bispectrum BB channel; not computed

Backup · Probability-law boundaries

Tail predictions require a law or a controlled closure

Finite-memory toy

positive compound-Poisson law; zero start; independent linear and full-Jacobi banks; six models (\(\ell\in\{0.03,0.1,0.3\}\), two mark scales) all pass the campaign checks

Finite samples

histograms estimate populated bins; two-sample KS distance within \(3\sqrt{1/N_1+1/N_2}\); rare-event tails need more control

Finite cumulants

moment agreement does not establish positivity or a unique tail

The no-event atom has probability \(e^{-10}\) for the first law; an exact smooth density is not assumed. A 40-Mpc-beam cosmological white-driving completion exists in the preparation assets and is kept out of the main sequence.

Backup · Part 1 · Complete view

Completeness is a rule at fixed observable and order

Driving fields · large-scale structurenonlinear growth · connected cumulants κ⁽²⁾, κ⁽³⁾, κ⁽⁴⁾ … · unresolved small-scale structureobserversource galaxyRay pathbeyond-Born: curvature on the bent rayradial and time shiftsScreen & frametransported basis, tiltframe rotation ≠ image rotationSource endpointfixed zobs ≠ fixed affine distancesource and observer frame termsCatalogue samplesource clustering, magnification biasweights and normalisationBeam propagationlens–lens coupling, nonlinearSachs response: FF and FKImage & observablereduced shear g = γ/(1−κ), magnificationfinite-source flux, size and shapeThis talk: driver statistics × nonlinear optical response, read out as κ = −∫δθ dλ (two-point) and κln = −ln(DA/D0) (PDF)

\[g=\frac{\gamma_A}{1-\kappa_A},\qquad \xi_w=\frac{\langle w_1w_2\,O_1O_2\rangle}{\langle w_1w_2\rangle}\]

Choose the observable and the amplitude order; then every retained contribution enters once, including means, denominators and cross terms. The two applications open the highlighted corner with everything else held fixed.

Backup · Part 1 · Controlled PDF model

A model where every link of the chain is specified exactly

Driver

compound-Poisson events along the ray, rate \(\nu=10\): Ricci mark \(J=0.02\), Weyl modulus \(|K|=0.04\), random angle; exponential memory \(\ell=0.1\)

→

Dynamics

full Jacobi matrix \(D''=\mathcal T D\), integrated path by path (50k paths); or the linear projection through the exact response window (200k paths)

→

Readout

\(\kappa_{\ln}=-\ln(D_A/D_0)\) at \({v_s=1}\), reference \({D_0(v)=v}\)

The law is positive and known in closed form, so every driver cumulant is exact and the linear output distribution is an exact prediction, not a fit. Nonlinearity enters only through the propagation.

Two experiments: hold the law, change the propagation; hold the covariance, change the law. Then ask where measurement noise would enter.

Backup · Part 1 · Controlled PDF model

Histogram barely moves; fourth cumulant drops by 25%

Linear projection and full Jacobi Monte Carlo densities for the same finite-memory compound Poisson driver, nearly overlapping
linear projection vs full Jacobi, same driver
Relative change of the second, third and fourth cumulants from linear to full Jacobi propagation: about minus 1, minus 3 and minus 25 per cent in the simulation, with the selected response expansion alongside
change from the linear reference: \(c_2\) −1%, \(c_3\) −3%, \(c_4\) −25%

Backup · Part 2 · Faraday screen cumulants

Two cumulants give one Gaussian answer for every screen; four can overshoot

Laplace and shifted-Gamma Faraday screens with the same mean and variance: exact phase average, two- and four-cumulant truncations, angle shift and error

Backup · Part 2 · Correlations

Same marginals, reversed correlations, different spectrum

Spectral effect of reversing energy-field and depth-field correlations at fixed marginals, in I, Q, U at three band centres, with quadratic-moment predictions

Reversing the energy–field and depth–field pairings while keeping every one-dimensional marginal fixed changes \(I,Q,U\) by 0.2–1.5%. A model built from separate distributions would miss the change; the quadratic moments predict it, with a 73% error on the smallest \(U\) change at 0.3 GHz.

Zhang & Chluba (in prep.), App. C

Backup · Part 2 · What varies the spectrum

Energy index, field spread and channel width act on different parts of the spectrum

Low-energy harmonic structure, electron energy index, magnetic field spread and channel averaging effects on intensity and linear polarisation

Backup · Part 2 · Assumptions

What the emission model assumes, and where each limit is assessed

Emissionhelical orbit in a field uniform over the orbit; no radiation reaction; powers add incoherently; a supplied line-shape change is bounded only at fixed integrated power
Propagationsteady emission on one straight ray; cold-plasma Faraday rotation \(\lambda^2\Psi\); absorption, scattering, refraction and conversion omitted (scalar absorption bounded if an optical depth is supplied)
Channelssmooth response on a declared finite band; shifting lines and rotation integrated across the channel before expansion
Populationcorrelated energy, field and depth allowed; all moments from one nonnegative population; fitted values need the same consistency check
Finite expansionfinite Legendre and Taylor orders about fixed references; conditional remainder bounds; population outside the declared ranges needs a separate estimate

Zhang & Chluba (in prep.), Table 1

Backup · Part 3 · Validate the field statistics

Known cumulants make the non-Gaussian test quantitative

\[K_{i_1\cdots i_r}=\lambda a^r\sum_j B_{i_1j}\cdots B_{i_rj}\]

For \(r\ge3\), Campbell's theorem: connected sky cumulants of the Poisson component; the Gaussian part contributes only at \(r=2\). \({K_3\propto\lambda^{-1/2}}\), \({K_4\propto\lambda^{-1}}\). Beam coupling predicts one-pixel and neighbouring-pixel statistics.

Campbell predictions versus simulated connected cumulants with standard errors

Backup · Part 3 · Gaussian reference, non-Gaussian target

Same Gaussian draws, a non-Gaussian posterior

Reweighted Gaussian draws reproduce the exact mixture posterior in a typical cell and in the brightest source cell

Each draw keeps its position; its weight \(w_m(\lambda)=p_\lambda(x^{(m)},d)/p_0(x^{(m)},d)\) changes its contribution. Factorised weighting is valid here because the observation \(d=B(x+\epsilon)\) with invertible \(B\) and source-coordinate white noise makes both reference and target factorise cell by cell; a general beam-correlated noise does not.

Backup · Part 3 · The computational engine

A tractable reference makes a large sample bank cheap

0.105 s

1,024 Gaussian field draws of 65,536 coefficients; warm JAX CPU, float32

\[p_0(x\mid y)=\mathcal N\!\Big(\frac{y}{1.01},\frac{0.01}{1.01}I\Big)\]

closed-form diagonal GCR conditional in source coordinates, \(y=B^{-1}d\)

Time for 1,024 draws versus field size: warm runs and first call including compilation

Backup · Part 3 · Bayesmith

Is an exact block always better than NUTS?

SamplerBudgetmax |pull|
factor sweep600 + 9008.46
factor sweep2400 + 36004.10
pure NUTS600 + 9001.05
pure NUTS2400 + 36000.97

Worst replication of a seven-parameter hierarchical model; pull = (posterior mean − truth) / posterior SD. Each conditional draw in the sweep is exact, but alternation between strongly coupled blocks mixes slowly; NUTS with an adapted mass matrix moves along the coupling. The documented use of the sweep is an exact block too large for gradient sampling, such as a sky map or per-channel gains.

Backup · Part 3 · RHINO calibration

A gradient gives the response; identifiability is a rank test

\[\mathrm{rank}=\min(n_{\rm src},k)\times n_{\rm freq}\]

One equation per switch position per channel; \(k\) free temperature families. Three sources make a three-family fit square and leave a four-family fit short by \(n_{\rm freq}\). Calibration on simulated data with 24 free noise-wave temperatures: Wiener mean by conjugate gradients, RMS errors 0.13 / 0.11 / 0.11 K on spreads of 40 / 60 / 8 K; condition number 40 with three sources, \(4\times10^6\) with one, and the solver refuses. Adding two foreground parameters to the four-family twin gives nullity 2 of 34 and the plan refuses to run; three more loads and seven switch positions restore nullity 0.

Backup · Part 3 · rheplicant-agent Workbench

The task file read as a signal path

rheplicant-agent Workbench, Model tab: the upper signal path of the rfi-flagging demo task with foregrounds, the RFI field and t sys extra highlighted, and the operator parameters listed on the right

rheplicant-agent Workbench · demos/tasks/rfi-flagging.yaml

Backup · Part 3 · rheplicant-agent Flags panel

Before and after flagging, on one colour scale

rheplicant-agent Workbench, Results tab, Flags panel: the simulated waterfall before and after flagging on one colour scale, and the full mask of flagged fractions per block with its frequency axis

rheplicant-agent Workbench · demos/tasks/rfi-flagging.yaml

Backup · Part 3 · rheplicant-agent session

The chat that drove the four rounds

A rheplicant-agent chat session under the rfi preset: flagging rounds 3 and 4, each with four check badges, the flagged fraction, the residual excess kurtosis and the parameters used; round 3 says continue, round 4 says pass

rheplicant-agent · recorded runs replayed

Historical backup · Part 3 · Demo C identifiability

Six constrained combinations per LST, out of eighteen columns

Noise standard deviation of each whitened-SVD combination for the main and stress bases, the retained combinations' weights over the nine moment columns, and the two reductions from 18 to 9 to 6 coefficients per LST

Historical backup · Part 3 · Demo C in the stress band

Where no per-LST spectral basis passes

Stress scenario: oracle and the physical moment basis at orders 0, 1 and 2 with three beam spectra; none recovers the trough

Backup · Part 3 · A controlled non-Gaussian sky

Same power spectrum, different source populations

Beam-smoothed Poisson sky and the one-point density of source coefficients: Poisson-Gaussian mixture versus the matched Gaussian

\[x_j=a(N_j-\lambda)+g_j,\quad N_j\sim{\rm Pois}(\lambda)\]

With \(a=\sqrt{0.8/\lambda}\), for every candidate \(\lambda\): \(\mathbb E[s]=0\), \(\mathrm{Cov}(s)=BB^{\mathsf T}\). Rare bright sources or many faint ones: the covariance cannot tell. The higher cumulants can, and Campbell's theorem gives them in closed form.

Part one's shot-noise drive as a sky to be inferred: recover \(\lambda\) from a 16,384‑coefficient map.

Backup · Part 3 · Marginalise the field, infer its population

Recover the source rate, and check the weights

Marginal log-likelihood of the Poisson rate: analytic curve, two factorised Gaussian banks and the whole-map weighted bank
16,384 latent coefficients · rate MAP 2.0014 · analytic 2.0015 · injected \(\lambda=2\)

\[w_m(\lambda)=\frac{p_\lambda(x^{(m)},d)}{p_0(x^{(m)},d)}\]\[\frac{Z_\lambda}{Z_0}\simeq\frac1M\sum_m w_m(\lambda)\]

Draw the Gaussian reference bank once; every candidate \(\lambda\) only changes the weights. 1,024 draws of 65,536 coefficients cost 0.105 s.

Whole-map weights collapse: ESS 6.2 of 2,048. The exact source-coordinate independence of this model factorises the estimator; minimum local ESS 1,614 of 2,048, and two independent banks agree with the analytic curve.

Part 1 · Path-integral weak lensing · How solid

The amplitude still rises with the cutoff; the observable is fixed

Held fixed in the number

Sourcesingle plane, nominal \(z_s=5\)
PathBorn; scalar-only, \(\Phi=\Psi\)
Driverlinear \(P\), tree-level SPT bispectrum
Cutoffvertex \(\ell_{\max}=15360\)
Readoutraw \(\langle\kappa_1\kappa_2\rangle\) moment, linearized map

What moves it

UV sensitivity. A collapsed configuration is a coincident-point moment. On the post-fix cutoff ladder the last doubling of \(\ell_{\max}\) still adds 17% at 0.5′ and about 9–11% in the band at tree level, and 103% at 0.5′ with BiHalofit. No cutoff-independent nonlinear amplitude is quoted: slide 21's 5–10% is the \(\ell_{\max}=15360\) value, still rising.

Spin signature. Linear scalar lensing is pure E in every realisation, so \(\Delta C_\ell^{BB,\,FK}=2\,\mathrm{Re}\langle B^{(1)}B^{(2)*}\rangle=0\). FK changes E only; the first allowed B-mode is Gaussian FF at field order 4.

Readout. Jacobi \(\kappa_A\), reduced shear and the source sample are external insertions still to be folded: the other stations of the complete view.

Part 1 · Path-integral weak lensing · Beyond two-point statistics

The one-point law reads what the covariance cannot

Full Jacobi output densities for two compound-Poisson driving laws with identical second cumulants
same driver covariance, half the marks × four times the rate: skewness 0.37 → 0.18
Change of the second, third and fourth cumulants from linear to full Jacobi propagation
same driver, linear vs full Jacobi propagation:
\(c_2\) −1%, \(c_3\) −3%, \(c_4\) −25%

Same power spectrum, different laws: the skewness halves. Nonlinear propagation moves the fourth cumulant by a quarter while the variance moves 1%.

Part 1 · Path-integral weak lensing · A complete view of the corrections

Corrections enter at every station along the ray

Driving fields · large-scale structurenonlinear growth · connected cumulants κ⁽²⁾, κ⁽³⁾, κ⁽⁴⁾ … · unresolved small-scale structureobserversource galaxyRay pathbeyond-Born: curvature on the bent rayradial and time shiftsScreen & frametransported basis, tiltframe rotation ≠ image rotationBeam propagationlens–lens coupling, nonlinearSachs response: FF and FKImage & observablereduced shear g = γ/(1−κ), magnificationfinite-source flux, size and shapeSource endpointfixed zobs ≠ fixed affine distancesource and observer frame termsCatalogue samplesource clustering, magnification biasweights and normalisationMixed terms: path × propagation · bispectrum × response · reduced shear × selection · endpoint × sampling · intrinsic shapes × lensing

Part 1 · Path-integral weak lensing · The toolchain

Each link of the calculation has its own package

Sachs equationmattercanoesprivatedriver cumulantssft-wickpublicPyPI 0.6.1XXFK3×6action → diagrams → integralsoptionalSFT-lensing-paper-analysestwo-pointFF · FKpublickappa_PDFprivateone-point PDFsft-dysonprivateRCcross-checksachsfield · sachsraypublicdraw fields · trace rays
\(\dot{\mathcal X}=A\mathcal X+\textcolor{#b75b18}{F\mathcal X\mathcal X}+\textcolor{#2867a3}{\varphi}\)
\(P(k)\)
\(\textcolor{#2867a3}{R}\)
\(\textcolor{#b75b18}{F}\)
\(\textcolor{#2867a3}{C}\)
\(\textcolor{#75519c}{K_3}\)
\(\Sigma\)
\(\textcolor{#2867a3}{R,\,C}\)

sft-wick: pip install sft-wick, arXiv:2606.19480 · github.com/StatFieldTheory/SFT-lensing-paper-analyses · github.com/zzhang0123/sachs-src-fields

Backup · Part 2 · The accuracy we need

Judge the model error in the space of the science parameter

A foreground model error shaped like the 21-cm signal shifts the recovered amplitude by 10 mK while the fit residual vanishes

10 mK → 0

signal-shaped foreground error: 10 mK amplitude bias, zero residual

A finite-moment error is small or large only relative to the signal it mimics. Propagate it through the observing response and the estimator, not the raw residual.

Historical backup · Demo C (per-LST spectral fit) compiled by bayesmith

Demo C's plan: a tolerance the arithmetic cannot reach

block 0  {fg_coeff}   GCR exact   structurally certified;
         numerical check 3 scales x 3 at-points (max 0.00e+00)
         kappa=1e+14 -> tol=1e-17 ... tol UNATTAINABLE at this
         dtype: the condition bound times the machine epsilon
         is 0.0222, already past the 0.001 target ... Run inside
         `with jax.enable_x64(True):` ... or strengthen the prior
block 1  {u}          NUTS
         outside the exact block ['fg_coeff']: sampled by NUTS,
         and the exact block is solved CONDITIONAL on them,
         once per sweep
execution: HMCGibbs(inner=NUTS, gibbs_sites=['fg_coeff'])

The graph: \(c\), 96 LST × 9 foreground coefficients, Gaussian prior; \(u\), 7 box-mapped 21-cm parameters through an emulator; waterfall \(\sim\mathcal N(c\,\Phi^{\mathsf T}+T_{21}(u),\,10\,\mathrm{mK})\). Nothing was declared: the affine block was found in the traced program, then checked numerically.

Gaussian conditional

solve, draw (GCR) or integrate out analytically; the plan also says when the arithmetic cannot deliver the tolerance

Useful local structure

log-space, iterative GLS or Gauss–Newton proposal, corrected to the full target by Metropolis–Hastings

General dependence

NUTS; a gradient route returns a convergence certificate (Newton decrement) or refuses with a reason

bayesmith 0.10 (PyPI) · ↖ Backup menu · ↖ Conclusion

Backup · Part 2 · The sky models we have

Sky models disagree at the 10 % level

One Mollweide sky with three models side by side: LFSM, GSM and GSM16
LFSM · GSM · GSM16, one sky, three models

> 10 %

disagreement between the models, as quoted in the RHINO overview

A global 21-cm model has to be good to about one part in a hundred thousand for the model error to stay below the signal.

Irfan et al. (2023) · RHINO overview, P. Bull · ↖ Backup menu · ↖ Conclusion

Backup · Part 3 · bayesmith routes

Five routes a block can take

methodprinted asmeaning
gcrGCR exactexact conditional Gaussian draw; the noise does not move with the block
gcr+snisGCR + SNISwhole graph exact, noise moves with it: GLS fixed point, corrected by self-normalised importance sampling
gcr+mhGCR + iterative GLS + MHexact block beside a sampled remainder with moving noise: the exact draw is an MH independence proposal
log-gcrlog-gcrthe exact draw on a log-transformed block whose prediction is exponential in an affine function
nutsNUTSNumPyro's No-U-Turn sampler
One Gaussian conditional: solve at its peak, draw a realisation, or integrate it out

One Gaussian conditional supports three operations: solve, draw, integrate out. Which structure takes which route: linear-Gaussian with an eligible covariance, a supported log-linear form, conditionally Gaussian affine groups inside a chain, an eliminable exact block with a sampled residual, a general differentiable model.

bayesmith 0.10 docs, Core concepts and Inference routes · ↖ Backup menu · ↖ Conclusion

Backup · Part 3 · bayesmith Example 03

Example 03: chains and provenance

Recovered population and group means with 99 percent intervals against their truths, from the recorded notebook run
Hierarchical-model recovery · recorded all-NUTS run
chains × draws2 × 2,000 after 1,000 warmup, seed 0
divergences0
population R-hat1.000004
population ESS8,817
population mean1.008 ± 0.217, truth 0.8
run recordplan, fingerprints, seed, dtype, devices, backend, budget, termination, approximation class
refusalfailed premise, grounds, scope, remedies, optional fallback

bayesmith Example 03, recorded on 0.9.0 at revision 6c644b1 · ↖ Backup menu · ↖ Conclusion

Backup · Part 3 · The RHINO pipeline

RHINO's open-source pipeline

rhino-daq

PFB spectrometer and Arduino control driver

momentRFI

RFI flagger: iterative clipping and 2-D surface fitting

rhino-cal

noise-wave fitting, Kirkham+ method

rhino-monitor

live satellite, weather and plane monitor

rhino-sparams

lab measurements

rhino-beams

beam simulations

husky

Bayesian sky model, simple foreground fits

limTOD

Bayesian map-maker

rheplicant

digital twin, live simulation; inference on bayesmith

github.com/RHINO-Experiment · RHINO overview, P. Bull · ↖ Backup menu · ↖ Conclusion

Backup · Part 3 · Spectral maps · What a log fit measures

A log fit through a beam returns brightness-weighted moments

\[\ln d_p=\ln\tilde T_p-\langle\beta\rangle_pL+\big(\langle C\rangle_p+\tfrac12\mathrm{Var}_p\beta\big)L^2-\big(\tfrac16K_{3,p}(\beta)+\mathrm{Cov}_p(\beta,C)\big)L^3+O(L^4)\]

Three panels of noise-free fits: beta against point value and beam average versus beam width; half the beam variance of beta in the curvature; spurious beta versus beam chromaticity
moments weighted by \(B_{pq}T_q(70\,\mathrm{MHz})\) · noise-free fits of the simulator sky through Gaussian beams · sd bands from the beam-smoothed prior

Fit − moment: \(2.7\times10^{-5}\) (β) and \(8.8\times10^{-5}\) (C) rms; ½Var ≥ 0; fit residual ≤ \(8.7\times10^{-6}\); cubic term against its prediction: correlation 0.9996. A pivot at 60 MHz moves β by 0.022 rms. Chromatic beam: spurious β grows by 0.0077 rms per 0.1 in α. Smoothing every channel to the widest beam restores the moments without noise; with noise it is untested.

Backup · Part 3 · Spectral maps · Exactness and cost

The block is exact; converged NUTS means differ by ≤ 0.15 sd

checkunknownsresult
Fourier modes, 1 and 4 visits12,288sd ratio 0.988–1.002
dense oracle768mean ≤ \(4.8\times10^{-5}\) sd; sd ratio 0.990, 1.003
dense Cholesky, t eliminated12,288mean ≤ \(3.8\times10^{-5}\) sd; sd ratio 0.995, 0.998
NUTS, f = 0.001, 0.03, 0.0599108two chains: means within 0.10, 0.14, 0.15 sd; sd ratio 0.976–1.001
log step, f = 0.06, 0.07108refused (fractional_too_large)
NUTS, uniform432within 0.12 sd; R-hat ≤ 1.01; 0.84–0.89 s per effective draw
NUTS, scan stripes432not converged: R-hat up to 1.092 (β); ESS down to 13.6 (C)
128 × 128, end to end49,15211.9 s per draw; z rms 1.08, 1.04
Seconds per independent draw against the number of unknowns: exact draws from 108 to 49,152 unknowns; NUTS per effective draw at 108 and 432, two chains each, the scan-stripe chains at 432 not converged
beam-smoothed prior · NUTS: dense mass, 1000 + 1000 steps
NUTS: two chains per size, drawn at ÷1.15 and ×1.15 · square: end to end

Certified CG runs: relative error ≤ \(5.0\times10^{-4}\). Operator records at \(f=10^{-3}\)–0.0599: \(\kappa\le6.81\times10^{7}\), ≤ 0.007 sd per pixel up to 12,288 unknowns; at 49,152, \(\kappa\le6.96\times10^{7}\), 0.0115–0.0127 sd. Bounds analytic, checked by Lanczos. Calibration and chromatic runs: mean relative error only. At \(f=3\times10^{-4}\): \(\kappa\le7.21\times10^{8}\), no pixel bound recorded. \(f\le10^{-4}\): not certified.

bayesmith 0.10 · NumPyro NUTS · ↖ Backup menu · ↖ Conclusion

Backup · Part 3 · Spectral maps · The prior

Curvature leans on the prior; an over-smooth prior over-claims

per-pixel sd, one visitβC
data alone, one pointing\(2.6\times10^{-3}\)0.025
joint posterior (median)\(1.2\times10^{-3}\)0.0036
prior68% coverage, β / C
beam-smoothed (used)67% / 68%
point field74% / 71%

Correlation length 2× too long: z rms 2.10 (β) and 3.01 (C) per Fourier mode, 2.09 and 3.00 end to end. Not done: inferring the correlation length and amplitude.

z rms of beta and C when the prior correlation length or amplitude is wrong by factors of 0.5 to 2; the end-to-end run for twice the length
beam-smoothed prior class · \(f=10^{-3}\) · dots: per Fourier mode, uniform one visit · diamonds: end to end, stripes and hole

Backup · Part 3 · Spectral maps · 16 realisations

Errors against beam averages match the sd in 16 realisations

Standardised error maps for beta and C, z rms and coverage over sixteen realisations, and the residual map of one global beta and C at 85 MHz
beam-smoothed prior · 16 realisations redraw the sky and the noise; posterior sd from the display realisation
z rms (median), β / C68% coverage (mean), β / C
observed pointings1.03 / 0.9967% / 69%
hole0.88 / 0.8866% / 71%

Backup · Part 3 · A RHINO-sized chromatic beam

Infer the beam and the sky spectrum together

Synthetic ring drift scan · 96 sky pixels · 32 LST bins · 16 channels · 60–85 MHz

\[T(\phi,\nu)=A\,T_0(\phi)(\nu/70)^{-\beta}\]

\[w(\nu)=w_{70}(\nu/70)^{-0.8}\]

Known sky template, Gaussian beam.
Infer the beam FWHM \(w_{70}\) and \(\beta\).
One common \(A\sim\mathcal N(1,0.2^2)\) integrated out exactly.

Inject \(w_{70}=40^\circ,\ \beta=2.55,\ A=1\).
20 K independent measurement noise.

One forward model: sky maps → chromatic beam → time–frequency data.

Fresh Rheplicant synthetic ring drift-scan data, 32 local-sidereal-time bins and 16 frequency channels; brighter is hotter

rheplicant 0.9 · MapSky, MatrixProjector · ↖ Spectral maps: limits · ↖ Backup menu · ↖ Conclusion

Backup · Part 3 · A RHINO-sized chromatic beam

The full drift scan constrains both unknowns

Same synthetic data and forward model · numbers: 801 × 801 grid, contours: 401 × 401 · shared amplitude integrated out

\(w_{70}=(40.25\pm0.22)^\circ\)

\(\beta=2.5483\pm0.0035\)

Posterior means ± standard deviations.
Ring: injected values; contours: 68% solid, 95% dashed.

Joint correlation \(\rho=0.020\).
Residual rms / noise = 0.991.

Check the entire posterior, then the predicted observation.
401 → 801 grid: stable means and intervals.

Joint beam-width and sky-index posterior, 68 and 95 percent contours and injected truth; standardized residual histogram close to unit Gaussian

rheplicant 0.9 · ↖ Backup menu · ↖ Conclusion

Backup · Part 3 · A RHINO-sized chromatic beam

Time dependence separates beam width from spectral slope

Controlled comparison · same truth, noise law, priors and common amplitude

One LST at 0 h

FWHM sd 8.6°, as in the 25°–55° prior.
No FWHM information; \(\beta\) follows FWHM along a ridge.

All 32 LSTs

FWHM sd 0.22°; \(\beta\) sd 0.0035.
The sky rotates through the beam.

Keep the angular modulation in the data: it constrains the beam while the spectrum constrains \(\beta\).

One LST: a broad beam-FWHM and spectral-index ridge that fills the prior box; its FWHM marginal equals the uniform priorAdding all 32 LSTs: a small posterior spot, shown in a zoom inset, and a narrow FWHM marginal

rheplicant 0.9 · ↖ Backup menu · ↖ Conclusion

Backup · Part 3 · bayesmith · Basic methods

Gaussian structure makes inference tractable

bayesmith · exploit Gaussian blocks; correct to the full target

Solve, draw, integrate

GLS, constrained realisations
Exact draws in log coordinates
Analytic elimination

Build a Gaussian proposal

Iterative GLS
Bias-corrected log-linearisation
Gauss–Newton linearisation

Recover the full target

Metropolis–Hastings correction
Importance weights
NUTS for remaining blocks

A non-Gaussian posterior can still be reached with Gaussian proposals

bayesmith 0.10 · examples/inference/methodology_guide.py

Backup · Part 3 · bayesmith · Gaussian reference reweighting

Draw Gaussian fields, then weigh the non-Gaussian law

Observation: \(d=Rx+\epsilon\), Gaussian noise; population law \(p_\eta(x)\)

1 · One Gaussian reference posterior

\(x_i\sim q(x\mid d)\propto p(d\mid x)\,p_0(x)\)   ·   fast GCR draws

2 · Evaluate the complete field's density ratio

\(w_i(\eta)=p_\eta(x_i)/p_0(x_i)\)

3 · Infer the population, then draw the field

\(p(\eta\mid d)\propto p(\eta)\,\frac1N\sum_iw_i(\eta)\)

Draw \(\eta\); choose a whole \(x_i\) with its weights at that \(\eta\).

Fixed likelihood here. Check weight ESS and independent banks; the finite bank is an approximation.

bayesmith 0.10 · PosteriorReweighting

Backup · Part 3 · bayesmith · Example 1 · Two populations

Infer a bimodal population with Gaussian field draws

\[d_j=x_j+\epsilon_j,\quad\sigma_\epsilon=0.35\]

\[\begin{aligned}p(x_j\mid a)={}&(1-a)\,\mathcal N(-1,0.6^2)\\&+a\,\mathcal N(1,0.6^2)\end{aligned}\]

Eight observed objects. Infer the mixture fraction \(a\sim\mathrm{Beta}(2,2)\).

Reference: \(p_0(x_j)=\mathcal N(0,1.5^2)\).
Two banks × 12,000 whole-field draws.

\(a\): 95% interval [0.28, 0.85]
min weight ESS 5,387 of 12,000

Bimodal population prior beside a Gaussian reference; the mixture-fraction posterior from two fresh GCR banks agrees with analytic convolution

bayesmith 0.10 · examples/inference/non_gaussian_reweight.py

Backup · Part 3 · bayesmith · Example 2 · Source counts

The Gaussian covariance stays fixed; infer the skewness

Synthetic 12 × 12 grid · prior λ ~ U(0.5, 8)

\[n_j\sim\mathrm{Poisson}(\lambda)\]

\[x_j=\sqrt{0.8/\lambda}(n_j-\lambda)+g_j\]

\(g_j\sim\mathcal N(0,0.2)\); observe \(d=B(x+\epsilon)\).
Known invertible toy beam; \(\epsilon\) white before it.

\(K_1=0,\ K_2=1\) at every \(\lambda\).
\(K_3=0.8^{3/2}/\sqrt\lambda,\ K_4=0.8^2/\lambda\).

\(\lambda>0.78\) at 97.5%, so \(K_3<0.81\)
Upper end: the prior bound \(\lambda\le8\)
Injected \(\lambda=2\)
min weight ESS 2,730 of 8,192

Simulated Poisson counts and the broad source-rate posterior; two fresh Gaussian reference banks agree with the full positive Poisson-Gaussian convolution

bayesmith 0.10 · examples/inference/campbell_sky.py

Backup · Part 3 · Bayesian analysis at scale · From population examples to an instrument

One model graph holds a sky and an instrument

Population hyperparameters govern sky, instrument and noise parameters; physical sky components feed the instrument response to a prediction and an observation law

Forward simulation

Draw parameters → generate a measurement.

Bayesian inference

Condition on the measurement → infer parameters. Same arrows, same physical calculation.

Backup · Part 3 · rheplicant + bayesmith · A synthetic narrow-beam survey

Logs turn a curved power-law sky into one Gaussian block

Synthetic periodic patch · 64 × 64 pointings · 16 channels, 60–85 MHz · narrow achromatic beam, not RHINO's

Simulated with rheplicant: 256² sky

\[\ln T_q=t_q-\beta_qL+C_qL^2\]

\[d_p=\textstyle\sum_q B_{pq}T_q\,(1+f_p w)\]

\(L=\ln(\nu/70\,\mathrm{MHz})\); beam 1.5 pointings; \(f_p=10^{-3}\) for one visit, \(5\times10^{-4}\) for four; one hole.

Inferred: one spectrum per pointing

\[\ln d_p=t_p-\beta_pL+C_pL^2+f_p w\]

Linear in \(t,\beta,C\); noise \(f_p\) in every channel.

Gaussian-field priors on \(\beta\) and \(C\): 12,288 unknowns, 62,608 data, one Gaussian block, exact independent draws.

one global β, C: χ²/dof = 123
β, C per pointing: χ²/dof = 0.99

Simulated data at 70 MHz on the 64 by 64 pointing grid, with stripes of one and four visits and an unobserved hole Two pointings in log space after removing the fitted power law: a curved four-visit spectrum and a flat one-visit spectrum, with their quadratic curves

rheplicant 0.9 · MapSky, MatrixProjector, RadiometerNoise · bayesmith 0.10

Backup · Part 3 · rheplicant + bayesmith · Synthetic survey · Posterior maps

Exact draws map β and curvature; their errors follow the scan

Spectral index and curvature maps: the beam-averaged truth and the posterior mean side by side, the hole outlined and a dotted cut through it Posterior standard deviation maps of the spectral index and the curvature: stripes of one and four visits and a bright unobserved hole The cut through the hole: truth, five exact posterior draws and the two-standard-deviation band for the spectral index and the curvature

12,288 unknowns: 1.3 s per independent draw; CG error ≤ 0.01 sd in every pixel of every draw
432 unknowns, same scan: exact draws 0.023 s; NUTS R-hat 1.092 (β), min ESS 14 (C)

bayesmith 0.10 · factor_partition, log_linear_operator, gcr_sample

Backup · Part 3 · Model → plan → inference

A good fit can still give the wrong map.

Beam-averaged sky

Observed-pixel beta errors against beam averages and point values, using the same saved posterior

Know which sky the map estimates.

Chromatic response

Saved beta bias when a chromatic beam is fitted by the achromatic log model; hole masked

A good residual can hide a biased map.

Prior smoothness

Saved curvature errors with the matched prior and twice its correlation length

Smoothness changes the uncertainty.

Same saved synthetic survey · errors against generating truth · Beam-width checks · Chromatic response · Log-noise boundary

Backup · Bayesmith example

A real model. An automatically generated sweep.

Saved generating components: random field, nonlinear bump, background and gainNotebook traced DAG: a random Fourier field, nonlinear bump, background, gain and moving noise; known inputs omitted

Traced synthetic model · known design inputs omitted · coloured parameters identify the two updates

Random field + background

Moving-noise GLS proposal + MH

Power + shape + gain + noise

NumPyro NUTS · conditional on the field

Composed-process synthetic example · automatically selected proposal block + NUTS remainder · ↖ Backup menu

Backup · Bayesmith example

Approximate the update. Keep the model.

Saved noisy data, generating mean, residuals and 99 percent posterior mean-signal interval
Saved posterior densities of bump location and process power; dashed orange lines show generating values

Structured proposal + original-target MH · nonlinear remainder sampled by NumPyro

Same saved composed-process example · GLS proposal + original-target MH + NumPyro remainder · orange dashed: generating truth · ↖ Backup menu

Discussion · Observation and inference

Examples and further directions

Backup · Part 3 · Bayesian analysis at scale · RHINO

RHINO: an observing system to model

The RHINO mesh horn frame under construction at Jodrell Bank, a large dish behind
Jodrell Bank · photo P. Bull
Sky-averaged 21-cm signalSky and instrument responseReference measurementsCalibration uncertainty inside the model

Bull et al. (2025), RASTI, arXiv:2410.00076 · photo P. Bull · ↖ Examples · ↖ Conclusion

Backup · Part 3 · Model → plan → inference

Rheplicant draws the twin it assembles.

Sky → antenna

Native Rheplicant tour Sky → antenna view

Switch → receiver

Native Rheplicant tour Switch → receiver view

Readout

Native Rheplicant tour Readout view

Native tour assembly · ⊕ adds branches · the diamond switches between antenna and reference loads · loads ×3

Full observation graph ↗ · Rheplicant documentation tour · identity-only stretches omitted · ↖ Examples · ↖ Conclusion

Backup · Part 3 · Model → plan → inference

Larger maps. The same inference machinery.

Saved Gaussian field benchmark: independent whole-field draw times at six sizes from108 to49152 jointly inferred parameters

One joint field update

Keep the map’s spatial structure.

Independent map draws

Reuse the Gaussian update.

Numerical accuracy checked

Check the solve as the field grows.

Reuse the method as the field grows.

Saved Bayesmith Gaussian-field benchmark · model-generated data · ↘ timing and convergence details · model checks · ↖ Examples · ↖ Conclusion

Backup · Part 3 · Model → plan → inference

Tools for agents. Results you can inspect.

rheplicant-agent / WorkbenchFlagging rounds · recorded tool executions

First tool call

Actual first-round 64 by128 RFI mask; orange cells are flagged

Refined result · checks repeated

Actual final-round RFI mask; persistent channels and isolated events flagged

Four fixed checks · every call

CallStable
result
Residual
check
Protected
data
Complete
procedure
Verdict
1
First pass
—✓✓—continue
2
Refine
✓✓✓—continue
3
Broaden
—✓✓✓continue
4
Repeat
✓✓✓✓pass

Stop when every fixed check passes.

Recorded rheplicant_flag executions · synthetic RFI example · ↘ original Workbench results · ↖ Examples · ↖ Conclusion

Backup · Part 3 · Model → plan → inference

Keep learning as observations arrive.

Night 1

Synthetic night1 spectrum and accumulated 95percent posterior for signal amplitude and foreground tilt

+ Night 2

Synthetic night2 spectrum and accumulated 95percent posterior for signal amplitude and foreground tilt

+ Night 3

Synthetic night3 spectrum and accumulated 95percent posterior for signal amplitude and foreground tilt

Top: new data (dots), generating mean (orange) · bottom: 95% joint posterior · +: truth · dashed: earlier nights

Stored information reproduces the full-data posterior.

Actual Rheplicant BayesMemory · synthetic affine-Gaussian example · nightly nuisance integrated out · ↖ Examples · ↖ Conclusion

Backup · Further directions

What comes next

Lensing

fold the Jacobi map, reduced shear and the source sample as external insertions; converged nonlinear bispectrum; ray-tracing validation

Synchrotron

the moment foreground inside the twin with Faraday depth and polarisation; coverage over noise realisations; the chromatic stress band

Inference

RHINO calibration on real data; live agent sessions on real nights; streamed campaign evidence; certificates for Gibbs sweeps; a preconditioner for long integrations; chromatic beams inside the forward model

↘ Technical backup

ERC, EU Horizon 2020, grant 948764 · RadioForegroundsPlus, HORIZON-CL4-2023-SPACE-01, GA 101135036 · ↖ Examples · ↖ Conclusion

Backup · Sources

Selected sources and implementation

Radio: Zhang & Chluba, A statistical framework for synchrotron emission, in prep.; SyncMoments 0.4.0. Bull et al. (2025), RASTI, RHINO. rheplicant 0.9 and bayesmith 0.10 on PyPI; Zhang (2025) MomentEmu, arXiv:2507.02179.

Gibbs sampling: Wandelt, Larson & Lakshminarayanan (2004), PRD 70, 083511; Eriksen et al. (2004), ApJS 155, 227; Eriksen et al. (2008), ApJ 676, 10; BeyondPlanck Collaboration (2023), A&A 675, A1; Galloway et al. (2023), A&A 675, A3; Kennedy et al. (2023), ApJS 266, 23; Murphy et al. (2026), MNRAS 551, 1503; Dutta et al. (2026), arXiv:2604.26885; Zhang, Bull, Santos & Nasirudin (2026), RASTI, hydra-tod. Foreground targets: Pritchard & Loeb (2012); Fixsen et al. (2011); Dowell & Taylor (2018); Chluba (2016); Abitbol et al. (2017); BICEP/Keck (2021); Irfan et al. (2023). Gibbs schematic after K. Glasscock, RHINO overview (P. Bull).

Formalism: Zhang, Bull, Clarkson & Nicola, Statistical Field Theory for Weak Gravitational Lensing, arXiv:2606.19472, and its analysis package. Software: sft-wick, arXiv:2606.19480; kappa_PDF for the controlled optical PDF models; Unify-WL for the correction panorama.

Stochastic optics: Fleury, Larena & Uzan (2015). Precision shear modelling: Euclid Collaboration (2024). Source sampling and finite images: lensing bias, extended sources.

PDFs: Patton et al.; Clerkin et al.; Barthelemy et al.; Zhong et al.

Provenance and hashes: assets/source_manifest.json · generated_manifest.json · reused_manifest.json · SOURCES.md