Déjà VAE: When Do Autoencoder Traces Reveal Generated Images?
Organizations: Department of Computer Science, Furman University
Abstract
A latent diffusion model's output has already passed through its autoencoder, so a second round trip changes it very little. This "déjà vu" underlies reconstruction-based detectors of generated images; we analyse when it reveals a generated image and when it does not. Read by a frozen vision foundation model without training, the trace is strongest in intermediate layers, and, unlike pixel-level reconstruction error, it treats blur as a sign of a real image. It belongs to the generator's exact decoder: on Synthbuster, the exact decoders of Stable Diffusion 1.3, 1.4, 2 and XL are the strongest of eight autoencoders and catch 94-100% of their generators' images at a 5% false-alarm rate (SDXL's version identified post hoc), while near-identical versions catch 7-42%. A detector trained only on real photographs and their autoencoder copies matches one trained on 162k generated images on GenImage (+2.3 points, 95% CI [0.9, 3.7]) and complements it in fusion, but one resize with JPEG re-save, or a mild blur, costs it 19-27 points. Two lessons concern benchmarks. The in-the-wild benchmark Chameleon can be solved from image width alone. And on Synthbuster, how the real photographs are matched to the generated images' size decides whether our detector leads or trails (+4.4 or -9.7 points): the matching protocol alone can reverse a detector comparison. Code and per-image scores: https://github.com/iamsaugatpandey/deja-vae
Figures & tables
| Generator | SD1 | ft-MSE | SDXL 0.9 | SDXL 1.0 † | MoVQ | FLUX | DC-AE | Cons. |
|---|---|---|---|---|---|---|---|---|
| Downscaled reals | ||||||||
| SD 2 | 16.0 | 95.0 | 41.0 | 15.5 | 10.0 | 21.5 | 11.5 | 13.5 |
| SD 1.3 | 99.5 | 21.0 | 1.0 | 6.0 | 9.0 | 19.5 | 13.5 | 0.5 |
| SD 1.4 | 99.0 | 26.0 | 3.5 | 10.0 | 4.0 | 21.5 | 22.5 | 0.5 |
| DALL E 3 | 22.0 | 32.5 | 31.5 | 15.0 | 7.0 | 32.5 | 2.0 | 34.5 |
| SDXL | 1.5 | 12.0 | 7.0 | 100.0 | 1.0 | 0.0 | 11.0 | 0.5 |
| GenImage | Chameleon | Synthbuster | |||||||||
| Method | Fakes | TPR@5 | worst | TPR@1 | FPR | TPR@5 | TPR@1 | FPR | TPR@5 | worst | FPR |
| Trained with generated images | |||||||||||
| SimLBR (released) | 162k | 85.3 | 45.0 | 74.2 | 4.2 | 84.0 | 75.6 | 7.7 | 80.3 | 41.9 | 4.5 |
| SimLBR (retrained) | 10k | 83.8 | 41.0 | 73.0 | 3.7 | 81.1 | 68.0 | 6.4 | 81.3 | 40.5 | 5.3 |
| Supervised probe | 10k | 80.3 | 32.4 | 67.9 | 3.6 | 73.2 | 55.4 | 4.9 | 78.4 | 31.6 | 5.2 |
| Training-free | |||||||||||
| Downscaled reals | Cropped reals | |||||
| Method | Mean | Worst | FPR | Mean | Worst | FPR |
| SimLBR (released) | 80.3 | 41.9 | 5.6 | 77.9 | 36.1 | 5.3 |
| Supervised probe | 78.4 | 31.6 | 5.5 | 69.5 | 21.3 | 3.8 |
| Reconstruction probe | 70.1 | 32.4 | 5.5 | 52.8 | 17.3 | 4.9 |
| Déjà VAE-I | 84.5 | 35.1 | 5.7 | 68.2 | 13.1 | 7.3 |
| Déjà VAE-P | 74.7 | 18.9 | 4.5 | 62.7 | 8.7 | 5.0 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| GenImage | Chameleon | Size-matched | Synthbuster | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | @5 | @1 | FPR | @5 | @1 | FPR | @5 | @1 | FPR | @5 | @1 | FPR |
| SimLBR (released) | 83.5 | 73.4 | 3.4 | 84.5 | 71.6 | 7.5 | 75.9 | 59.2 | 7.5 | 81.9 | 64.9 | 4.8 |
| SimLBR (retrained) | 83.3 | 69.7 | 4.1 | 81.8 | 70.8 | 7.3 | 74.6 | 60.5 | 7.3 | 82.7 | 69.9 | 5.4 |
| Supervised probe | 80.9 | 70.7 | 4.4 | 74.1 | 57.4 | 5.9 | 66.6 | 49.3 | 5.9 | 79.2 | 68.0 | 6.0 |
| Reconstruction probe | 78.1 | 61.4 | 9.5 | 59.1 | 28.9 | 11.2 | 56.0 | 29.5 | 11.2 | 72.8 | 55.5 | 13.1 |
| Déjà VAE-I | 85.8 | 72.3 | 3.1 | 37.3 | 18.8 | 3.1 | 27.7 | 11.4 | 3.1 | 85.5 | 75.0 | 3.4 |
| GenImage | Chameleon | Synthbuster | ||||
|---|---|---|---|---|---|---|
| Variant | TPR@5 | FPR | TPR@5 | FPR | TPR@5 | FPR |
| Déjà VAE-I as in the paper | 87.5 | 5.0 | 33.9 | 2.0 | 84.5 | 3.0 |
| final layer instead of layers 8–18 | 79.5 | 3.6 | 61.2 | 3.9 | 85.7 | 4.0 |
| without counterfactual rows | 92.8 | 29.8 | 36.0 | 12.8 | 84.9 | 16.8 |
| Downscaled reals | Cropped reals | |||||
|---|---|---|---|---|---|---|
| Generator | Déjà VAE-I | SimLBR | Difference | Déjà VAE-I | SimLBR | Difference |
| DALL E 2 | 93.7 | 50.7 | +43.0 [+38.5, +47.9] | 78.3 | 47.4 | +30.9 [+25.2, +36.0] |
| DALL E 3 | 62.6 | 99.8 | 37.2 [ 42.0, 32.5] | 26.1 | 99.6 | 73.5 [ 79.1, 66.5] |
| Firefly | 98.3 | 41.9 | +56.4 [+51.5, +63.2] | 90.5 | 36.1 | +54.4 [+49.2, +58.4] |
| GLIDE | 35.1 | 74.9 | 39.8 [ 44.5, 33.3] | 13.1 | 71.3 | 58.2 [ 62.1, 53.3] |
| Midjourney v5 | 86.1 | 91.0 | 4.9 [ 7.7, 1.5] | 60.2 | 90.0 | 29.8 [ 36.7, 23.9] |
| Generator | Pred. | ft-MSE | Déjà VAE-I | Déjà VAE-P | Déjà VAE-TF |
|---|---|---|---|---|---|
| GenImage | |||||
| ADM | 66.8 | +11.3 [+9.3, +13.5] | +22.4 [+19.8, +25.0] | 3.6 [ 6.6, +0.0] | |
| BigGAN | 83.8 | +10.8 [+9.3, +12.6] | +20.4 [+18.6, +22.5] | +11.4 [+9.9, +13.8] | |
| Midjourney | 91.3 | 7.7 [ 9.5, 6.0] | 2.7 [ 3.9, 1.3] | 33.1 [ 35.8, 29.4] | |
| VQDM | 95.9 | +3.8 [+2.9, +4.8] | +16.6 [+14.7, +18.6] | +9.1 [+6.4, +12.4] | |
| GLIDE | 65.1 | +11.5 [+9.1, +14.1] | +30.4 [+27.7, +33.3] | 10.8 [ 14.0, 7.1] | |
AI-Generated Image Detection
AI-generated image detection identifies synthetic or AI-edited images and develops methods that generalize across generators, domains, and image transformations.
See all 211 papers