How Many Solver Steps Should a Subhalo Survive? Warm-Started Lens Reconstruction for Substructure Inference

Small clumps of dark matter that hold no stars, called subhalos, can be detected only through their gravity. When a foreground galaxy bends the light of a more distant galaxy into a bright arc, a subhalo near the arc adds a faint, local wiggle. Counting such wiggles across many lenses tests whether dark matter is "cold" (many small clumps) or "warm" (few). The trouble is that a flexible model of the background galaxy's own light can explain the same wiggle as a bump in that galaxy, and it will do so if you optimize it long enough. This proposal treats the length of that optimization as a control knob. A neural network supplies a good starting fit of the lensing system. A short, fixed number of physics-based correction steps then refines it. The subhalo signal is read from what the fit leaves unexplained. The question is how many steps keep the subhalo in the residual while removing everything else.

The faint edges of the arc are where this tradeoff matters most. A subhalo's imprint on the image is proportional to how steeply the arc's brightness changes, so the signal is concentrated at arc boundaries. At those boundaries the arc fades into sky noise, the source model is least constrained, and over-flexible reconstructions are most willing to absorb structure. Our claim is that a warm-started, truncated reconstruction, paired with an explicit soft map of where the arc boundary is, gives residuals from which an inference network recovers the warm dark matter cutoff with calibrated uncertainty. We expect this to hold when the background galaxy is more complex than the training simulations, which is the regime where networks that read raw images are known to degrade.

Core Claim

The physics of the signal makes the boundary connection concrete. A subhalo adds a small deflection $\delta\alpha(x)$ to light rays at image position $x$. To first order it changes the observed brightness by

$$\delta I(x) \approx -\nabla I(x)\cdot \delta\alpha(x),$$

where $I(x)$ is the unperturbed lensed image. Per-pixel detectability therefore scales like $|\nabla I|\,|\delta\alpha|/\sigma$, with $\sigma$ the pixel noise. Most of the information sits on the arc edges and very little sits in the flat arc interior. Low-contrast boundary ambiguity is therefore part of the subhalo-detection problem itself, rather than an analogy imported from medical segmentation.

We define the retention ratio after $K$ refinement steps as

$$R_K = \frac{\lVert r_K - r_K^{\text{smooth}} \rVert^2}{\lVert \delta I \rVert^2}.$$

Here $r_K$ is the residual left by a reconstruction run on an image containing an injected subhalo, and $r_K^{\text{smooth}}$ is the residual from the same reconstruction run on the identical image without the subhalo. $R_K$ is therefore the fraction of the subhalo's imprint that survives in the residual. The noise-fitting failure reported for neural-field source models in Strong Lensing Source Reconstruction Using Continuous Neural Fields predicts that $R_K$ falls toward zero as $K$ grows. Large residual errors from the smooth mass model, which mimic subhalos, dominate at small $K$. We hypothesize an interior optimum in $K$. We further hypothesize that a learned warm start moves this optimum to a small number of steps, which makes the whole pipeline cheap enough to amortize over thousands of lenses.

Prior Work and Positioning

Three groups of prior work define the space.

The first group supplies the inference machinery. Mining for Dark Matter Substructure trains a ResNet-18 on raw images with simulator-derived likelihood ratios and constrains the subhalo mass fraction to about 10% with roughly 100 Euclid-like lenses. Estimating the warm dark matter mass from strong lensing images with truncated marginal neural ratio estimation and The effect of the perturber population on subhalo measurements in strong gravitational lenses use truncated marginal neural ratio estimation (TMNRE). This is a form of simulation-based inference: a classifier learns the ratio of posterior to prior for the few parameters of interest, and simulations are focused on the plausible region of parameter space. The second of these papers finds that an MLP-Mixer, a network that mixes information across distant image patches, beats CNNs as the image compressor. All three read the raw image in one pass. We keep their estimator and change only its input.

The second group motivates the change. Robustness of Neural Ratio and Posterior Estimators to Distributional Shifts shows that these estimators degrade when source complexity, noise, or the smooth lens model differs from training. The closest existing work is Targeted Likelihood-Free Inference of Dark Matter Substructure in Strongly-Lensed Galaxies. It first fits the source with a variational Gaussian process and then runs a ratio estimator on targeted simulations. That pipeline takes hours per lens, uses a diagonal-covariance approximation, and targets one $10^9 M_\odot$ subhalo. Our pipeline is amortized, runs a fixed short refinement, targets the population parameter (the half-mode mass), and asks explicitly how much refinement destroys the signal. The source-reconstruction methods based on variationally optimised Gaussian processes, continuous neural fields, and diffusion restoration all fit smooth lenses or a fixed lens operator, and none measures substructure retention.

The third group supplies the acceleration and boundary techniques, which we borrow and test in a new physics domain. Deep Guess uses a ResUNet initial estimate so that a proximal solver for sparse-view CT converges in 12–30 iterations instead of more than 500. SUPER Learning interleaves supervised networks with about 4 iterations of an unsupervised solver per layer. Bounding Maps replaces hard lesion boxes with graded continuous targets for low-contrast CT. MISNet adds boundary and reverse attention for faint polyp edges. Deep Guess also constrains our design: it reports that non-convex solvers stall when the warm start lies outside the correct basin. Our warm start therefore has to be judged by downstream inference quality, not by its own reconstruction error.

Research Program

All simulation uses the differentiable GPU ray tracer Caustics, with HST-like settings matching the TMNRE study (signal-to-noise near 30, line-of-sight perturbers included). Background sources are drawn from real galaxy images, following the HST galaxies used in the continuous-neural-field paper and the PROBES galaxies behind AstroDDPM.

The warm-start network is an MLP-Mixer encoder. It predicts the smooth-lens parameters and a pixelized source from the observed image, and it is trained on smooth-lens simulations only, so it never learns to explain subhalos. Refinement then takes $K$ gradient steps on the lens and source jointly, minimizing a data-fidelity term plus a smoothness penalty on the source, with backpropagation through Caustics. The steps are not unrolled into a trained network. Keeping them as plain physics updates preserves the data-consistency argument that Deep Guess emphasizes.

The inference network receives three channels: the observed image, the residual $r_K$, and a soft boundary map. The boundary map is $|\nabla \hat I|/\sigma$ computed from the reconstructed lensed image $\hat I$, clipped and rescaled to $[0,1]$. It works like a Bounding Map, a graded rather than binary indication of where the arc edge is credible. TMNRE is trained on these inputs for the half-mode mass. The physical model and the estimator stay fixed; only the input representation and $K$ vary.

The analysis has two parts. First, we measure $R_K$ as a function of $K$, subhalo mass, and boundary contrast. Second, we measure end-to-end posterior quality as a function of $K$. The test is whether the optimum $K$ predicted by $R_K$ matches the $K$ that gives the best calibrated constraint.

Baselines

The naive reference point is TMNRE with a CNN compressor on raw images, trained with the same simulation budget. It shows what is gained by doing anything at all.

The strongest existing method is raw-image TMNRE with the MLP-Mixer compressor from The effect of the perturber population. Its companion study reports a 95% credible lower bound of about 6.5 keV on the warm dark matter particle mass for CDM truth on HST-like mocks, and recovery of the half-mode mass across $10^7$–$10^{10} M_\odot$. We retrain it on the identical simulation set with the same number of TMNRE rounds, the same architecture size, and the same hyperparameter search budget. To be fair on compute, we give it extra simulations equal to the GPU time our refinement consumes. Beating it means one of two outcomes. The first is a lower bound at least as tight with expected coverage within nominal tolerance under source-complexity shift, where the baseline undercovers. The second is a measurably tighter in-distribution half-mode-mass posterior at equal calibration.

The second strong baseline adapts the targeted pipeline of Targeted Likelihood-Free Inference. Its Gaussian-process fit is run to convergence and then feeds the same residual-channel TMNRE, which isolates whether "converged" refinement is worse than truncated refinement.

Three ablations isolate our ingredients. Removing the warm start, starting from a blank or parametric guess, tests acceleration. Removing the boundary map tests whether explicit edge information helps a Mixer that could learn edges on its own. Replacing the boundary map with MISNet-style boundary attention inside the compressor tests whether the cue should be given as an input or learned as an architectural feature.

For the other benchmarks, the file reports about 10% precision on the subhalo mass fraction from about 100 Euclid-like lenses in Mining for Dark Matter Substructure. The file has no reported result on Lacuna for coverage under source-complexity shift: the robustness study reports degradation without numbers in the file, so we will establish this baseline ourselves.

Why not just…?

Why not just train raw-image TMNRE on more diverse sources? This is the most serious threat. Domain randomization over source morphologies might give the same robustness without any reconstruction. We match it by spending our refinement compute on additional diverse simulations for the baseline. We then test on a held-out source family, diffusion-prior samples when training used real HST galaxies, and on the reverse split. If the randomized baseline matches our coverage and bound, the reconstruction step is not justified for amortized population inference. We would then report the result and narrow the claim to the retention analysis.

Why not just run the source fit to convergence with standard early stopping on the fit quality? Stopping when the fit statistic reaches its expected value per degree of freedom treats every pixel alike. Subhalo absorption, however, happens at the few high-gradient edge pixels and barely moves the global fit statistic. The $R_K$ curves will show directly whether this stopping rule lands past the retention optimum. The converged Gaussian-process baseline will show whether that costs posterior quality. A converged fit also takes minutes to hours per lens according to the Gaussian-process and neural-field papers, which is too slow for thousands of simulations per TMNRE round.

Why not just compute the residual power spectrum? The power-spectrum approach is cheap and uses residuals too. Our truncated residuals will be fed to it as an additional baseline. Because a power spectrum averages over the whole image, it discards the edge localization that the gradient argument says carries the signal. TMNRE work also argues that two-point statistics confuse clumpy sources with subhalos. If the power spectrum of our residuals rivals the neural compressor, the gain comes from the reconstruction rather than the network, which is still a useful finding.

Why not just add boundary attention to the compressor? MISNet-style attention is learned from data and is sensitive to noise mistaken for edges. Our boundary map is computed from the physics and the noise level. The swap ablation above decides between them directly.

Proposed Experiments

The first decisive check is the retention curve. We inject single subhalos from $10^7$ to $10^{10} M_\odot$ at controlled positions relative to the arc edge, at signal-to-noise levels of 30 and 60, and measure $R_K$ for $K$ from 0 to 500 with and without the warm start. The prediction is falsifiable. Retention should fall with $K$, fall fastest for edge-placed low-mass subhalos at low contrast, and plateau much earlier with the warm start. If retention stays flat, the source-absorption mechanism is wrong.

The second check is end-to-end inference over $K$ on HST-like population mocks. We report the 95% lower bound on warm dark matter mass, half-mode-mass posterior width, and expected-coverage curves. The comparison includes the baselines above and three shift conditions modeled on the robustness study: source complexity, noise model, and smooth-lens form.

The third check is cost. We report wall-clock time per lens for refinement against the roughly 20-minute neural-field fit and the roughly 10-minute Gaussian-process initial fit cited above. This tests whether the Deep Guess-style speedup of 15–25× in CT carries over to non-linear ray tracing.

The proposal succeeds if the $K$ that maximizes retention also gives the best calibrated constraint under shift, and if that point beats the compute-matched MLP-Mixer baseline. It fails, informatively, if domain randomization closes the gap.