DiffuLT: How to Make Diffusion Model Useful for Long-tail Recognition

Jie Shao, Ke Zhu, Hanxiao Zhang, Jianxin WuarXiv 2024 · DOI

Abstract

Long-tail recognition is a pervasive challenge in machine learning where datasets are dominated by a few "head" classes, leading to poor performance on rare "tail" classes. This paper introduces DiffuLT (Diffusion model for Long-Tail recognition), a novel data-centric pipeline that addresses this imbalance by training a diffusion model from scratch on the imbalanced dataset itself. By generating and filtering synthetic samples for underrepresented classes, DiffuLT creates a balanced "proxy" dataset that significantly enhances classification accuracy without the need for external data or pre-trained weights.

Introduction

In practical applications, data distributions are rarely uniform. Most datasets exhibit a "long-tail" distribution where a small number of classes have abundant samples, while the majority of classes are represented by only a few examples. Standard deep learning models tend to be biased toward the majority classes, which can be problematic in critical domains like medical imaging or security.

Traditional solutions include loss re-weighting or over-sampling. Recent advancements have explored using generative models like Stable Diffusion to synthesize tail samples; however, these often rely on massive external datasets, raising concerns about information leakage or applicability in sensitive environments. DiffuLT proposes a self-contained approach: balancing a long-tailed dataset using only the information inherent within it.

Conceptual overview of DiffuLT filling the distribution gap for tail classes by generating synthetic samples.

Methodology

The DiffuLT pipeline is structured into four primary stages to transform an imbalanced dataset into a balanced one:

  1. Initial Training: Two models are trained on the original imbalanced dataset: a standard classifier ($f_0$) and a Class-Balancing Diffusion Model (CBDM). The CBDM incorporates a specialized regularization term to ensure tail classes are not neglected during the generative training process.
  2. Sample Generation: The trained CBDM generates synthetic images for tail classes until a target population threshold is met for every class.
  3. Sample Filtering: To mitigate the impact of low-quality "hallucinations," the authors employ a filtering mechanism. The most effective metric, $d_3$, utilizes the initial classifier ($f_0$) to assign confidence scores to generated images, retaining only those with high confidence.
  4. Retraining: A final classifier ($f_\phi$) is trained on the augmented dataset (original + filtered synthetic). To balance the influence of real versus synthetic data, a Weighted Cross-Entropy (WCE) loss is used, assigning a lower weight ($\omega$) to generated samples.
The overall pipeline of DiffuLT, illustrating the flow from an imbalanced dataset through generation and filtering to a final balanced classifier.

Experimental Setup

DiffuLT was evaluated on several standard long-tail benchmarks:

  • CIFAR10-LT & CIFAR100-LT: Variants of CIFAR datasets with controlled imbalance ratios.
  • ImageNet-LT: A large-scale benchmark with 1,000 classes and over 115,000 images.

Key Insights

  • The "Lecturer" Effect: The diffusion model effectively transfers structural knowledge from well-represented head classes to tail classes during generation, acting as a "lecturer" that teaches the model about general image features.
  • Generative Quality Correlation: There is a direct link between the Fréchet Inception Distance (FID) of the diffusion model and final classification accuracy; higher quality generation yields better downstream performance.
  • The Necessity of Filtering: Filtering is crucial for removing noisy synthetic samples that could otherwise degrade performance. The "Filter Classifier" ensures that only high-fidelity, class-relevant images are used for training.
  • Internal Information Sufficiency: By training from scratch, DiffuLT demonstrates that the information within a long-tailed dataset is sufficient for self-balancing, ensuring fairness and generalization without external dependencies.

Results

DiffuLT achieves state-of-the-art (SOTA) performance across benchmarks:

  • CIFAR100-LT: Achieved 50.7% accuracy at an imbalance ratio of 100, a significant improvement over previous methods.
  • ImageNet-LT: Reached 56.2% overall accuracy using a ResNet-50 backbone.
  • Tail Class Gains: On ImageNet-LT, accuracy for "Few-shot" classes improved from a baseline of 5.8% to 39.2%.

Conclusion and Future Work

While DiffuLT offers a powerful solution for long-tail recognition, it comes with higher computational costs due to training diffusion models from scratch. Future work may explore the integration of pre-trained models where permissible and the application of this self-balancing approach to more complex tasks like object detection and semantic segmentation.

Summary updated

BibTeX
@misc{shao2024diffult,
  author = {Jie Shao and Ke Zhu and Hanxiao Zhang and Jianxin Wu},
  title = {{DiffuLT: How to Make Diffusion Model Useful for Long-tail Recognition}},
  year = {2024},
  eprint = {2403.05170},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.05170},
}
Figure