RoWSFormer: A Robust Watermarking Framework with Swin Transformer for Enhanced Geometric Attack Resilience

Weitong Chen, Yuheng LiarXiv 2024 · DOI

Introduction

Digital watermarking involves embedding hidden information into images, balancing imperceptibility with robustness. While modern frameworks often utilize Convolutional Neural Networks (CNNs), these models frequently struggle with geometric attacks such as rotation, scaling, and cropping. CNNs' reliance on local pixel neighborhoods and translation invariance leads to "desynchronization" when global spatial relationships shift, preventing accurate watermark extraction.

Methods: The RoWSFormer Architecture

RoWSFormer addresses these limitations by adopting the Encoder-Noise-Decoder (END) architecture, replacing standard CNN blocks with Transformer-based components designed for global context and frequency awareness.

Comparison of END-based and Flow-based watermarking paradigms.

The framework introduces two primary novel components:

  1. Locally-Channel Enhanced Swin Transformer Block (LCESTB): This hybrid block combines the Swin Transformer's efficient window-based self-attention with local and channel enhancement. It captures long-range spatial dependencies—critical for surviving rotation—while maintaining the local precision required for high-quality embedding.
  2. Frequency-Enhanced Transformer Block (FETB): By utilizing the Discrete Cosine Transform (DCT), the FETB allows the model to embed watermarks in specific frequency bands that are more resilient to common image processing.
Detailed architecture of RoWSFormer, highlighting the Encoder and Decoder structures incorporating LCESTB and FETB.

Additionally, a Constrained Loss Function ($L_C$) ensures that watermarked images remain within valid pixel value ranges (0–255), preventing visual artifacts.

Key Insights

  • Global Context for Geometric Resilience: Transformers' self-attention mechanism provides a global "map" of the image, enabling the decoder to "re-synchronize" even after significant geometric distortion.
  • Hybridization: Combining Swin Transformers with local/channel enhancements offers a superior balance between computational efficiency and fine-grained detail preservation compared to pure Vision Transformers (ViT).
  • Frequency-Domain Regularization: Explicitly attending to the frequency domain via FETB acts as a powerful regularizer against filters and compression.

Results and Performance

RoWSFormer was evaluated using the DIV2K and COCO datasets against state-of-the-art CNN-based (HiDDeN, MBRS), flow-based (FBRW), and Transformer-based (WFormer) methods.

  • Geometric Resilience: RoWSFormer achieved a 6 dB improvement in PSNR over existing methods under rotation and scaling attacks, with extraction accuracy exceeding 97%.
  • General Robustness: For non-geometric noise like blurring or Salt & Pepper, the model improved PSNR by approximately 3 dB at comparable accuracy levels.
  • Visual Quality: The model produces fewer perceptible artifacts, particularly in high-frequency regions, outperforming flow-based models in inter-channel feature fusion.

Conclusion

RoWSFormer demonstrates that integrating global context via Swin Transformers significantly enhances watermarking robustness against geometric attacks. While it shows a slight performance gap in Gaussian noise compared to specialized SOTA models and carries a higher computational load than simple CNNs, its superior resilience to spatial transformations marks a significant advancement in secure digital imaging. Future work may focus on optimizing frequency-domain extraction and addressing "print-and-capture" scenarios.

Summary updated

BibTeX
@misc{chen2024rowsformer,
  author = {Weitong Chen and Yuheng Li},
  title = {{RoWSFormer: A Robust Watermarking Framework with Swin Transformer for Enhanced Geometric Attack Resilience}},
  year = {2024},
  eprint = {2409.14829},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.14829},
}
Figure