Research KB 登录

CPT-011 Concept

DiT in-context conditioning

id CPT-011
type concept
name DiT in-context conditioning
aliases in-context conditioning (DiT), in-context block (DiT)
defined-by SRC-2212.09748

Definition

DiT 四种 conditioning 设计之一(SRC-2212.09748 §3.2 "DiT block design"): 把 timestep t 与 class label c 的嵌入向量作为两个额外 token 追加到 输入序列,与 image token 同等对待——类似 ViT 的 cls token 用法,因此 标准 ViT block 无需任何修改;最终 block 之后将条件 token 从序列中 移除再解码。条件信息的融合完全依赖 self-attention 对条件 token 的 注意(序列级交互),block 内无专门的条件通路。

Empirical Role

  • CLM-002 / EVI-002:四种 conditioning 消融(DiT-XL/2 @ 400K,无 guidance,ft-MSE decoder)中 FID-50K 最差——35.24(对照 cross-attention 26.14 / adaLN 25.21 / adaLN-Zero 19.47),排序训练 全程保持(Figure 5)。论文据此强调 conditioning 机制对质量的关键影响 (adaLN-Zero 的 FID 约为 in-context 的一半)。
  • 算力:119.37G,增量可忽略(§3.2 "introduces negligible new Gflops")。
  • 参数量:四种设计中最少——449M(Table 4;条件 token 不引入调制 网络或额外注意力层)。

Disambiguation

  • 与 cross-attention(CPT-010):同属条件作为 token 参与注意力,但 in-context 走 self-attention 序列内融合(条件与 image token 混排), cross-attention 是独立的条件→image 交叉注意力层;后者贵约 15% Gflops 且质量更好(CLM-002)。
  • 与 adaLN 系(CPT-007/CPT-002):in-context/条件-token 是序列级交互, adaLN 是 token 无关的逐维仿射广播;本设计中条件不施加"同一函数于 全部 token",融合强度由注意力自行决定。
  • 与 ViT cls token:机制同源(论文自述 similar to cls tokens),差别在 用途——ViT 的 cls token 聚合全局表征用于分类头,本设计是扩散去噪的 条件注入、末端移除。

Notes

  • 论文对四种 conditioning 设计仅文字描述 + Figure 3 图示;本卡机制即 §3.2 原文要点的忠实转述。
  • established 2026-09-05,源于"DiT 四种 conditioning 设计"问答暴露的 concept gap(D14 循环);至此四种设计全部有 CPT 锚点(其余三者见 CPT-002/007/010,术语路由见 DIS-001/DIS-002)。

关联(10)

  • SRC-2212.09748 Scalable Diffusion Models with Transformers
  • FRM-2212.09748 DiT 五层重建:以 ViT 替换 latent diffusion 的 U-Net backbone、Gflops 为透镜的 scaling 研究;边界为 class-cond ImageNet 256/512。
  • CLM-002 同 XL/2 与 400K 步预算下,adaLN-Zero 的 FID 19.47 为四种 conditioning 设计最低,且算力最省之一。
  • EVI-002 Table 4/Figure 5:XL/2 @400K adaLN-Zero FID 19.47 最低(<adaLN 25.21<cross-attn 26.14<in-context 35.24),排序训练全程保持(支撑 CLM-002)。
  • CPT-002 adaLN-Zero
  • CPT-007 adaptive layer norm (adaLN)
  • CPT-010 DiT cross-attention conditioning
  • SYN-001 DiT 四种 conditioning 设计系统对比:adaLN-Zero 以可忽略算力增量取得 FID 19.47 全维最优;推导出'交互强度-质量'非单调与'算力效率优先'两条结构观察(单来源外推,显式标注)。
  • DIS-001 术语 cross-attention 的双 referent 路由:LDM 通用条件接口(CPT-009)与 DiT block 设计变体(CPT-010)。
  • DIS-002 术语 adaLN 的两种读法路由:vanilla adaLN(CPT-007)与其零初始化特化 adaLN-Zero(CPT-002)。