# Edge-Aware Dual-Task Image Watermarking Against Social Network Noise
## 3 Proposed Method
### Social Network Noise Simulator  
In real-world scenarios, watermarked images often experience a complex journey of transmission and manipulation across various social media platforms. As shown in Figure 4, consider a typical use case: a photographer shares their watermarked image on Facebook. This image might be downloaded and reposted on Twitter with some cropping adjustments, then shared through WhatsApp where compression occurs, and subsequently edited in Photoshop before being uploaded to TikTok. Throughout this cross-platform propagation, the watermarked image encounters multiple forms of signal processing and potential attacks, both intentional and unintentional. To simulate these realistic scenarios, we propose the social network noise simulator (SNNS), which synthesizes various types of noise and transformations commonly encountered in social media sharing. Specifically, we design a random single noise pool \(SNNS_{pool}\) containing seven representative types of noise:  
\[SNNS_{pool}^{\text{single}}=\{\textit{Identity},\textit{GausNoise},\textit{ Cropout},\textit{Dropout},\textit{Resize},\textit{Jpeg},\textit{Rotation},\textit{Affine}\},\]  
where each noise type corresponds to common operations in social media platforms and image editing tools. During the training process and testing process, for each minibatch, one type of noise is randomly selected from \(SNNS_{pool}\) to simulate the unpredictable nature  
Figure 4: A typical propagation scenario of a watermarked image through social networks and editing tools. of social media transmission. Note that we exclude identity transformation from the testing phase as it represents the trivial case where no noise is applied to the image. As shown in Figure 5, we visualize the effects of different noise types simulated by our social network noise simulator (SNNS). In the left panel, the top image shows the cover image \(I_{cov}\) while the bottom one shows the watermarked image \(I_{wm}\). The right panel demonstrates eight noise attacks, where the first row displays the noise-attacked watermarked images \(NI_{wm}\) and the second row shows the corresponding residual maps \(|NI_{wm}-I_{wm}|\). The residual maps highlight the differences between the noise-attacked watermarked images and the original watermarked image, providing insights into the impact of the various noise attacks. Note that, while our framework implements dropout and dropout, which require cover image information for pixel replacement, we demonstrate their effects using crop and drop operations in the visualization for clearer interpretation of the noise patterns. The proposed SNNS includes multiple domains of image distortions, as detailed below. In the spatial domain, we implement dropout and dropout operations, where \(p\) represents the retention rate of original pixels. Cropout randomly selects a square region and replaces it with the corresponding content from \(I_{cov}\), while dropout performs this replacement at randomly selected individual pixels. For visualization purposes, we show crop and drop effects that directly mask or remove regions without replacement, making the impact of these spatial operations more visually apparent. In the frequency domain, we introduce several types of distortions. Our JPEG compression is implemented as a fully differentiable module that follows the standard compression pipeline, since JPEG compression encountered on social media platforms involves a non-differentiable quantization step that blocks gradient backpropagation during training, making it impossible to directly use real JPEG compression for the joint optimization of encoder and decoder networks [14]. Inspired by previous works [10; 14] that demonstrated the effectiveness of differentiable JPEG simulation layers, we adopt a JPEG-Mask simulation layer during the training phase.