Tackling the Problem of Distributional Shifts: Correcting Misspecified, High-dimensional Data-driven Priors for Inverse Problems

Gabriel Missael Barco, Alexandre Adam, Connor Stone, Yashar Hezaveh, Laurence Perreault-Levasseur

TL;DR

This paper introduces an iterative method to correct "misspecified" or biased data-driven priors used in Bayesian inverse problems. By repeatedly generating posterior samples from new observations and retraining the prior model on them, the method successfully shifts the prior toward the true underlying data distribution. This approach significantly reduces reconstruction bias in complex, high-dimensional scientific tasks like strong gravitational lensing.

What Problem Does This Paper Address?

In inverse problems—such as reconstructing a clear image of a distant galaxy from a noisy, distorted telescope observation—Bayesian inference relies heavily on a "prior" distribution to guide the reconstruction. Modern machine learning allows us to use deep generative models (like score-based diffusion models) as highly expressive, data-driven priors.

However, researchers rarely have perfect, noise-free datasets of the target population to train these models. Instead, they must rely on simulations or imperfect surrogate data. If this training data suffers from a "distributional shift" (for example, training a model on smooth elliptical galaxies when the true target population consists of detailed spiral galaxies), the resulting prior becomes misspecified. This misspecified prior introduces strong, unquantifiable biases into the final reconstructions, severely limiting the real-world reliability of generative models in precision science.

Impact of a misspecified prior on strong gravitational lensing source reconstruction.

Methods

The authors propose an iterative framework inspired by Generalized Expectation-Maximization (EM) and empirical Bayes to update an initially biased prior using only noisy, partial observations.

  1. Score-Based Models (SBMs) as Priors: The framework leverages SBMs, which learn the score function (the gradient of the log-probability density) of a distribution.
  2. Iterative Prior Updating: Starting with an initial misspecified prior $p_{\theta_0}(x)$, the algorithm processes successive batches of new observations $\{y_i\}$. For each batch, it generates posterior samples using the current prior and an analytical approximation of the likelihood.
  3. Retraining: These posterior samples are aggregated to form a new "proposal" dataset, which is then used to retrain the SBM from scratch, yielding an updated prior $p_{\theta_{\alpha+1}}(x)$.

The authors mathematically prove an ascent property, demonstrating that each iterative update incrementally increases (or maintains) the expected log-evidence of the data, guiding the prior toward the true marginal likelihood.

Graphical model of the hierarchical inference problem.

Datasets

The method was evaluated on two distinct tasks:

  1. MNIST: A toy problem used to test "mode mismatch." The initial prior was trained on a subset of handwritten digits excluding '1' and '4', while the true target distribution excluded '1' and '6'.
  2. Galaxy Images: A high-dimensional scientific application.
  3. True Target Distribution: A synthetic dataset of 10,000 noise-free, high-resolution blue spiral galaxies from the SKIRT TNG dataset.
  4. Initial Misspecified Prior: A dataset of 10,459 real, noisy, and blurred red elliptical galaxies sourced from the DESI Legacy Imaging Surveys DR10.

Key Insights and Ideas

  • Forgetting is fast, learning is slow: The algorithm can discard incorrect features or modes extremely quickly (often in a single update iteration). However, learning entirely new features that were completely absent from the initial prior requires multiple iterations.
  • Structure recovery from noise: Remarkably, even though the model only ever sees highly distorted, noisy observations (lensed images), it successfully infers and reconstructs underlying high-frequency structures (like spiral arms, rings, and satellite galaxies) that were completely missing from its initial training data.
  • Evidence Maximization: In the large-data limit, the iterative process converges to a stationary distribution that shares the same marginal likelihood as the true data-generating process, meaning the model effectively "forgets" its initial simulation artifacts.

Key Results

  • MNIST Mode Correction: The model completely forgot the incorrect digit '6' after the very first update. Over four iterations, it successfully learned the missing digit '4', initially reconstructing it as a morphologically similar '9' before refining its shape.
  • Galaxy Morphology Shift: Over 10 iterations, the prior successfully transitioned from featureless elliptical profiles to complex spiral structures, recovering features that were completely missed by the misspecified prior.
  • Quantitative Convergence: The PQMass metric ($\chi^2_{PQM}$), which measures the distance between generative distributions, improved significantly across iterations. Furthermore, the axis ratio ($q$) of the reconstructed galaxies converged closely toward the true ground-truth distribution, demonstrating a massive reduction in reconstruction bias.
Evolution of posterior samples correcting the missing digit 4 over multiple updates.

Limitations and Future Work

  • High Computational Cost: Retraining score-based models from scratch at every single iteration is incredibly resource-intensive (taking roughly 20 hours per galaxy SBM on an A100 GPU). The authors suggest exploring parameter-efficient fine-tuning techniques, such as LoRA (Low-Rank Adaptation), to alleviate this burden.
  • Assumption of a Known Forward Model: The current study assumes the physical forward model (the lensing transformation) is perfectly known. In real-world applications, the lens parameters are unknown and must be sampled jointly with the source image—a problem known as "blind inversion" which the authors plan to explore in future work.

Summary updated

BibTeX
@article{barco2025tackling,
  author = {Gabriel Missael Barco and Alexandre Adam and Connor Stone and Yashar Hezaveh and Laurence Perreault-Levasseur},
  title = {{Tackling the Problem of Distributional Shifts: Correcting Misspecified, High-dimensional Data-driven Priors for Inverse Problems}},
  journal = {The Astrophysical Journal},
  year = {2025},
  url = {https://openreview.net/forum?id=gKase6JIrB},
}
Figure