Manuscript Offprint

arXiv:2608.30656

APT: Anchor-aligned Perturbations for Tamper Localization in Fully Regenerated Images

Suhyeon Ha, Woo Jae Kim, Joonsung Jeon, Sooel Son, Sung-eui Yoon

Suhyeon Ha, Woo Jae Kim, Joonsung Jeon, Soeel Son ∗^{*}, and Sung-eui Yoon ∗^{*}

KAIST

{suhyeon.ha, wkim97, mikeraph, sl.son, sungeui}@kaist.ac.kr

https://suhyeonha.github.io/APT

Abstract. Proactive tamper localization embeds an imperceptible signal into an image prior to distribution, enabling pixel-level manipulation detection. Existing methods assume a spliced (SP) setting, where synthesized regions are composited onto the original background, leaving embedded signals intact. However, real-world diffusion-based inpainting operates in a fully regenerated (FR) setting, where the entire image undergoes denoising, disrupting background signals and rendering existing frameworks ineffective. We propose APT, a semi-fragile latent-space perturbation that embeds a dense, vector-wise localization signal. By aligning each spatial feature vector toward a fixed anchor direction, APT localizes tampering via the alignment disparity between synthesized foreground and anchor-aligned background features after inpainting. The proposed hard negative mining loss and noisy perturbation branch further enforce uniform alignment. Experiments on COCO demonstrate that APT achieves an FR IoU of 0.92, outperforming the strongest baseline (WAM, 0.84), while existing methods collapse to near-random performance (AUC ≈ 0.5), establishing APT as a practical forensic framework generalizable across tampering types unknown at test time.

Keywords: Tamper Localization · Image Inpainting · Proactive Perturbation

1 Introduction

Recent advances in diffusion-based inpainting [12, 19, 22, 30] enable highly photorealistic, text-guided image manipulation. These generative capabilities substantially lower the technical barrier for fraudsters, facilitating the large-scale production and dissemination of deceptive visual forgeries on social media, particularly during high-stakes global crises [2, 26]. Such misuse transforms inpainting from a creative tool into an instrument for information manipulation. To counter this threat, proactive tamper localization has emerged as a defensive scheme. The core idea is to embed an imperceptible signal into an image prior to distribution. Upon suspected manipulation, verifiers can analyze the protected image and localize the altered regions.

∗^{*} Co-corresponding authors

S. Ha et al.

Figure

Fig. 1: Vulnerability of proactive localization under fully regenerated (FR) inpainting. In the spliced (SP) setting (b), assumed by existing methods, synthesized regions are composited onto the original background, leaving the embedded signal intact. In contrast, the FR setting (a) uses the raw inpainting output directly, disrupting the background signal across the entire image. While prior methods (c) struggle to localize tampered regions under FR due to severe background signal disruption, our method (d) produces accurate localization masks under both FR and SP settings. Background signals are visualized as 10×(∣tamper−original∣⊙(1−mask))10 \times (|tamper - original| \odot (1 - mask)).

Existing proactive localization methods [24, 28, 31, 32] rely on an optimistic adversary model that assumes splicing (SP): after synthesizing a forged region, the adversary copies the forged patch back onto the original image as a post-processing step (Fig. 1). Under this assumption, the background remains unchanged and the embedded signal outside the edited region is preserved, enabling reliable localization. However, this assumption is broken by diffusion-based editing in its native form. The raw output of diffusion models is a fully regenerated (FR) image; the entire image undergoes the noise sampling and denoising process to blend the synthesized foreground with the background. Accordingly, the embedded signal in the background is also impaired, even when the semantic content outside the edited region appears intact. While existing studies [8, 20] note that FR images are generally harder to detect than SP images, no prior work in proactive localization has addressed this practical and challenging FR setting.

Addressing this gap requires rethinking what properties a localization signal must satisfy to be effective in the FR setting. Diffusion-based inpainting models synthesize the target foreground based on a text prompt while reconstructing the original background. Successful localization under such generative processes thus requires a dual property: the signal must remain robust to background regeneration yet fragile to foreground synthesis.

However, existing proactive methods [24, 28, 32] struggle to satisfy this requirement, particularly the robustness to background regeneration, due to two primary limitations. First, their localization embeddings are fragile to both the VAE encoding-decoding process and pixel regeneration used in diffusion pipelines. As a result, signals embedded in background regions become unsta-ble, rendering them unreliable as localization cues in the FR setting. Second, they often rely on global embeddings that lack explicit spatial correspondence between the signal and its location, making it difficult to accurately map pixel-level tampering.

To address these challenges, we propose APT, a semi-fragile perturbation framework that embeds a robust vector-wise localization signal in the VAE latent space. APT optimizes a latent perturbation that drives each spatial latent vector toward a predefined anchor vector, producing vector-wise alignment at every spatial location rather than relying on a single global embedding. Since we sample this anchor vector from the unit hypersphere independently of the generative model's learned distribution, feature vectors synthesized by the diffusion model naturally deviate from this anchor direction. In contrast, during diffusion-based inpainting, background regions are reconstructed by heavily conditioning on the original latent representation, which already carries the anchor-induced alignment. This foreground-background alignment disparity yields a reliable localization signal that differentiates tampered and protected regions after inpainting. To further stabilize the signal, we introduce a hard negative mining loss that suppresses weakly aligned spatial features and a noisy perturbation branch that improves robustness of the embedded signal against VAE-induced distortions during background regeneration.

APT achieves consistent localization performance across both spliced and fully regenerated tampered images. At verification, the vector-wise detection map is directly upsampled to produce a pixel-level mask (APT), while an optional lightweight decoder can be employed to further refine spatial boundaries (APT*).

We compare APT with state-of-the-art tamper localization methods across both SP and FR settings. While existing methods perform well in SP settings, they suffer severe performance drops in IoU ranging from 0.14 to 0.93 when faced with FR manipulations. Specifically, StableGuard [28] and OmniGuard [32] collapse to near-random AUC levels ( ≈0.5\approx 0.5), whereas APT maintains a robust AUC of 0.97. Furthermore, APT* surpasses the top-performing baseline (WAM [24], 0.84), with an IoU of 0.92, effectively bridging the gap in FR tamper localization.

Our contributions are as follows:

– We present the first systematic evaluation of proactive tamper localization under fully regenerated (FR) inpainting. We reveal a critical vulnerability in existing methods, suffering severe performance degradation on FR forgeries.

– We propose APT, a novel semi-fragile perturbation framework that optimizes a dense, vector-wise anchor signal in the VAE latent space, where the foreground-background alignment disparity serves as the localization cue. A hard negative mining loss and a noisy perturbation branch further enforce spatially uniform alignment, enabling robust localization across both SP and FR manipulations.

– Experiments on COCO demonstrate that APT significantly outperforms state-of-the-art baselines under the challenging FR manipulations while maintaining competitive performance on SP images. This establishes APT as a practical tamper localization framework for real-world scenarios where the manipulation type is unknown at test time.

S. Ha et al.

References (31)

  • Malp: Manipulation localization using a proactive scheme
  • Blended latent diffusion
  • Z-image: An efficient image generation foundation model with single-stream diffusion transformer (opens arXiv in a new tab)
  • Mvss-net: Multi-view multi-scale supervised networks for image manipulation detection
  • Scaling rectified flow transformers for high-resolution image synthesis
  • Watermarking images in self-supervised latent spaces
  • Sagi: Semantically aligned and uncertainty guided ai image inpainting
  • Trufor: Leveraging all-round clues for trustworthy image forgery detection and localization
  • Hierarchical fine-grained image forgery detection and localization
  • Sida: Social media image deepfake detection, localization and explanation with S. Ha et al. large multimodal model
  • Brushnet: A plug-and-play image inpainting model with decomposed dual-branch diffusion
  • Adam: A Method for Stochastic Optimization
  • FLUX.2: Frontier Visual Intelligence
  • Noise-assisted prompt learning for image forgery detection and localization
  • Microsoft coco: Common objects in context
  • Inpainting using denoising diffusion probabilistic models
  • Lcm-lora: A universal stable-diffusion acceleration module (opens arXiv in a new tab)
  • Hd-painter: high-resolution and prompt-faithful text-guided image inpainting with diffusion models
  • Tgif: Text-guided inpainting forgery dataset
  • Sdxl: Improving latent diffusion models for high-resolution image synthesis
  • High-resolution image synthesis with latent diffusion models
  • U-net: Convolutional networks for biomedical image segmentation
  • Watermark anything with localized messages
  • DINOv3
  • Are deep neural networks good for blind image watermarking? In: 2018 IEEE International Workshop on Information Forensics and Security (WIFS)
  • Stableguard: Towards unified copyright protection and tamper localization in latent diffusion models
  • Difforensics: Leveraging diffusion prior to image forgery detection and localization
  • Adding conditional control to text-to-image diffusion models
  • Editguard: Versatile image watermarking for tamper localization and copyright protection
  • Omniguard: Hybrid manipulation localization via augmented versatile deep image watermarking
  • Lanpaint: Training-free diffusion inpainting with asymptotically exact and fast conditional sampling (opens arXiv in a new tab)