Concept animation

Hero diagram

Paper: 2603.22283 Authors: Shivam Duggal, Xingjian Bai, Zongze Wu, Richard Zhang, Eli Shechtman, Antonio Torralba, Phillip Isola, William T. Freeman Categories: cs.CV, cs.AI, cs.GR, cs.LG

The Gap

Latent diffusion models (LDMs) like Stable Diffusion achieve impressive image synthesis, but they’re stuck in a two-stage training trap. First, you train an autoencoder to compress images into latent codes. Then you freeze it and train a separate diffusion model in that latent space. This staging creates a chicken-and-egg problem: the tokenizer doesn’t know what latent structure would help generation, and the generator can’t influence the latent space it’s forced to work in.

Prior work (LDM, DALL-E 2, Imagen) accepts this split as necessary. The assumption: tokenization (encoding real images) and generation (sampling from noise) are fundamentally different tasks requiring separate training. But what if they’re actually two sides of the same coin?

Problem: Two-stage training creates misaligned latent spaces
   |
   v
Assumption: Tokenization and generation are the same inference problem
            under different conditioning (full image vs noise+text)
   |
   v
Method: Share encoder weights between both tasks, train jointly
   |
   v
Evidence: FID 2.12 on ImageNet 256x256 without adversarial losses
   |
   v
Conclusion: Single-stage joint training is feasible and competitive

The Increment

One sentence: Before UNITE, you trained tokenizers and diffusion models separately in sequence; after UNITE, you train them simultaneously through a shared encoder that learns a “common latent language.”

Core Mechanism

UNITE introduces a Generative Encoder that plays two roles through weight sharing. In the tokenization pass, it takes a real image and encodes it to latents (like a standard VAE encoder). In the generation pass, it takes noisy latents plus text conditioning and predicts the denoised latents (like a diffusion model). The decoder is always the same—it reconstructs images from latents.

The training alternates between two forward passes per batch. First pass: encode real images to latents, decode them back, compute reconstruction loss. Second pass: add noise to those latents, feed noisy latents + text to the same encoder (now acting as denoiser), predict clean latents, compute diffusion loss. Gradients from both tasks flow through the shared encoder weights.

Training Loop (per batch):

Pass 1 (Tokenization):
  Image --> [Generative Encoder] --> Latent --> [Decoder] --> Reconstructed Image
              (shared weights)                                        |
                                                                      v
                                                              Reconstruction Loss

Pass 2 (Generation):
  Noisy Latent + Text --> [Generative Encoder] --> Predicted Clean Latent
                           (same shared weights)              |
                                                              v
                                                        Diffusion Loss

Both losses backprop through shared encoder --> joint latent space optimization

Think of it like training a bilingual translator. Most systems train two separate translators: English→French, then French→English. UNITE trains one person who learns both directions simultaneously. When translating English→French, they learn what French structure makes sense. When going French→English, they learn what English structure is natural. The shared brain (encoder weights) develops an internal “meaning space” that works for both directions. The tokenization task teaches the encoder what latent codes faithfully represent images. The generation task teaches it what latent codes are easy to denoise from noise. The shared weights force a compromise—a latent space that’s both reconstructable and generatable.

Key Concepts

  • Latent Space as Common Language: In traditional LDMs, the latent space is designed only for reconstruction—compress the image, decompress it, minimize pixel error. The diffusion model is then forced to generate in this space that wasn’t designed for generation. UNITE’s insight: if both tasks share weights, the latent space must satisfy both reconstruction fidelity and generation ease. It’s like designing a file format that’s both human-readable and machine-parseable—the constraints from both uses shape the format. Here, gradients from reconstruction push for information preservation, while gradients from diffusion push for smooth, denoising-friendly structure.

  • Conditioning as Task Selector: The Generative Encoder doesn’t have separate code paths for tokenization vs generation. Instead, conditioning signals tell it which task to perform. For tokenization: condition on the full image (via cross-attention or concatenation). For generation: condition on text and noise level. Same weights, different inputs. This is like a Swiss Army knife—one tool, multiple functions selected by how you hold it. The network learns to route information differently based on what’s being conditioned on.

  • Weight Sharing vs Parameter Efficiency: This isn’t about saving memory (though it does). It’s about forcing the encoder to learn representations that serve both tasks. If tokenization and generation had separate encoders, tokenization could learn a latent space that’s great for reconstruction but terrible for denoising. Weight sharing creates pressure: the latent space must be a compromise that works for both. It’s architectural inductive bias—the structure of the model enforces a constraint that the latent space should be “generation-aware.”

Framework Shift

Before (LDM two-stage):                After (UNITE single-stage):

Stage 1: Train Tokenizer              Joint Training:
  Image --> [Encoder] --> Latent         Image -----> [Generative Encoder] --> Latent
              |                                         (shared weights)         |
              v                                              ^                   v
          [Decoder] --> Reconstructed                       |               [Decoder]
              |                                    Noisy Latent + Text          |
              v                                              |                   v
      Reconstruction Loss                                    |           Reconstruction
         (freeze encoder)                                    |               Loss
                                                             |                   +
Stage 2: Train Diffusion                                     |            Diffusion
  Noisy Latent + Text --> [Diffusion Model]                 |               Loss
                               |                             |                   |
                               v                             +-------------------+
                       Predicted Clean Latent                  (both backprop)
                               |
                               v
                        Diffusion Loss

Latent space shaped by:                Latent space shaped by:
- Reconstruction only                  - Reconstruction + Generation jointly

One sentence: From sequential specialization (train tokenizer, then generator) to simultaneous co-optimization (train both through shared weights), the core shift is treating tokenization and generation as dual views of the same latent inference problem.

Expert Assessment

Problem choice: This is a real gap, not manufactured. The two-stage training of LDMs is an acknowledged pain point—you can’t fine-tune the latent space after the diffusion model reveals what structure would help. The problem sits at a natural inflection point: LDMs are mature enough that people are questioning their training inefficiencies, but not so entrenched that alternatives seem impossible.

Method maturity: The core insight (tokenization and generation are both latent inference under different conditioning) is elegant, but the execution is straightforward weight sharing plus alternating training. There’s no deep algorithmic innovation—it’s more of an architectural rearrangement. That said, sometimes the simple idea is the right idea. The paper doesn’t explore why this works theoretically (e.g., what properties of the loss landscape enable joint convergence), which feels like a missed opportunity.

Experimental integrity: The baselines are fair—they compare against LDM and DiT trained with the same compute budget. FID 2.12 on ImageNet 256x256 is competitive but not state-of-the-art (DiT-XL gets 2.27, but uses more parameters). The claim “near state of the art” is defensible but slightly generous. One red flag: they don’t show what happens if you train the two-stage baseline longer to match UNITE’s total training time. Is UNITE better, or just more compute-efficient? The ablations are solid—they show that weight sharing matters more than just joint training with separate encoders.

Writing quality: The paper front-loads motivation well, but the method section is dense. The “Generative Encoder” name is confusing—it’s not generating images, it’s encoding to latents (sometimes from images, sometimes from noise). A clearer name would help. The analysis sections (representation alignment, compression) feel tacked on—they don’t build a coherent story about why joint training works. Rewriting Section 4 to unify these analyses under a single narrative would elevate the paper.

Verdict: Weak accept — solid empirical result with a clean idea, but lacks theoretical depth and the gains are incremental rather than transformative.

Takeaways

Steal the framing: When you have two tasks that operate on the same representation (here, latents), ask if they’re actually the same task under different conditioning. This reframing can collapse multi-stage pipelines into single-stage training. Applies beyond vision—think NLP (encoding and decoding), RL (policy and value), or audio (analysis and synthesis).

Weight sharing as regularization: Forcing two tasks to share parameters isn’t just about efficiency—it’s a way to regularize the learned representation. If your representation works for both tasks, it’s probably capturing something fundamental rather than task-specific quirks. Use this when you suspect your representation is overfitting to one task’s idiosyncrasies.

Alternating training for multi-objective optimization: The two-pass-per-batch training is a simple way to handle multiple loss functions that operate on the same parameters. Instead of weighting losses (which requires tuning), alternate between them. Each pass gets clean gradients from its own objective. This is cleaner than multi-task learning with weighted sums when the tasks have different data requirements.

论文: 2603.22283 作者: Shivam Duggal, Xingjian Bai, Zongze Wu, Richard Zhang, Eli Shechtman, Antonio Torralba, Phillip Isola, William T. Freeman 分类: cs.CV, cs.AI, cs.GR, cs.LG

缺口

潜在扩散模型(LDM)如 Stable Diffusion 能生成惊艳的图像,但它们被困在两阶段训练的陷阱里。

先训练一个自编码器把图像压缩成潜在编码。

然后冻结它,在这个潜在空间里训练一个独立的扩散模型。

这种分阶段训练造成了先有鸡还是先有蛋的问题:分词器不知道什么样的潜在结构有助于生成,生成器也无法影响它被迫使用的潜在空间。

先前工作(LDM、DALL-E 2、Imagen)把这种分离当作必然。

假设是:分词(编码真实图像)和生成(从噪声采样)是根本不同的任务,需要分开训练。

但如果它们其实是同一枚硬币的两面呢?

问题:两阶段训练导致潜在空间不对齐
   |
   v
假设:分词和生成是同一个推理问题
      只是条件不同(完整图像 vs 噪声+文本)
   |
   v
方法:在两个任务间共享编码器权重,联合训练
   |
   v
证据:ImageNet 256x256 上 FID 2.12,无对抗损失
   |
   v
结论:单阶段联合训练可行且有竞争力

增量

一句话: UNITE 之前,你按顺序分别训练分词器和扩散模型;UNITE 之后,你通过共享编码器同时训练它们,让它们学习”共同的潜在语言”。

核心机制

UNITE 引入了一个生成式编码器,通过权重共享扮演两个角色。

在分词阶段,它接收真实图像并编码为潜在表示(像标准 VAE 编码器)。

在生成阶段,它接收带噪声的潜在表示加文本条件,预测去噪后的潜在表示(像扩散模型)。

解码器始终相同——从潜在表示重建图像。

训练在每个批次中交替进行两次前向传播。

第一次:将真实图像编码为潜在表示,解码回来,计算重建损失。

第二次:给这些潜在表示加噪声,将带噪潜在表示+文本送入同一个编码器(现在充当去噪器),预测干净的潜在表示,计算扩散损失。

两个任务的梯度都流经共享的编码器权重。

训练循环(每批次):

第一次(分词):
  图像 --> [生成式编码器] --> 潜在表示 --> [解码器] --> 重建图像
            (共享权重)                                      |
                                                              v
                                                          重建损失

第二次(生成):
  带噪潜在表示 + 文本 --> [生成式编码器] --> 预测的干净潜在表示
                          (相同共享权重)              |
                                                        v
                                                    扩散损失

两个损失都通过共享编码器反向传播 --> 联合优化潜在空间

把它想象成训练一个双语翻译。

大多数系统训练两个独立的翻译器:英译中,然后中译英。

UNITE 训练一个人同时学习两个方向。

翻译英译中时,他们学习什么样的中文结构有意义。

翻译中译英时,他们学习什么样的英文结构自然。

共享的大脑(编码器权重)发展出一个内部”意义空间”,对两个方向都有效。

分词任务教编码器什么样的潜在编码能忠实表示图像。

生成任务教它什么样的潜在编码容易从噪声中去噪。

共享权重强制一个折衷——一个既可重建又可生成的潜在空间。

关键概念

  • 潜在空间作为共同语言: 在传统 LDM 中,潜在空间只为重建设计——压缩图像,解压缩,最小化像素误差。

扩散模型随后被迫在这个不是为生成设计的空间里生成。

UNITE 的洞见:如果两个任务共享权重,潜在空间必须同时满足重建保真度和生成便利性。

这就像设计一个既人类可读又机器可解析的文件格式——来自两种用途的约束塑造了格式。

这里,来自重建的梯度推动信息保留,来自扩散的梯度推动平滑、易去噪的结构。

  • 条件作为任务选择器: 生成式编码器没有为分词和生成设置独立的代码路径。

相反,条件信号告诉它执行哪个任务。

对于分词:以完整图像为条件(通过交叉注意力或拼接)。

对于生成:以文本和噪声水平为条件。

相同的权重,不同的输入。

这就像瑞士军刀——一个工具,根据你如何握持它来选择多种功能。

网络学习根据条件的内容以不同方式路由信息。

  • 权重共享 vs 参数效率: 这不是为了节省内存(虽然确实节省了)。

而是为了强制编码器学习同时服务两个任务的表示。

如果分词和生成有独立的编码器,分词可能学习一个对重建很好但对去噪很糟的潜在空间。

权重共享创造压力:潜在空间必须是对两者都有效的折衷。

这是架构归纳偏置——模型的结构强制了一个约束,即潜在空间应该”生成感知”。

框架转变

之前(LDM 两阶段):                  之后(UNITE 单阶段):

阶段1:训练分词器                     联合训练:
  图像 --> [编码器] --> 潜在表示         图像 -----> [生成式编码器] --> 潜在表示
              |                                      (共享权重)         |
              v                                           ^                v
          [解码器] --> 重建图像                           |            [解码器]
              |                                 带噪潜在表示 + 文本         |
              v                                           |                v
        重建损失                                          |            重建损失
      (冻结编码器)                                      |                +
                                                          |            扩散损失
阶段2:训练扩散                                           |                |
  带噪潜在表示 + 文本 --> [扩散模型]                      |                |
                              |                           +----------------+
                              v                            (都反向传播)
                      预测的干净潜在表示
                              |
                              v
                        扩散损失

潜在空间塑造者:                      潜在空间塑造者:
- 仅重建                              - 重建 + 生成联合

一句话: 从顺序专业化(训练分词器,然后生成器)到同步协同优化(通过共享权重训练两者),核心转变是将分词和生成视为同一潜在推理问题的双重视角。

专家评审

选题眼光: 这是真缺口,不是人造的。

LDM 的两阶段训练是公认的痛点——扩散模型揭示什么结构有帮助后,你无法微调潜在空间。

这个问题处于自然的拐点:LDM 已经足够成熟,人们开始质疑其训练效率,但还没有根深蒂固到替代方案看起来不可能。

方法成熟度: 核心洞见(分词和生成都是不同条件下的潜在推理)很优雅,但执行就是直接的权重共享加交替训练。

没有深层的算法创新——更多是架构重排。

话说回来,有时简单的想法就是正确的想法。

论文没有从理论上探讨为什么这有效(例如,损失景观的什么属性使联合收敛成为可能),这感觉是错失的机会。

实验诚意: 基线公平——他们与使用相同计算预算训练的 LDM 和 DiT 比较。

ImageNet 256x256 上 FID 2.12 有竞争力但不是最先进的(DiT-XL 达到 2.27,但使用更多参数)。

“接近最先进”的说法站得住脚但略显慷慨。

一个警示信号:他们没有展示如果训练两阶段基线更长时间以匹配 UNITE 的总训练时间会发生什么。

UNITE 更好,还是只是计算效率更高?消融实验扎实——他们表明权重共享比仅用独立编码器联合训练更重要。

写作功力: 论文前面的动机铺垫得很好,但方法部分很密集。

“生成式编码器”这个名字令人困惑——它不是生成图像,而是编码为潜在表示(有时从图像,有时从噪声)。

更清晰的名字会有帮助。

分析部分(表示对齐、压缩)感觉是硬加上去的——它们没有构建关于为什么联合训练有效的连贯故事。

重写第4节,将这些分析统一在单一叙事下,会提升论文档次。

判决: 弱接收 — 扎实的实证结果配上干净的想法,但缺乏理论深度,收益是渐进式而非变革性的。

要点总结

偷走这个框架: 当你有两个在同一表示上操作的任务(这里是潜在表示)时,问问它们是否实际上是不同条件下的同一任务。

这种重新框架可以将多阶段流程折叠成单阶段训练。

适用范围超越视觉——想想 NLP(编码和解码)、强化学习(策略和价值)或音频(分析和合成)。

权重共享作为正则化: 强制两个任务共享参数不仅仅是为了效率——这是正则化学习表示的一种方式。

如果你的表示对两个任务都有效,它可能捕获了某种基本的东西,而不是任务特定的怪癖。

当你怀疑你的表示过拟合到一个任务的特质时使用这个。

交替训练用于多目标优化: 每批次两次传播的训练是处理在相同参数上操作的多个损失函数的简单方法。

与其加权损失(需要调参),不如在它们之间交替。

每次传播从自己的目标获得干净的梯度。

当任务有不同的数据需求时,这比带加权和的多任务学习更干净。