From Detection to Repair: Closing the Loop in AI‑Generated Image Forensics
GenShield, a unified autoregressive framework introduced by researchers from Peking University, combines explainable AI‑generated image detection with controllable artifact correction, leveraging a two‑stage Visual Chain‑of‑Thought curriculum and the newly built GenShield‑Set dataset to achieve state‑of‑the‑art performance on both detection and repair benchmarks.
Problem Motivation
AI‑generated images are becoming increasingly realistic, creating a need to determine whether an image originates from a camera or a generative model and to locate, explain, and correct any unnatural artifacts such as structural errors, physical inconsistencies, or local distortions.
GenShield Framework
GenShield is a unified autoregressive transformer that jointly performs explainable detection and controllable artifact correction. For each input image the model outputs:
A real/fake label.
A textual description of the image content.
Evidence text that justifies any identified artifacts.
Repaired image patches that address the artifacts while preserving the main semantics and overall structure.
GenShield‑Set Dataset
Training requires GenShield‑Set, which consists of two complementary parts:
GenShield‑Set‑Detect : real and AI‑generated images paired with structured detection answers (label, description, evidence).
GenShield‑Set‑Correct : more than 10 000 “abnormal‑image → repaired‑image” pairs built from AI‑generated images with expert‑annotated artifacts and filtered for high‑quality repairs.
Visual Chain‑of‑Thought (VCoT) Curriculum Learning
The training process is divided into two stages:
Stage 1 – Simultaneous learning of explainable detection and instruction‑guided repair. The model learns to output structured detection fields and to generate repaired patches conditioned on diagnostic text.
Stage 2 – Multi‑round self‑correction. For a possibly anomalous image the model:
Generates diagnostic text describing remaining artifacts.
Performs targeted repair based on the diagnosis.
Feeds the repaired image back into the model for a new diagnosis.
Repeats until it outputs a termination message such as “no obvious artifacts detected.”
This curriculum keeps the detection task active throughout training, allowing detection and repair to reinforce each other: detection supplies fine‑grained diagnostic cues for repair, while repair forces the model to learn a realistic image generation prior that sharpens its sensitivity to subtle artifacts.
Model Architecture
GenShield is an autoregressive transformer that produces both structured detection fields and image patches. The diagnostic text serves as a conditioning instruction that guides the patch generation process during repair.
Experimental Results
Detection : On the Holmes‑Set benchmark GenShield achieves 98.8 % average accuracy and 99.8 % average precision, surpassing a range of non‑LLM and LLM‑based detectors.
Artifact Correction : Compared with strong baselines (GPT‑Image, Nano‑Banana‑Pro, Seedream, FLUX‑Pro, BAGEL, Qwen‑Image‑Edit), GenShield obtains lower residual artifact scores and the best scores on HPSv3, CLIP‑Score, and PickScore.
Resources
Code repository: https://github.com/zhipeixu/GenShield
Paper: https://arxiv.org/abs/2605.16122
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
