DDAE++: Enhancing Diffusion Models Towards Unified Generative and Discriminative Learning

Weilai Xiang, Hongyu Yang, Di Huang, Yunhong Wang · Submission to ICLR 2026 · Rejected

TL;DR

Diffusion models naturally learn rich visual semantics, but their internal representations are scattered across layers rather than concentrated into a compact, usable bottleneck. This paper introduces self-conditioning—a lightweight mechanism that routes mid-layer semantic features back into decoding layers as conditioning signals—bridging the gap between generation and representation learning. Paired with non-leaky augmentations and contrastive self-distillation, this approach simultaneously boosts image synthesis quality and linear classification performance across UNet, UViT, and DiT architectures.

What Problem Does This Paper Address?

While diffusion models produce photorealistic images and capture strong local features for dense vision tasks (like depth or edge estimation), their global representations lag far behind self-supervised learning (SSL) paradigms like contrastive learning (CL) or masked autoencoding (MAE).

The root cause is structural: unlike MAEs (which enforce an asymmetric bottleneck) or contrastive models (which pull global instance representations together), diffusion networks disperse semantics across all layers. The richest high-level semantics emerge in the middle layers, but they are diluted and underutilized as they travel toward the output. Consequently, the model lacks an explicit semantic bottleneck, creating a disconnect where improvements in generative ability do not necessarily translate to stronger representations.

Methods

The authors propose DDAE++, a framework operating across three complementary perspectives:

  1. Architectural (Self-Conditioning):
  2. UNet and DiT: Features from a designated intermediate layer are global-average-pooled, projected via a linear layer, scaled adaptively based on the timestep $t$, and added to the decoder's global conditioning embedding (AdaGN / AdaLN).
  3. UViT: A learnable summary token ([CLS]) is introduced into the transformer. It natively interacts with patch tokens and the time embedding via self-attention, dynamically aggregating and rerouting semantics without manual pooling or layer routing.
  4. Layer Selection Strategy: Instead of costly grid searches, short profiling runs (e.g., 20 epochs) show that the layer yielding the lowest early training loss reliably predicts the best final FID and linear probing accuracy.
  5. Data-Space (Non-Leaky Augmentations): Uses geometric transformations (translation, rotation, scaling) parameterized as condition vectors to prevent data transformations from leaking into generation.
  6. Objective-Space (Contrastive Self-Distillation): Directs contrastive learning (adapted from MoCo v3) to refine the newly formed bottleneck. Notably, the authors discover that the standard exponential moving average (EMA) model—traditionally used solely for generative evaluation—serves as a high-quality teacher for contrastive targets, avoiding the need for a separate momentum encoder.

Datasets

  • CIFAR-10 & CIFAR-100: Evaluated on pixel-space models (DDPM, EDM, and Rectified Flow) using ddpm, ddpmpp, and UViT-S backbones.
  • ImageNet-1k ($256\times256$): Evaluated on latent-space Rectified Flow transformers (DiT-B, DiT-L, and DiT-XL) in both unconditional and class-conditional settings.
  • ADE20K & Pascal VOC 2012: Evaluated on downstream frozen-feature linear semantic segmentation ($256\times256$).

Key Insights and Ideas

  • Decoupling the Generator into Phases: Centered Kernel Alignment (CKA) feature analysis reveals that self-conditioning forces an explicit phase transition. In a 24-layer DiT-L, layers 1–17 act as a unified semantic encoder accumulating global context, while layers 18–24 decouple into a specialized local generative decoder modulated by the bottleneck.
  • The Generative-Discriminative "Bridge": In baseline diffusion, data augmentations often improve representation but harm generation (e.g., CIFAR-100 FID degrades from 7.35 to 7.96). Adding self-conditioning bridges this gap, translating representational gains into generative improvements (recovering FID to 7.05 while increasing accuracy).
  • EMA Synergy: The EMA decay rate that produces the best sample generation also happens to be optimal for representation learning, demonstrating an inherent synergy between the two objectives.

Key Results

  • CIFAR-100: On standard UNet (ddpm), self-conditioning improves FID from 5.97 to 5.77 while boosting linear probe accuracy from 62.06% to 63.55%. When combined with augmentations and self-distillation, accuracy reaches 74.48% on UViT-S (surpassing competitive contrastive baselines like ResNet-50 at 66.15–72.51%).
  • ImageNet-1k (Unconditional):
  • DiT-B (400 epochs): FID improves from 18.86 to 17.94, and linear accuracy climbs from 64.93% to 66.55% (+1.38M parameters, ~1% overhead).
  • DiT-L (400 epochs): FID improves from 8.73 to 8.07, and linear accuracy improves from 70.15% to 71.33%.
  • Outperforms generative SSL baselines like l-DAE (57.50% / 65.00%) and MAE (61.40%–62.90%).
  • Transfer Segmentation: On frozen DiT-B patch tokens, self-conditioning consistently outperforms baselines across training durations, achieving 65.61 mIoU on VOC2012 (vs. baseline 64.34 mIoU).

Limitations and Future Work

  • Lack of Aggressive Latent Augmentation: Unlike pixel-space SSL models that benefit from aggressive multi-crop views, latent diffusion training currently lacks an effective multi-crop strategy without breaking VAE latents.
  • Scale: Due to compute constraints, ImageNet experiments were capped at $256\times256$ resolution and 400 epochs; scaling to multi-billion parameter text-to-image models remains unexplored.
  • Augmentation Sensitivity: The geometric pipeline requires careful tuning to avoid interference between conditional prompt tokens and image tokens.

Summary updated

BibTeX
@misc{xiang2025ddae,
  author = {Weilai Xiang and Hongyu Yang and Di Huang and Yunhong Wang},
  title = {{DDAE++: Enhancing Diffusion Models Towards Unified Generative and Discriminative Learning}},
  year = {2025},
  eprint = {2505.10999},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.10999},
}
Figure