FARE: Forensic Acceptance Region Estimation for Catching Bait-and-Switch Image Generators
Organizations: School of Informatics The University of Edinburgh
Abstract
Modern AI image generators are increasingly deployed as opaque APIs, where customers can query the deployed service, but cannot inspect model weights or architecture. This creates a practical challenge: a provider may pass governance certification with one generator and later silently switch to a cheaper and lower-quality one for deployment, compromising public trust or even safety in high-stakes domains. We study integrity auditing at deployment time and propose FARE (Forensic Acceptance Region Estimation). A certified generator is enrolled by training FARE on images sampled from that generator. After deployment, FARE can determine whether a generated image is consistent with the enrolled generator---using only that image. FARE's features are based on image generator-specific artifacts that have been proposed for forensic applications. FARE amplifies these features during training by finding hard samples that tighten the acceptance region and increase sensitivity to subtle changes in the certified generator. Across generator swaps, including substitutions with similar model versions and model variants, FARE is effective at detecting swaps, consistently outperforming existing baselines at strict operating points, and remains effective under the exact-model and decision-only attacks evaluated in this work.
Figures & tables
| Detection Method | Cross-Family Swaps | Within-Family Swaps | ||
|---|---|---|---|---|
| CF-FFHQ | CF-Diff | WF-GANTrain | WF-SDVer | |
| TPR@1%FPR | TPR@1%FPR | TPR@1%FPR | TPR@1%FPR | |
| Deep SVDD | 12.46 29.05 | 0.00 0.00 | 1.23 0.62 | 1.21 1.06 |
| OC-SVM | 6.89 15.51 | 0.00 0.00 | 0.76 0.49 | 2.79 4.31 |
| CLIP + OC-SVM | 13.91 31.48 | 0.00 0.00 | 1.34 0.52 | 1.73 1.66 |
| DCT Fingerprint + OC-SVM | 11.46 26.84 | 0.00 0.00 | 0.89 0.40 | 3.07 4.40 |
| Deployment Variant | Detection Performance (TPR@1%FPR) | |||
|---|---|---|---|---|
| StyleGAN3 | VDVAE | NCSN++ | SD2.1 | |
| Weight compression | ||||
| Quantization (INT6) | 92.57 0.91 | 91.03 1.02 | 90.50 1.10 | 86.42 1.35 |
| Quantization (INT4) | 98.89 0.34 | 97.14 0.48 | 98.39 0.29 | 98.27 0.31 |
| Mild Pruning | 92.42 0.88 | 93.44 0.77 | 91.57 0.95 | 87.36 1.28 |
| Heavy Pruning | 98.44 0.41 | 99.32 0.22 | 97.53 0.52 | 98.12 0.36 |
| Rule | WF-GANTrain (TPR@ FPR) | WF-SDVer (TPR@ FPR) | |||||
|---|---|---|---|---|---|---|---|
| Single-image | 1 | 96.38 2.77 | 89.86 2.64 | 71.53 4.87 | 92.56 3.06 | 85.49 3.84 | 62.39 5.27 |
| Batch (Mean) | 5 | 99.81 0.24 | 99.67 0.31 | 99.03 0.46 | 99.46 0.35 | 99.12 0.43 | 98.27 0.68 |
| Batch (Mean) | 10 | 99.92 0.17 | 99.85 0.23 | 99.47 0.32 | 99.73 0.26 | 99.41 0.36 | 98.84 0.49 |
| Batch (Max) | 5 | 99.48 0.37 | 99.16 0.45 | 98.29 0.63 | 98.93 0.42 | 98.57 0.58 | 97.24 0.86 |
| Batch (Max) | 10 | 99.65 0.26 | 99.37 0.34 | 98.74 0.47 | 99.21 0.33 | 98.86 0.46 | 97.92 0.67 |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Scenario | Certified deployment(s) | Non-certified deployment(s) | Resolution |
|---|---|---|---|
| CF-FFHQ | SG2, SG3-T, GANformer, StyleSwin, R3GAN, CIPS, VDVAE, VQVAE, NVAE, NCSN++, LDM, ADM | For each certified model, the remaining models in the pool | |
| CF-Diff | SD1.4, SD1.5, SD2.0, SD2.1, SD3.5-Medium | Evaluation images from CommunityForensics | |
| WF-GANTrain (SG2) | SG2-30k, SG2-70k, SG2-140k, SG2-30k-ADA, SG2-70k-ADA, SG2-140k-ADA | For each certified model, the remaining models in the pool | |
| WF-GANTrain (SG3) | SG3-T, SG3-R, SG3-T-FFHQU, SG3-R-FFHQU | For each certified model, the remaining models in the pool | |
| WF-SDVer | SD1.4, SD1.5, SD2.0, SD2.1, SD3.5-Medium | For each certified model, the remaining models in the pool |
| Method | Implementation details |
|---|---|
| Deep SVDD | The same convolutional backbone as FARE, but without the constrained front-end and with a -dimensional embedding head. The center is initialized from certified patches. Training uses patches and batch size . The image score is the top- mean of squared distances to the learned center. |
| OC-SVM (Patch) | A one-class SVM trained on frozen ResNet-50 patch descriptors. Certified patches are resized to . The RBF kernel uses and . Image scores are the top- mean of patch anomaly scores. |
| CLIP + OC-SVM | A one-class SVM trained on frozen CLIP ViT-B/32 image embeddings of a full image. The RBF kernel uses and . |
| DCT Feature + OC-SVM | A one-class SVM trained on our adapted -dimensional DCT fingerprints, motivated by [ 30 ] , computed from the mean absolute AC coefficients of each full image. The RBF kernel uses and . Because this baseline is image-level, no patch aggregation is applied. |
| FSD | A one-class model fitted to the frozen Forensic Self-Description representation [ 31 ] . Task-specific fitting and threshold calibration use only certified-generator outputs. |
| NPR + OC-SVM | A one-class SVM fitted to frozen Neighboring Pixel Relationships features [ 32 ] . Task-specific fitting and threshold calibration use only certified-generator outputs. |
| Hyperparameter | Value |
|---|---|
| Num certified training images | 100,000 |
| Num certified calibration images | 10,000 |
| Num verification images | 10,000 |
| Image resolution | for FFHQ pool (i.e. GAN/VAE/diffusion pool); for the conditioned SD family |
| Patch size | for both training and verification |
| Top- parameter |
| Stage | Implemented setting |
|---|---|
| Constrained conv layer | Bayar–Stamm constrained depthwise convolution, kernel size , eight filters per RGB channel, constraint scale |
| Channel mixing | conv from channels to width , followed by ReLU |
| Backbone | Six convolutional blocks with widths and strides |
| Normalization | GroupNorm throughout the backbone |
| Head | Global average pooling, then a linear map from features to one logit |
| Attack hyperparameter | Value |
|---|---|
| Attack type | PGD on image pixels as a white-box stress test against the deployed detector |
| Optimization objective | Minimize , i.e., the image-level detector score after top- aggregation |
| Perturbation budget | with images normalized to |
| Number of PGD steps | 50 with early stopping after successful acceptance |
| Step size | 0.001 |
| Random restarts | 5, retaining the best adversarial example across restarts |
| CF-FFHQ | CF-Diff | WF-GANTrain | WF-SDVer | |
|---|---|---|---|---|
| 8 | 91.24 1.25 | 99.17 0.67 | 92.42 2.43 | 90.35 5.42 |
| 32 | 99.43 1.19 | 99.45 0.88 | 96.38 2.77 | 92.56 3.06 |
| 128 | 89.93 2.51 | 85.02 4.53 | 70.11 6.12 | 72.84 9.43 |
| CF-FFHQ | CF-Diff | WF-GANTrain (avg.) | WF-SDVer | |
|---|---|---|---|---|
| 5 | 98.87 1.12 | 96.08 2.34 | 94.86 1.89 | 88.73 3.45 |
| 10 | 99.43 1.19 | 99.45 0.88 | 96.38 2.77 | 92.56 3.06 |
| 50 | 99.49 0.74 | 99.11 1.02 | 95.74 1.72 | 91.88 2.41 |
| 100 | 95.54 2.67 | 94.27 3.11 | 92.91 3.48 | 86.92 4.92 |
| CF-FFHQ | CF-Diff | WF-GANTrain | WF-SDVer | |
|---|---|---|---|---|
| 0 | 96.26 2.14 | 98.71 1.05 | 93.54 2.88 | 89.92 2.12 |
| 1,000 | 98.90 1.45 | 99.23 0.82 | 95.81 1.94 | 92.84 1.56 |
| 2,000 | 99.43 1.19 | 99.45 0.88 | 96.38 2.77 | 92.56 3.06 |
| 10,000 | 99.40 1.02 | 99.68 0.54 | 96.33 1.68 | 92.13 2.04 |
| Certified | 30k | 70k | 140k | 30k-A | 70k-A | 140k-A |
|---|---|---|---|---|---|---|
| SG2-30k | – | 97.40 | 98.04 | 96.81 | 98.28 | 98.12 |
| SG2-70k | 98.45 | – | 91.67 | 98.08 | 93.49 | 93.82 |
| SG2-140k | 99.20 | 92.52 | – | 96.71 | 93.67 | 93.01 |
| SG2-30k-ADA | 97.72 | 97.14 | 97.54 | – | 94.44 | 94.78 |
| SG2-70k-ADA | 99.48 | 94.31 | 94.56 | 95.36 | – | 89.29 |
| SG2-140k-ADA | 99.53 | 94.73 | 93.82 | 95.83 | 90.11 | – |
| Certified | SG3-T | SG3-R | SG3-T-FFHQU | SG3-R-FFHQU |
|---|---|---|---|---|
| SG3-T | – | 99.01 | 96.93 | 99.93 |
| SG3-R | 99.83 | – | 99.93 | 96.11 |
| SG3-T-FFHQU | 96.02 | 99.19 | – | 98.98 |
| SG3-R-FFHQU | 99.20 | 95.18 | 99.82 | – |
| Certified | SD1.4 | SD1.5 | SD2.0 | SD2.1 | SD3.5-M |
|---|---|---|---|---|---|
| SD1.4 | – | 85.85 | 90.29 | 91.02 | 93.32 |
| SD1.5 | 89.53 | – | 89.58 | 90.54 | 93.96 |
| SD2.0 | 94.06 | 93.97 | – | 87.63 | 93.40 |
| SD2.1 | 94.01 | 94.12 | 90.87 | – | 92.88 |
| SD3.5-M | 97.03 | 95.95 | 96.57 | 96.62 | – |
| Contradiction transform set | Mean TPR@1%FPR |
|---|---|
| All four transforms | 98.84 |
| Without Gaussian blur | 86.76 |
| Without Gaussian noise | 94.28 |
| Without JPEG compression | 93.90 |
| Without crop–resize | 80.63 |
| Steps | Latency (s/image) | Energy (J/image) | Peak memory (GiB) | CLIP similarity |
|---|---|---|---|---|
| 20 | 1.311 | 354.9 | 3.10 | 0.2956 |
| 10 | 0.701 | 204.9 | 3.10 | 0.2796 |
| 5 | 0.384 | 111.4 | 3.10 | 0.2409 |
| Train/cal. prompt split | Verification prompt split | TPR@1%FPR |
|---|---|---|
| “Animal” | Other prompts | 97.83 2.25 |
| “Artifacts” | Other prompts | 99.27 1.03 |
| “World-knowledge” | Other prompts | 97.74 1.40 |
| “People” | Other prompts | 98.68 1.79 |
| Item | Value |
|---|---|
| Software stack | Python 3.11.10, PyTorch 2.5.1, CUDA 12.1, torchvision 0.20.1, diffusers 0.37.0, transformers 5.3.0, scikit-learn 1.8.0, pandas 3.0.1 |
| GPU | NVIDIA H200 |
| Code release | https://github.com/kaikaiyao/FARE (core implementation) |
Digital Image Forensics
Digital image forensics develops methods to detect, localize, explain, and trace image manipulation, synthetic content, and hidden data.
See all 112 papers