TL;DR
EigDiff is a novel dataset distillation method that slashes the training data needed for fine-tuning diffusion models by up to 14x with negligible performance loss. By performing Principal Component Analysis (PCA) in the CLIP latent space, it identifies "eigensamples" that capture the most important features and diversity of a dataset, accelerating the data selection process by up to 1607x compared to traditional methods.
What Problem Does This Paper Address?
Training and fine-tuning state-of-the-art diffusion models (like Stable Diffusion) is a massive computational headache. While researchers have made great strides in "inference distillation"—reducing the number of steps needed to generate an image—the training phase remains tethered to gargantuan datasets.
The authors argue that these datasets are riddled with redundancy. Current fine-tuning techniques, such as Direct Preference Optimization (DPO) or Supervised Fine-Tuning (SFT), often process hundreds of thousands of images, many of which contribute very little new information to the model. Existing data selection methods (like K-Means++ or Facility Location) are often too slow to be practical for web-scale data or require manual labeling. EigDiff aims to automate this selection, making high-quality fine-tuning accessible even with limited academic resources.
Methods
The core idea behind EigDiff is inspired by the classic "Eigenfaces" approach from the 90s, which used PCA to find the most important features of human faces. However, raw pixels are sensitive to lighting and shifts, so EigDiff moves the operation into the CLIP latent space.
The pipeline follows these steps:
- Latent Encoding: Images are passed through a frozen EVA-CLIP encoder to get high-level semantic embeddings.
- PCA in CLIP Space: The authors perform PCA on these embeddings to find the principal components (eigenvectors) that describe the dominant modes of variation in the data.
- Two-Stage Selection:
- Stage 1 (Exemplars): The algorithm selects images whose embeddings align most strongly with the top eigenvectors. These are the "prototypical" samples of the dataset.
- Stage 2 (Diversity): To prevent the model from becoming too narrow, they use stratified sampling. They divide the similarity scores into bins and pick samples from across the entire range, ensuring the subset retains the internal diversity of the original data.
- Fine-Tuning: The model is then fine-tuned (using LoRA for efficiency) on this significantly smaller, curated subset.
Datasets
The authors evaluated EigDiff across four diverse datasets:
- Pick-a-Pic v1 & HPDv2: Large-scale datasets of human preferences used for aligning models with what people find aesthetically pleasing.
- Rapidata: A human style preference dataset.
- ROCO Radiology: A specialized medical dataset used to test "out-of-domain" adaptation, where a general-purpose model is taught to generate medical radiographs.
Key Insights and Ideas
- Latent PCA is Robust: While PCA on raw pixels fails on natural images due to affine transformations (like a slight rotation or shift), PCA on CLIP embeddings captures semantic "eigen-concepts" that are much more stable and useful for selection.
- Redundancy is a Bottleneck, Not a Benefit: The results suggest that after a certain point, more data doesn't help; it just costs more. EigDiff identifies the "photogenic needles in the haystack."
- Mitigating Catastrophic Forgetting: Interestingly, in some Supervised Fine-Tuning (SFT) scenarios, EigDiff outperformed full-scale training. The authors suggest that training on the full (and potentially lower-quality) dataset for many steps causes the model to "drift" too far from its strong pre-trained weights. A smaller, higher-quality subset keeps the model better anchored.
Key Results
The quantitative gains are striking:
- Data Reduction: Training sets were reduced by up to 14x.
- Training Speedup: Total fine-tuning time was reduced by 5.87x to 13.95x.
- Selection Speedup: Compared to other coreset selection methods like Facility Location, EigDiff’s PCA-based approach is between 3.1x and 1607x faster.
- Performance: Despite using a fraction of the data, EigDiff matched or exceeded the "PickScore" (a metric for human preference) of models trained on the full dataset in most tests.
As shown in Figure 2, while EigDiff starts slightly behind the full-scale baseline, it eventually overtakes it, achieving higher performance with fewer total optimization steps.
Limitations and Future Work
The primary limitation acknowledged by the authors is the reliance on the embedding geometry of the encoder. If the pre-trained CLIP model has biases or "blind spots" regarding certain types of images, the PCA selection will inherit those flaws.
Future work could explore using different encoders or even ensembles of encoders to guide the selection. Additionally, the authors suggest that this method could be extended beyond images to other modalities, such as video or 3D data, where the cost of training is even more prohibitive.
Summary updated