- The paper introduces a unified end-to-end transformer framework that couples explainable detection with iterative, mask-free artifact correction for AI-generated images.
- It employs a novel mixture-of-transformers architecture with visual chain-of-thought and curriculum learning to jointly optimize detection and restoration.
- Experimental results demonstrate near-perfect detection accuracy and superior artifact correction performance, outperforming existing methods under varied degradations.
GenShield: Unified Detection and Artifact Correction for AI-Generated Images
Introduction
"GenShield: Unified Detection and Artifact Correction for AI-Generated Images" (2605.16122) addresses the emerging challenge of distinguishing and “repairing” images synthesized by advanced generative models, particularly diffusion models. With AI-generated images (AIGI) achieving near-indistinguishable photorealism, classical binary detection or simple artifact localization are insufficient for robust digital forensics, misinformation mitigation, and digital content authentication. GenShield advances the state of the art by proposing a unified, end-to-end transformer-based framework that tightly couples explainable AIGI detection and mask-free artifact correction within a single autoregressive curriculum, revealing a synergistic relation between forensic understanding and image restoration.
Motivation and Problem Framing
Traditional AIGI detection methods focus on statistical or pixel-level cues and operate in isolation from any artifact correction. Correction methods, when present, are typically post hoc, highly dependent on precise localization, and often introduce new artifacts due to frozen inpainting modules. As generative models improve, artifact signals become increasingly subtle and highly entangled with natural semantics, rendering these pipelines inadequate, especially given the lack of paired artifact-restoration datasets.
GenShield’s central thesis is that detection (semantic understanding, forensic analysis) and correction (generative restoration, artifact repair) are mutually reinforcing—joint modeling not only improves detection sensitivity and robustness but also enables controlled, high-fidelity correction of detected artifacts without introducing semantic drift or new inconsistencies. This holistic approach is essential for practical deployment in high-stakes scenarios such as journalism and visual media forensics.
Methodology
GenShield adopts a mixture-of-transformers (MoT) architecture wherein two specialist experts—a detection expert (for explainable AIGI segmentation and rationale generation) and a correction expert (for artifact-aware restoration)—share a multimodal decoder backbone. The experts interact via shared self-attention layers, allowing bidirectional transfer of both generative priors and forensic reasoning. The detection expert guides the correction process with explicit rationales, while the correction expert sharpens the detection sensitivity through strong camera-consistent priors.
Visual Chain-of-Thought (VCoT) and Curriculum Learning
Artifact correction is formulated as a multi-step visual chain-of-thought process. Curriculum learning proceeds in two stages:
- Stage 1: Joint detection and instruction-guided correction, leveraging strong supervision and explicit artifact descriptions to establish reliable generative priors.
- Stage 2: Iterative Visual CoT-based self-correction, in which the model alternates between diagnostic explanation (localizing and describing residual artifacts) and targeted restoration steps with an explicit stopping criterion (termination diagnosis).
Throughout both stages, detection remains an active, autoregressive structured-text generation task, fully compatible with the transformer architecture.
GenShield-Set: Dataset Construction
A key contribution is the GenShield-Set dataset, comprising over 10,000 high-quality, precisely aligned anomalous–restored tuples for artifact correction and ~66,000 image-text pairs for explainable detection. Correction data are constructed by enhancing region-based artifact annotations and leveraging advanced editors (Nano Banana Pro), followed by rigorous human filtering to ensure semantic consistency and avoid over/under restoration. Termination diagnoses generated by large language vision models (Qwen-2.5-VL) are used to clearly delimit repaired endpoints. Intermediate states from Stage 1 provide diverse, partially corrected trajectories for Stage 2's iterative refinement.
Experimental Results
On Holmes-Set [Zhou et al., 2025], GenShield achieves mean accuracy of 98.8% and AP of 99.8%, outperforming both LLM-based (e.g., AIGI-Holmes, Qwen2.5-VL) and non-LLM-based detectors by significant margins. For instance, on Janus-Pro-7B, GenShield achieves 99.4% accuracy compared to the next best (AIDE) at 97.8%. Across challenging generative models, this performance demonstrates substantial generalizability and robustness, attributed to the coupling of structured explainable rationales and generative priors.
Crucially, GenShield retains high accuracy under adverse image degradations: JPEG compression (QF=70), Gaussian blur, and image resizing, with minimal performance drop (e.g., 96.1% accuracy under severe compression), consistently outperforming all baselines. This resilience is a direct consequence of the unified understanding-generation paradigm, reducing the over-dependence on low-level image cues.
On SynthScars [Kang et al., 2025], GenShield’s correction surpasses both advanced closed- and open-source image editors, including GPT-Image-1.5 and Nano Banana Pro, in both subjective (GPT-5.2 and human evaluation) and objective metrics (HPSv3, CLIP-Score, PickScore). Specifically, GenShield achieves a mean artifact score (lower is better) of 0.15, outperforming the best baseline by a wide margin. Objective metrics are also state-of-the-art (HPSv3 = 6.20, CLIP-Score = 22.12, PickScore = 18.86), indicating not only effective artifact removal but also photorealistic consistency with the camera-captured manifold.
Iterative (multi-step) vs. single-step ablations demonstrate substantial improvements in artifact removal and output stability with the VCoT strategy, as evidenced by the lower artifact scores and superior objective metrics for the multi-step (full) model.
Ablations and Analysis
Ablation studies confirm that:
- Joint detection–correction training provides significant performance gains over task-isolated models.
- Curriculum learning (progression from guided to self-corrective, iterative correction) is essential for convergence and high-quality, semantically consistent restoration.
- Iterative VCoT refinement (absent in "w/o VCoT") is critical for the removal of subtle and residual artifacts without over-editing or semantic drift.
Distributional analysis of correction step counts shows that 79.8% of images are fully repaired within two refinement steps (mean <3), confirming both the efficiency and adaptiveness of the iterative loop.
Implications and Future Directions
GenShield signifies a paradigm shift in vision AI safety, moving beyond binary detection to closed-loop authenticity restoration. The practical implications are extensive: integration into real-world forensic pipelines is rendered feasible by generalization across generators, robustness to image degradations, and the ability for interpretable, explainable decision making.
Theoretically, the tightly coupled modeling of forensic reasoning and generative restoration provides a compelling template for broader unified understanding-generation models, possibly extendable to cross-modal and multi-domain digital forensics.
Areas for extension include tackling globally incoherent or extremely low-quality generations (noted as a limitation), exploiting continuously improving editing/generation models for supervision, and scaling correction beyond local artifacts to complex, semantically entangled manipulations.
Conclusion
GenShield demonstrates that end-to-end, unified modeling of explainable AI image detection and iterative, mask-free artifact correction leads to simultaneous SOTA performance in both detection robustness and artifact restoration fidelity. By systematically linking diagnostic understanding with controlled generative correction in a curriculum-augmented transformer framework, GenShield lays technical and conceptual groundwork for trustworthy, explainable AI image forensics in increasingly adversarial and hyper-realistic generative media environments (2605.16122).