RA-Det: Detecting AI-generated images using robustness asymmetryRA-Det: Towards Universal Detection of AI-Generated Images via Robustness Asymmetry
RA-Det detects synthetic images using feature drift differences under perturbation; with ProGAN training, average ACC across 16 generators is 93.47%.
Simulates real-world black-box detection: trained using only a single generative model, discriminates image authenticity on unseen generators; no generator fingerprints needed, encoder frozen. The detector can add bounded perturbations and compare embeddings. The authors state that synthetic images weaken downstream recognition and may be used for disinformation, identity forgery, and inappropriate content.
- Photorealistic synthetic images weaken appearance cues, making detectors that rely on traces or high-level representations unstable under compression, blur, and unseen generators. The authors instead examine differences in representation stability between real and synthetic images under small perturbations.
- RA-Det uses a conditional UNet to learn bounded perturbations, compares distances and difference vectors before and after perturbation in frozen DINOv3 embeddings, and fuses a semantic branch and median filter residual. Training is binary cross-entropy plus a contrastive loss with margin 0.1.
- Under single-generator training and unseen-generator testing, in Table 1 RA-Det achieves average ACC/AP of 93.47%/97.00% across 16 generators, while FerretNet achieves 85.66%/90.43%. On whichfaceisreal, DIRE-D on ADM, and FLUX under ProGAN training, it is not the highest in that row.
- Conclusion plans to test whether the difference extends to more forms such as adversarial perturbations. Experiments cover training sources like ProGAN, the 16 generators in Table 1, and several recent generators; the number of test images per class, repetitions, and perturbation magnitude ε are not reported.
- Evaluated models
- RA-DetDDPM
- Benchmarks
- ProGAN 360k真实/360k合成Zhong et al. (2024) / PatchCraftLSUNAIGIBench SDv1.4GenImageCelebA-HQ
- Metrics
- ACCAP
The researchers propose RA-Det, a behavior-based rather than appearance-based framework for detecting AI-generated images. The method exploits robustness asymmetry, where natural images maintain stable semantic representations under small structured perturbations, while generated images exhibit significantly larger feature drift. The authors provide a theoretical analysis establishing a lower-bound relationship between this asymmetry and the memorization tendency of generative models, explaining why it persists across architectures. Across 14 generative models and compared against over 10 strong detectors, RA-Det improves average performance by 7.81%, and without relying on generator fingerprints, it transfers to unseen generators. Source code is publicly available on GitHub.
Paper analysis
What problem does this paper attempt to solve?
When appearance cues weaken, use representation stability under perturbation rather than appearance traces for synthetic image detection.
When appearance cues weaken, detect synthetic images using representation stability under perturbation rather than appearance traces.
- Scenario: The authors state that generative models and convenient platforms can produce hyper-realistic images, leading to seeing is no longer believing; misuse includes disinformation, identity forgery, and inappropriate content, making detection more critical.
- Existing shortcomings: Representation-driven methods use CLIP, DINOv2, or vision-language model embeddings; trace-based methods target frequency anomalies, decoding residuals, upsampling, or local pixel structures. The authors state that both place the signal on appearance, becoming fragile under JPEG or blur, and modern diffusion and rectified-flow models suppress structural traces.
- Observation: Under small, semantically preserving perturbations, deep representations of natural images are more stable, while synthetic images exhibit larger feature drift. The authors call this robustness asymmetry and provide a lower bound linked to generative model memorization to explain its occurrence across architectures.
- Method: Proposes a behavior-driven framework, RA-Det, that turns this asymmetry into a detection signal. The authors state it is data- and model-agnostic, requires no generator fingerprints, and transfers to unseen generators.
- Threat model:
- Goal: Classify images as real or synthetic and generalize to generators unseen during training.
- Knowledge: The authors state the protocol simulates real-world black-box detection: training is limited to one generative model, evaluation is on unseen models; no generator fingerprints are used, and the base encoder is frozen.
- Capability: The detector can apply bounded perturbations to inputs and compare embeddings before and after perturbation. The paper does not state that the detector can read generator weights or training data.
- Victim system: The authors state that realistic synthetic content weakens the reliability of downstream recognition systems and may be used for disinformation, identity forgery, and inappropriate content dissemination.
What related research exists?
Related work is divided into representation-driven and trace-driven; the authors shift detection from appearance to perturbation behavior.
The paper categorizes existing detectors into two types and compares them with named baselines in experiments.
Representation-driven detection
- UniFD (Ojha et al., 2023): Directly classifies CLIP embeddings, leveraging semantic and structural priors in the backbone for cross-generator generalization.
- Subsequent adaptations: C2P-CLIP (Tan et al., 2025) uses cross-view prompts and multi-view consistency; LASTED (Wu et al., 2025) refines multimodal representations with text supervision; LVLM detectors (Yu et al., 2025) use large vision-language models for explainable detection. Related Work only describes their benefit from foundation models' domain coverage and invariance, without per-paper numerical comparisons with this work.
Trace-driven forensics
- Frequency and gradients: Frank et al. (2020) examine anomalies in DCT or Fourier spectra; LGrad (Tan et al., 2023) examines gradient inconsistencies in local edge structures.
- Upsampling and decoding: NPR (Tan et al., 2024) and FerretNet (Liang et al., 2026) model local pixel relationships and decoder-induced correlations.
- Reconstruction error: DIRE (Wang et al., 2023) and DRCT (Chen et al., 2024) use reconstruction error to expose inconsistencies in synthetic content. The authors state that these methods are lightweight and interpretable, but performance often depends on whether structural traces are preserved, and modern diffusion and rectified-flow models increasingly suppress these traces.
From appearance to behavior
- Paper positioning: Both types of methods use appearance-level cues; the authors state that as generators reduce traces and approach natural statistics, the effectiveness of these cues declines. This paper instead examines how images behave under structured perturbations.
Baselines and benchmarks
- Baselines: GAN-specific are FreDect, LGrad; diffusion-specific are DIRE-G, DIRE-D, DNF; universal are CNNSpot, GramNet, UniFD, NPR, RIGID, FerretNet. In experiments, the authors call RIGID a behavioral baseline that also exploits the robustness gap, and compare learned difference features with threshold-based scoring.
- Benchmarks: The main protocol follows Wang et al.'s single-generator training and unseen-model testing, with test sets from Zhong et al. (2024) / PatchCraft; metrics are ACC and AP.
The authors position this work's distinction from the above as "from appearance to behavior": using representation stability under controlled perturbations, rather than visible traces, as the detection cue.
How does the paper address this problem?
RA-Det uses learnable bounded perturbations to amplify robustness asymmetry, then fuses semantic, difference, and residual features.
RA-Det learns bounded perturbations in the frozen foundation model space, feeding the embedding difference between clean and perturbed images, semantic embeddings, and pixel residuals to a multi-branch detector. Figure 3 is divided into three stages: probing, multi-branch detection, and contrastive loss.
Setting and lower bound
- Notation: Input is x, label y∈{0,1}. Frozen encoder f gives e=f(x). Probing module P produces bounded perturbation δ, yielding the perturbed image and its embedding e′.
- Probing formulation: The paper writes the perturbation as x′ = P(x) = x + δ, i.e., adding a bounded perturbation to the original image, rather than replacing image content.
- Memorization link: Feature displacement Shift is the expectation of the squared norm of embedding difference under small isotropic probes. SIDE memorization divergence M is the KL divergence of the training-neighborhood mixture distribution from the generation distribution, with smaller values indicating stronger memorization. Assumption 4.1 assumes the encoder is less sensitive along manifold tangents and more sensitive along normals. Lemma 4.2 states that within a sufficiently small radius, the difference Δ in Jacobian energy has a positive lower bound. Theorem 4.3 states that the expected displacement difference of the generation distribution relative to the real distribution has a lower bound that increases as M decreases, with an O(ε⁴) remainder; equation (13) gives the coefficient. The authors claim that stronger memorization leads to greater asymmetry in the small-noise regime. Proofs are in Appendix D.
Differential Robustness Probing
- Purpose: DRP learns controlled perturbations to amplify observable robustness differences between real and synthetic images. The authors state its purpose is not to attack or deceive the detector.
- Structure: A conditional UNet predicts a per-pixel perturbation map. The encoder downsamples at multiple levels; the clean embedding is projected into a spatial feature map for conditioning; the bottleneck uses cross-attention fusion; the decoder upsamples with skip connections; the output head applies tanh then multiplies by ε to limit magnitude. The paper does not give a numerical value for ε.
- Training constraints: JPEG and blur augmentation are disabled so that asymmetry comes only from the probing module.
Difference features and three branches
- Difference quantities: Computes embedding distance d, difference vector Δ=e−e′, and cosine similarity s. The optional diagonal covariance approximation DCA retains only diagonal terms; the authors state that in ablations, off-diagonal contributions are negligible, and the paper does not give a standalone number for that term.
- Three branches: The semantic branch uses frozen embeddings with a lightweight classification head. The difference branch uses two MLPs, receiving d and Δ respectively. The low-level residual branch applies a median filter with kernel size 3 to obtain x̃, computes residual r=x−x̃, then processes it with a lightweight CNN trained from scratch. Each branch outputs logits that are aggregated; Figure 3 labels this as Ensemble Logits then Sigmoid. The paper does not specify the aggregation operator.
- Figure 2: The x-axis is Cosine Similarity, labeled from 0.850 to 1.000. The authors state that real images have higher clean–perturbed similarity than synthetic images, and separation holds on both DINOv3 ViT-L/16 and CLIP ViT-L/14. The paper does not give density peaks.
Training objective and implementation
- Loss: Total loss is binary cross-entropy plus a robustness term. The latter is Lra = ReLU((sfake − sreal) + γ), penalizing violations of the batch-average similarity constraint s_real ≥ s_fake + γ. Default γ=0.1. In-batch real samples have yi=1, synthetic samples yi=0. Figure 3's caption refers to the margin between feature displacements, while the loss equation operates on cosine similarity.
- Implementation: PyTorch, backbone is DINOv3 ViT-L/16. Images are resized to 256×256; training uses random crops to 224×224, testing uses center crops. The perturbation generator and detection heads are trained for 10 epochs, Adam, initial learning rate 1×10⁻⁵, batch size 32, on eight NVIDIA H200 GPUs.
Decision
- Metrics: Following PatchCraft, uses ACC and AP. The paper does not specify the decision threshold for ACC, nor does it use LLM review or human agreement.
What experiments did the paper conduct?
Under ProGAN training, the average ACC/AP across 16 generators is 93.47%/97.00%, and it is not the highest in that row for several generators.
Experimental Setup
- Training: The main experiment uses only ProGAN synthetic images. The main text uses 360k real images plus 360k ProGAN images; Appendix A states that real images come from LSUN. Training runs for 10 epochs, Adam, learning rate 1×10⁻⁵, batch size 32, on eight H200s. JPEG and blur augmentation are disabled.
- Main test: ProGAN and 15 unseen generators provided by Zhong et al. (2024), i.e., the 16 in Table 1, including faces and other semantics. The abstract mentions 14 generative models and more than 10 detectors.
- Recent generators: Appendix Table 4 additionally reports SDXL, SDv3.5, FLUX, FLUX1-dev, MJ-v6, Infinity, VAR.
- Baselines: GAN-specific are FreDect, LGrad; diffusion-specific are DIRE-G, DIRE-D, DNF; universal are CNNSpot, GramNet, UniFD, NPR, RIGID, FerretNet. DIRE-D and DNF are trained on ADM, DIRE-G and most other methods use ProGAN.
- Metrics and backbone: ACC, AP, protocol from PatchCraft. Main backbone DINOv3 ViT-L/16, ablation includes CLIP ViT-L/14. The paper does not specify decision thresholds, number of repetitions, or number of test images per generator, and does not use LLM evaluation.
Main Results
Table 1 shows average ACC/AP over 16 generators. The table below lists 8 detectors; omitted are LGrad (75.34/84.35), DIRE-G (68.68/74.13), DNF (77.75/68.69), CNNSpot (68.38/76.39).
Swipe horizontally to read the table
Detector Avg ACC(%) Avg AP(%) Training side (per Table 1 note) FreDect 64.03 68.28 GAN detector GramNet 67.58 76.93 universal DIRE-D 71.53 75.87 fake images from ADM RIGID 77.17 82.38 authors call it a behavior baseline UniFD 78.00 89.73 universal NPR 80.55 84.05 universal FerretNet 85.66 90.43 universal RA-Det 93.47 97.00 trained on ProGAN like most methods - The authors claim RA-Det is best on average, with an advantage over the strongest universal baseline FerretNet; the abstract states an average performance improvement of 7.81%, consistent with the difference in average ACC between the two in Table 1 (93.47 vs. 85.66). The paper does not write 7.81% as an AP difference. The authors claim the radar chart in Fig. 4 is larger and more balanced; per-generator numbers are as in Table 1.
- In Table 1, RA-Det is not the highest ACC in every row. On whichfaceisreal it is 72.20/81.13, lower than RIGID's 88.40/95.06 and UniFD's 86.90/96.73. On ADM, DIRE-D is 98.25/99.79, higher than RA-Det's 88.89/95.07. On Midjourney, DIRE-D is 89.45/97.32 and DNF's ACC is 87.32, both higher than RA-Det's 80.04; DNF's AP is 68.09, lower than 87.53. On StyleGAN, NPR is 96.06/99.78, higher than 94.98/98.90; on CycleGAN, UniFD is 98.33/99.80, higher than 96.52/99.47; on DALLE2, FerretNet is 94.95/98.82, higher than 94.30/98.14.
- The authors claim that compared to RIGID, learned difference modeling is more effective than threshold-based robustness scoring, with average ACC/AP going from 77.17/82.38 to 93.47/97.00.
Training Sources and Recent Generators
- Three training sources: In Table 2, Setting I (ProGAN only) has average ACC/AP 93.47/97.00, Setting II (SDv1.4 only) 92.70/96.99, Setting III (ProGAN+SDv1.4) 93.33/96.69. The authors claim the three settings are close, and the cue is not specific to ProGAN or GAN.
- Sample sizes: Appendix A states Setting I uses LSUN 360K real images plus ProGAN 360K; Setting II uses LSUN 52,922 real images plus 72,000 SDv1.4 fake images from AIGIBench; Setting III uses 72,000 each, with fake images from ProGAN and that SDv1.4 subset.
- Recent generators: In Table 4, Setting I ACC/AP: SDXL 96.29/91.34, SDv3.5 75.61/81.65, FLUX 57.19/61.50, FLUX1-dev 80.58/88.40, MJ-v6 74.97/70.93, Infinity 88.32/80.09, VAR 91.63/84.16. In Setting II, FLUX rises to 85.35/91.01, Infinity 97.08/99.51, VAR 79.60/88.75. In Setting III, FLUX is 62.72/55.80. The authors claim training on diffusion sources improves performance on several diffusion and recent generators; in the table, VAR's ACC in Setting II is lower than in Setting I. The last column of Table 4 is the same as the average over the 16 generators in Table 1 and should not be taken as a total average including recent models.
Common Post-processing and Computational Cost
- Post-processing: Figure 5 compares JPEG (QF=95, 90, 85) and Gaussian blur (σ=0.8, 1.0, 1.5), against UniFD, NPR, FerretNet. The caption states RA-Det has the highest ACC and AP, trace methods decline more, and UniFD is more stable than trace baselines but still below RA-Det. The main text does not give values for each point.
- Cost: In Table 5, RA-Det has 281.48 G FLOPs, 378.12 M parameters, peak memory 1962.00 MB, 25.14 ms/image; UniFD is 16.49 ms, C2P-CLIP is 21.64 ms. The authors claim the extra cost mainly comes from active probing on top of base features, and runtime remains in a moderate range.
Empirical Examination of the Lower Bound
- Training stage: Appendix D trains a DDPM with about 50 million parameters on CelebA-HQ, checkpoints cover 200 to 5200 epochs, encoders are ViT-B/32, ViT-B/16, ViT-L/14, DINOv2-ViT-B/14. The authors claim that for ε∈[3, 10], difference displacement rises, then falls after a turning point, showing an inverted U or S shape; Figure 6 does not give endpoint values in the main text. The authors state they do not treat epoch as a validated monotonic proxy for SIDE divergence; the caption says larger epochs correspond to stronger memorization and larger small-ε differences.
- AMS: Table 6 uses SIDE's Average Memorization Score for linear regression on small-ε differences. Slopes are positive for all four encoders: ViT-B/32 0.118 (R² 0.66), ViT-B/16 0.129 (0.59), ViT-L/14 0.106 (0.73), DINOv2-B/14 0.0241 (0.64). The authors claim higher direct memorization metrics correspond to larger feature displacement differences.
Other Ablations and Analyses
- Backbone: Replacing with CLIP ViT-L/14 gives ACC/AP 91.85/95.00 (Table 3). The authors claim the cue is not limited to a single representation space, and DINOv3 is higher in that table.
- Loss: Removing L_ra and keeping only BCE gives 90.86/95.26.
- Probing: Replacing DRP with Gaussian noise, Gaussian blur, and resize residual gives 86.11/91.71, 87.07/91.42, 86.59/90.83, respectively, all lower than the learned DRP.
- Margin: For γ=0.1, 0.25, 0.5, 1.0, 2.0, ACC/AP are 93.47/97.00, 90.96/95.07, 92.67/96.23, 93.47/97.02, 92.31/96.16. For γ=1.0, AP is 97.02 and ACC is the same as default. The authors claim the default value is close to the best in the table and the method is insensitive to this hyperparameter.
- Branches: Removing the semantic, difference, and residual branches gives 90.34/95.43, 85.73/91.52, 88.62/94.26; replacing median filter with Gaussian filter gives 90.58/95.63. The authors claim the difference branch is most critical, consistent with its largest drop.
- DIRE's format bias: In Appendix C, the authors claim DIRE's high scores on diffusion images largely come from format bias such as synthetic images being PNG and real images being JPEG; after flattening the format, performance drops and cross-generator transfer worsens. The paper does not give the post-drop numbers.
What are some points that can be further explored?
The authors plan to test whether the robustness difference extends to more forms such as adversarial perturbations.
Limitations and future directions noted by the authors
- More perturbation types: The paper has no separate Limitations section. The Conclusion states that future work will examine whether the robustness difference between real and synthetic images is a more general phenomenon, and extend to more perturbation types, such as adversarial attacks.
Experimental coverage
- Main protocol: Training uses 360k real images plus 360k ProGAN synthetic images; Appendix A states that Setting I's real images come from LSUN. Testing covers the 16 generators in Table 1, with metrics ACC and AP.
- Comparison detectors: FreDect, LGrad, DIRE-G, DIRE-D, DNF, CNNSpot, GramNet, UniFD, NPR, RIGID, FerretNet. Among these, DIRE-D and DNF are trained with ADM.
- Training sources and recent models: Table 2 includes three training sources: ProGAN, SDv1.4, and a mix of both. Table 4 additionally reports SDXL, SDv3.5, FLUX, FLUX1-dev, MJ-v6, Infinity, VAR.
- Post-processing and overhead: Post-processing includes JPEG (QF=95, 90, 85) and Gaussian blur (σ=0.8, 1.0, 1.5), compared against UniFD, NPR, FerretNet; Figure 5 does not give numerical values for each point. Table 5 reports FLOPs, parameter count, peak GPU memory, and per-image time.
- Quantities not reported in the paper: Number of test samples per generator, number of repetitions, perturbation magnitude ε values, and detection numbers under adversarial attacks. That attack type appears in the Conclusion's future plans. The lower-bound check in Appendix D uses DDPM on CelebA-HQ and four frozen encoders.
Summarize the main content of the paper
RA-Det turns the feature drift difference under perturbation into a detection signal, with average ACC higher than the universal detectors in the table, but not the highest in every row.
RA-Det is a synthetic image detector that uses representation stability differences under perturbation instead of appearance artifacts.
- Problem: The authors state that photorealistic generated images weaken appearance cues such as frequency, residuals, and high-level embeddings, especially after JPEG, blur, or with unseen generators. The detection setting is called real-world black-box detection by the authors: train on only one generative model, discriminate real vs. fake on unseen models, and do not use generator fingerprints.
- Method: Freeze DINOv3 ViT-L/16, use a conditional UNet to produce perturbations constrained by tanh and ε, compare distances and difference vectors of clean vs. perturbed embeddings, and add a semantic head and median filter residual with kernel size 3. Loss is binary cross-entropy plus a contrastive term with margin 0.1, applied to in-batch cosine similarities. The theory section relates a lower bound on expected displacement difference under small noise to SIDE memorization divergence: the smaller the divergence, the larger the lower bound.
- Main results: In Table 1, after ProGAN training, average ACC/AP across 16 generators is 93.47%/97.00%; FerretNet is 85.66%/90.43%, RIGID is 77.17%/82.38%. The abstract states an average performance improvement of 7.81%, consistent with the average ACC difference relative to FerretNet.
- Exceptions: On whichfaceisreal, RA-Det ACC is 72.20%, lower than RIGID's 88.40%. On ADM, DIRE-D is 98.25/99.79, higher than RA-Det's 88.89/95.07. Appendix Table 4, with only ProGAN training, FLUX ACC/AP is 57.19/61.50.
- Authors' conclusion: The authors state this asymmetry is a cross-architecture transferable detection cue, and probing can turn it into a detector; the figure caption for post-processing experiments states RA-Det remains higher than listed baselines under JPEG and blur, but the main text does not give the values for each point in the figure. Conclusion plans to test whether the difference extends to more perturbations such as adversarial. Table 5 shows single-image inference time 25.14 ms.