Learning Generalizable and Efficient Image Watermarking via Hierarchical Two-Stage Optimization

Ke Liu, Xuanhan Wang, Qilong Zhang, Lianli Gao, Jingkuan SongarXiv 2025 · DOI

In the era of AI-generated content (AIGC), safeguarding the copyright of digital assets has become a paramount challenge. While deep learning has significantly advanced image watermarking, achieving a balance between invisibility, robustness, and efficiency—the "watermarking trilemma"—remains elusive. This paper introduces HiWL (Hierarchical Watermark Learning), a framework designed to overcome these limitations through a novel two-stage optimization strategy.

What Problem Does This Paper Address?

Existing deep watermarking methodologies typically fall into two categories, each with distinct trade-offs:

  1. Latent-based methods: These techniques fuse the watermark and image within a complex latent space. While they offer high robustness and invisibility, they are computationally expensive. They require a heavy encoder to process every image individually, making them unsuitable for large-scale, real-time applications.
  2. Single-shot methods: These are optimized for speed, generating a "universal" watermark pattern that is additively applied to image pixels. However, because these patterns are not tailored to the specific structural features of the target image, they often suffer from poor robustness or visible artifacts.
Comparison of Latent-based and Single-shot watermarking paradigms and their inherent trade-offs.

The core challenge addressed by HiWL is bridging this gap: achieving the robustness of latent-based fusion with the deployment efficiency of a single-shot additive approach.

Methods: Hierarchical Two-Stage Optimization

The HiWL framework employs a Hierarchical Two-Stage Optimization strategy to decouple the watermark generation from specific image encoding during inference.

Stage 1: Distribution Alignment Learning

The first stage focuses on aligning multi-modal inputs—binary watermark messages and RGB image pixels—within a shared latent space. The model is trained using three primary constraints:

  • Image Reconstruction Loss: Ensures the watermarked image maintains visual fidelity to the original.
  • Adversarial Loss: Refines the watermark's "texture" to ensure it remains imperceptible.
  • Message Reconstruction Loss: Guarantees that the embedded code can be accurately extracted even after potential distortions.

Stage 2: Generalized Watermark Representation Learning

The pivotal insight of HiWL is the "weak coupling" between image features and watermark messages. In this stage, the model learns to extract an RGB residual—the difference between the watermarked and original image—that is effective across diverse image domains. By training the model to ensure this residual remains robust when added to entirely different images, the framework achieves high generalizability.

The HiWL framework: Stage 1 focuses on distribution alignment, while Stage 2 learns generalized watermark representations for single-shot generation.

Once trained, the heavy encoding process is performed only once to generate a specific residual for a given message. Watermarking subsequent images becomes a simple, computationally trivial addition operation.

Key Results and Evaluation

The researchers evaluated HiWL across a diverse range of datasets, including MS-COCO for training and ImageNet, HumanArt, and GenImage for testing generalizability across natural, artistic, and AI-generated domains.

  • Efficiency: HiWL achieves "single-shot" speeds, processing 1,000 images per second, matching the fastest existing methods while providing superior quality.
  • Robustness: The framework demonstrated an average 98.3% bit accuracy across 18 types of noise distortions, representing a 7.6% improvement over state-of-the-art benchmarks.
  • Invisibility: High visual fidelity was maintained, with a PSNR of 37.86 dB and an SSIM of 0.969, significantly outperforming previous universal hiding methods that often produced visible artifacts.

Conclusion and Future Work

HiWL represents a significant advancement in image watermarking by successfully addressing the trilemma of invisibility, robustness, and efficiency. By leveraging hierarchical optimization and the discovery of weak feature coupling, it enables high-performance, large-scale watermarking.

Future research will focus on addressing "pixel overflow" in high-contrast images—where additive residuals can hit pixel value limits—and further narrowing the performance gap in highly abstract domains like sketches.

Summary updated

BibTeX
@misc{liu2025learning,
  author = {Ke Liu and Xuanhan Wang and Qilong Zhang and Lianli Gao and Jingkuan Song},
  title = {{Learning Generalizable and Efficient Image Watermarking via Hierarchical Two-Stage Optimization}},
  year = {2025},
  eprint = {2508.08667},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.08667},
}
Figure