DifFace: Blind Face Restoration With Diffused Error Contraction

Zongsheng Yue, Chen Change Loy · DOI

TL;DR

DifFace is a novel blind face restoration method that leverages the rich generative priors of a pre-trained diffusion model without requiring any retraining or complex loss configurations. By predicting an intermediate noisy state rather than the final clean image, it introduces a unique "error contraction" property that significantly boosts robustness against severe, real-world image corruption.

What Problem Does This Paper Address?

Blind Face Restoration (BFR) aims to recover high-quality (HQ) face images from low-quality (LQ) inputs marred by unknown and complex degradations like blur, noise, and downsampling.

Traditional deep learning approaches typically train a neural network to map LQ images directly to HQ images. To make the outputs look realistic, researchers rely on a complex cocktail of loss functions—such as $L_1$/$L_2$ pixel loss, adversarial loss, and perceptual loss—which require tedious hyperparameter tuning to balance. More critically, these networks are highly sensitive to "degradation mismatch": if a real-world image suffers from a type of corruption not included in the synthetic training data, the restoration quality degrades drastically.

Methods

Instead of learning a direct mapping from LQ to HQ space, DifFace splits the problem into two distinct phases by utilizing a frozen, pre-trained diffusion model as an unsupervised image prior:

  1. The Diffused Estimator: A standard restoration backbone (such as SRCNN or SwinIR) is trained using only a simple $L_1$ loss on synthetic data. Given an LQ image ($y_0$), it predicts a coarse initial guess of the clean image.
  2. Transition to an Intermediate State: This initial guess is used to construct a transition distribution, allowing the method to sample an intermediate, slightly noisy state ($x_N$) of the diffusion process.
  3. Recursive Diffusion Refinement: Starting from this intermediate state $x_N$, the frozen pre-trained diffusion model runs its reverse Markov chain sampling steps to recursively clean and reconstruct the final high-quality face ($x_0$).
Overview of the DifFace inference pipeline

The authors also demonstrate that this framework can be easily extended to non-blind restoration tasks, such as face inpainting, by introducing a closed-form optimization step during the reverse diffusion process to enforce data consistency.

Datasets

  • Training: The diffused estimator and the diffusion prior were trained using the FFHQ dataset, which consists of 70,000 high-quality face images. Synthetic degradations (blur, noise, downsampling, JPEG compression) were applied to generate LQ pairs for the estimator.
  • Evaluation:
  • CelebA-Test: A synthetic testing dataset containing 4,000 high-quality images from CelebA-HQ degraded using known parameters.
  • Real-World Datasets: To test robustness against authentic, unknown corruptions, the authors evaluated on LFW (1,711 mildly degraded images), WebPhoto (407 internet-crawled images), and WIDER (970 heavily degraded images).

Key Insights and Ideas

1. The Power of Error Contraction

The core mathematical breakthrough of DifFace is exploiting the "error contraction" property inherent to diffusion models. In a standard diffusion process, data is repeatedly re-scaled by a factor of less than 1 ($\sqrt{\alpha_N}$) as noise is added. DifFace proves that this scaling factor also shrinks the prediction error of the initial network. By tasking the network with predicting a noisy intermediate state ($x_N$) rather than the final clean image ($x_0$), the network's inherent prediction errors are compressed, making the overall pipeline highly resilient to severe, out-of-distribution degradations.

Comparison showing how DifFace bypasses direct prediction to contract errors

2. Tuning the Realism-Fidelity Trade-off

The choice of the starting timestep $N$ acts as a knob to balance fidelity (staying true to the input image) and realism (generating sharp, believable details). If $N$ is too large, the image becomes too noisy, and the diffusion model creates a realistic face that may lose the original person's identity. If $N$ is too small, the error contraction effect diminishes. The authors discovered that $N=400$ (out of 1000 total diffusion steps) provides the optimal balance.

Visual results showing the effect of different starting timesteps (N)

3. Pluralistic Predictions

Unlike deterministic networks that can only produce a single output, DifFace possesses a "pluralistic" property. Because it relies on a generative diffusion model, changing the random seed allows it to generate multiple diverse and highly plausible variations of a face from a single heavily corrupted input.

Key Results

  • Synthetic Performance: On CelebA-Test, DifFace achieved state-of-the-art or second-best performance across multiple metrics, notably securing the best Landmark Distance (LMD) score of 6.06 and a superior Fréchet Inception Distance (FID-G) of 20.29, outperforming competitive GAN-based models like CodeFormer and VQFR.
  • Real-World Robustness: On the severely degraded WIDER dataset, DifFace achieved the best FID score (37.52), demonstrating its superior ability to handle real-world, complex corruptions gracefully.
  • Application Versatility: DifFace achieved highly competitive, visually coherent results on face inpainting and super-resolution tasks without requiring task-specific adversarial retraining.
Visual comparisons of DifFace against other state-of-the-art methods on face restoration and inpainting

Limitations and Future Work

The primary limitation of DifFace is its inference efficiency. Because it inherits the iterative sampling process of diffusion models, it is significantly slower than feed-forward CNN or GAN architectures. Even when accelerated using a DDIM sampler to 100 steps, DifFace takes approximately 4.32 seconds to restore a $512 \times 512$ image on an NVIDIA Tesla V100, compared to CodeFormer's blazing-fast 0.08 seconds.

The authors note that exploring more advanced diffusion acceleration techniques to bridge this computational gap is a key direction for future research.

Summary updated

BibTeX
@article{yue2024difface,
  author = {Zongsheng Yue and Chen Change Loy},
  title = {{DifFace: Blind Face Restoration With Diffused Error Contraction}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2024},
  doi = {10.1109/tpami.2024.3432651},
}
Figure