Repulsor: Accelerating Generative Modeling with a Contrastive Memory Bank

Shaofeng Zhang, Xuanqi Chen, Ning Liao, Haoxiang Zhao, Xiaoxing Wang, Haoru Tan, Sitong Wu, Xiaosong Jia, Qi Fan, Junchi YanarXiv 2025 · DOI

Abstract

Repulsor is a plug-and-play training framework designed to significantly accelerate the convergence of generative models, such as diffusion and flow-matching, by enforcing feature separation in the latent space. By utilizing a dynamically updated contrastive memory bank, Repulsor provides a massive pool of negative samples to regularize the model’s internal representations without the computational overhead of external pretrained encoders or the constraints of mini-batch sizes. Experimental results on ImageNet-256 demonstrate that Repulsor achieves a 5x training speedup and state-of-the-art image quality, reaching a FID of 2.40 in just 400k steps.

Introduction

While denoising generative models (e.g., Stable Diffusion, DiT) are the current gold standard for visual synthesis, they are notoriously slow and expensive to train. Recent research has attempted to accelerate this process by "injecting" discriminative knowledge—forcing the generator to learn features similar to those of a pretrained vision model like DINO or CLIP. However, this approach introduces significant computational overhead from running heavy external encoders and tethers the generator to the specific biases of the external model.

An alternative approach, known as "dispersion," encourages the model to spread out its internal representations to make them more discriminative using only the current mini-batch. However, dispersion is inherently limited by batch size; small batches do not provide enough "negative examples" for the model to learn a robust, separated feature space. Repulsor addresses these challenges by decoupling the contrastive signal from both external models and mini-batch limitations.

Methods

Repulsor builds on the concept of feature dispersion but breaks the dependency on mini-batch size through several key innovations:

  • Contrastive Memory Bank: Instead of looking only at the current batch, Repulsor maintains a large, sliding-window queue (a memory bank) of features from previous iterations. This allows the model to compare current features against hundreds of thousands of "negative" samples simultaneously.
  • Positive-Free Contrastive Loss: Unlike standard contrastive learning which pulls "positives" together and pushes "negatives" apart, Repulsor uses a "dispersive loss." It assumes the generative task itself handles the alignment (pulling together), so it focuses exclusively on repulsion (pushing apart) to prevent feature collapse.
  • Lightweight Projection Head: To maintain efficiency, a simple linear layer maps high-dimensional internal features to a lower-dimensional space before they enter the memory bank, acting as an information bottleneck.
  • Zero Inference Cost: The memory bank and projection head are auxiliary tools used strictly during training. Once training is complete, these modules are discarded, leaving the original architecture untouched for inference.
The Repulsor framework uses a dispersive loss to separate internal features in a latent space, represented here by a sphere.

Key Results and Insights

The researchers evaluated Repulsor primarily on ImageNet-256, the standard benchmark for high-resolution class-conditional image generation. The framework delivered a massive boost in both speed and quality:

  • State-of-the-Art Quality: On ImageNet-256, Repulsor achieved a FID of 2.40 within 400k training steps (using Classifier-Free Guidance). For comparison, the baseline SiT model reached a FID of only 6.02 at the same stage.
  • 5x Training Speedup: Repulsor reached performance levels in just 80 epochs that took previous dispersion methods 400 epochs to achieve.
  • The Scaling Law of Negatives: The study demonstrates that increasing the pool of negative samples via a memory bank leads to a cleaner, more separable latent space, making the denoising task easier for the model to learn.
Qualitative results on ImageNet-256 showing high-fidelity generation across diverse classes including animals, food, and objects.

Limitations and Future Work

A primary challenge identified is semantic density. In massive datasets like ImageNet, many images are semantically similar (e.g., different photos of the same dog breed). Repulsor’s aggressive repulsion strategy might inadvertently force these similar instances too far apart, potentially distorting the global semantic structure. Future work may involve developing "semantic-aware" memory banks that can distinguish between true negatives and "near-positives" through clustering or soft-repulsion mechanisms.

Summary updated

BibTeX
@misc{zhang2025repulsor,
  author = {Shaofeng Zhang and Xuanqi Chen and Ning Liao and Haoxiang Zhao and Xiaoxing Wang and Haoru Tan and Sitong Wu and Xiaosong Jia and Qi Fan and Junchi Yan},
  title = {{Repulsor: Accelerating Generative Modeling with a Contrastive Memory Bank}},
  year = {2025},
  eprint = {2512.08648},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.08648},
}
Figure