MATH · IN · MODELS

A real Stable Diffusion v1 model's internal activations linearly encode continuous scene depth and a salient-object/background distinction, appearing early in denoising and causally controlling the generated image

measured in 1 paper

- Chen, Viégas & Wattenberg train linear probes (a linear classifier for salient-object vs. background and a linear regressor for relative depth, fit separately per self-attention layer and denoising step) on the activations of Stable Diffusion v1 (initialized from the v1.4 checkpoint, "trained without explicit depth information") using 617 self-generated images labelled by off-the-shelf TRACER and MiDaS models (246 train, 371 test). [chen-etal-2023-beyond-surface-statistics] - At the last denoising step the probes reach an average Dice of 0.85 (salient object) and RMSE of 0.47 (depth) on decoder-side self-attention, versus 0.30 and 0.95 on a randomized LDM; the probe performance rises sharply over the first 5 of 15 denoising steps, while external models run on the decoded noisy images fail until much later (MiDaS only at step 11). [chen-etal-2023-beyond-surface-statistics] - In intervention experiments the activations themselves are updated by gradient steps through the frozen probe so that its prediction matches a translated salient-object or depth label; the resulting images match the modified labels better than a null baseline (median Dice 0.69 vs. 0.46; median RMSE 0.63 vs. 1.02), which the authors take as evidence that the representations "play a causal role". Labels are pseudo-labels from other models and the probes are linear classifiers/regressors rather than a separately characterized direction. [chen-etal-2023-beyond-surface-statistics]

Context

linear depth direction, salient-object/background direction, early-denoising emergence

Method

Papers

Beyond Surface Statistics: Scene Representations in a Latent Diffusion Model — Chen, Yida, Viégas, Fernanda, Wattenberg, Martin2023 · arXiv:2306.05720