Face Deepfake-aware Recovery via Semantic-driven Facial Representation-based Watermarking

Yuan-Chih Chen, Chun-Shien LuNeurIPS 2026

TL;DR

When someone deepfakes a face, traditional protective watermarks break down if the image is slightly rotated, cropped, or even just re-aligned by a face detector. This paper solves that fragility by decoupling who a person is from where their pixels sit: instead of hiding an entire spare image inside the photo, the authors distill facial features (nose, eyes, skin) into a tiny ~128-bit semantic DNA sequence. Even if an attacker swaps the face and flips or rotates the image, this compact code survives to reconstruct the original person’s identity.

What Problem Does This Paper Address?

Suppose you want to protect a portrait so that if someone swaps the face with a deepfake, you can still recover the original identity. Right now, researchers generally try one of two things: train a supervised model on paired real/fake images (which fails on unseen deepfake tools), or hide a backup copy of the original image inside the pixels themselves using steganography or reversible watermarking.

The catch with hiding pixels inside pixels is spatial entanglement. Existing watermarking methods tie visual content directly to pixel coordinates. In the real world, images get cropped, rotated, or translated. Even worse, deepfaking itself alters facial geometry just enough that standard face-alignment algorithms draw slightly different bounding boxes before and after manipulation.

Overlay of bounding boxes from original and faceswapped images showing subtle spatial misalignment.

That tiny shift desynchronizes pixel-level watermarks, turning recovered faces into ghostly, unusable smudges. Meanwhile, modern discrete tokenizers (like VQGAN) require thousands of bits (e.g., ~2,560 bits for a $256 \times 256$ image), blowing past the storage capacity of robust watermarking systems.

Methods

The authors’ core move is to stop hiding pixels and start hiding component-level semantics, outsourcing the spatial layout to the tampered image itself at recovery time.

  1. Semantic Aggregation & Independent Quantization (Novel): Using off-the-shelf models—a face parser (SegNeXt) and a face recognition encoder (IR-SE-50)—the image is divided into 12 semantic regions (nose, lips, eyes, skin, etc.). Instead of keeping a spatial grid, the authors apply global average pooling over each region. Each component’s vector is then snapped to its nearest neighbor in an independent, component-specific codebook rather than a shared one.
  2. Pruning Unimportant Parts (Novel): Not every part of a head tells us who you are. By measuring how swapping individual components impacts ArcFace and CosFace recognition scores, the authors drop low-value regions like background and earrings, packing the remaining essential indices into a tiny bitstream (e.g., 80 to 128 bits).
  3. Robust Watermarking & Masking Attack: A U-Net-style encoder/decoder embeds this bitstream into the image. During training, a differentiable attack layer applies standard geometric/photometric distortions plus selective facial masking—teaching the network to survive missing face data without overfitting to any single deepfake generator.
  4. Reconstruction & Fusion: To recover the face, the decoder extracts the bitstream from the tampered photo. A StyleGAN2 generator takes those recovered component codes alongside the tampered image’s segmentation mask to synthesize the original face in the current pose, blending only the identity-critical regions back in.

Datasets

  • CelebA-HQ: 30,000 high-resolution ($1024 \times 1024$) single-face portraits (28,000 for training, 2,000 for testing). Retrieval queries are tested against all 30,000 images.
  • FFHQ: Used to test cross-dataset generalization (detailed in the paper's appendix).
  • No new dataset benchmarks were introduced; tampered faces were generated on the fly during evaluation using the E4S face-swapping framework.

Key Insights and Ideas

  • Pooling buys geometric immunity: Averaging features across semantic masks (e.g., "all nose pixels") throws away exact coordinates, making the representation naturally resilient to shifts, crops, and subtle alignment errors.
  • Your nose matters; your ears don't: In a 10,000-sample face-swap analysis, replacing the nose, skin, or eyeglasses caused massive drops in ArcFace/CosFace identity similarity, while swapping ears, neck, or earrings barely registered (earrings actually slightly increased similarity noise). Dropping non-essential parts saves precious watermark bandwidth.
  • Masking beats deepfake simulation: Simply masking out facial regions during watermark training generalizes to real face-swapping attacks without needing supervised deepfake pairs.

Key Results

Tested on CelebA-HQ against E4S face-swapping combined with geometric (rotation $\pm 10^\circ$, scaling, translation, horizontal flipping) and photometric (JPEG, blur, noise) attacks, the method dramatically outperforms image-hiding baselines like HiNet and Imuge+.

  • Geometric Resilience: When tampered images are rotated, Imuge+'s Top-1 face retrieval accuracy collapses from 76.0% to 2.3% (and 0.4% under flipping). The proposed method (with codebook size 8192) holds steady at 55.1% Top-1 (75.7% Top-5) under rotation, and 58.6% Top-1 under flipping.
  • Watermark Survival: Across all geometric and photometric attacks combined with face-swapping, bit decoding accuracy stays between 97.9% and 100%, whereas spatial-sensitive watermarks like EditGuard drop to random guessing (~50.3%) under rotation and scaling.
  • Visual Quality: Under Gaussian blur, baseline Imuge+ PSNR drops to 18.60 dB, while the proposed method maintains 28.05 dB PSNR and 0.9124 SSIM.

Limitations and Future Work

While the authors note their pipeline can theoretically process multi-face photos by cropping and aligning each face individually, their experiments are strictly limited to single-face portraits because CelebA-HQ and FFHQ only contain single faces. Additionally, because reconstruction relies on the tampered image's segmentation mask to supply spatial structure, severe occlusions or manipulations that completely destroy facial layout are not explored. The paper does not explicitly outline specific avenues for future work beyond establishing semantic representations as a practical direction for identity-preserving recovery.

Summary updated

Abstract

Existing image watermarking methods typically entangle visual content with spatial structure, making them highly sensitive to geometric transformations and alignment discrepancies, especially in the presence of deepfake manipulations. In this paper, we propose a semantic-driven facial watermarking framework for robust identity recovery. The key idea is to decouple identity-related semantic information from spatial layout and encode it into a compact and spatially robust semantic representation. Specifically, we decompose a face into semantic components and aggregate deep features into component-wise latent representations, which are quantized via independent codebooks and converted into a compact bitstream for embedding. After decoding, the embedded semantic information is recovered and used to reconstruct identity-consistent facial content, even under slight geometric distortions and tampering. Experiments on CelebA-HQ and FFHQ demonstrate that our method significantly outperforms existing watermarking approaches in terms of reconstruction quality, identity preservation, and retrieval accuracy under both photometric and geometric attacks, validating the effectiveness of semantic component-wise encoding for reliable face recovery.
BibTeX
@inproceedings{chen2026face,
  author = {Yuan-Chih Chen and Chun-Shien Lu},
  title = {{Face Deepfake-aware Recovery via Semantic-driven Facial Representation-based Watermarking}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=SqHbIQuLi6},
}
Figure