Update model card and evaluation figures
Browse files- .gitattributes +4 -0
- README.md +280 -44
- assets/ablation/auroc_comparison.png +0 -0
- assets/baseline/robustness_comparison.svg +134 -0
- assets/baseline/summary.csv +4 -0
- assets/baseline/summary.json +29 -0
- assets/error-analysis/clean-false-negative-water-silhouette.jpg +0 -0
- assets/error-analysis/clean-false-positive-food.jpg +0 -0
- assets/error-analysis/composed-false-negative-clean.jpg +3 -0
- assets/error-analysis/composed-false-negative-transformed.jpg +3 -0
- assets/error-analysis/composed-false-positive-clean.jpg +0 -0
- assets/error-analysis/composed-false-positive-transformed.jpg +0 -0
- assets/error-analysis/crop-false-negative-clean.jpg +3 -0
- assets/error-analysis/crop-false-negative-transformed.jpg +3 -0
- assets/error-analysis/resize-false-positive-clean.jpg +0 -0
- assets/error-analysis/resize-false-positive-transformed.jpg +0 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
assets/error-analysis/composed-false-negative-clean.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
assets/error-analysis/composed-false-negative-transformed.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
assets/error-analysis/crop-false-negative-clean.jpg filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
assets/error-analysis/crop-false-negative-transformed.jpg filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,16 +1,7 @@
|
|
| 1 |
-
---
|
| 2 |
-
library_name: pytorch
|
| 3 |
-
pipeline_tag: image-classification
|
| 4 |
-
tags:
|
| 5 |
-
- ai-generated-image-detection
|
| 6 |
-
- image-forensics
|
| 7 |
-
- robust-classification
|
| 8 |
-
license: other
|
| 9 |
-
---
|
| 10 |
|
| 11 |
# RobustFake
|
| 12 |
|
| 13 |
-
[GitHub](https://github.com/ParrotG/RobustFake) · [Hugging Face Model](https://huggingface.co/
|
| 14 |
|
| 15 |
## Problem and Solution
|
| 16 |
|
|
@@ -23,26 +14,45 @@ RobustFake addresses this problem with a frozen CLIP ViT-B/16 visual encoder and
|
|
| 23 |
| Category | Selection |
|
| 24 |
|---|---|
|
| 25 |
| Development environment | Visual Studio Code; Python command-line workflow |
|
| 26 |
-
| Model | Frozen OpenCLIP `ViT-B-16-quickgelu/openai`; trainable multi-layer fusion and binary detection heads; residual-statistics branch |
|
| 27 |
| Core libraries and frameworks | PyTorch, torchvision, OpenCLIP, Pillow, scikit-learn, NumPy, Hugging Face Hub, PyArrow, ModelScope Hub |
|
| 28 |
| Training datasets | Shanmuk AI Image Detection Dataset, WildFake train split, Community Forensics-Small, Tiny-GenImage |
|
| 29 |
| Official demonstration dataset | WildFake subset: COCO val2017 real images and DALL·E Advanced generated images |
|
| 30 |
| Scale | 80,000 prepared images; 64k train, 8k ID validation, 8k domain-generalisation validation |
|
| 31 |
| Compute profile | Frozen backbone; fewer than 5M trainable parameters; approximately 8–12GB NVIDIA GPU memory recommended |
|
| 32 |
|
| 33 |
-
The challenge specification is preserved in [docs/QUESTION.MD](docs/QUESTION.MD). Detailed acquisition, compliance, engineering, and recovery behavior is documented in [docs/PROJECT.md](docs/PROJECT.md).
|
| 34 |
|
| 35 |
## Contents
|
| 36 |
|
| 37 |
-
- [
|
| 38 |
-
- [
|
| 39 |
-
- [
|
| 40 |
-
- [
|
| 41 |
-
- [
|
| 42 |
-
- [
|
| 43 |
-
- [
|
| 44 |
-
- [
|
| 45 |
-
- [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
## Model Design
|
| 48 |
|
|
@@ -59,7 +69,7 @@ For each view, the detector extracts the final 512-dimensional projected CLIP em
|
|
| 59 |
|
| 60 |
The fused global and local embeddings are aggregated with their mean and standard deviation. The mean represents evidence shared by both views; the standard deviation exposes disagreement between global context and local detail. This aggregation is invariant to view ordering.
|
| 61 |
|
| 62 |
-
The residual-statistics branch computes 24 fixed high-pass statistics per view from directional residuals, channel-wise Laplacians, and horizontal/vertical pixel differences. Its view-wise mean and standard deviation pass through a small MLP and are concatenated with the CLIP aggregate. This gives the detector direct access to compact forensic evidence while leaving the CLIP backbone frozen.
|
| 63 |
|
| 64 |
```mermaid
|
| 65 |
flowchart TD
|
|
@@ -118,12 +128,14 @@ The final feature head is `LayerNorm → Linear → GELU → Dropout`, followed
|
|
| 118 |
|
| 119 |
The training pool is designed to represent variation along two different axes: how authentic images are acquired and what type of generator produces synthetic images. Authentic content includes photographic, web-scale, face, landscape, and ImageNet/COCO-like sources. Synthetic content spans diffusion, GAN, autoregressive/other families, general-purpose generators, fine-tuned community models, and multiple generation resolutions. This diversity is intended to make the decision boundary less dependent on one benchmark's content style or one generator family.
|
| 120 |
|
| 121 |
-
|
|
| 122 |
-
|---|---|
|
| 123 |
-
| Shanmuk paired set |
|
| 124 |
-
| WildFake train split |
|
| 125 |
-
| Community Forensics-Small |
|
| 126 |
-
| Tiny-GenImage |
|
|
|
|
|
|
|
| 127 |
|
| 128 |
The physical pool contains 40,000 real and 40,000 generated images. Source quotas prevent a large repository from replacing the intended mixture. Within each quota, real samples are bucketed by acquisition/content source and generated samples by family, architecture, and model. Square-root allocation gives larger domains more examples while reducing their ability to dominate and avoiding excessive oversampling of very small buckets.
|
| 129 |
|
|
@@ -226,6 +238,75 @@ With the internally selected robust calibrated threshold, clean Balanced Accurac
|
|
| 226 |
|
| 227 |
Official evaluation caches frozen final, intermediate, and residual features by preprocessing identity and scenario. The first evaluation computes CLIP features; compatible checkpoints subsequently execute only the trainable head. A deterministic `--fast` profile uses a balanced 2,000-image subset and representative severe scenarios for iteration, while the formal report always uses the complete official subset and full prescribed matrix.
|
| 228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
## Environment and Reproduction
|
| 230 |
|
| 231 |
### Environment requirements
|
|
@@ -247,14 +328,14 @@ uv sync --extra dev
|
|
| 247 |
|
| 248 |
All runtime settings are centralised in [configs/default.yaml](configs/default.yaml). Commands accept `--config` and repeated `--set section.key=value` overrides.
|
| 249 |
|
| 250 |
-
The
|
| 251 |
|
| 252 |
To download the model package without running inference:
|
| 253 |
|
| 254 |
```bash
|
| 255 |
uv run robustfake-download-model \
|
| 256 |
--config configs/default.yaml \
|
| 257 |
-
--hf-repo
|
| 258 |
```
|
| 259 |
|
| 260 |
### Required directory-to-JSON inference
|
|
@@ -264,7 +345,7 @@ The challenge-required CLI recursively scores supported images and atomically wr
|
|
| 264 |
```bash
|
| 265 |
uv run aigc-predict \
|
| 266 |
--config configs/default.yaml \
|
| 267 |
-
--hf-repo
|
| 268 |
--input-dir path/to/images \
|
| 269 |
--output-json predictions.json
|
| 270 |
```
|
|
@@ -279,7 +360,7 @@ Each output item contains exactly the required fields:
|
|
| 279 |
|
| 280 |
After the first download, Hugging Face Hub reuses its local immutable snapshot cache. A local package remains supported by replacing `--hf-repo` with `--checkpoint path/to/best.pt`; place the matching `calibration.json` beside the checkpoint.
|
| 281 |
|
| 282 |
-
### Evaluation with the
|
| 283 |
|
| 284 |
After preparing the official demonstration subset, run either the fast diagnostic or complete matrix without training:
|
| 285 |
|
|
@@ -287,16 +368,16 @@ After preparing the official demonstration subset, run either the fast diagnosti
|
|
| 287 |
uv run aigc-prepare-official-eval --config configs/default.yaml
|
| 288 |
uv run aigc-evaluate-official \
|
| 289 |
--config configs/default.yaml \
|
| 290 |
-
--hf-repo
|
| 291 |
--fast
|
| 292 |
uv run aigc-evaluate-official \
|
| 293 |
--config configs/default.yaml \
|
| 294 |
-
--hf-repo
|
| 295 |
```
|
| 296 |
|
| 297 |
### Training reproduction
|
| 298 |
|
| 299 |
-
Prepare the official protected manifest
|
| 300 |
|
| 301 |
```bash
|
| 302 |
uv run aigc-prepare-official-eval --config configs/default.yaml
|
|
@@ -308,12 +389,9 @@ Cache frozen features and train the detector head:
|
|
| 308 |
|
| 309 |
```bash
|
| 310 |
uv run aigc-cache-features --config configs/default.yaml
|
| 311 |
-
uv run aigc-cache-residuals
|
| 312 |
-
--config configs/default.yaml \
|
| 313 |
-
--set model.residual_statistics_enabled=true
|
| 314 |
uv run aigc-train \
|
| 315 |
--config configs/default.yaml \
|
| 316 |
-
--set model.residual_statistics_enabled=true \
|
| 317 |
--set feature_cache.use_for_training=true
|
| 318 |
```
|
| 319 |
|
|
@@ -328,20 +406,178 @@ uv run aigc-evaluate-official \
|
|
| 328 |
--set evaluation.checkpoint_path=artifacts/runs/your_run/best.pt
|
| 329 |
```
|
| 330 |
|
| 331 |
-
For a shorter diagnostic pass, append `--fast` to the evaluation command.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
|
| 333 |
## Robustness Evaluation Summary
|
| 334 |
|
| 335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
|
| 337 |
## Error Analysis Note
|
| 338 |
|
| 339 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 340 |
|
| 341 |
## Limitation Reflection
|
| 342 |
|
| 343 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 344 |
|
| 345 |
## Team Contribution
|
| 346 |
|
| 347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
# RobustFake
|
| 3 |
|
| 4 |
+
[GitHub](https://github.com/ParrotG/RobustFake) · [Hugging Face Model](https://huggingface.co/ParrotG/RobustFake)
|
| 5 |
|
| 6 |
## Problem and Solution
|
| 7 |
|
|
|
|
| 14 |
| Category | Selection |
|
| 15 |
|---|---|
|
| 16 |
| Development environment | Visual Studio Code; Python command-line workflow |
|
| 17 |
+
| Model | Frozen OpenCLIP `ViT-B-16-quickgelu/openai`; trainable multi-layer fusion and binary detection heads; residual-statistics branch enabled by default |
|
| 18 |
| Core libraries and frameworks | PyTorch, torchvision, OpenCLIP, Pillow, scikit-learn, NumPy, Hugging Face Hub, PyArrow, ModelScope Hub |
|
| 19 |
| Training datasets | Shanmuk AI Image Detection Dataset, WildFake train split, Community Forensics-Small, Tiny-GenImage |
|
| 20 |
| Official demonstration dataset | WildFake subset: COCO val2017 real images and DALL·E Advanced generated images |
|
| 21 |
| Scale | 80,000 prepared images; 64k train, 8k ID validation, 8k domain-generalisation validation |
|
| 22 |
| Compute profile | Frozen backbone; fewer than 5M trainable parameters; approximately 8–12GB NVIDIA GPU memory recommended |
|
| 23 |
|
|
|
|
| 24 |
|
| 25 |
## Contents
|
| 26 |
|
| 27 |
+
- [RobustFake](#robustfake)
|
| 28 |
+
- [Problem and Solution](#problem-and-solution)
|
| 29 |
+
- [Project Snapshot](#project-snapshot)
|
| 30 |
+
- [Contents](#contents)
|
| 31 |
+
- [Model Design](#model-design)
|
| 32 |
+
- [Frozen multi-layer visual representation](#frozen-multi-layer-visual-representation)
|
| 33 |
+
- [Training objective](#training-objective)
|
| 34 |
+
- [Dataset Design](#dataset-design)
|
| 35 |
+
- [Training, Validation, and Calibration](#training-validation-and-calibration)
|
| 36 |
+
- [Paired robustness augmentation](#paired-robustness-augmentation)
|
| 37 |
+
- [Optimisation profile](#optimisation-profile)
|
| 38 |
+
- [Validation and checkpoint selection](#validation-and-checkpoint-selection)
|
| 39 |
+
- [Global calibration](#global-calibration)
|
| 40 |
+
- [Official Evaluation](#official-evaluation)
|
| 41 |
+
- [External academic baselines](#external-academic-baselines)
|
| 42 |
+
- [Ablation study results](#ablation-study-results)
|
| 43 |
+
- [Ablation Protocol](#ablation-protocol)
|
| 44 |
+
- [Environment and Reproduction](#environment-and-reproduction)
|
| 45 |
+
- [Environment requirements](#environment-requirements)
|
| 46 |
+
- [Installation](#installation)
|
| 47 |
+
- [Required directory-to-JSON inference](#required-directory-to-json-inference)
|
| 48 |
+
- [Evaluation with the Hugging Face model](#evaluation-with-the-hugging-face-model)
|
| 49 |
+
- [Training reproduction](#training-reproduction)
|
| 50 |
+
- [External baseline reproduction](#external-baseline-reproduction)
|
| 51 |
+
- [Ablation reproduction](#ablation-reproduction)
|
| 52 |
+
- [Robustness Evaluation Summary](#robustness-evaluation-summary)
|
| 53 |
+
- [Error Analysis Note](#error-analysis-note)
|
| 54 |
+
- [Limitation Reflection](#limitation-reflection)
|
| 55 |
+
- [Team Contribution](#team-contribution)
|
| 56 |
|
| 57 |
## Model Design
|
| 58 |
|
|
|
|
| 69 |
|
| 70 |
The fused global and local embeddings are aggregated with their mean and standard deviation. The mean represents evidence shared by both views; the standard deviation exposes disagreement between global context and local detail. This aggregation is invariant to view ordering.
|
| 71 |
|
| 72 |
+
The residual-statistics branch, enabled by default, computes 24 fixed high-pass statistics per view from directional residuals, channel-wise Laplacians, and horizontal/vertical pixel differences. Its view-wise mean and standard deviation pass through a small MLP and are concatenated with the CLIP aggregate. This gives the detector direct access to compact forensic evidence while leaving the CLIP backbone frozen.
|
| 73 |
|
| 74 |
```mermaid
|
| 75 |
flowchart TD
|
|
|
|
| 128 |
|
| 129 |
The training pool is designed to represent variation along two different axes: how authentic images are acquired and what type of generator produces synthetic images. Authentic content includes photographic, web-scale, face, landscape, and ImageNet/COCO-like sources. Synthetic content spans diffusion, GAN, autoregressive/other families, general-purpose generators, fine-tuned community models, and multiple generation resolutions. This diversity is intended to make the decision boundary less dependent on one benchmark's content style or one generator family.
|
| 130 |
|
| 131 |
+
| Dataset source | Authentic-image sources represented in the selected pool | AIGC generator categories and models represented in the selected pool |
|
| 132 |
+
|---|---|---|
|
| 133 |
+
| Shanmuk paired set | COCO and ImageNet parent images | Modern diffusion-family generators: Stable Diffusion 1.5, SDXL, FLUX.1-schnell, Kandinsky 2.2, PixArt-Σ, and Würstchen |
|
| 134 |
+
| WildFake train split | LAION-5B, ImageNet, FFHQ, CelebA-HQ, AFHQ, and Church | Diffusion models including ADM, VQDM, DDPM, DDIM, and Imagen; GAN-family models including BigGAN, StyleGAN, StarGAN, DF-GAN, GALIP, and GigaGAN; other token/autoencoding architectures including VQ-VAE, VQGAN, and MAE |
|
| 135 |
+
| Community Forensics-Small | COCO, FFHQ, LandscapesHQ, and VISION camera images | Latent-diffusion, pixel-diffusion, GAN, and other families; systematic models include ProGAN, BigGAN, GigaGAN, StyleGAN variants, ProjectedGAN, GLIDE, DeepFloyd, VQDiffusion, Taming Transformers, and LFM, supplemented by many community fine-tunes and LoRAs |
|
| 136 |
+
| Tiny-GenImage | ImageNet images | Diffusion and related generators ADM, GLIDE, Midjourney, VQDM, Stable Diffusion 1.5, and Wukong, plus the GAN-family BigGAN |
|
| 137 |
+
|
| 138 |
+
The entries above describe models and authentic origins that are actually present in the final 80,000-record manifest, rather than every category advertised by each upstream repository. In particular, the pinned Tiny-GenImage revision contains no physical SD1.4 records, so that declared class is not presented as observed coverage.
|
| 139 |
|
| 140 |
The physical pool contains 40,000 real and 40,000 generated images. Source quotas prevent a large repository from replacing the intended mixture. Within each quota, real samples are bucketed by acquisition/content source and generated samples by family, architecture, and model. Square-root allocation gives larger domains more examples while reducing their ability to dominate and avoiding excessive oversampling of very small buckets.
|
| 141 |
|
|
|
|
| 238 |
|
| 239 |
Official evaluation caches frozen final, intermediate, and residual features by preprocessing identity and scenario. The first evaluation computes CLIP features; compatible checkpoints subsequently execute only the trainable head. A deterministic `--fast` profile uses a balanced 2,000-image subset and representative severe scenarios for iteration, while the formal report always uses the complete official subset and full prescribed matrix.
|
| 240 |
|
| 241 |
+
### External academic baselines
|
| 242 |
+
|
| 243 |
+
The same prepared manifests and transformation scenarios can evaluate two pinned public detectors without retraining them:
|
| 244 |
+
|
| 245 |
+
- CNNDetection, the ResNet-50 `blur_jpg_prob0.5.pth` model from *CNN-generated images are surprisingly easy to spot... for now* (CVPR 2020);
|
| 246 |
+
- UnivFD, the OpenAI CLIP ViT-L/14 linear detector from *Towards Universal Fake Image Detectors That Generalize Across Generative Models* (CVPR 2023).
|
| 247 |
+
|
| 248 |
+
Their official checkpoints, repository revisions, preprocessing, score direction, and SHA-256 values are recorded in `baseline_evaluation`. Downloads are verified before loading. Baseline scores are deliberately reported as uncalibrated; AUROC and Average Precision are therefore the primary comparisons, while fixed-threshold metrics remain diagnostic.
|
| 249 |
+
|
| 250 |
+
```bash
|
| 251 |
+
uv run aigc-download-baselines --config configs/default.yaml
|
| 252 |
+
uv run aigc-evaluate-baselines \
|
| 253 |
+
--config configs/default.yaml \
|
| 254 |
+
--dataset wildfake_official \
|
| 255 |
+
--fast
|
| 256 |
+
```
|
| 257 |
+
|
| 258 |
+
Omit `--fast` for the complete single- and composed-transformation matrix. Use repeated `--baseline cnndetection` or `--baseline univfd` arguments to select individual baselines. Results and per-image predictions are written under `artifacts/evaluations/baselines/<dataset>/<baseline>/`; checkpoint-independent scenario scores are cached separately for repeatable presentation analysis.
|
| 259 |
+
|
| 260 |
+
#### Completed full-matrix comparison
|
| 261 |
+
|
| 262 |
+
All three detectors were evaluated on the same 13,841-image WildFake official demonstration set: 4,998 COCO val2017 authentic images and 8,843 DALL·E Advanced generated images. Every run contains the same record IDs and class counts for clean input, all 14 prescribed single transformations, and six additional composed stress tests. RobustFake uses its complete released inference pipeline; CNNDetection and UnivFD retain their pinned official checkpoints, 224-pixel preprocessing, and uncalibrated heads. Because no target-set calibration or retraining is applied to the public baselines, AUROC is the primary threshold-independent comparison.
|
| 263 |
+
|
| 264 |
+

|
| 265 |
+
|
| 266 |
+
| Detector | Clean AUROC | Mean prescribed-transform AUROC | Worst prescribed-transform AUROC | Worst prescribed scenario |
|
| 267 |
+
|---|---:|---:|---:|---|
|
| 268 |
+
| **RobustFake** | **0.9792** | **0.9683** | **0.9432** | Resize 0.5× |
|
| 269 |
+
| CNNDetection (CVPR 2020) | 0.6041 | 0.5975 | 0.5314 | Gaussian noise σ=0.10 |
|
| 270 |
+
| UnivFD (CVPR 2023) | 0.5898 | 0.5546 | 0.4024 | Resize 0.25× |
|
| 271 |
+
|
| 272 |
+
Relative to the stronger public baseline on each aggregate, RobustFake gains 37.5 AUROC points on clean input, 37.1 points on the mean prescribed transformation, and 41.2 points on the worst prescribed transformation. More importantly, its mean-to-worst decline is only 2.51 points, compared with 6.61 points for CNNDetection and 15.22 points for UnivFD. The per-scenario panel shows that this is not driven by one favorable corruption: RobustFake remains above 0.94 AUROC in every prescribed scenario, while the two public checkpoints are close to chance on several resizing, blur, and noise settings.
|
| 273 |
+
|
| 274 |
+
The result supports the complete-system design rather than attributing the gap to calibration: affine calibration is monotonic and cannot improve AUROC ranking. RobustFake combines a broader leakage-audited training mixture, explicit clean/degraded pairing, global/local evidence, multi-layer CLIP fusion, and residual statistics. Conversely, the public checkpoints were trained for different generator distributions and are intentionally used without adaptation, so these numbers demonstrate transfer to this challenge setting rather than claiming that either published method is universally weak. Their fixed 0.5 thresholds predict almost every sample as authentic on this dataset; thresholded accuracy and recall are therefore retained only as domain-shift diagnostics, not used for the headline comparison.
|
| 275 |
+
|
| 276 |
+
The checked summary and vector figure can be regenerated directly from the three full result files:
|
| 277 |
+
|
| 278 |
+
```bash
|
| 279 |
+
uv run robustfake-baseline-report \
|
| 280 |
+
--result RobustFake=artifacts/evaluations/wildfake_official/results.json \
|
| 281 |
+
--result CNNDetection=artifacts/evaluations/baselines/wildfake_official/cnndetection/results.json \
|
| 282 |
+
--result UnivFD=artifacts/evaluations/baselines/wildfake_official/univfd/results.json \
|
| 283 |
+
--output-dir assets/baseline
|
| 284 |
+
```
|
| 285 |
+
|
| 286 |
+
### Ablation study results
|
| 287 |
+
|
| 288 |
+
The ablation follows a strict leave-one-component-out design. Each trainable variant starts from the release configuration and removes exactly one component while retaining the same 80k manifest, split roles, seed, cached clean/degraded features, eight-epoch budget, optimiser, checkpoint-selection rule, and internal constrained-minimax calibration protocol. Every checkpoint is then evaluated on the complete official scenario matrix; the official labels are never used to select a checkpoint or fit a calibrator. The no-calibration row instead reuses the unchanged full checkpoint and only removes its post-hoc affine mapping and calibrated threshold.
|
| 289 |
+
|
| 290 |
+

|
| 291 |
+
|
| 292 |
+
| Variant | Clean AUROC | Mean single AUROC | Worst single AUROC | Mean composed AUROC | Δ mean / worst single vs Full |
|
| 293 |
+
|---|---:|---:|---:|---:|---:|
|
| 294 |
+
| **Full RobustFake** | **0.9792** | **0.9683** | **0.9432** | **0.8968** | Reference |
|
| 295 |
+
| Without residual statistics | 0.9624 | 0.9563 | 0.9060 | 0.8812 | −1.20 / −3.72 pp |
|
| 296 |
+
| Without multi-layer fusion | 0.9582 | 0.9235 | 0.8317 | 0.8401 | −4.48 / −11.15 pp |
|
| 297 |
+
| Without consistency loss | 0.9787 | 0.9676 | 0.9419 | 0.8925 | −0.08 / −0.13 pp |
|
| 298 |
+
| Without contrastive loss | 0.9774 | 0.9659 | 0.9387 | 0.8890 | −0.25 / −0.45 pp |
|
| 299 |
+
|
| 300 |
+
Multi-layer fusion provides the largest measured contribution: removing the intermediate transformer evidence reduces mean single-transform AUROC by 4.48 percentage points, worst-single AUROC by 11.15 points, and mean composed AUROC by 5.67 points. The residual-statistics branch is the second strongest component, with a particularly clear 3.72-point loss on the worst prescribed transformation. Together, these results support the central design claim that semantic final-layer features benefit from both intermediate representation levels and compact forensic statistics.
|
| 301 |
+
|
| 302 |
+
The auxiliary objectives have smaller but directionally consistent effects in this single-seed study. Removing contrastive learning reduces every reported ranking aggregate, including mean composed AUROC by 0.79 points. Removing consistency changes mean and worst single-transform AUROC by only 0.08 and 0.13 points, while its larger 0.43-point effect on composed transformations provides limited evidence that it helps under accumulated degradation. These small differences should be reported as marginal contributions rather than statistical significance.
|
| 303 |
+
|
| 304 |
+
Calibration is deliberately excluded from the AUROC chart because its positive affine mapping is monotonic and therefore leaves ranking effectively unchanged. Its contribution is operational: compared with the raw full checkpoint, robust calibration raises mean single-transform Balanced Accuracy from 0.8887 to 0.8939 and worst-single real recall from 0.6004 to 0.8705, while lowering clean Balanced Accuracy from 0.9278 to 0.8898. This exposes an explicit trade-off between protecting authentic images from false accusations under degradation and recovering more generated images on clean input; the detailed threshold analysis appears in [Error Analysis Note](#calibration-and-the-false-positive-trade-off).
|
| 305 |
+
|
| 306 |
+
## Ablation Protocol
|
| 307 |
+
|
| 308 |
+
The core ablation suite starts from the final RobustFake configuration and independently removes residual statistics, multi-layer fusion, consistency loss, contrastive loss, or post-hoc calibration. All trainable ablations reuse the same frozen feature and residual caches, data split, seed, optimisation budget, checkpoint rule, and internal calibration protocol. Exact training, evaluation, and report-generation commands are included in [Ablation reproduction](#ablation-reproduction).
|
| 309 |
+
|
| 310 |
## Environment and Reproduction
|
| 311 |
|
| 312 |
### Environment requirements
|
|
|
|
| 328 |
|
| 329 |
All runtime settings are centralised in [configs/default.yaml](configs/default.yaml). Commands accept `--config` and repeated `--set section.key=value` overrides.
|
| 330 |
|
| 331 |
+
The release package is published at [ParrotG/RobustFake](https://huggingface.co/ParrotG/RobustFake). It provides the trainable checkpoint, its SHA-256-bound calibration, and the resolved training configuration, so users do not need to reproduce training before inference. A public repository does not require authentication for download.
|
| 332 |
|
| 333 |
To download the model package without running inference:
|
| 334 |
|
| 335 |
```bash
|
| 336 |
uv run robustfake-download-model \
|
| 337 |
--config configs/default.yaml \
|
| 338 |
+
--hf-repo ParrotG/RobustFake
|
| 339 |
```
|
| 340 |
|
| 341 |
### Required directory-to-JSON inference
|
|
|
|
| 345 |
```bash
|
| 346 |
uv run aigc-predict \
|
| 347 |
--config configs/default.yaml \
|
| 348 |
+
--hf-repo ParrotG/RobustFake \
|
| 349 |
--input-dir path/to/images \
|
| 350 |
--output-json predictions.json
|
| 351 |
```
|
|
|
|
| 360 |
|
| 361 |
After the first download, Hugging Face Hub reuses its local immutable snapshot cache. A local package remains supported by replacing `--hf-repo` with `--checkpoint path/to/best.pt`; place the matching `calibration.json` beside the checkpoint.
|
| 362 |
|
| 363 |
+
### Evaluation with the Hugging Face model
|
| 364 |
|
| 365 |
After preparing the official demonstration subset, run either the fast diagnostic or complete matrix without training:
|
| 366 |
|
|
|
|
| 368 |
uv run aigc-prepare-official-eval --config configs/default.yaml
|
| 369 |
uv run aigc-evaluate-official \
|
| 370 |
--config configs/default.yaml \
|
| 371 |
+
--hf-repo ParrotG/RobustFake \
|
| 372 |
--fast
|
| 373 |
uv run aigc-evaluate-official \
|
| 374 |
--config configs/default.yaml \
|
| 375 |
+
--hf-repo ParrotG/RobustFake
|
| 376 |
```
|
| 377 |
|
| 378 |
### Training reproduction
|
| 379 |
|
| 380 |
+
Prepare the official protected manifest and all configured external leakage-deny manifests before constructing the mixed dataset:
|
| 381 |
|
| 382 |
```bash
|
| 383 |
uv run aigc-prepare-official-eval --config configs/default.yaml
|
|
|
|
| 389 |
|
| 390 |
```bash
|
| 391 |
uv run aigc-cache-features --config configs/default.yaml
|
| 392 |
+
uv run aigc-cache-residuals --config configs/default.yaml
|
|
|
|
|
|
|
| 393 |
uv run aigc-train \
|
| 394 |
--config configs/default.yaml \
|
|
|
|
| 395 |
--set feature_cache.use_for_training=true
|
| 396 |
```
|
| 397 |
|
|
|
|
| 406 |
--set evaluation.checkpoint_path=artifacts/runs/your_run/best.pt
|
| 407 |
```
|
| 408 |
|
| 409 |
+
For a shorter diagnostic pass, append `--fast` to the evaluation command. Dataset locations, cache paths, retry limits, and evaluation outputs are centralised in `configs/default.yaml`.
|
| 410 |
+
|
| 411 |
+
### External baseline reproduction
|
| 412 |
+
|
| 413 |
+
Download the pinned and checksum-verified public baseline checkpoints:
|
| 414 |
+
|
| 415 |
+
```bash
|
| 416 |
+
uv run aigc-download-baselines \
|
| 417 |
+
--config configs/default.yaml
|
| 418 |
+
```
|
| 419 |
+
|
| 420 |
+
After preparing SID-Set, evaluate a selected detector on the same manifest-backed pipeline:
|
| 421 |
+
|
| 422 |
+
```bash
|
| 423 |
+
uv run aigc-evaluate-baselines \
|
| 424 |
+
--config configs/default.yaml \
|
| 425 |
+
--dataset sid_set \
|
| 426 |
+
--baseline cnndetection
|
| 427 |
+
```
|
| 428 |
+
|
| 429 |
+
Replace `sid_set` with `wildfake_official`, or `cnndetection` with `univfd`, to reproduce the other configured comparisons. Add `--fast` for the deterministic diagnostic subset where supported.
|
| 430 |
+
|
| 431 |
+
### Ablation reproduction
|
| 432 |
+
|
| 433 |
+
The four trainable leave-one-component-out variants reuse the release feature and residual caches:
|
| 434 |
+
|
| 435 |
+
```bash
|
| 436 |
+
uv run aigc-train \
|
| 437 |
+
--config configs/default.yaml \
|
| 438 |
+
--set project.run_name=ablation_without_residual \
|
| 439 |
+
--set model.residual_statistics_enabled=false \
|
| 440 |
+
--set feature_cache.use_for_training=true
|
| 441 |
+
|
| 442 |
+
uv run aigc-train \
|
| 443 |
+
--config configs/default.yaml \
|
| 444 |
+
--set project.run_name=ablation_without_multilayer \
|
| 445 |
+
--set model.multilayer_fusion_enabled=false \
|
| 446 |
+
--set feature_cache.use_for_training=true
|
| 447 |
+
|
| 448 |
+
uv run aigc-train \
|
| 449 |
+
--config configs/default.yaml \
|
| 450 |
+
--set project.run_name=ablation_without_consistency \
|
| 451 |
+
--set loss.consistency_weight=0.0 \
|
| 452 |
+
--set feature_cache.use_for_training=true
|
| 453 |
+
|
| 454 |
+
uv run aigc-train \
|
| 455 |
+
--config configs/default.yaml \
|
| 456 |
+
--set project.run_name=ablation_without_contrastive \
|
| 457 |
+
--set loss.contrastive_weight=0.0 \
|
| 458 |
+
--set feature_cache.use_for_training=true
|
| 459 |
+
```
|
| 460 |
+
|
| 461 |
+
Fit each run's calibration on its internal validation data, then evaluate it into an isolated result directory. Set `component` to `residual`, `multilayer`, `consistency`, or `contrastive`:
|
| 462 |
+
|
| 463 |
+
```bash
|
| 464 |
+
component=residual
|
| 465 |
+
uv run aigc-calibrate \
|
| 466 |
+
--config artifacts/runs/ablation_without_${component}/resolved_config.yaml \
|
| 467 |
+
--checkpoint artifacts/runs/ablation_without_${component}/best.pt
|
| 468 |
+
|
| 469 |
+
uv run aigc-evaluate-official \
|
| 470 |
+
--config artifacts/runs/ablation_without_${component}/resolved_config.yaml \
|
| 471 |
+
--checkpoint artifacts/runs/ablation_without_${component}/best.pt \
|
| 472 |
+
--set official_evaluation.results_path=artifacts/ablations/without_${component}/results.json \
|
| 473 |
+
--set evaluation.save_predictions=false
|
| 474 |
+
```
|
| 475 |
+
|
| 476 |
+
The calibration ablation reuses the unchanged full checkpoint. The paths below correspond to a run produced by the default `project.run_name: robustfake`:
|
| 477 |
+
|
| 478 |
+
```bash
|
| 479 |
+
uv run aigc-evaluate-official \
|
| 480 |
+
--config artifacts/runs/robustfake/resolved_config.yaml \
|
| 481 |
+
--checkpoint artifacts/runs/robustfake/best.pt \
|
| 482 |
+
--set evaluation.calibration_enabled=false \
|
| 483 |
+
--set official_evaluation.results_path=artifacts/ablations/without_calibration/results.json \
|
| 484 |
+
--set evaluation.save_predictions=false
|
| 485 |
+
```
|
| 486 |
+
|
| 487 |
+
Generate the summary tables plus presentation-ready SVG and PNG figures after the complete evaluations finish:
|
| 488 |
+
|
| 489 |
+
```bash
|
| 490 |
+
uv run robustfake-ablation-report \
|
| 491 |
+
--result Full=artifacts/evaluations/wildfake_official/results.json \
|
| 492 |
+
--result NoResidual=artifacts/ablations/without_residual/results.json \
|
| 493 |
+
--result NoMultilayer=artifacts/ablations/without_multilayer/results.json \
|
| 494 |
+
--result NoConsistency=artifacts/ablations/without_consistency/results.json \
|
| 495 |
+
--result NoContrastive=artifacts/ablations/without_contrastive/results.json \
|
| 496 |
+
--result NoCalibration=artifacts/ablations/without_calibration/results.json \
|
| 497 |
+
--output-dir artifacts/ablations/report
|
| 498 |
+
```
|
| 499 |
|
| 500 |
## Robustness Evaluation Summary
|
| 501 |
|
| 502 |
+
The complete release baseline was evaluated on all 13,841 official demonstration images under every scenario. The reported operating-point metrics use the single calibration fitted exclusively on the internal validation splits; no official labels were used for checkpoint selection, calibration, or threshold fitting.
|
| 503 |
+
|
| 504 |
+
| Evaluation family | Tested settings | Mean AUROC | Worst AUROC (setting) | Lowest Balanced Accuracy |
|
| 505 |
+
|---|---|---:|---:|---:|
|
| 506 |
+
| Clean | No added degradation | 0.9792 | 0.9792 | 0.8898 |
|
| 507 |
+
| JPEG recompression | Quality 90, 70, 50, 30 | 0.9714 | 0.9595 (`Q=50`) | 0.8373 |
|
| 508 |
+
| Gaussian blur | Sigma 0.5, 1.0, 2.0 | 0.9623 | 0.9469 (`sigma=2.0`) | 0.8845 |
|
| 509 |
+
| Resize | Scale 0.5, 0.25 | 0.9439 | 0.9432 (`scale=0.5`) | 0.8700 |
|
| 510 |
+
| Gaussian noise | Sigma 0.02, 0.05, 0.10 | 0.9885 | 0.9838 (`sigma=0.10`) | 0.9395 |
|
| 511 |
+
| Colour adjustment and crop | Jitter 20%, crop 80% | 0.9656 | 0.9656 (`jitter=20%`) | 0.8479 |
|
| 512 |
+
| **All prescribed single transformations** | 14 scenarios | **0.9683** | **0.9432** (`scale=0.5`) | **0.8373** |
|
| 513 |
+
| Additional composed stress tests | 6 ordered pipelines | 0.8968 | 0.8713 (`crop→resize→JPEG`) | 0.7746 |
|
| 514 |
+
|
| 515 |
+
The mean prescribed-transformation AUROC is only 0.0109 below clean AUROC, and even the worst prescribed transformation remains above 0.94. Noise is handled particularly well; resizing and strong blur are the most difficult single-operation families. Ordered compositions create a larger distribution shift and should therefore be interpreted as a separate stress boundary rather than averaged into the challenge-prescribed result.
|
| 516 |
+
|
| 517 |
+
Ranking robustness does not guarantee a uniformly safe operating point. The following cases expose the principal class-specific trade-offs:
|
| 518 |
+
|
| 519 |
+
| Scenario | AUROC | Balanced Accuracy | Real recall | Fake recall | Interpretation |
|
| 520 |
+
|---|---:|---:|---:|---:|---|
|
| 521 |
+
| Clean | 0.9792 | 0.8898 | 0.9818 | 0.7978 | Strong real-image protection, with lower fake recall at the selected robust threshold |
|
| 522 |
+
| Blur, `sigma=2.0` | 0.9469 | 0.8845 | 0.8824 | 0.8867 | The two class recalls remain balanced under the strongest blur |
|
| 523 |
+
| Resize, `scale=0.25` | 0.9446 | 0.8784 | 0.8705 | 0.8864 | Severe downsampling reduces ranking but does not collapse either class recall |
|
| 524 |
+
| Crop 80% | 0.9656 | 0.8479 | 0.9788 | 0.7170 | Ranking remains strong, but more generated images cross the real decision side |
|
| 525 |
+
| Crop→blur→resize→JPEG stress | 0.9168 | 0.7746 | 0.6152 | 0.9340 | The largest observed false-positive shift under compounded degradation |
|
| 526 |
+
|
| 527 |
+
For presentation, the clearest primary visual is a set of four severity curves for JPEG, blur, resize, and noise, with AUROC on a shared `0.90–1.00` axis and clean AUROC shown as a dashed reference. A second compact panel should compare `clean`, `mean prescribed single`, `worst prescribed single`, and `mean composed` AUROC without mixing composed tests into the official aggregate. Pair this with a real-versus-fake recall dumbbell for the five representative rows above; this makes the distinction between ranking robustness and threshold robustness visually explicit.
|
| 528 |
|
| 529 |
## Error Analysis Note
|
| 530 |
|
| 531 |
+
Error cases were selected from the complete official per-image prediction log at the deployed calibrated threshold of `0.5664`. Selection considered both high-confidence clean errors and images that were classified correctly when clean but crossed the decision boundary after a prescribed or composed transformation. Qualitative examples were deduplicated by encoded-file SHA-256 before inspection so that repeated benchmark files did not occupy multiple case-study slots. The observations below are plausible failure hypotheses based on the visible content and the controlled score change, not causal explanations of the learned representation.
|
| 532 |
+
|
| 533 |
+
| Error type and record prefix | Preview | Scenario and calibrated fake probability | Visual observation and likely failure mode |
|
| 534 |
+
|---|---|---|---|
|
| 535 |
+
| Clean false positive, `0f9d01575d4d` | <img src="assets/error-analysis/clean-false-positive-food.jpg" width="180" alt="Authentic overhead food photograph classified as generated"> | Clean: `0.9541` | A genuine overhead food photograph has polished stock-photo composition, shallow depth of field, saturated colour, and repeated fine food textures. This combination resembles the highly controlled composition and locally regular texture found in generated training images, producing a confident false accusation even without added degradation. |
|
| 536 |
+
| Clean false negative, `ec6b2c9b8785` | <img src="assets/error-analysis/clean-false-negative-water-silhouette.jpg" width="180" alt="Generated transparent-water silhouette classified as authentic"> | Clean: `0.0018` | A DALL·E image depicts an impossible human silhouette formed from transparent water against a sparse studio background. Despite its semantic implausibility, the fluid boundary, lighting, and empty background are internally coherent and contain neither malformed text nor an ordinary face/hand cue. The result suggests that broad real graphic and product-photography coverage can make stylisation alone weak evidence of generation. |
|
| 537 |
+
| Transformation-induced false positive, `715742f964dc` | <img src="assets/error-analysis/resize-false-positive-clean.jpg" width="120" alt="Authentic indoor image before resize"> → <img src="assets/error-analysis/resize-false-positive-transformed.jpg" width="120" alt="Authentic indoor image after 0.25x resize and upscale"> | Clean → resize 0.25×: `0.0202 → 0.9701` | The authentic COCO image is an already low-resolution indoor snapshot. Severe downsampling removes camera texture and small object detail, leaving smooth walls, furniture, and soft boundaries. The almost complete score reversal indicates sensitivity to the loss of natural high-frequency evidence rather than to scene semantics alone. |
|
| 538 |
+
| Transformation-induced false negative, `ae4ec4f74c8d` | <img src="assets/error-analysis/crop-false-negative-clean.jpg" width="120" alt="Generated fashion display before crop"> → <img src="assets/error-analysis/crop-false-negative-transformed.jpg" width="120" alt="Generated fashion display after 80 percent center crop"> | Clean → centre crop 80%: `0.7945 → 0.0260` | The generated fashion display is initially detected, but cropping enlarges the coherent central person and garments while removing part of the outer box, shadows, wrapping, and peripheral layout. This suggests that important evidence was spatially concentrated near the composition boundary and was not fully preserved by the two-view aggregation. |
|
| 539 |
+
| Composed false positive, `8adec5521027` | <img src="assets/error-analysis/composed-false-positive-clean.jpg" width="120" alt="Authentic bathroom before composed degradation"> → <img src="assets/error-analysis/composed-false-positive-transformed.jpg" width="120" alt="Authentic bathroom after crop blur resize and JPEG degradation"> | Clean → crop 80%, blur 1.0, resize 0.25×, JPEG 30: `0.0668 → 0.9900` | A real bathroom photograph becomes dominated by blocky planar surfaces after the ordered stress pipeline. Fine tile, reflection, and material cues are largely erased; the remaining smooth geometry strongly resembles a rendered interior. This is representative of the false-positive increase measured by the stress scenario's `0.6152` real recall. |
|
| 540 |
+
| Composed false negative, `4a604bc5c1de` | <img src="assets/error-analysis/composed-false-negative-clean.jpg" width="120" alt="Generated cinematic archive scene before degradation"> → <img src="assets/error-analysis/composed-false-negative-transformed.jpg" width="120" alt="Generated cinematic archive scene after color noise and JPEG degradation"> | Clean → colour jitter, noise 0.02, JPEG 70: `0.6421 → 0.0163` | The generated image already imitates a cinematic archive frame, including black bars, grain-like texture, dramatic lighting, and a subtitle. Added colour/noise/codec effects make those photographic and film-like cues more convincing while suppressing weaker synthesis traces, causing the detector to accept it as authentic. |
|
| 541 |
+
|
| 542 |
+
The complete record IDs and image paths remain in `artifacts/evaluations/wildfake_official/predictions.jsonl`. The selected source-image previews are copied to `assets/error-analysis/` for GitHub and Hugging Face rendering. Arrow-separated transformed previews reproduce the deterministic full-frame evaluation scenario after standardisation and before the detector's global/local crops. All pictured examples originate from the WildFake official demonstration subset and remain subject to the upstream dataset's terms.
|
| 543 |
+
|
| 544 |
+
### Calibration and the false-positive trade-off
|
| 545 |
+
|
| 546 |
+
The affine Platt transform has a positive coefficient and is therefore monotonic: it changes probability interpretation and the operating point, but not AUROC or sample ranking. The selected calibrated threshold is equivalent to requiring an uncalibrated fake probability of approximately `0.8957`, rather than the conventional `0.5`. This conservative shift was selected solely from the four internal clean/degraded ID/DG validation groups to prevent a fake-biased threshold from allowing one easy validation group to hide false positives. It was not selected retrospectively on the official labels.
|
| 547 |
+
|
| 548 |
+
The transferred operating-point trade-off on the complete official evaluation is:
|
| 549 |
+
|
| 550 |
+
| Evaluation slice | Operating point | Balanced Accuracy | Real recall | Fake recall |
|
| 551 |
+
|---|---|---:|---:|---:|
|
| 552 |
+
| Clean | Raw probability ≥ 0.5 | 0.9279 | 0.9424 | 0.9134 |
|
| 553 |
+
| Clean | **Internal robust calibration** | 0.8898 | **0.9818** | 0.7978 |
|
| 554 |
+
| Prescribed single transformations, pooled | Raw probability ≥ 0.5 | 0.8887 | 0.8455 | **0.9320** |
|
| 555 |
+
| Prescribed single transformations, pooled | **Internal robust calibration** | **0.8939** | **0.9519** | 0.8360 |
|
| 556 |
+
| Composed stress tests, pooled | Raw probability ≥ 0.5 | 0.7560 | 0.6157 | **0.8963** |
|
| 557 |
+
| Composed stress tests, pooled | **Internal robust calibration** | **0.7920** | **0.8189** | 0.7651 |
|
| 558 |
+
|
| 559 |
+
Calibration substantially reduces false positives under both single and composed transformations and improves their pooled Balanced Accuracy, but it also increases false negatives; on clean official images it sacrifices Balanced Accuracy and fake recall to protect real-image recall. This is an explicit deployment choice rather than a uniformly superior threshold. A high-cost moderation setting should preserve the conservative operating point or introduce an abstention band, whereas a triage or forensic-search setting may choose a lower threshold to recover more generated images. Any such threshold must be selected on representative internal deployment data, never on the protected official demonstration labels.
|
| 560 |
|
| 561 |
## Limitation Reflection
|
| 562 |
|
| 563 |
+
The mixed training and validation design broadens both authentic-image domains and generator families, but a complete leave-one-source-out study has not yet been run because of the available training time and compute budget. The held-out domains and generator architectures in `val_dg`, together with the external official evaluation, provide partial evidence of transfer to unseen conditions; they do not establish that performance will remain stable when every constituent dataset or source family is removed in turn. Source-level leave-one-out evaluation is therefore a priority for validating whether any part of the mixture remains disproportionately influential.
|
| 564 |
+
|
| 565 |
+
RobustFake deliberately focuses on evidence available in decoded image pixels. Authenticity can also be assessed through provenance and acquisition signals such as C2PA manifests, EXIF fields, content credentials, and embedded watermark detectors such as SynthID. Some of these signals may survive transformations that weaken pixel-level forensic traces and can provide stronger positive provenance when present. However, the project primarily uses established datasets because collecting a legally and demographically representative sample of real Internet media was not feasible within the project scope. Such datasets are commonly re-encoded or otherwise preprocessed, and their metadata presence, removal patterns, and platform distribution may not reflect the open Internet. Adding these channels under those conditions could teach dataset provenance rather than media authenticity. A future system should instead fuse pixel evidence with independently validated provenance while treating missing or editable metadata as inconclusive.
|
| 566 |
+
|
| 567 |
+
CLIP was selected as the visual backbone because its large-scale image-language pretraining offers broad semantic coverage, its intermediate transformer features retain information at several abstraction levels, and freezing it makes repeated robustness experiments feasible under the parameter and compute constraints. This choice is not evidence that CLIP is the optimal backbone for image forensics. Self-supervised encoders such as DINO-family models, other vision-language encoders such as SigLIP, convolutional architectures, and models pretrained specifically on forensic or frequency-domain objectives could provide useful controls or complementary evidence. Time constraints prevented a controlled backbone comparison.
|
| 568 |
+
|
| 569 |
+
The official demonstration set is also narrower than a deployment environment: its clean subset contains one principal authentic source and one principal generator source, while the applied corruptions are deterministic simulations of redistribution. Real platforms introduce content-dependent resizing, repeated transcoding, screenshots, overlays, mixed editing histories, and changing generator distributions. The additional composed scenarios probe this gap, but they are not a substitute for longitudinal evaluation on naturally circulated media.
|
| 570 |
+
|
| 571 |
+
Finally, the detector returns a binary probability rather than a provenance proof or generator attribution. The release results show that class ranking can remain strong while a fixed threshold becomes asymmetric under severe composed transformations. Calibration drift, adaptive post-processing, and newly released generators can therefore increase false accusations even when aggregate AUROC appears satisfactory. RobustFake should be used as one signal in a broader review process, with threshold monitoring, an abstention region for uncertain cases, and periodic recalibration on representative deployment data.
|
| 572 |
|
| 573 |
## Team Contribution
|
| 574 |
|
| 575 |
+
| Team member | Contribution |
|
| 576 |
+
|---|---|
|
| 577 |
+
| **Gu Shucheng** | Led the model design and construction of the mixed training dataset. Designed the frozen CLIP multi-layer detector, global/local view aggregation, residual-statistics branch, and paired robustness objectives; developed the source-balanced mixture, domain-generalisation split, and generator/domain holdout strategy; coordinated training, hyperparameter refinement, calibration, and final system integration. |
|
| 578 |
+
| **Youlong Xu** | Contributed to the data preparation and quality-control workflow, including source acquisition, image validation and standardisation, bucket-level sampling support, duplicate and leakage checks, and review of dataset diversity and representativeness. |
|
| 579 |
+
| **Ruicheng Li** | Contributed to robustness experimentation and evaluation, including degradation settings, validation protocols, official and external evaluation workflows, metric interpretation, and analysis of class-specific errors under severe transformations. |
|
| 580 |
+
| **Hanson Yu** | Contributed to reproducibility and software engineering, including configuration and checkpoint workflows, command-line inference, cache-aware execution, testing, and review of installation and reproduction instructions. |
|
| 581 |
+
| **Hantong Hong** | Contributed to experimental reporting and presentation, including academic baseline and ablation planning, result aggregation, robustness visualisation, error-analysis organisation, documentation review. |
|
| 582 |
+
|
| 583 |
+
All team members participated in design discussions, result review, and final presentation preparation.
|
assets/ablation/auroc_comparison.png
ADDED
|
assets/baseline/robustness_comparison.svg
ADDED
|
|
assets/baseline/summary.csv
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name,path,dataset,evaluated_sample_count,clean_auroc,mean_single_transform_auroc,worst_single_transform_auroc
|
| 2 |
+
RobustFake,artifacts/evaluations/wildfake_official/results.json,wildfake_official,13841,0.9792350164084631,0.9683476078594796,0.943203663914961
|
| 3 |
+
CNNDetection,artifacts/evaluations/baselines/wildfake_official/cnndetection/results.json,wildfake_official,13841,0.6040858161652085,0.5974861786849762,0.5313726644112354
|
| 4 |
+
UnivFD,artifacts/evaluations/baselines/wildfake_official/univfd/results.json,wildfake_official,13841,0.5897733853238232,0.5545874898318806,0.4023539303768551
|
assets/baseline/summary.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"clean_auroc": 0.9792350164084631,
|
| 4 |
+
"dataset": "wildfake_official",
|
| 5 |
+
"evaluated_sample_count": 13841,
|
| 6 |
+
"mean_single_transform_auroc": 0.9683476078594796,
|
| 7 |
+
"name": "RobustFake",
|
| 8 |
+
"path": "artifacts/evaluations/wildfake_official/results.json",
|
| 9 |
+
"worst_single_transform_auroc": 0.943203663914961
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"clean_auroc": 0.6040858161652085,
|
| 13 |
+
"dataset": "wildfake_official",
|
| 14 |
+
"evaluated_sample_count": 13841,
|
| 15 |
+
"mean_single_transform_auroc": 0.5974861786849762,
|
| 16 |
+
"name": "CNNDetection",
|
| 17 |
+
"path": "artifacts/evaluations/baselines/wildfake_official/cnndetection/results.json",
|
| 18 |
+
"worst_single_transform_auroc": 0.5313726644112354
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"clean_auroc": 0.5897733853238232,
|
| 22 |
+
"dataset": "wildfake_official",
|
| 23 |
+
"evaluated_sample_count": 13841,
|
| 24 |
+
"mean_single_transform_auroc": 0.5545874898318806,
|
| 25 |
+
"name": "UnivFD",
|
| 26 |
+
"path": "artifacts/evaluations/baselines/wildfake_official/univfd/results.json",
|
| 27 |
+
"worst_single_transform_auroc": 0.4023539303768551
|
| 28 |
+
}
|
| 29 |
+
]
|
assets/error-analysis/clean-false-negative-water-silhouette.jpg
ADDED
|
assets/error-analysis/clean-false-positive-food.jpg
ADDED
|
assets/error-analysis/composed-false-negative-clean.jpg
ADDED
|
Git LFS Details
|
assets/error-analysis/composed-false-negative-transformed.jpg
ADDED
|
Git LFS Details
|
assets/error-analysis/composed-false-positive-clean.jpg
ADDED
|
assets/error-analysis/composed-false-positive-transformed.jpg
ADDED
|
assets/error-analysis/crop-false-negative-clean.jpg
ADDED
|
Git LFS Details
|
assets/error-analysis/crop-false-negative-transformed.jpg
ADDED
|
Git LFS Details
|
assets/error-analysis/resize-false-positive-clean.jpg
ADDED
|
assets/error-analysis/resize-false-positive-transformed.jpg
ADDED
|