Mask Image Watermarking

Runyi Hu, Jie Zhang, Shiqian Zhao, Nils Lukas, Jiwei Li, Qing Guo, Han Qiu, Tianwei Zhang

Introduction

As AI-generated content becomes more prevalent, invisible image watermarking is essential for copyright protection and tracking provenance. Traditional deep learning watermarking methods are primarily global, spreading the watermark signal uniformly across an entire image. This approach suffers from three major limitations: fragility to local tampering (e.g., cropping), a lack of localization capabilities, and an inability to target specific regions of interest.

MaskWM addresses these challenges by introducing a spatial masking mechanism during training. This framework allows for embedding, localizing, and extracting watermarks from specific local regions, maintaining high robustness even against heavy tampering while training significantly faster than previous local watermarking models.

Methodology

MaskWM extends the standard encoder-distortion-decoder pipeline by incorporating a novel masking mechanism to instill spatial awareness in the network. The framework is implemented in two primary variants:

  • MaskWM-D (Decoding Mask): This variant uses global embedding but local extraction. While the encoder embeds the watermark across the whole image, the decoder is trained on partially masked versions of the distorted image. A dedicated localization module helps the decoder identify watermarked regions and filter out noise from unwatermarked areas before bit extraction.
  • MaskWM-ED (Encoding & Decoding Mask): Designed for targeted local protection, this variant introduces the mask at the encoding stage. The encoder learns to concentrate the watermark signal strictly within defined boundaries, leaving the rest of the image unaltered.
The MaskWM architecture illustrating the watermark embedding, masking, and extraction pipeline.

To ensure high visual quality, MaskWM utilizes a Just-Noticeable-Difference (JND) module. This module adaptively modulates watermark strength based on human visual sensitivity, effectively hiding signals in complex textures rather than smooth areas.

Experimental Setup and Results

The model was trained on 83,000 images from the MS-COCO 2014 dataset, utilizing object segmentation masks for semantically meaningful training. Evaluation was conducted on the MS-COCO validation set.

Performance and Robustness

MaskWM demonstrates extreme local robustness, achieving near 100% extraction accuracy even when the watermark survives in only 5% of the image area. This significantly outperforms existing baselines such as WAM, EditGuard, and StegaStamp.

Quantitative comparison of MaskWM against global and local watermarking methods across various metrics and distortions.

As shown in the table above, MaskWM variants maintain high PSNR and SSIM values while achieving perfect accuracy under "No Distortion" and "Valuemetric" conditions, and near-perfect accuracy under "Geometric" distortions.

Efficiency and Scalability

A key advantage of MaskWM is its efficiency. Training requires approximately 20 hours on a single NVIDIA A6000 GPU, representing a roughly 15x reduction in computational cost compared to the leading local model, WAM. Furthermore, MaskWM scales effectively to longer bitstreams (64-bit and 128-bit) and supports multi-watermarking, where up to five distinct watermarks can be independently embedded and extracted from different regions of a single image.

Conclusion

MaskWM provides a highly efficient and robust solution for local image watermarking. By separating localization from extraction and employing a masking mechanism, it overcomes the limitations of global methods and the computational intensity of previous local models. While some visual artifacts may persist in smooth regions, future work focusing on advanced loss functions and visual enhancement modules aims to further improve imperceptibility.

Summary updated

BibTeX
@inproceedings{hu2025mask,
  author = {Runyi Hu and Jie Zhang and Shiqian Zhao and Nils Lukas and Jiwei Li and Qing Guo and Han Qiu and Tianwei Zhang},
  title = {{Mask Image Watermarking}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=da1u6Cy7Mq},
}
Figure