Difficulty Calibration Across Time for Membership Inference in Diffusion Models
Organizations: The Hebrew University of Jerusalem
Abstract
Modern diffusion models are trained on massive datasets that often include copyrighted or private images. Membership inference attacks (MIAs) address this by testing whether a given image was in a model's training set. The standard approach scores an image by its reconstruction loss and flags low-loss images as members. This often fails because some images are simply easier to reconstruct than others, so a simple unseen image can score a lower loss than a complex training image. Difficulty calibration separates memorization from how difficult an image is to begin with. We show how to calibrate along two axes of time: training time and diffusion time. First, across training time, we introduce Reference-Model Calibration (RMC), which compares a fine-tuned model's loss against an earlier checkpoint. This cleanly isolates newly memorized data and gives near-perfect auditing, even without text captions. Since earlier checkpoints are not always available, we next present Temporal Self-Calibration (TSC), which calibrates across diffusion time using only a single model. Our key observation is that an image's difficulty persists across noise levels, whereas memorization is localized in time. By comparing the loss at a target timestep against neighboring timesteps from the same model, TSC attenuates image difficulty using the model's own trajectory. Empirically, our methods beat the state of the art by a wide margin, and unlike most existing attacks, generalize across different model parameterizations such as -, -, and -prediction models. Code is available at https://github.com/MichaelJoseph777/TSC.
Figures & tables
| Pokémon | MS COCO | Flickr | ||||||||
| Method | AUC | ASR | TPR@1%FPR | AUC | ASR | TPR@1%FPR | AUC | ASR | TPR@1%FPR | |
| CLiD | ( ) | 96.98 | 91.83 | 64.75 | 95.55 | 88.72 | 44.04 | 95.22 | 88.16 | 47.14 |
| RMC | ( ) | 99.44 | 96.51 | 90.63 | 99.88 | 98.52 | 96.60 | 99.80 | 98.14 | 96.86 |
| ( ) | 99.73 | 97.84 | 96.64 | 99.94 | 99.04 | 98.52 | 99.96 | 99.50 | 99.82 | |
| CIFAR-10 | Tiny ImageNet | STL-10-U | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Method | AUC | ASR | TPR@1%FPR | AUC | ASR | TPR@1%FPR | AUC | ASR | TPR@1%FPR | |
| Naive | ( ) | 85.39 | 78.21 | 7.35 | 64.37 | 60.52 | 2.93 | 64.15 | 60.50 | 2.51 |
| SecMI | ( ) | 88.24 | 80.91 | 10.20 | 66.37 | 61.88 | 2.91 | 68.12 | 63.33 | 3.03 |
| PIA | ( ) | 91.90 | 84.88 | 25.80 | 68.99 | 64.25 | 4.43 | 69.46 | 64.51 | 4.08 |
| PIAN | ( ) | 89.26 | 83.32 | 30.90 | 67.04 | 63.44 | 6.10 | 66.72 | 63.36 | 4.32 |
| TSC | ( ) | 95.91 | 90.15 | 62.31 | 78.63 | 72.18 | 12.27 | 77.84 | 71.29 | 9.57 |
| Pokémon | MS COCO | Flickr | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Method | AUC | ASR | TPR@1%FPR | AUC | ASR | TPR@1%FPR | AUC | ASR | TPR@1%FPR | |
| Naive | ( ) | 84.84 | 77.43 | 28.37 | 76.61 | 69.92 | 7.16 | 77.96 | 71.66 | 10.08 |
| SecMI | ( ) | 83.59 | 76.47 | 15.14 | 78.33 | 71.46 | 6.84 | 81.14 | 74.24 | 7.40 |
| PIA ( ) | ( | 69.86 | 66.13 | 19.71 | 54.08 | 53.96 | 2.76 | 54.73 | 53.24 | 1.96 |
| PIA (optimal ) | ( ) | 94.50 | 87.88 | 61.30 | 75.61 | 70.90 | 17.36 | 74.18 | 69.58 | 17.12 |
| PIAN | ( ) | 53.34 | 54.15 | 1.92 | 69.20 | 64.08 | 13.88 | 69.15 | 65.10 | 12.40 |
| Selected ( loss) | -loss | -loss | -loss | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | -pred | -pred | -pred | -pred | -pred | -pred | -pred | -pred | -pred | ||
| Naive | ( ) | 6.48 | 6.05 | 6.74 | 34.54 | 34.28 | 34.56 | 27.52 | 29.78 | 28.29 | |
| PIA | ( ) | 2.27 | 4.07 | 6.22 | 1.01 | 52.48 | 54.84 | 31.69 | 74.61 | 75.85 | |
| PIAN | ( ) | 2.41 | 6.00 | 5.69 | 1.06 | 56.68 | 58.36 | 72.11 | 77.77 | 76.73 | |
| SecMI | ( ) | default | 0.94 | 1.10 | 1.19 | 5.55 | 5.57 | 5.26 | 29.25 | 35.40 | 30.82 |
| TSC | ( ) | 30.28 | 28.74 | 31.26 | 81.31 | 80.56 | 80.68 | 91.22 | 93.22 | 92.75 | |
| Filter | Setting | AUC | TPR | AUC | TPR |
|---|---|---|---|---|---|
| TSC (endpoints) | 87.06 | 35.30 | 88.11 | 39.26 | |
| Even | 83.96 | 26.43 | 86.84 | 34.84 | |
| Gaussian (full) | – | – | 81.21 | 20.57 | |
| Gaussian (window) | 71.84 | 5.72 | 79.53 | 11.28 | |
| Reverse window | 80.58 | 16.26 | 85.65 | 27.95 | |
| Reference | AUC | TPR | |
|---|---|---|---|
| Symmetric | 87.06 | 35.30 | |
| Left only | 78.15 | 23.52 | |
| Right only | 82.13 | 6.47 | |
| Unequal | 88.77 | 30.94 | |
| Unequal | 80.64 | 26.56 | |
| Weighted | 86.24 | 29.11 |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| -prediction | -prediction | -prediction | ||||
|---|---|---|---|---|---|---|
| -loss: | ||||||
| -loss: | ||||||
| -loss: | ||||||
| Dataset | Resolution | Member | Hold-out | Aug. | Steps | Epochs |
|---|---|---|---|---|---|---|
| CIFAR-10 | 25k | 25k | HFlip | 800k | k | |
| CIFAR-100 | 25k | 25k | HFlip | 800k | k | |
| STL-10-U | 50k | 50k | HFlip | 1.6M | k | |
| Tiny ImageNet | 50k | 50k | HFlip | 1.6M | k |
| Dataset | Train | Hold-out | Steps | Aug. |
|---|---|---|---|---|
| Pokémon | 416 | 417 | 7.5k | Crop |
| MS-COCO | 2.5k | 2.5k | 150k | Crop |
| Flickr30k | 2.5k | 2.5k | 150k | Crop |
| Dataset | Train | Hold-out | Steps | Aug. |
|---|---|---|---|---|
| Pokémon | 416 | 417 | 7.5k | Crop+HFlip |
| MS-COCO | 2.5k | 2.5k | 50k | Crop+HFlip |
| Flickr30k | 10k | 10k | 200k | Crop+HFlip |
| CIFAR-10 | C100 hflip | STL-10-U | Tiny ImageNet | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Reference | AUC | TPR | AUC | TPR | AUC | TPR | AUC | TPR | |
| 15 | Symmetric | 95.91 | 62.31 | 95.85 | 57.06 | 77.84 | 9.57 | 78.63 | 12.27 |
| 15 | Left only | 88.78 | 42.48 | 88.95 | 38.22 | 67.39 | 6.42 | 67.48 | 6.97 |
| 15 | Right only | 91.70 | 9.76 | 92.11 | 12.09 | 71.34 | 1.62 | 73.37 | 2.41 |
| 15 | Unequal | 97.27 | 55.60 | 97.32 | 54.35 | 80.12 | 6.79 | 80.38 | 7.02 |
| 15 | Unequal | 90.18 | 44.90 | 90.24 | 40.80 | 70.74 | 8.63 | 71.42 | 11.91 |
| Component | Mean gap | Pooled SD | AUC |
|---|---|---|---|
| Center | 0.3885 | 0.4119 | 74.26 |
| Symmetric | 0.2566 | 0.1366 | 87.06 |
| Endpoint difference | 0.0371 | 0.1552 | 57.14 |
| Left reference | 0.2937 | 0.2464 | 77.80 |
| Right reference | 0.2195 | 0.1580 | 81.84 |
Membership Inference Attacks
Membership inference attacks test whether records or entities were used to train a machine-learning model, revealing potential privacy leakage.
See all 117 papers