DiffusionPrint: Learning Generative Fingerprints for Diffusion-Based Inpainting Localization
Organizations: Information Technologies Institute, CERTH
Abstract
Modern diffusion-based inpainting models pose significant challenges for image forgery localization (IFL), as their full regeneration pipelines reconstruct the entire image via a latent decoder, disrupting the camera-level noise patterns that existing forensic methods rely on. We propose DiffusionPrint, a patch-level contrastive learning framework that learns a forensic signal robust to the spectral distortions introduced by latent decoding. It exploits the fact that inpainted regions generated by the same model share a consistent generative fingerprint, using this as a self-supervisory signal. DiffusionPrint trains a convolutional backbone via a MoCo-style objective with cross-category hard negative mining and a generator-aware classification head, producing a forensic feature map that serves as a highly discriminative secondary modality in fusion-based IFL frameworks. Integrated into TruFor, MMFusion, and a lightweight fusion baseline, DiffusionPrint consistently improves localization across multiple generative models, with gains of up to +28% on mask types unseen during fine-tuning and confirmed generalization to unseen generative architectures. Code is available at https://github.com/mever-team/diffusionprint
Figures & tables
| Configuration | All (%) | IID (%) | |
|---|---|---|---|
| Pairing | MoCo | 75.21 | 78.33 |
| Ours | 86.35 | 87.69 | |
| Channels | 1 (flatten) | 80.36 | 81.10 |
| 64 (GAP) | 86.35 | 87.69 | |
| 256 (GAP) | 85.00 | 85.41 | |
| Top- | 64 | 85.83 | 86.45 |
| SD 2.1 | SDXL | Flux schnell | Flux dev | Flux fill | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Framework | Modality | sem | rand | sem | rand | sem | rand | sem | rand | sem | rand |
| Lite Baseline | NP++ | 52% | 23% | 60% | 61% | 75% | 72% | 65% | 62% | 64% | 59% |
| DP | 54% +2 | 25% +2 | 64% +4 | 68% +7 | 85% +10 | 77% +5 | 80% +15 | 73% +11 | 73% +9 | 73% +14 | |
| DP † | 52% +0 | 25% +2 | 65% +5 | 70% +9 | 88% +13 | 76% +4 | 81% +16 | 71% +9 | 76% +12 | 77% +18 | |
| TruFor [ 23 ] | NP++ | 50% | 23% | 61% | 62% | 80% | 62% | 69% | 46% | 65% | 59% |
| DP | 53% +3 | 25% +2 | 67% +6 | 73% +11 | 89% +9 | 85% +23 | 83% +14 | 74% +28 | 75% +10 | 74% +15 | |
| Augmentation Strategy | Overall Accuracy (%) |
|---|---|
| None | 84.90 |
| Geometric | 86.35 |
| Geometric + JPEG | 83.40 |
| Geometric + HP Filter | 64.10 |
Image Forgery Localization
Image forgery localization identifies manipulated or AI-generated regions in images, often alongside image-level authenticity detection.
See all 79 papers