Manuscript Offprint

arXiv:2609.02640

From Detection to Localization: A Unified Forensics Framework for Fully Synthetic and Tampered Images

Annalisa Gallina, Marco Fiorucci, Marco Brigo, Federica Battisti, Lamberto Ballan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Annalisa Gallina<sup>✉</sup>

University of Padova Padova, Italy annalisa.gallina.1@phd.unipd.it

Marco Fiorucci

University of Padova Padova, Italy marco.fiorucci@unipd.it

Marco Brigo

University of Padova Padova, Italy marco.brigo@studenti.unipd.it

Federica Battisti

University of Padova Padova, Italy federica.battisti@unipd.it

Lamberto Ballan

University of Padova Padova, Italy lamberto.ballan@unipd.it

Abstract

The rapid advancement of generative models has significantly worsened the problem of manipulated image detection, as these methods are capable of producing highly realistic forgeries, reinforcing the importance of multimedia forensics. Conventional approaches typically frame image manipulation detection as a binary classification task (real vs. generated), which limits the capability to distinguish and localize different forms of manipulation. To address these constraints, this work extends an existing detector by introducing a unified multiclass framework (real vs. fully generated vs. tampered). In addition to classifying image authenticity, the framework incorporates a segmentation branch to enable pixel-level localization of tampered regions. The proposed approach outperforms selected recent benchmarks, offering an efficient solution with improved classification accuracy and higher IoU scores for the localization task. Find the code at https://github.com/anngal01/From-Detection-to-Localization-A-Unified-Forensics-Framework-for-Fully-Synthetic-and-Tampered-Images.git

1 INTRODUCTION

The rapid evolution of generative modeling has significantly changed the ways in which digital content is created and experienced. Powered by large-scale architectures trained on massive open-world datasets, diffusion-based models have emerged as the prevailing approach for high-fidelity image synthesis [1], consistently surpassing adversarial methods [2] in terms of quality and diversity. Current frameworks like latent diffusion [3], DALL-E 3 [4], and Mid-journey [5], enable the seamless generation of photorealistic visuals from textual prompts. While these advancements have empowered creative workflow and augmented the digital content production, they simultaneously challenge the reliability of visual content [6]. The ability to synthesize photorealistic imagery at scale facilitates the proliferation of misinformation and identity fraud, necessitating robust deepfake detection and Image Forgery Detection and Localization (IFDL) as the forensic focus shifts from obvious structural artifacts toward subtle, near-imperceptible statistical anomalies.

To mitigate these emerging threats, the research community has intensified its efforts in the domain of visual forensics. Early investigations primarily targeted specific architectural footprints and statistical inconsistencies unique to Generative Adversarial Network (GAN)-generated content [7, 8]. However, the transition

toward diffusion-based synthesis has rendered many legacy techniques ineffective, as modern models often lack the upsampling artifacts and checkerboard patterns characteristic of previous generations. Consequently, recent literature has shifted toward exploring high-frequency inconsistencies, noise residuals, and reconstruction errors as robust forensic signatures [9–11]. Furthermore, research has branched into spectral analysis, such as leveraging color distribution irregularities to enhance cross-domain robustness [5], and vision-language alignment, where prompt-tuned models harmonize visual and textual cues to detect semantic inconsistencies [12].

Despite these advancements, existing forensic frameworks remain hindered by critical technical bottlenecks. Most conventional detectors are formulated as closed-set binary classification tasks primarily designed to distinguish between entirely real and fully synthetic content [13, 14]. While recent approaches such as RINE [15] and SPAI [16] have enhanced generalization across disparate architectures, by leveraging intermediate spectral invariants features, they remain predominantly centered on global image level labels. This rigid formulation fails to address modern workflows where authentic images undergo generative tampering, such as diffusion-based inpainting, object insertion or scene-elements manipulation. These sophisticated manipulations necessitate a shift towards a multiclass paradigm capable of simultaneous detection and pixel level attribution, a transition recently facilitated by the introduction of new benchmarks [17, 18]. Additionally, while high-performing Large Vision-Language Models (LVLMs) offer forensic reasoning, their deployment is constrained by heavy computational overhead and a lack of pixel-level precision [17, 19].

In this paper, we propose a unified framework that extends RINE [15] beyond binary classification. By identifying the "proxy token" phenomenon [20] as a bottleneck in CLIP-based models, we adopt DINOv2 [21] to leverage superior spatial consistency through shared frozen representations. The architecture follows a sequential logic: a three-class branch categorizes images as real, fully synthetic, or partially tampered; the latter triggers a lightweight segmentation branch for pixel-level localization. This approach avoids extensive parameter tuning by exploiting the inherent discriminative power of fixed foundation features, significantly optimizing training efficiency. Extensive evaluations on SID-Set [17] and So-Fake-Set [18] confirm that our framework matches or improves state-of-the-art performance, establishing a baseline for the dense forensic localization of diverse image content.

Figure

Figure 1: Overview of the proposed framework. An input image is processed by a frozen DINOv2 backbone, and features extracted from multiple transformer blocks are shared between two task-specific branches. The detection branch aggregates these representations through a trainable importance estimator to perform image-level classification, while the localization branch combines multi-scale features using a trainable decoder to predict the pixel-level tampering mask.

References (49)

  • Denoising diffusion probabilistic models
  • Generative adversarial networks
  • High-resolution image synthesis with latent diffusion models
  • Secret lies in color: Enhancing ai-generated images detection with color distribution analysis
  • Deepfake generation and detection: A benchmark and survey
  • Detecting and simulating artifacts in gan fake images
  • What makes fake images detectable? understanding properties that generalize
  • Towards universal fake image detectors that generalize across generative models
  • Dire for diffusion-generated image detection
  • Latent reconstruction error based method for diffusion-generated image detection
  • Antifakeprompt: Prompt-tuned vision-language models are fake image detectors
  • Hierarchical fine-grained image forgery detection and localization
  • Frequency-aware deepfake detection: Improving generalizability through frequency space domain learning
  • Leveraging representations from intermediate encoder-blocks for synthetic image detection
  • Any-resolution ai-generated image detection by spectral learning
  • Sida: Social media image deepfake detection, localization and explanation with large multimodal model
  • So-fake: Benchmarking and explaining social media image forgery detection, 2025
  • Fakeshield: Explainable image forgery detection and localization via multimodal large language models
  • Declip: Decoupled learning for open-vocabulary dense perception
  • Dinov2: Learning robust visual features without supervision
  • Exposing deepfake videos by detecting face warping artifacts
  • Exploiting visual artifacts to expose deepfakes and face manipulations
  • Leveraging frequency analysis for deep fake image recognition
  • Detecting deepfakes with self-blended images
  • Doloriel and Ngai-Man Cheung
  • D3: Scaling up deepfake detection by learning from discrepancy
  • Progressive growing of gans for improved quality, stability, and variation
  • How to boost face recognition with stylegan? In Proc
  • On the detection of synthetic images generated by diffusion models
  • Progan: Network embedding via proximity generative adversarial network
  • Stylegan-t: unlocking the power of gans for fast large-scale text-to-image synthesis
  • Pscnet: Progressive spatio-channel correlation network for image manipulation detection and localization
  • Trufor: Leveraging all-round clues for trustworthy image forgery detection and localization
  • Visual instruction tuning
  • DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning
  • Qwen2.5-vl technical report, 2025
  • InternVL3: Exploring Advanced Training and Test-Time Recipes for Open-Source Multimodal Models
  • Lisa: Reasoning segmentation via large language model
  • Supervised contrastive learning
  • Vision transformers for dense prediction
  • Group normalization
  • Cnn-generated images are surprisingly easy to spot
  • Rethinking the up-sampling operations in cnn-based generative network for generalizable deepfake detection
  • Language-guided hierarchical fine-grained image forgery detection and localization
  • Global texture enhancement for fake face detection in the wild
  • Fusing global and local features for generalized ai-synthesized image detection
  • Flux.1 context: Flow matching for in-context image generation and editing in latent space, 2025
  • Sdxl: Improving latent diffusion models for high-resolution image synthesis
  • Imagic: Text-based real image editing with diffusion models