[Paper Review] A Theoretical Justification for Image Inpainting using Denoising Diffusion Probabilistic Models
This paper provides the first theoretical justification for diffusion-based image inpainting using Denoising Diffusion Probabilistic Models (DDPMs), proving that a modified RePaint algorithm—RePaint+—achieves linear convergence to the true underlying image without retraining, even for unseen masks. It resolves a critical bias in RePaint caused by misalignment in the reverse process, enabling provably exact recovery of missing image regions via rectified drift and dispersion components.
We provide a theoretical justification for sample recovery using diffusion based image inpainting in a linear model setting. While most inpainting algorithms require retraining with each new mask, we prove that diffusion based inpainting generalizes well to unseen masks without retraining. We analyze a recently proposed popular diffusion based inpainting algorithm called RePaint (Lugmayr et al., 2022), and show that it has a bias due to misalignment that hampers sample recovery even in a two-state diffusion process. Motivated by our analysis, we propose a modified RePaint algorithm we call RePaint$^+$ that provably recovers the underlying true sample and enjoys a linear rate of convergence. It achieves this by rectifying the misalignment error present in drift and dispersion of the reverse process. To the best of our knowledge, this is the first linear convergence result for a diffusion based image inpainting algorithm.
Motivation & Objective
- To theoretically justify the empirical success of diffusion-based image inpainting using DDPMs in a linear model setting.
- To identify and analyze the bias in RePaint caused by misalignment in the reverse process, which hinders perfect sample recovery.
- To propose a modified algorithm, RePaint+, that corrects this misalignment and enables provable convergence to the true data distribution.
- To establish the first linear convergence rate for any diffusion-based inpainting algorithm, ensuring exact recovery without retraining for new masks.
- To demonstrate that the generative prior of DDPMs is sufficient for full reconstruction of missing image parts, even under unknown or unseen masks.
Proposed method
- Theoretical analysis of the RePaint algorithm in a linear model setting, focusing on the reverse SDE process and its drift and dispersion components.
- Identification of a misalignment error in RePaint's reverse process that causes systematic bias in the inpainted region, even when known regions match perfectly.
- Derivation of a modified reverse SDE in RePaint+ that rectifies the misalignment by adjusting the drift and dispersion terms using a corrected noise schedule.
- Proof that RePaint+ converges linearly to the true data sample, with convergence rate independent of the mask pattern.
- Use of a Gaussian prior and linear manifold assumption to model the data distribution, enabling analytical tractability and exact recovery under ideal conditions.
- Empirical validation using toy experiments in R² with 1000 samples, comparing RMSE of RePaint, RePaint+RevSDE, and RePaint+ under identical settings.
![Figure 1 : Example demonstrating the bias in RePaint [ LDRYTV22 ] . Starting from the Gaussian prior $\overleftarrow{{\bm{x}}_{1}}$ (green circles), reverse SDE as proposed by RePaint generates $\overleftarrow{{\bm{x}}_{0}}$ (brown circle) that matches with the true data $\overrightarrow{{\bm{x}}_{0](https://ar5iv.labs.arxiv.org/html/2302.01217/assets/x1.png)
Experimental results
Research questions
- RQ1Why does RePaint fail to recover the true image despite matching known regions, and what causes the systematic bias in the inpainted region?
- RQ2Can a modified RePaint algorithm achieve provable convergence to the true underlying image in a theoretical linear model?
- RQ3What is the convergence rate of the modified algorithm, and does it achieve linear convergence as claimed?
- RQ4How does misalignment in the reverse process's drift and dispersion components affect sample recovery in diffusion-based inpainting?
- RQ5Can the generative prior of DDPMs alone enable full reconstruction of missing image parts without retraining for new masks?
Key findings
- RePaint exhibits a significant bias in the inpainted region, with an RMSE of 22.97 in the toy experiment, despite perfect alignment in known coordinates.
- RePaint+ achieves near-perfect recovery with an RMSE of 3.28×10⁻⁸, demonstrating provable exact recovery in the theoretical setting.
- The proposed RePaint+ algorithm achieves linear convergence to the true data sample, marking the first such result for any diffusion-based inpainting method.
- Passing RePaint-generated samples through an additional reverse SDE step worsens recovery (RMSE = 27.61), confirming the presence of a persistent bias in the original algorithm.
- Theoretical analysis proves that the misalignment in drift and dispersion components is the root cause of the bias, and its correction enables exact recovery.
- Empirical results confirm that RePaint+ recovers the true sample within an ϵ-neighborhood for finite resampling steps, with convergence speed governed by the linear rate.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.