Squeezing the Evader: One-Class Forgery Detection That Reads How Scores Respond to Perturbation

Detectors for AI-generated images and deepfakes increasingly learn only what real photographs look like and flag anything that falls outside that description. This "one-class" approach generalizes to new generators better than training on known fakes, but nobody has tested how it holds up against an attacker. Benchmarks such as RAID show that supervised fake detectors collapse under small adversarial pixel changes, and the one-class detectors have not been attacked at all. We propose a detector that forces the attacker into a dilemma. To make a fake look real to a one-class model, the attacker can do one of two things. The first is to add a small, carefully tuned pixel perturbation. Such perturbations are known to be fragile, and they break under mild re-encoding. The second is to regenerate the pixels through a generative model, by searching in its latent space or by "purifying" the image. Regeneration replaces sensor-level statistics with synthetic ones, and those are exactly what a real-only detector models.

The proposal makes the first route self-incriminating. A real photograph's anomaly score changes in a predictable, small way when the image is lightly JPEG-recompressed, slightly resized, or briefly noised and denoised. A fake that has been pushed just inside the "real" boundary by a fragile perturbation should instead snap back out. We fit the one-class model, trained only on real images, to two things jointly: an image's score, and how that score responds to a fixed set of mild transformations. The fragility of adversarial perturbations then becomes a detection signal rather than a curiosity, while the low-level real-only detector covers the second route.

Core Claim

The claim is that a one-class detector with a response signature substantially raises the perceptual cost an adaptive white-box attacker must pay to evade it. The response signature is defined as the vector of score changes under a small transformation family, and it is calibrated on real images only. This holds at matched attack budgets, compared with the same detector scored on the raw image alone. Concretely, let $s(x)$ be a real-only anomaly score, such as the coding-cost gap of Zero-Shot Detection of AI-Generated Images or the discriminator output of RealNet. Let $T_1,\dots,T_K$ be mild transformations. Define

$$ r(x) = \big(s(T_1 x) - s(x),\; \dots,\; s(T_K x) - s(x)\big), $$

the change in score each transformation causes. The final detector is a one-class density $p_{\text{real}}(s(x), r(x))$ fit only on authentic images, and the image is flagged when that density is low.

There is a simple reason an attacker cannot easily satisfy both coordinates. Keeping $s(x)$ low while also keeping every $s(T_k x)$ low means the perturbation must survive the whole family. Robustness to transformations is known to cost perceptibility: MetaCloak reports explicitly that stronger transformation-robust cloaks become more visible. Avoiding pixel noise altogether means regenerating the image. The tension identified between IMPRESS and ZED suggests that regenerated pixels carry synthetic micro-statistics. IMPRESS purifies images by projecting them through a latent diffusion autoencoder. ZED finds that diffusion models fail to reproduce natural micro-texture.

What is new here is not the use of input transformations as a defense. It is that the transformation response is modeled as part of the authentic class, using only real data. Benign shifts such as camera changes or prior compression are therefore absorbed into calibration rather than treated as attacks.

Research Program

The work has three parts.

The first part is the missing measurement. We will attack one-class detectors directly. ZED's coding cost is differentiable through its neural compressor, RealNet is a differentiable network, and the single-center hypersphere of FDFL is also differentiable. Each will face white-box projected gradient descent (iterative pixel attacks within a maximum-change budget, as in RAID) and the latent-space attribute attack of AVA. AVA edits faces through StyleGAN latent codes and fooled nine supervised detectors, but it was never run against detectors of low-level statistics. Each will also face Lab-chrominance perturbations in the style of Anti-Forgery, which hides dense noise in the color channels and resists reconstruction defenses. This part tests the reasonable worry that one-class envelopes are just as brittle as supervised boundaries.

The second part builds the response-signature detector. The transformation family is kept cheap, so that it never approaches IMPRESS's reported ~141 seconds per image. It contains JPEG recompression at two qualities, a downscale-upscale step, a small Gaussian blur, and a single forward-noise-plus-denoise step of an off-the-shelf diffusion model at a small timestep. The joint density is a Gaussian mixture or a small normalizing flow over $(s, r)$, fit on real images. Those real images are drawn under the same compression conditions as the test data, for example FaceForensics++ at c23 and c40. This choice addresses the known sensitivity of one-class detectors to benign compression shift.

The third part is a fully adaptive attack, which is the evaluation that matters. The attacker knows the transformation family and the density model. They optimize with Expectation Over Transformation (averaging gradients over the transformations), and they use straight-through gradients wherever JPEG is involved. The attacker may also chain a pixel attack with IMPRESS-style purification, or use AVA's latent search with a term that penalizes the response signature. For every attack we report the evasion rate together with its price. The price is measured as pixel budget, LPIPS (a learned perceptual distance), and identity similarity for faces. We will trace the frontier between evasion and perceptual cost.

Baselines

The naive reference point is each one-class detector, ZED, RealNet, and FDFL's single-center model, scored on the raw image with no transformations. It shows how much the attacks hurt when nothing is done. No reported result found on Lacuna for any one-class detector under adversarial attack, so these numbers are themselves a contribution.

The strongest existing evidence on attacking fake detectors comes from RAID. There, white-box F1 for almost all tested detectors "plummeted to 0.0", and the Corvi et al. detector's AUROC dropped "from 0.99 to 0.67" under transferred attacks. We use RAID's released images (aimagelab/RAID) at its 8/255, 16/255, and 32/255 budgets for the transfer setting. We also regenerate white-box attacks against each one-class detector with the same PGD step count and budget. A supervised detector adversarially retrained on RAID-style examples is the strongest competitor among methods that see fakes, and it will be trained on the same real images plus D³ fakes with matched compute. RAID suggests this retraining pipeline but the file gives no reported number for it. On clean data, the reference figure for the base detector is ZED's AUC above 95% on DALL-E 3, Midjourney v5, and SDXL, so the clean AUC our signature costs must be reported against that figure.

Two simpler defenses get the same transformation budget: JPEG or blur applied as a pre-filter before the detector, and an ensemble of ZED and RealNet. Two ablations isolate the key ingredient. The first uses each single transformation's score $s(T_k x)$ alone instead of the response vector. The second trains a supervised classifier on $(s, r)$ using attacked examples instead of a real-only density, which tests whether the one-class calibration matters for unseen attacks.

The proposal beats the competition if two conditions hold under fully adaptive attacks. The adaptive attacker must need a meaningfully larger perceptual cost to reach 50% evasion than against the best baseline, which we will specify as at least a doubling of LPIPS or a move from 8/255 to 16/255 or beyond. The clean AUC must also stay within two points of the raw detector.

Why not just…?

Why not just pre-filter inputs with JPEG or blur? APBench shows that such pre-processing neutralizes availability poisoning, so this is a serious alternative. However, a fixed pre-filter is a single known transformation that an Expectation Over Transformation attacker can optimize through. IMPRESS reports that JPEG, noise, and resizing were "not enough" against transformation-aware protections. A pre-filter also discards the very micro-statistics that ZED relies on, which raises false positives on real images. Our pre-filter baseline and the single-transformation ablation test this directly. If the pre-filter matches the response signature under adaptive attack, the joint modeling adds nothing, and we will report that.

Why not just adversarially train a supervised detector? Adversarial training can close the white-box gap for the attacks it trains on. But the supervised detectors it hardens overfit to known generators and dataset shortcuts, as argued in Real Appearance Modeling for More General Deepfake Detection and Circumventing Shortcuts in Audio-visual Deepfake Detection Datasets with Unsupervised Learning. RealNet also reports gains of 4.51% mean accuracy over prior methods across generator families. We test the threat by holding out a generator and an attack type, Lab chrominance or AVA, from adversarial training. We then check whether the adversarially trained detector or the real-only signature degrades less.

Why not just ensemble several one-class detectors? An attacker who must fool both ZED and RealNet faces a harder problem. If both detectors rely on correlated low-level cues, though, one perturbation may fool both. An ensemble also does not use fragility at all. Ensembling is cheap and could plausibly do as well, so it runs under the same adaptive attack. It also composes with our method, and we report the ensemble with and without response signatures.

Why not just let the attacker use latent-space or purification attacks, which aren't fragile? This is the real threat to the response signature, and it is why the low-level detector remains in the loop. The prediction from the ZED and IMPRESS tension is that AVA outputs and IMPRESS-purified images carry synthetic micro-statistics and score high on $s$ itself. If AVA or purified fakes pass ZED and RealNet at real-image rates, the squeeze fails on that route, and we will say so.

Proposed Experiments

The experiments use three data sources. The first is the RAID and D³ split for general AI-generated images. The second is ZED's benchmark, with 29,000 synthetic and 6,000 real images, for cross-generator coverage. The third is FaceForensics++ at c23 and c40, plus CelebA-HQ, for face forgeries and AVA attacks. On FF++ c40, FDFL reports 0.924 AUC, which anchors the clean performance of the face pipeline.

The decisive check is the adaptive frontier. For each detector, we plot evasion rate against LPIPS and against pixel budget for PGD, Expectation Over Transformation PGD, Lab-chrominance attacks, AVA with a signature penalty, and PGD followed by purification. We compare the raw-score detector, the baselines, and the response-signature detector on the same plot.

The idea is falsified if either of two outcomes occurs. The first is that an Expectation Over Transformation attack at 8/255 evades the response-signature detector about as often as it evades the raw detector. The second is that regenerated images (AVA and IMPRESS outputs) score as real on ZED and RealNet. A secondary check tests benign robustness. We measure false-positive rates on real images from compression levels and cameras not used in calibration, so that the response signature does not simply turn benign distribution shift into alarms.