Voting Across Exposures: Median-of-Means Deblending of Crowded Astronomical Images

Deep sky surveys photograph the same patch of sky hundreds of times and average those exposures into a "coadd" before any galaxy or star is measured. Averaging is fragile. One exposure with a satellite trail, a scattered-light ghost, or a badly estimated blur profile leaks into every downstream measurement. The damage is worst where sources overlap, a problem astronomers call source confusion or blending. There, a small distortion changes how the light gets split between neighbours. We propose to stop averaging everything. We would split the exposures into independent groups, run a fast neural deblender on each group's coadd, and let the groups vote on the catalog of sources, region by region. Groups that disagree with the majority are dropped before a final full-depth fit.

The vote works because of two pieces of robust statistics. Median-of-means estimation splits data into blocks, averages within each, and takes a median across blocks, so one bad block cannot move the answer. It needs blocks that are truly independent. Separate exposures provide exactly that, since given the true sky their noise and artifacts are independent. A bounded kernel is a similarity function whose induced distance saturates at a ceiling, and it supplies the missing distance between catalogs. Catalogs contain different numbers of sources and have no natural ordering, but a bounded kernel embedding turns each catalog into a point in a function space. In that space, a spurious bright detection moves the point by at most a fixed amount. The result is a deblending pipeline whose failure modes are bounded by a counting argument rather than by how well the simulator anticipated every defect.

Core Claim

Amortized deblenders such as BLISS (the Bayesian Light Source Separator) are trained only on simulated images. When real data violate the simulator, they fail silently. We claim that a median-of-means "tournament" over independent exposure groups, run in a bounded-kernel embedding of catalog posteriors, restores accuracy under exposure-level corruption that pixel-level outlier rejection does not catch. Misestimated point spread functions are the clearest example; the point spread function (PSF) is the instrument's blur profile. Diffuse ghosts are another. The scheme gives up little depth, because only the outvoted groups are excluded from the final fit.

The new ingredient is where the median is taken. It is taken over catalogs, not over pixel values and not over summary statistics. As far as the research file shows, nobody has combined median-of-means with deblending: a targeted search returned zero papers.

Relation to Prior Work

The deblending side supplies the base estimator and motivates the gap. BLISS (Scalable Bayesian Inference for Detection and Deblending in Astronomical Images, Simulation-Based Inference for Probabilistic Galaxy Detection and Deblending) trains tiled convolutional encoders on GalSim/CatSim simulations and outputs posteriors over source counts, positions, types and fluxes. StarNet (Variational Inference for Deblending Crowded Starfields) does the same for crowded star fields.

Both are trained with a forward Kullback–Leibler objective that averages over the simulator's assumptions. Neither has any mechanism for data the simulator never produced. We reuse BLISS unchanged as the per-group estimator and add robustness around it rather than inside it.

The misspecified simulation-based-inference line is the closest relative, and it constrains our design. Minimum Distance Summaries (Minimum Distance Summaries for Robust Neural Posterior Estimation) repairs corrupted inputs at test time by minimizing a bounded-kernel distance called maximum mean discrepancy (MMD) between observations and simulator outputs. It works only on low-dimensional summary vectors, averages its embeddings rather than taking medians, and has not been applied to transdimensional source scenes. RNPE (Robust Neural Posterior Estimation and Statistical Model Criticism) places a heavy-tailed spike-and-slab error model on each summary statistic and pays for it with test-time MCMC. KSD-Bayes (Robust Generalised Bayesian Inference for Intractable Likelihoods) bounds outlier influence with an inverse multi-quadratic kernel but needs a score function, which forward simulators lack. All three correct per-observation or per-statistic deviations. None exploits repeated independent views of the same scene, which is the structure surveys actually have.

The median-of-means side supplies the aggregation method. MONK (MONK – Outlier-Robust Mean Embedding Estimation by Median-of-Means) computes a minimax median of block-wise kernel mean embeddings, with a breakdown point near 25% and cubic cost. The metric-space tournament of Loss Minimization and Parameter Estimation with Heavy Tails selects the block estimate whose smallest ball containing a majority of the other estimates is tightest.

We adopt the tournament rather than MONK's optimization, for two reasons. The number of blocks is small (tens), so the tournament's quadratic cost in the number of blocks is trivial. And it returns an actual block, which tells us which exposure groups to discard.

The bounded-kernel results of On Robustness Properties of Convex Risk Minimization Methods for Pattern Recognition justify the choice of distance. Under a bounded kernel, the influence of a far-away point is capped and decays.

The file also flags that median-of-means assumes independent blocks, which fails for spatially correlated pixels. Partitioning by exposure is how we sidestep that objection. Shared calibration and a shared PSF model can still couple exposures, and we test for this explicitly.

Research Program

For a sky region, a catalog posterior from BLISS yields samples of source sets $c = \{(x_s, \log f_s, t_s)\}$. Here $x_s$ is position, $f_s$ flux, and $t_s$ the star/galaxy label. We embed each set as an unnormalized sum, averaged over posterior samples:

$$\mu = \mathbb{E}_{c \sim q}\Big[\sum_{s \in c} k\big((x_s,\log f_s,t_s),\cdot\big)\Big],$$

where $q$ is the deblender's posterior and $k$ is a Gaussian kernel with $k(z,z)=1$. Because the sum is unnormalized, the embedding registers differences in source count. Because the kernel is bounded, each extra or missing source moves $\mu$ by at most a fixed amount, with no dependence on its flux. Distances between embeddings are computed exactly from posterior samples, since a blend region contains only a handful of sources.

The procedure has four steps.

  1. Split. Partition the $n$ exposures of a field into $K$ groups, chosen randomly or stratified by observing conditions. Build one coadd per group and run a PSF-conditioned BLISS encoder on each, giving embeddings $\mu_1,\dots,\mu_K$ for every blend region.
  2. Tournament. Within each region, compute $r_i$, the smallest radius around $\mu_i$ that contains more than $K/2$ of the other embeddings. Select $i^\star = \arg\min_i r_i$.
  3. Keep the majority. Retain the groups $j$ with $\|\mu_j - \mu_{i^\star}\| \le 2r_{i^\star}$.
  4. Refit. Coadd only the retained exposures for that region and run BLISS once more at nearly full depth.

The vote is done per region, so a satellite trail removes one group only along its strip.

The guarantee follows the Hsu–Sabato argument. Suppose each clean group's embedding lies within $\rho$ of the full-depth truth with probability at least $3/4$, and fewer than about a quarter of the groups are corrupted. Then the selected embedding lies within $3\rho$ of the truth with failure probability decaying exponentially in $K$. This is a Chernoff bound on the number of failed groups. We will state and check it empirically. We do not claim a sharper result.

The number of groups $K$ trades sub-coadd depth against breakdown. We will pick it with a stability rule: increase $K$ until the retained set stops changing. This is a pragmatic stand-in for the Lepski-type selection that MONK leaves open.

Baselines

The do-nothing reference is BLISS run on the ordinary mean coadd of all exposures, the pipeline as published. On real data its reported numbers fix the bar. On the SDSS Stripe 82 frame, Scalable Bayesian Inference for Detection and Deblending in Astronomical Images reports 571 of 889 sources identified, with galaxy classification accuracy of 87% versus 84% for the SDSS PHOTO pipeline. On simulated LSST coadds, Simulation-Based Inference for Probabilistic Galaxy Detection and Deblending reports median flux residuals rising from about 16% to about 160% for MAP and about 400% for SEP at high blendedness, and star F1 above 70% at SNR > 12.

The strongest practical competitor is the astronomer's default: a per-pixel sigma-clipped coadd, or a pixel-median coadd, followed by the same BLISS encoder. It removes cosmic rays and bright trails at almost no cost. We will give it the same exposures, the same encoder weights and the same tuning budget over clipping thresholds as we give over $K$.

The second competitor is BLISS retrained with artifact augmentation, meaning simulated cosmic rays, trails, ghosts and PSF jitter injected during training. It receives the same GPU-hour budget as our pipeline's training and inference combined.

Two ablations isolate our ingredients.

  1. Kernel ablation. Replace the bounded catalog embedding with an unbounded metric: Hungarian-matched Euclidean distance on position and linear flux, with a fixed penalty for unmatched sources. This tests whether saturation matters.
  2. Aggregation ablation. Replace the tournament with the plain mean of group embeddings (equivalent to $K=1$ in effect) and with a MONK-style RKHS median. This tests whether the majority vote rather than splitting alone does the work.

Beating the clipped coadd means two things. Detection F1 and median flux residual must be significantly better under exposure-level corruption, especially PSF-error corruption. And on clean data the pipeline must stay within the noise of the mean-coadd baseline.

Why not just…?

Why not just sigma-clip the coadd? For pixel-sharp artifacts like cosmic rays, this is a real threat, and we expect it to tie us. Our hypothesis is that clipping cannot catch corruption that is not a pixel outlier. A visit with a misestimated PSF, or a faint broad ghost, shifts many pixels by amounts inside the clipping band, yet still changes how a blend is split. The corruption-type breakdown below settles this. If clipping matches us on PSF errors too, the catalog-level vote is unnecessary and we will say so.

Why not just train BLISS with augmented artifacts? Augmentation covers the artifact families someone thought to simulate. The file notes that forward-KL training averages over simulator assumptions, so performance on unanticipated defects is unknown. We test this directly: train with augmentation on some artifact families and evaluate on a held-out family. Augmentation and our vote also compose, so we report their combination as well.

Why not just use a heavy-tailed or bounded per-pixel likelihood, as RNPE or KSD-Bayes do? Per-pixel bounded losses cap the influence of each pixel. They do not cap a contiguous region of many mildly wrong pixels, whose bounded contributions add up. RNPE also needs test-time MCMC, which is incompatible with survey scale. We include a Student-t pixel-likelihood refit as an extra comparison on the PSF-error setting.

Why not just apply Minimum Distance Summaries? It requires a low-dimensional summary vector, and a transdimensional catalog has no fixed-length summary. Any forced summary, such as counts and total flux, discards the blend structure we care about.

Proposed Experiments

Simulation. We would extend the BLISS GalSim/CatSim LSST simulations to multi-epoch form: the same true catalog, rendered through per-visit PSFs, noise and sky levels. We then inject corruption into a controlled fraction of visits, from 0% to 40%. The corruption families are cosmic rays, satellite trails, scattered-light ghosts, PSF misestimation (the wrong PSF supplied to the encoder) and moving transients. Metrics follow the BLISS evaluation: detection precision, recall and F1; median flux residual binned by blendedness; star/galaxy F1; and coverage of the source-count posterior.

The decisive figure is a breakdown curve for each method: metric versus corrupted-visit fraction, for each corruption family. The prediction is falsifiable. Our method should stay flat up to roughly the median-of-means breakdown fraction, while the mean coadd degrades from the first bad visit. Our method should beat clipping on PSF-error and ghost corruption and tie it on cosmic rays.

A clean-data run with no corruption measures the cost of the vote. If the full-depth refit does its job, this cost should be small.

Independence check. We would repeat the simulation with a shared, slightly wrong PSF model across all visits. This is static misspecification, which no vote over exposures can fix. It is a negative control that delimits the claim.

Real data. SDSS Stripe 82 was imaged repeatedly, so it provides real multi-epoch exposures. We would rerun the frame used by Scalable Bayesian Inference for Detection and Deblending in Astronomical Images, scoring against the same SDSS COADD and DECaLS verification catalogs. The comparison is our pipeline against the mean-coadd and clipped-coadd BLISS on the 571/889 detection count and the 87% classification accuracy. We would also inspect which exposure groups the tournament drops in each region, and whether those drops coincide with logged bad seeing or known artifacts. That correspondence is evidence that the vote detects real defects rather than noise.