TRANSMISSION // 2612.04682v1
When AI “what-if” images look more like attacks
Source published
A counterfactual image can flip an AI classifier without showing a meaningful change. Researchers test this gap and introduce SeeShift, a method for making semantic edits.

A convincing-looking edit is not necessarily a useful explanation. A new study tests whether visual counterfactuals are supported by independent classifiers and remain valid under image transformations—checks that offer clues about an edit’s meaning, but do not prove what caused the classifier’s decision.
A visual counterfactual is an image edited to make an AI classifier change its answer. If a system labels a face “not smiling,” for example, a counterfactual might show what the image could look like if the person were smiling. But an edit can flip the classifier without showing a change that people—or another model—would recognize. Is it explaining the decision, or exploiting the classifier’s sensitivity, like an adversarial attack?
Jan Masłowski, Mário A. T. Figueiredo and Marek Śmieja argue that familiar checks do not settle this question. An edited image can be close to the original and appear plausible while persuading only the classifier it was optimized against. The researchers propose additional diagnostics: check the edit with independent classifiers, and test whether the classifier’s changed decision remains after transformations such as JPEG compression, blur, noise, rescaling and diffusion-based purification. They compare these results with adversarial examples and real images of the target class. The tests can indicate whether an edit behaves like a fragile perturbation, but they do not prove what features caused the decision to change.
The team evaluates five existing counterfactual methods and its own method, SeeShift, on CelebA-HQ face images, AFHQ animal faces and NIH ChestX-ray14 chest radiographs. For each task, the researchers use a binary ResNet-50 classifier and compare methods on the same test images. Their measures include whether that classifier changes its decision, whether independent “oracle” classifiers assign the edited image to the target class, and whether the changed decision survives image transformations. They also report LPIPS, a perceptual distance measure comparing edits with their source images, and CMMD, which compares distributions of image embeddings. These measures describe proximity and distributional difference; they are not direct proof of realism or explanatory meaning.
For chest X-rays, two physicians reviewed versions presented with random letters, without method names. They rated whether the requested change was achieved, where it appeared, and “same patient, plausible radiograph” on a 1–5 scale. This combined fidelity rating is a subjective judgment, not verification of patient identity.
The central finding is that flipping the original classifier was not enough to establish that an edit explained anything. On CelebA-HQ, independent oracles confirmed fewer than a third of the counterfactuals produced by DiME, MaskDiME and ACE. Fewer than 30% of those methods’ edits remained valid after diffusion purification. Other baselines did better on some checks, but results varied across methods and datasets. The authors present the tests as complementary diagnostics, not a universal way to label an image an explanation or an attack.
SeeShift takes a different route. Instead of directly adjusting image pixels using gradients from the classifier, it learns to shift an image’s semantic code in a diffusion autoencoder. It transfers the resulting difference back to the original as a localized residual, so pixels outside the edited region come from the original image. Across the three datasets, SeeShift had the highest oracle validity and robustness to image transformations among the counterfactual methods tested. Its proximity results were not uniformly best: the trade-offs differed by dataset and metric, and changing an animal’s species on AFHQ required a larger edit. These comparisons apply to the study’s tasks, models and evaluation setup; they do not guarantee that every edit will be meaningful.
The physician study offered a human assessment in the medical-image setting. Reviewers rated the requested change as achieved (score 4 or 5) for 73% of SeeShift versions they assessed, compared with at most 17% for any baseline. Across 52 case ratings, they selected SeeShift as the best version 83% of the time. The study involved 28 distinct cases and two physicians; these results concern the reviewed examples, not clinical accuracy or suitability for diagnosis. Images were processed at 256 × 256 resolution. The authors say larger studies at diagnostic resolution are needed before clinical use.
Important uncertainties remain. Independent classifiers can share shortcuts with the original model. Transformations may erase genuine evidence or leave some adversarial edits intact. The authors say these diagnostics support semantic consistency but do not establish which features caused a decision change, and they are not a defense against every attack. SeeShift also depends on the quality and representation of its autoencoder; the experiments cover three datasets, not every kind of image task.
This work is an arXiv preprint, so its findings should be read as research claims rather than settled clinical evidence. Its practical message is that a successful classifier flip and a small pixel change do not, on their own, establish explanatory value. Independent checks and transformation tests can add useful evidence, while leaving important questions unresolved.
- counterfactual explanations
- adversarial examples
- explainable AI
- computer vision
- diffusion autoencoders
- medical imaging
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
Turning recommendation “what-ifs” into explanations people can read
Source published
Shared keywords: counterfactual explanations, explainable ai
Can edited images reveal what a deepfake detector uses?
Source published
Shared keywords: computer vision, counterfactual explanations
A vision-inspired network that is less confidently wrong
Source published
Shared keywords: adversarial examples, computer vision
When malaria AI explanations overlap parasite regions, predictions may be more accurate
Source published
Shared keywords: explainable ai, medical imaging
Mammography AI heat maps perform worse in dense breasts—but the reasons matter
Source published
Shared keywords: explainable ai, medical imaging