Abstract
In the escalating conflict between Deepfake generation and forensic detection, proactive watermarking has emerged as a vital tool for image traceability. However, traditional watermarking techniques often fail when subjected to the aggressive re-encoding and reconstruction processes inherent in Deepfake models. This paper introduces DiffMark, a novel framework that leverages diffusion models to embed watermarks into the generative fabric of an image. By treating the watermark as a condition during the denoising process, DiffMark achieves superior robustness against face-swapping and attribute editing while maintaining high visual fidelity.
Introduction
The proliferation of Deepfakes poses significant risks to individual privacy and social stability. While passive forensics attempt to detect manipulations post-hoc, proactive forensics—specifically digital watermarking—allow for the tracking of an image's source from its inception. The primary obstacle for existing watermarking methods is robustness. Deepfake manipulations, such as those performed by SimSwap or StarGAN, involve deep neural reconstruction that typically "washes away" fragile pixel-space or latent-space watermarks. DiffMark addresses this by integrating the watermark into the image generation process itself.
Methodology
DiffMark shifts the paradigm from additive watermarking to conditional generation. Instead of modifying a pre-existing image, the framework uses a diffusion model to generate a watermarked version of the original image guided by binary data.
Dual-Condition Denoising and CIF Module
The core of DiffMark is a denoising pipeline guided by two conditions: the original facial image and the binary watermark. To prevent the model from ignoring the watermark in favor of the image condition, the original image is dynamically scaled based on the noise level at each timestep.
To ensure effective integration, the authors developed a Cross Information Fusion (CIF) module. This module utilizes a learnable embedding table with position-aware indexing ($e_i = i + w_i L$) to map watermark bits into a high-dimensional feature space. These features are then fused with image features via cross-attention, ensuring the watermark is semantically embedded within the image structure rather than applied superficially.
Deepfake-Resistant Guidance
To further "harden" the watermark against future edits, DiffMark employs a training-free enhancement during the sampling phase. By calculating gradients from a watermark decoder—simulated after the image passes through a Deepfake model—the diffusion process is steered toward a state that is inherently resistant to those specific types of reconstruction distortions.
Experimental Evaluation
The researchers evaluated DiffMark on the CelebA-HQ and LFW datasets, comparing it against state-of-the-art baselines like MBRS, SepMark, and EditGuard.
- Visual Fidelity: DiffMark achieved a Peak Signal-to-Noise Ratio (PSNR) of approximately 41.9 dB and a Structural Similarity Index (SSIM) of 0.977 at 256x256 resolution, indicating that the watermarks are virtually imperceptible to the human eye.
- Robustness to Deepfakes: When subjected to aggressive face-swapping via SimSwap, DiffMark maintained a Bit Error Rate (BER) of only ~5.96%. In contrast, competing methods saw BERs escalate to between 15% and 45%, rendering the watermark unrecoverable.
- Generalization: The model demonstrated strong cross-dataset performance, maintaining high accuracy on the LFW dataset despite being trained on CelebA-HQ, proving its utility in real-world, out-of-distribution scenarios.
Conclusion
DiffMark represents a significant advancement in proactive forensics. By integrating watermarking into the diffusion-based generative process, it provides a robust solution for image traceability that survives sophisticated AI-driven manipulations. While the iterative nature of diffusion models introduces some computational overhead (~0.75s per image), the gains in robustness and image quality offer a compelling trade-off for high-stakes security and authentication applications.
Citation: Sun, C., et al. "DiffMark: Diffusion-based Robust Watermark Against Deepfakes." arXiv:2507.01428v2 [cs.CV].
Summary updated