TL;DR
Diffusion models, while powerful for image generation, can amplify biases present in their training data. This paper reveals that the sampling process itself, not just the trained model, significantly influences this bias amplification. By tuning sampling hyperparameters, we can either reduce or amplify biases without retraining the model, offering a new avenue for debiasing.
What Problem Does This Paper Address?
Diffusion models have become a cornerstone of generative AI, excelling in tasks like image synthesis. However, a critical issue is their tendency to not only replicate but also amplify biases found in their training datasets. This bias amplification is particularly concerning for demographic attributes like gender and skin color, but can affect any spurious correlation. While previous research has focused on mitigating bias by retraining or fine-tuning the diffusion models themselves, this paper addresses a crucial, underexplored aspect: the role of the sampling procedure and its hyperparameters in this bias amplification phenomenon. The authors argue that bias amplification might not be an inherent property of the trained model alone, but rather an adaptable behavior influenced by how we extract samples from the model.
Methods
The core of this work lies in systematically investigating how different sampling strategies and their associated hyperparameters affect bias amplification in diffusion models. The authors formalize the sampling process, identifying key elements that can lead the model to deviate from a deterministic trajectory. They hypothesize that these deviations can lead to the generation of rarer samples, potentially influencing bias.
Their methodology involves:
- Defining Bias: They adopt a standard definition of bias, focusing on a "bias attribute" (e.g., gender) spuriously correlated with a target attribute (e.g., profession) in the data. They quantify bias using the proportion of "bias-aligned" samples (where the target attribute aligns with the bias attribute) generated by the model, denoted as $p_{model}$.
- Categorizing Hyperparameters: They group sampling hyperparameters into three categories:
- Conditioning Strength: Primarily the guidance scale ($w$) in classifier-free guidance (CFG).
- Computational Cost: Number of integration steps ($n_{steps}$) and the choice of integration scheme (e.g., Euler, Heun).
- Amount of Stochasticity: Parameters controlling the injection of fresh noise, such as the time window ($[S_{tmin}, S_{tmax}]$) and the variance of the noise ($S_{churn}$ or $\eta$).
- Empirical Validation: They conduct controlled studies using various diffusion models (DDPM, EDM, Stable Diffusion) and datasets, systematically varying these hyperparameters to observe their impact on $p_{model}$.
Datasets
The paper utilizes a combination of established and specialized datasets to evaluate their findings:
- Biased MNIST: A variant of MNIST designed to test debiasing methods, introducing bias by associating specific background colors with digit classes.
- Multi-Color MNIST: Another MNIST variant with biases related to background colors.
- BFFHQ: A dataset of face images that introduces demographic biases, specifically correlating age labels with gender (e.g., "young" images are predominantly female, "old" images predominantly male).
- LAION-5B: A large-scale dataset of image-caption pairs collected from the web, used to study gender bias in the context of occupations like "lawyer." For LAION-5B, the focus is on observing changes in bias with different sampling hyperparameters due to the complexity of estimating a baseline bias.
Key Insights and Ideas
- Sampling is a Key Lever for Bias: The most significant insight is that bias amplification is not solely determined by the trained model but is heavily influenced by the sampling process. This opens up a new dimension for bias mitigation.
- Hyperparameters Matter Dramatically: Even with a fixed, trained model, adjusting sampling hyperparameters can lead to substantial changes in bias amplification – sometimes reducing it, sometimes increasing it.
- Stochasticity's Role: The amount and timing of stochasticity (injecting fresh noise) during sampling play a crucial role. Introducing noise can lead the sampler to "jump" between trajectories, potentially landing on more biased ones.
- Guidance Scale Trade-off: Higher guidance scales in CFG tend to increase bias amplification, aligning samples more closely with class averages (which often encode biases). Conversely, lower guidance scales can sometimes reduce bias.
- Numerical Errors as a Debiaser: Surprisingly, numerical errors introduced by using fewer integration steps in the sampler can sometimes lead to bias reduction, as they might steer samples away from the learned biased distribution initially.
Key Results
- BFFHQ: For the BFFHQ dataset, changing the number of diffusion timesteps ($T$) did not significantly amplify bias. However, the guidance scale ($w$) showed a clear positive correlation with bias amplification ($p_{model} > p_{dataset}$ at higher $w$). At lower $w$ and fewer timesteps, $p_{model}$ could fall below $p_{dataset}$, indicating bias reduction.
- Biased MNIST: Varying the number of sampling steps ($n_{steps}$) showed a pattern of initial bias reduction followed by amplification as $n_{steps}$ increased.
- Stable Diffusion: For Stable Diffusion, $p_{model}$ varied significantly with $n_{steps}$, a previously unexplored phenomenon.
- Time Window and Noise Variance: The specific time window for injecting fresh noise had a noticeable impact, and increasing the variance of this noise ($S_{churn}$) generally led to a positive correlation with bias amplification.
Limitations and Future Work
- Interactions of Hyperparameters: The authors acknowledge that their experiments often involved fixing most hyperparameters while varying one. They suggest that higher-order interactions between multiple hyperparameters could be missed and warrant further investigation.
- "Bias Amplification Paradox": The paper touches upon the idea that what appears as bias amplification might sometimes be explained by distributional shifts between training and inference prompts, as seen in some prior work.
- Theoretical Interpretation: While they provide empirical evidence, a deeper theoretical understanding of why these sampling choices lead to bias amplification or reduction is still needed.
- Debiasing Strategy Development: The observed ability to reduce bias through sampling suggests a promising avenue for developing training-free debiasing strategies. However, they note that while sampling can reduce bias, it may not fully eradicate it. Future work could focus on designing such strategies and exploring their theoretical underpinnings.
Summary updated