Purify Before You Align: Improving Representation Alignment for Diffusion Models
Organizations: Cornell University · Independent researcher. · University of Pennsylvania
Abstract
Representation alignment improves and accelerates diffusion training by encouraging intermediate features to match a pretrained visual encoder. However, standard alignment matches pretrained representations without distinguishing what information may be more useful for generation. We introduce local appearance purification (LAP), which improves generation quality and makes encoders such as MAE more effective alignment targets by removing locally predictable content and aligning to the residual. LAP modifies only the alignment target, and requires no changes to diffusion training or inference. Through controlled interventions within a fixed encoder, we show that effective alignment depends on what information the target emphasizes, not simply how much image information it contains. Our theory gives a variational interpretation of standard alignment and, for fixed local predictors, a sum of token-wise information bounds conditioned on local appearance. To understand why purification benefits some encoders more than others, we derive an exact constant-readout test that measures how well the target can be matched without using the diffusion model's hidden state. LAP improves generation quality across five pretrained representations (MAE, AIMv2, CLIP, DINOv2, DINOv3), with the largest gain for MAE: on ImageNet-256 with SiT-B/2, it reduces FID from to . Its gains persist with stronger alignment recipes and tokenizers. Computed before diffusion training, the constant-readout score predicts the benefit of purification (Spearman across 13 encoders).
Figures & tables
| Teacher | Method | FID | IS | Prec. | Rec. | |
|---|---|---|---|---|---|---|
| No alignment | 53.92 | 25.34 | 0.435 | 0.602 | ||
| MAE ViT-L | 0.93 | REPA | 53.05 | 26.30 | 0.438 | 0.599 |
| LAP-L | 45.15 | 31.44 | 0.480 | 0.617 | ||
| LAP-N | 42.30 | 33.85 | 0.496 | 0.622 | ||
| AIMv2 ViT-L | 0.66 | REPA | 47.97 | 29.88 | 0.464 | 0.615 |
| LAP-L | 44.31 | 32.67 | 0.484 | 0.622 | ||
| Teacher | Method | FID | IS | Prec. | Rec. |
|---|---|---|---|---|---|
| MAE ViT-L | iREPA | 43.06 | 33.23 | 0.491 | 0.617 |
| LAP | 41.32 | 34.70 | 0.502 | 0.626 | |
| VA-REPA | 52.82 | 26.32 | 0.437 | 0.606 | |
| LAP | 41.60 | 34.06 | 0.503 | 0.622 | |
| REG | 52.92 | 26.33 | 0.434 | 0.608 | |
| LAP | 41.65 | 34.31 | 0.500 | 0.626 |
| Tokenizer | Method | FID | IS | Prec. | Rec. |
|---|---|---|---|---|---|
| SD-VAE | No alignment | 53.92 | 25.34 | 0.435 | 0.602 |
| REPA | 53.05 | 26.30 | 0.438 | 0.599 | |
| LAP | 42.30 | 33.85 | 0.496 | 0.622 | |
| EQ-VAE | No alignment | 52.50 | 25.99 | 0.449 | 0.599 |
| REPA | 52.41 | 26.31 | 0.452 | 0.597 | |
| LAP | 40.01 | 35.24 | 0.523 | 0.608 |
| Dataset | Method | FID | IS | Prec. | Rec. |
|---|---|---|---|---|---|
| RESISC45 | No alignment | 68.06 | 4.75 | 0.421 | 0.200 |
| REPA (DINOv2) | 66.34 | 4.80 | 0.426 | 0.184 | |
| REPA (MAE) | 64.65 | 4.94 | 0.414 | 0.205 | |
| LAP (MAE) | 61.47 | 4.96 | 0.433 | 0.228 | |
| AID | No alignment | 62.41 | 6.47 | 0.365 | 0.222 |
| REPA (DINOv2) | 63.68 | 6.36 | 0.376 | 0.200 |
Appendix figures & tables41 assets
Supplementary material from the paper’s appendix.
Appendix
| Teacher | Input | Norm. | Extracted features | |
|---|---|---|---|---|
| MAE B/L/16 | 256 | IN | 768/1024 | Last block, before final LN |
| DINOv2 S/B/L/14 | 224 | IN | 384/768/1024 | Normalized patch tokens |
| CLIP L/14 | 224 | CLIP | 1024 | Before final LN/projection |
| CLIP B/16 | 256 | CLIP | 768 | Before final LN/projection |
| I-JEPA H/14 | 224 | IN | 1280 | Final normalized tokens |
| MoCo v3 B/16 | 256 | IN | 768 | Backbone patch tokens |
| DINOv2 presence | Velocity | Use | |||
| Model | Token (dense) | Token (paired) | Image-split | (%) | |
| Unaligned | 0.196 | 0.166 | 0.130 | 0.451 | 14.03 |
| LAP-L (MAE) | 0.268 | 0.226 | 0.172 | 0.114 | 15.38 |
| LAP-N (MAE) | 0.290 | 0.240 | 0.178 | 0.004 | 10.61 |
| REPA | 0.343 | 0.286 | 0.207 | 0.115 | 12.21 |
| LAP-L (DINOv2) | 0.342 | 0.289 | 0.213 | 6.67 | |
| Model | Noise | Presence | Cosine | Velocity | Use (%) |
|---|---|---|---|---|---|
| Unaligned | High | 0.177 | 0.005 | 0.582 | 8.5 |
| Mid | 0.196 | 0.008 | 0.451 | 13.9 | |
| Low | 0.196 | 0.006 | 0.333 | 15.0 | |
| Raw MAE | High | 0.255 | 0.947 | 0.329 | 3.8 |
| Mid | 0.386 | 0.960 | 0.275 | 17.7 | |
| Low | 0.485 | 0.970 | 0.269 | 22.7 |
| Checkpoint | High | Mid | Low |
|---|---|---|---|
| REPA (400K) | 13.8 [13.6, 14.0] | 22.4 [21.0, 23.9] | 30.1 [28.8, 31.5] |
| Unaligned (400K) | 13.0 | 15.9 | 20.7 |
| Model | Mean fill (%) | Resampling (%) |
|---|---|---|
| Unaligned | 13.9 | 15.0 |
| Raw MAE | 17.7 | 6.5 |
| LAP-L (MAE) | 15.5 | 4.9 |
| LAP-N (MAE) | 11.0 | 1.4 |
| REPA | 10.9 | 2.0 |
| LAP-L (DINOv2) | 6.5 | 1.6 |
| Model | |||
|---|---|---|---|
| Unaligned | 0.8 (0.2) | 4.4 (0.8) | 13.9 (2.8) |
| Raw MAE | 2.0 (1.0) | 8.6 (7.1) | 17.7 (16.4) |
| REPA | 0.8 (0.3) | 4.8 (1.8) | 10.9 (8.7) |
| LAP-L (DINOv2) | 0.6 (0.3) | 2.9 (1.6) | 6.5 (6.5) |
| LAP-N (DINOv2) | 0.2 (0.3) | 2.1 (1.9) | 4.5 (8.8) |
| LAP-L (MAE) | 3.0 (0.3) | 10.4 (1.7) | 15.5 (5.6) |
| (shared direction) | (per position) | ||||||
|---|---|---|---|---|---|---|---|
| Data | Encoder | Raw | LAP-L | LAP-N | Raw | LAP-L | LAP-N |
| Dev-200 | MAE | 0.933 | 0.020 | 0.011 | 0.945 | 0.437 | 0.329 |
| CLIP | 0.607 | 0.088 | 0.067 | 0.620 | 0.169 | 0.110 | |
| DINOv2 | 0.221 | 0.007 | 0.011 | 0.347 | 0.272 | 0.207 | |
| AIMv2 | 0.663 | 0.041 | 0.036 | 0.701 | 0.221 | 0.130 | |
| DINOv3 | 0.525 | 0.018 | 0.017 | 0.587 | 0.310 | 0.168 | |
| Encoder | Target | Seed 0 | Seed 1 | Mean | ||
|---|---|---|---|---|---|---|
| MAE | Raw | 0.933 | 0.945 | 1641.4 | 1643.2 | 1642.3 |
| LAP-L | 0.020 | 0.437 | 1504.3 | 1512.3 | 1508.3 | |
| LAP-N | 0.011 | 0.329 | 1486.2 | 1482.6 | 1484.4 | |
| LAP-P | 0.019 | 0.027 | 1495.9 | 1502.8 | 1499.4 | |
| LAP-N P | 0.012 | 0.025 | 1471.3 | 1436.4 | 1453.8 | |
| DINOv2 | Raw | 0.221 | 0.347 | 1551.2 | 1518.6 | 1534.9 |
| Target | Seed 0 | Seed 1 | Mean |
|---|---|---|---|
| Raw | 53.68 | 52.41 | 53.05 |
| LAP-L | 44.81 | 45.48 | 45.15 |
| LAP-N | 43.06 | 41.53 | 42.30 |
| LAP-P | 44.02 | 44.62 | 44.32 |
| LAP-N P | 42.33 | 41.80 | 42.07 |
| High | Mid | Low | ||
| Base range | 0.037–0.051 | 0.472–0.501 | 0.926–0.934 | |
| MAE | 0.655 | 0.266 | 0.013 | |
| DINOv2 | 0.268 | 0.052 | ||
| CLIP | 0.114 | 0.026 | ||
| Unaligned | 0.264 | 0.676 | 0.949 | |
| REPA | 0.248 | 0.662 | 0.946 |
| Encoder | Raw accuracy | Purified accuracy | gap | ||
| MAE ViT-L | 1 | 0.178 | 0.661 | 0.693 | |
| 3 | 0.314 | 0.661 | 0.688 | ||
| 5 | 0.352 | 0.661 | 0.687 | ||
| DINOv2 ViT-B | 3 | 0.125 | 0.798 | 0.794 | |
| CLIP ViT-L | 3 | 0.074 | 0.787 | 0.791 | |
| 5 | 0.084 | 0.787 | 0.790 |
| Dataset | Encoder | Pooled res./pred. | Token res./pred. | Both | |
|---|---|---|---|---|---|
| dev-200 | MAE-L | 1 | Pass | ||
| 3 | Pass | ||||
| 5 | Pass | ||||
| dev-200 | DINOv2-B | 3 | Pass | ||
| 5 | Pass | ||||
| 7 | Pass |
| Model | ||||
|---|---|---|---|---|
| No alignment | 0.618 | 0.648 | – | untrained |
| Raw MAE | 0.716 | 0.948 | 0.876 | 0.737 |
| LAP-N (MAE) | 0.764 | 0.137 | 0.072 | |
| REPA (DINOv2) | 0.690 | 0.465 | 0.281 | 0.192 |
| LAP-L (DINOv2) | 0.690 | 0.410 | 0.251 |
| Target | Seed 0 | Seed 1 | Mean |
|---|---|---|---|
| Raw CLIP | 1548.9 | 1553.0 | 1550.9 |
| LAP-L | 1517.1 | 1513.9 | 1515.5 |
| LAP-N, | 1537.6 | 1498.1 | 1517.9 |
| LAP-N, | 1527.7 | 1516.2 | 1522.0 |
| Target | MLP head | Conv head spatial norm |
|---|---|---|
| Raw MAE | 1641.4 / 1643.2 | 1508.0 / 1496.9 |
| LAP-N (MAE) ( ) | 1486.2 / 1482.6 | 1510.7 / 1484.4 |
| Raw DINOv2 ( REPA) | 1551.2 / 1518.6 | 1476.6 / 1504.3 |
| LAP-N (DINOv2) ( ) | 1508.4 / 1536.2 | 1514.3 / 1523.7 |
| Predictable-only (DINOv2) | 1679.9 / 1641.6 | 1648.6 / 1653.8 |
| Model | Batch | Steps | Unaligned | Raw MAE | REPA | LAP-N (MAE) | LAP-L (DINOv2) |
|---|---|---|---|---|---|---|---|
| Without guidance | |||||||
| SiT-B/2 | 64 | 400K ∗ | 53.92 | 53.05 | 41.75 | 42.30 | 41.47 |
| SiT-B/2 | 64 | 800K | 43.48 | 42.60 | 33.44 | 33.95 | 33.24 |
| SiT-B/2 | 256 | 400K | 36.54 | 34.72 | 27.67 | 28.57 | 27.58 |
| SiT-L/2 | 64 | 400K | 37.93 | 35.07 | 19.28 | 23.77 | 18.60 |
| SiT-L/2 | 256 | 400K | 20.14 | 16.05 | 10.01 | 11.97 | 9.78 |
| (a) 100K steps: FID-10K | |||
|---|---|---|---|
| Teacher | Target | Block 4 | Block 8 |
| MAE | Raw | 87.26 / 87.09 (87.18) | 87.83 / 86.54 (87.19) |
| LAP-N | 71.73 / 71.20 ( 71.46 ) | 72.91 / 72.63 (72.77) | |
| AIMv2 | Raw | 80.95 / 80.94 (80.95) | 82.41 / 82.52 (82.47) |
| LAP-L | 72.51 / 73.43 ( 72.97 ) | 78.98 / 77.28 (78.13) | |
| CLIP | Raw | 80.04 / 80.17 (80.11) | 79.33 / 79.93 (79.63) |
| Teacher | Target | FID | IS | Prec. | Rec. |
|---|---|---|---|---|---|
| Base recipe: REPA, SD-VAE, block 8 | |||||
| – | No alignment | 27.70 | 53.78 | 0.603 | 0.530 |
| MAE | Raw | 26.37 | 57.46 | 0.606 | 0.532 |
| LAP-N | 17.90 | 79.89 | 0.676 | 0.529 | |
| AIMv2 | Raw | 22.32 | 68.58 | 0.638 | 0.528 |
| LAP-L | 19.68 | 77.35 | 0.654 | 0.545 | |
| Target | 25K | 50K | 75K | 100K |
|---|---|---|---|---|
| Unaligned | 2564.6 | 1652.4 | 1454.3 | 1355.1 |
| Raw self-teacher | 2555.0 | 1622.5 | 1425.3 | 1307.5 |
| Residual self-teacher | 2537.3 | 1623.6 | 1429.5 | 1313.1 |
| Target | FID | IS | Prec. | Rec. |
|---|---|---|---|---|
| No alignment | 53.92 | 25.34 | 0.435 | 0.602 |
| REPA (raw DINOv2) | 41.75 | 35.50 | 0.492 | 0.630 |
| REPA prediction loss ( Section 3.1 ) | 46.79 | 29.99 | 0.473 | 0.617 |
| Predictable-only target ( Section 3.2 ) | 56.71 | 24.37 | 0.415 | 0.591 |
| Recipe | Target | FID | IS | Prec. | Rec. |
|---|---|---|---|---|---|
| MAE ViT-L teacher | |||||
| iREPA | Raw | 43.06 | 33.23 | 0.491 | 0.617 |
| LAP-L | 43.10 | 33.07 | 0.490 | 0.627 | |
| LAP-N | 41.32 | 34.70 | 0.502 | 0.626 | |
| VA-REPA | Raw | 52.82 | 26.32 | 0.437 | 0.606 |
| LAP-L | 43.43 | 32.65 | 0.492 | 0.620 | |
| Target | FID | IS | Prec. | Rec. |
|---|---|---|---|---|
| No alignment | 32.30 | 40.61 | 0.584 | 0.604 |
| Raw | 26.10 | 52.41 | 0.611 | 0.620 |
| LAP-L | 25.69 | 53.11 | 0.615 | 0.614 |
| LAP-N | 24.94 | 55.13 | 0.614 | 0.617 |
| 100K steps, FID-10K | 400K steps, FID-50K | |||||||
|---|---|---|---|---|---|---|---|---|
| Encoder | raw | LAP-L | Raw | LAP-L | Gain | Raw | LAP-L | Gain |
| MAE ViT-B | 0.938 | 0.022 | 86.94 | 75.48 | 11.47 | 53.22 | 43.97 | 9.25 |
| MAE ViT-L † | 0.933 | 0.020 | 87.19 | 76.53 | 10.66 | 53.05 | 45.15 | 7.90 |
| CLIP ViT-B/16 | 0.704 | 0.246 | 83.46 | 78.92 | 4.53 | 49.05 | 45.70 | 3.35 |
| DINOv3 ViT-H+ | 0.682 | 0.033 | 80.47 | 77.27 | 3.20 | 45.59 | 44.25 | 1.34 |
| AIMv2 ViT-L † | 0.663 | 0.041 | 82.47 | 78.13 | 4.34 | 47.97 | 44.31 | 3.66 |
| Teacher | Target | FID-Inception | FID-DINOv2 |
|---|---|---|---|
| – | No alignment | 124.72 | 1652.4 |
| MAE | Raw | 122.44 | 1641.4 |
| LAP-L | 107.55 | 1504.3 | |
| LAP-N | 106.98 | 1486.2 | |
| CLIP | Raw | 114.64 | 1548.9 |
| LAP-L | 110.72 | 1517.1 |
| Teacher | Target | 100K | 200K | 300K | 400K |
|---|---|---|---|---|---|
| – | No alignment | 88.47 | 70.79 | 62.01 | 56.61 |
| MAE ViT-L | Raw | 87.19 | 69.10 | 60.87 | 55.54 |
| LAP-N | 72.77 | 56.55 | 49.18 | 45.05 | |
| AIMv2 ViT-L | Raw | 82.47 | 64.33 | 56.03 | 50.73 |
| LAP-L | 78.13 | 60.28 | 52.41 | 47.19 | |
| CLIP ViT-L | Raw | 79.63 | 60.94 | 52.36 | 47.43 |
| Dataset | Alignment target | FID-10K | |
|---|---|---|---|
| RESISC45 (45 classes) | No alignment | 4 | |
| DINOv2 | 4 | ||
| ImageNet MAE, raw | 4 | ||
| LAP-N (ImageNet MAE) | 4 | ||
| AID (30 classes) | No alignment | 2 | |
| DINOv2 | 2 |
| Velocity | Align. cosine | Use (%) | Proxy seed 0 | Proxy seed 1 | |
| Dev-200, 100K steps | |||||
| 0 | 0.16 | 0.65 | 8.3 | 1157.3 | 1161.2 |
| 0.5 | 0.50 | 0.63 | 7.6 | 1167.2 | 1207.1 |
| 2 | 0.52 | 0.61 | 40.2 | 1242.0 | 1252.3 |
| ImageNet-1k, 400K steps | |||||
| 0 | 0.11 | 0.64 | 11.4 | 825.1 | 821.1 |
| Encoder | Utility | Seed 0 | Seed 1 | Mean |
|---|---|---|---|---|
| CLIP | 0.18 | 1548.9 | 1553.0 | 1551.0 |
| I-JEPA | 0.29 | 1529.4 | 1515.7 | 1522.6 |
| DINOv2 | 0.33 | 1551.2 | 1518.6 | 1534.9 |
| MoCo v3 | 0.44 | 1584.2 | 1598.0 | 1591.1 |
| MAE | 0.72 | 1641.4 | 1643.2 | 1642.3 |
| Teacher | Target | Seed 0 | Seed 1 | Mean |
|---|---|---|---|---|
| – | No alignment | 1652.4 | 1649.9 | 1651.2 |
| MAE | Raw | 1641.4 | 1643.2 | 1642.3 |
| LAP-L | 1504.3 | 1512.3 | 1508.3 | |
| LAP-N | 1486.2 | 1482.6 | 1484.4 | |
| CLIP | Raw | 1548.9 | 1553.0 | 1551.0 |
| LAP-L | 1517.1 | 1513.9 | 1515.5 |
| Teacher | Target | Seed 0 | Seed 1 |
|---|---|---|---|
| – | No alignment | 53.95 | 53.90 |
| MAE ViT-L | Raw | 53.68 | 52.41 |
| LAP-L | 44.81 | 45.48 | |
| LAP-N | 43.06 | 41.53 | |
| AIMv2 ViT-L | Raw | 48.08 | 47.87 |
| LAP-L | 44.40 | 44.22 |
| Setting | Target | Seed 0 | Seed 1 |
|---|---|---|---|
| REPA-family recipes, MAE ViT-L | |||
| iREPA | Raw | 43.50 | 42.62 |
| LAP-L | 43.38 | 42.81 | |
| LAP-N | 41.12 | 41.52 | |
| VA-REPA | Raw | 53.46 | 52.19 |
| LAP-L | 42.98 | 43.88 | |
Diffusion Model Alignment
Diffusion model alignment steers generated content and internal representations toward prompts, human preferences, safety goals, and task constraints.
See all 185 papers