Can We Find Neurons that Cause Unrealistic Images in Deep Generative Networks?

Hwanil Choi, Wonjoon Chang, Jaesik Choi

Abstract

Even though Generative Adversarial Networks (GANs) have shown a remarkable ability to generate high-quality images, they do not always guarantee photorealism. Occasionally, they produce "artifacts"—defective or unnatural objects. This research investigates why these artifacts emerge by hypothesizing that rarely activated neurons and frequently activated neurons serve different purposes. By analyzing neuron statistics, we show that rarely activated neurons are primarily responsible for artifacts and failed diversity. We propose "Sequential Ablation," a method to repair these defects without high computational cost or manual labeling.

The Problem: Glitches in the Matrix

Generative Adversarial Networks (GANs) are the gold standard for creating hyper-realistic synthetic media. However, they are prone to producing artifacts: unnatural distortions like warped limbs, strange textures, or "blob" defects. Current solutions often rely on manual identification of problematic neurons or training secondary "artifact-detecting" networks. This study asks a more fundamental question: Is there an inherent statistical signature in the neurons that cause these failures?

Methodology: Activation Frequency Rate

The researchers introduced the Activation Frequency Rate ($R$) to categorize neurons. By passing 30,000 random latent codes through pre-trained models like StyleGAN2 or PGGAN, they measured how often each neuron "fires" (outputs a value > 0).

  1. Categorization: Neurons are divided into HR-neurons (High-rate, frequently active) and LR-neurons (Low-rate, rarely active).
  2. Sequential Ablation: To repair images, the authors zero out the activations of LR-neurons during generation. They discovered that artifacts are rooted in the early and middle layers of the generator, which govern spatial layout.
  3. Thresholding: A threshold of $R = 0.3$ was identified as the optimal point to suppress artifact-inducing units while preserving image integrity.

Key Insights: The Diversity-Artifact Trade-off

The study reveals a profound relationship between neuron frequency and image quality. HR-neurons form the "foundation" of the model, representing common structures like the basic layout of a face. In contrast, LR-neurons are responsible for rare features that provide dataset diversity. Because the network encounters these features less frequently during training, it is less "competent" at rendering them, which leads to artifacts.

Figure 3: Comparison of normal and artifact images. The heatmaps show neuron activity, while the chart illustrates that artifact images have a significantly higher number of activated LR-neurons (0-30% rate) compared to normal images.

As shown in the figure above, artifact-heavy images contain a significantly higher count of activated LR-neurons in the early layers. By suppressing these "unreliable" units, the model defaults to its more robust HR-neuron knowledge, effectively smoothing out defects in a zero-shot manner.

Results

The proposed Sequential Ablation method yielded significant quantitative and qualitative improvements:

  • Quantitative: In StyleGAN2 (FFHQ), applying ablation to layers 0, 1, and 3 improved the FID score from 48.9 to 29.6.
  • Fidelity vs. Recall: Images with the fewest active LR-neurons showed the highest precision (realism) but lower diversity. Conversely, images with many active LR-neurons were more diverse but suffered from lower precision due to artifacts.
  • Qualitative: The method successfully removed "cracks" on faces, fixed distorted hands, and eliminated unnatural background textures across various datasets including FFHQ, LSUN-Cat, and CelebA-HQ.

Conclusion

The distinction between frequently and rarely activated neurons provides a clear statistical path to identifying and fixing GAN artifacts. While LR-neurons are necessary for diversity, their unreliability in early layers is a primary source of visual defects. Sequential Ablation offers a computationally efficient, automated way to improve the reliability of generative models. Future work may focus on making these "rare" features more robust during the initial training phase.

Summary updated

BibTeX
@inproceedings{choi2022can,
  author = {Hwanil Choi and Wonjoon Chang and Jaesik Choi},
  title = {{Can We Find Neurons that Cause Unrealistic Images in Deep Generative Networks?}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  url = {https://openreview.net/forum?id=iDY2gNaQlaI},
}
Figure