Skip to main content
QUICK REVIEW

[Paper Review] Detecting Overfitting of Deep Generative Networks via Latent Recovery

R. L. Webster, Julien Rabin|arXiv (Cornell University)|Jan 9, 2019
Generative Adversarial Networks and Image SynthesisComputer Science33 references12 citations
TL;DR

This paper proposes a latent recovery method to detect overfitting in deep generative models by optimizing for the nearest latent code that reconstructs a given image. Using LBFGS with Euclidean or perceptual losses, it shows that successful recovery indicates memorization; models like GLO and CGAN show no overfitting with sufficient data, while failure to recover generated images suggests complex, non-trivial latent spaces with local minima.

ABSTRACT

State of the art deep generative networks are capable of producing images with such incredible realism that they can be suspected of memorizing training images. It is why it is not uncommon to include visualizations of training set nearest neighbors, to suggest generated images are not simply memorized. We demonstrate this is not sufficient and motivates the need to study memorization/overfitting of deep generators with more scrutiny. This paper addresses this question by i) showing how simple losses are highly effective at reconstructing images for deep generators ii) analyzing the statistics of reconstruction errors when reconstructing training and validation images, which is the standard way to analyze overfitting in machine learning. Using this methodology, this paper shows that overfitting is not detectable in the pure GAN models proposed in the literature, in contrast with those using hybrid adversarial losses, which are amongst the most widely applied generative methods. The paper also shows that standard GAN evaluation metrics fail to capture memorization for some deep generators. Finally, the paper also shows how off-the-shelf GAN generators can be successfully applied to face inpainting and face super-resolution using the proposed reconstruction method, without hybrid adversarial losses.

Motivation & Objective

  • To detect overfitting in deep generative models such as GANs and VAEs.
  • To develop a reliable method for identifying memorization by recovering latent codes from generated or real images.
  • To evaluate the stability and convergence of latent recovery across different optimization algorithms and loss functions.
  • To analyze whether local overfitting occurs in image patches, such as eyes and mouths.
  • To quantify recovery success rates and failure modes, especially for architectures like MESCH with high failure rates.

Proposed method

  • Reconstruct target images by optimizing a latent code z using LBFGS to minimize the objective loss ||G(z) - y||², where y is the target image.
  • Use a masking operator φ to isolate local image regions (e.g., eyes, mouths) for patch-level recovery analysis.
  • Compare recovery performance across different loss functions: L2 (Euclidean), L1 (Manhattan), and VGG-based perceptual loss.
  • Apply thresholding (MSE < 0.025 for generated images, < 0.1 for real images) to define successful recovery.
  • Use convergence curves of median recovery error (MRE) over 100 iterations to compare optimization stability across LBFGS, SGD, and Adam.
  • Restart optimization 10 times per image to assess failure due to poor initialization, especially for unstable architectures like MESCH.
Figure 1: Visual results on training images recovery with a masking operator on right eyes (using LBFGS and Euclidean objective loss, and PGGAN generator). First row: target (real) images $y_{i}$ . First column: initialization. Second column: optimization after 100 iterations. Recovery is more consi
Figure 1: Visual results on training images recovery with a masking operator on right eyes (using LBFGS and Euclidean objective loss, and PGGAN generator). First row: target (real) images $y_{i}$ . First column: initialization. Second column: optimization after 100 iterations. Recovery is more consi

Experimental results

Research questions

  • RQ1Can latent recovery detect memorization in deep generative models like DCGAN, GLO, and CGAN on MNIST and CIFAR-10?
  • RQ2Does overfitting occur locally in image patches (e.g., eyes, mouths) even when global overfitting is absent?
  • RQ3How do different loss functions (L2, L1, perceptual) affect the stability and convergence of latent recovery?
  • RQ4Why do some models, such as PGGAN on LSUN Bedroom, fail to recover their own generated images?
  • RQ5To what extent do poor initializations contribute to recovery failure, and can restarts mitigate this?

Key findings

  • On MNIST and CIFAR-10, GLO and CGAN models show no detectable memorization (KS p-value = 0.00e+00 for GLO-1024), indicating no overfitting with sufficient data.
  • Local recovery of eye and mouth patches using PGGAN shows KS p-values of 0.0545 and 0.6918, suggesting minimal local overfitting.
  • Perceptual loss (VGG-19) hinders optimization stability in high-quality generators, leading to slower convergence and worse recovery than L2 loss.
  • MESCH generators have low recovery success (68%) but improve dramatically to 98% with 10 random restarts, indicating failure is due to initialization, not model incapacity.
  • LBFGS converges significantly faster than SGD and Adam, achieving MRE < 0.024 in under 50 iterations for most cases.
  • Failure to recover generated images (e.g., PGGAN on LSUN Bedroom) suggests complex latent manifolds with many local minima, not just optimization issues.
(a) Eye patch recovery error.
(a) Eye patch recovery error.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.