arXiv:2610.21780cs.CVOct 2026

Manuscript Offprint

arXiv:2610.21780

DINO-FIL: Multi-Layer Transformer Fusion for Generative Inpainting Forgery Localization

Simon Freitter, David Fischinger, Silvia Poletti, Marcel Hasenbalg, Martin Boyer

Simon Freitter 1^{1} ID^{ID}, David Fischinger 1^{1} ID^{ID}, Silvia Poletti 1^{1} ID^{ID}, Marcel Hasenbalg 1^{1} ID^{ID}, and Martin Boyer 1^{1} ID^{ID}

AIT Austrian Institute of Technology GmbH, Giefinggasse 4, 1210 Vienna, Austria

simon@freitter.com

Abstract. We propose DINO-FIL, a transformer-based framework for pixel-level localization of generative image forgeries. The method leverages multi-layer representations from a pretrained DINOv3 ViT-H+/16 encoder combined with a lightweight fusion decoder to capture both semantic structure and fine-grained texture inconsistencies introduced by image editing. By aggregating intermediate transformer features across depths, the model improves sensitivity to subtle, spatially localized artifacts that are often missed by standard single-layer approaches. We evaluate DINO-FIL in a cross-dataset setting, training on B-Free and testing on Beyond the Brush, CocoGlide, TGIF, and SAGI-D. The model achieves strong generalization, outperforming existing baselines on average and on four of five evaluated datasets, while maintaining a high true negative rate on pristine images.

Keywords: Inpainting Localization · Image Forensics · DINOv3

1 Introduction

Generative image editing has rapidly improved in visual quality and accessibility. Text-guided and mask-guided inpainting systems can now remove, replace, or regenerate selected image regions while preserving global scene coherence, making manipulated content increasingly difficult to recognize from visual inspection alone [5]. Unlike conventional manipulations such as splicing or copy-move editing, generative inpainting can synthesize new content inside a user-specified mask and blend it into the surrounding context. This is particularly challenging in fully regenerated settings, where the edited region is synthesized jointly with its local visual context rather than inserted as an externally pasted region. As a result, traditional image forgery localization methods may not observe clear low-level discontinuities [9,10]. Reliable localization of inpainted regions is therefore an important task for image forensics, media verification, and downstream trustworthiness analysis.

In this work, we address dense image inpainting localization. Given an RGB image, the goal is to predict a pixel-level binary mask that separates inpainted regions from authentic image content. Unlike image-level synthetic detection, dense inpainting localization targets a finer-grained, pixel-level task: identifying

S. Freitter et al.

edited regions by detecting subtle statistical inconsistencies and visual artifacts, such as boundary discontinuities between authentic and synthesized content. In this setting, “edited” does not necessarily mean that the background pixels remain unchanged. Depending on the editing workflow, the background may either stay pixel-identical to the original image or be regenerated together with the modified region. In the latter case, pixel-level changes can occur across the entire image while preserving the background’s semantic content, potentially destroying the local forensic traces needed for inpainting localization, even though image-level synthetic detection may still succeed [9].

Recent inpainting-focused benchmarks such as TGIF [10], Beyond the Brush (BtB) [1], SAGI-D [5], CocoGlide [6], and B-Free [7] reflect this shift toward realistic local edits.

Pretrained vision backbones have become central to image forensics. TruFor [6] leverages a pretrained vision transformer architecture to process RGB images together with learned noise-sensitive traces for general forgery localization. In parallel, self-supervised ViT backbones such as DINO [3] provide transferable dense representations that can be adapted to localize subtle generative traces. DinoLizer [2] demonstrates the value of DINOv2 [12] patch embeddings for generative inpainting localization and reports strong cross-dataset performance.

However, existing DINO-based localization methods typically rely on final-layer features [2,14]. Forensic methods primarily rely on low-level artifacts such as compression and sensor noise [10], while modern vision foundation models encode higher-level semantic structure in image representations, motivating the use of multi-level features. Multi-level fusion is a standard principle in dense prediction [4,8,13]; for ViTs, intermediate hidden states provide a natural hierarchy of local, structural, and semantic information.

We propose DINO-FIL, a dense Forensic Inpainting Localization framework built on a pretrained DINOv3 ViT-H+/16 encoder and a lightweight multi-layer fusion decoder. DINO-FIL extracts hidden states from several backbone depths, projects them to a common channel dimension, enriches them with lightweight multi-scale context modules inspired by atrous spatial pyramid pooling (ASPP) [4], and fuses them in a top-down decoder inspired by feature pyramid networks (FPN) [8]. Since all selected DINOv3 hidden states share the same patch-grid resolution, DINO-FIL treats transformer depth, rather than spatial scale, as the fusion hierarchy. This enables the model to combine local appearance cues, texture- and pattern-sensitive intermediate representations, and higher-level semantic context. We further study partial encoder fine-tuning with a lower learning rate for unfrozen DINOv3 layers than for the newly initialized decoder.

In summary, our contributions are threefold:

– We introduce DINO-FIL, a DINOv3-based dense inpainting localization model that fuses intermediate transformer features from multiple backbone depths rather than relying only on the final layer.

– We systematically study encoder adaptation and show that partial fine-tuning of later DINOv3 layers improves inpainting localization while full encoder fine-tuning provides limited additional benefit.

– We provide a cross-dataset evaluation of our proposed approach against strong forensic baselines and show that high-resolution inference substantially improves inpainting localization, while maintaining low false-positive rates on pristine images.