Generative Models: What Do They Know? Do They Know Things? Let's Find Out!

Xiaodan Du, Nicholas Kolkin, Greg Shakhnarovich, Anand Bhattad · Submission to ICLR 2025 · Rejected

TL;DR

Generative models (GANs, autoregressive transformers, and diffusion networks) inherently learn physical scene intrinsics—such as depth, surface normals, albedo, and shading—purely as a byproduct of image synthesis training. By applying lightweight Low-Rank Adaptation (LoRA) to internal attention and affine layers, these intrinsic properties can be extracted using the model's original image decoder with as few as 250 labeled samples and fewer than 0.2% new parameters. Furthermore, higher generation quality directly correlates with more accurate recovered scene geometry and reflectance.

What Problem Does This Paper Address?

While state-of-the-art generative models produce remarkably realistic scenes, a foundational question remains: do these models actually acquire an internal understanding of 3D geometry and physical illumination, or are they merely assembling statistical textures?

Previous attempts to answer this have either been model-specific (e.g., latent space probing restricted to StyleGAN), required training separate readout heads, or fine-tuned the entire network on downstream tasks. Full fine-tuning alters the base network so severely that it becomes impossible to tell whether intrinsic knowledge was innate or simply learned during fine-tuning. Meanwhile, single-layer linear probing performs poorly because intrinsic representations are distributed throughout the network. The authors seek a universal, non-destructive probe to test whether intrinsic knowledge is ubiquitous across diverse generative architectures.

Methods

The authors introduce a model-agnostic extraction framework based on Low-Rank Adaptation (LoRA):

  • Zero New Decoders: Instead of appending task-specific prediction heads, the model's native image-generation output head is reused to predict an RGB-formatted intrinsic map (e.g., a 3-channel normal or albedo map).
  • Targeted Architecture Hooks:
  • Diffusion Models (Stable Diffusion UNet): LoRA adapters are injected into cross-attention and self-attention layers, prompted with text such as "surface normal" or "depth".
  • GANs (StyleGAN-v2, StyleGAN-XL): LoRA modules adapt the affine layers mapping style vectors from $\mathcal{W}$-space to $\mathcal{S}$-space.
  • Autoregressive Models (VQGAN): LoRA adapts the convolutional attention layers within the decoder.
  • Pseudo-Ground Truth Supervision: Because true ground truth for albedo and shading is scarce, the authors train the adapters using pseudo-ground truth generated by off-the-shelf experts: Omnidata-v2 (surface normals), ZoeDepth (depth), and Paradigms (albedo/shading).
  • Multi-Step Diffusion Adaptation ($\text{SD}_{\text{AUG}}$): While a single-step SD-UNet acts directly as a dense feedforward predictor, naive multi-step diffusion introduces spatial misalignments and color drift. To fix this, the authors concatenate the input image's latent encoding to the noise (following InstructPix2Pix) and leverage SD v2-1’s $v$-prediction objective with a Zero-SNR schedule to eliminate color shifts.

Datasets

The study evaluates both synthetic and real-world image domains:

  • FFHQ: Used to evaluate face generation and intrinsic recovery across VQGAN, StyleGAN-v2, and StyleGAN-XL.
  • LSUN Bedrooms: Used for indoor scene intrinsic evaluation on StyleGAN-v2.
  • ImageNet: Used to test StyleGAN-XL on diverse object classes.
  • DIODE: Real-world indoor/outdoor dense depth and normal dataset, used to evaluate zero-shot intrinsic extraction on real photographic inputs.
  • SDXL Synthetic Generations: $1024 \times 1024$ high-resolution synthetic images used to test out-of-distribution multi-step generalization.

(No new benchmark datasets were introduced.)

Key Insights and Ideas

  • Intrinsic Knowledge is Ubiquitous: Physical scene characteristics are not unique to diffusion models; GANs and autoregressive models also construct internal representations of normals, depth, albedo, and lighting.
  • Generative Quality Drives Physical Accuracy: Across model families, FID scores strongly correlate with intrinsic quality (e.g., StyleGAN-XL > StyleGAN-v2 > VQGAN on FFHQ). Similarly, moving from Stable Diffusion v1-1 to v1-5 steadily improves intrinsic fidelity. A control experiment with a randomly initialized UNet completely fails, confirming that intrinsics stem from the generative pre-training rather than the LoRA adapters.
  • Extreme Parameter & Data Efficiency: Intrinsics can be unlocked with as few as $250$ labeled images, peaking in quality at around $4{,}000$ images. A rank-2 LoRA (adding just $0.04\%$ parameters to Stable Diffusion) yields credible maps, while rank-8 ($0.17\%–0.57\%$ parameters) reaches optimal performance.
  • Outperforming the Teacher: Remarkably, on the DIODE evaluation set, a single-step SD-UNet with LoRA surpassed the median normal error and depth RMSE of the very supervised teachers (Omnidata-v2 and ZoeDepth) used to produce its training targets.

Key Results

  • Real Image Evaluation (DIODE Surface Normals):
  • Supervised Teacher (Omnidata-v2): $18.90^\circ$ Mean Error, $13.36^\circ$ Median Error.
  • SD-UNet Single-Step (LoRA rank-8, 0.17% params): $20.31^\circ$ Mean Error, $12.54^\circ$ Median Error (outperforming teacher).
  • Depth RMSE: SD-UNet achieved $0.2046$, improving over ZoeDepth's $0.2693$.
  • Low-Data Comparison (DIODE 250-sample regime):
  • LoRA: $27.73^\circ$ Mean Normal Error.
  • Linear Probing: $29.10^\circ$.
  • Full Fine-Tuning: $34.40^\circ$.
  • Model Quality vs. Error (FFHQ Mean Normal Error):
  • VQGAN (FID 9.6): $19.97^\circ$
  • StyleGAN-v2 (FID 3.62): $16.93^\circ$
  • StyleGAN-XL (FID 2.19): $15.28^\circ$

Limitations and Future Work

  • Mechanistic Usage Remains Unclear: While generative models demonstrably possess this physical knowledge, it remains ambiguous exactly how internal layers query or enforce these representations during forward image generation.
  • Single-Step vs. Multi-Step Discrepancy: Although the multi-step model ($\text{SD}_{\text{AUG}}$) produces visually sharper high-frequency details, its quantitative metrics on DIODE still lag slightly behind the single-step feedforward UNet.
  • Need for Non-Parametric Extraction: Although LoRA requires minimal tuning and data, developing a truly parameter-free extraction technique remains an unsolved challenge.

Summary updated

BibTeX
@misc{du2023generative,
  author = {Xiaodan Du and Nicholas Kolkin and Greg Shakhnarovich and Anand Bhattad},
  title = {{Generative Models: What Do They Know? Do They Know Things? Let's Find Out!}},
  year = {2023},
  eprint = {2311.17137},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.17137},
}
Figure