Deep Robust Reversible Watermarking Thanks: Jiale Chen is with the School of Computer Science, Beijing Institute of Technology, Beijing 100081, China, and also with the Guangdong-Hong Kong-Macao Joint Laboratory for Emotional Intelligence and Pervasive Computing, Artificial Intelligence Research Institute, Shenzhen MSU-BIT University, Shenzhen 518172, China (e-mail: chenoly@outlook.com). Thanks: Wei Wang and Xiping Hu are with the School of Medical Technology, Beijing Institute of Technology, Beijing 100081, China, and also with the Guangdong-Hong Kong-Macao Joint Laboratory for Emotional Intelligence and Pervasive Computing, Artificial Intelligence Research Institute, Shenzhen MSU-BIT University, Shenzhen 518172, China (e-mail: ehomewang@ieee.org; huxp@bit.edu.cn). Thanks: Chongyang Shi is with the School of Computer Science, Beijing Institute of Technology, Beijing 100081, China (e-mail: cy_shi@bit.edu.cn). Thanks: Yuanman Li is with the College of Electronics and Information Engineering, Shenzhen University, Shenzhen 518060, China. (email: yuanmanli@szu.edu.cn). Thanks: Li Dong is with the Department of Computer Science, Faculty of Electrical Engineering and Computer Science, Ningbo University, Ningbo 315211, China (e-mail: dongli@nbu.edu.cn). Jiale Chen, Wei Wang, Chongyang Shi Abstract Robust Reversible Watermarking (RRW) enables perfect recovery of cover images and watermarks in lossless channels while ensuring robust watermark extraction under lossy channels. However, existing RRW methods, mostly non-deep learning-based, suffer from complex designs, high computational costs, and poor robustness limiting their practical applications. To address these issues, this paper proposes Deep Robust Reversible Watermarking (DRRW), a deep learning-based RRW scheme. DRRW introduces an Integer Invertible Watermark Network (iIWN) to achieve an invertible mapping between integer data distributions, fundamentally addressing the limitations of conventional RRW approaches. Unlike traditional RRW methods requiring task-specific designs for different distortions, DRRW adopts an encoder-noise layer-decoder framework, enabling adaptive robustness against various distortions through end-to-end training. During inference, the cover image and watermark are mapped into an overflowed stego image and latent variables. Arithmetic coding efficiently compresses these into a compact bitstream, which is embedded via reversible data hiding to ensure lossless recovery of both the image and watermark. To reduce pixel overflow, we introduce an overflow penalty loss, significantly shortening the auxiliary bitstream while improving both robustness and stego image quality. Additionally, we propose an adaptive weight adjustment strategy that eliminates the need to manually preset the watermark loss weight, ensuring improved training stability and performance. Experiments on multiple datasets demonstrate that DRRW achieves notable performance advantages. Compared to state-of-the-art RRW methods, DRRW improves robustness and reduces embedding, extraction, and recovery complexities by 55.14 × \times , 5.95 × \times , and 3.57 × \times , respectively. The auxiliary bitstream is shortened by 43.86 × \times , and reversible embedding succeeds on 16,762 images in the PASCAL VOC 2012 dataset, marking a significant step toward practical RRW applications. Notably, DRRW achieves robustness and visual quality superior to existing irreversible robust watermarking methods while strictly maintaining reversibility. The source code is available at https://github.com/chenoly/Deep-Robust-Reversible-Watermark . I Introduction Fig. 1: Comparison between traditional RRW and the proposed DRRW. (a) The traditional method embeds a robust watermark using conventional robust image watermarking methods; (b) The proposed DRRW embeds a robust watermark using an integer invertible watermark network. With the rapid evolution of digital content and internet technologies, safeguarding intellectual property and ensuring data security have become pressing concerns. Digital watermarking has emerged as a pivotal solution, embedding identifiable markers directly into multimedia content. This technique facilitates ownership verification, content integrity authentication, and secure dissemination of digital media [ 1 , 2 ] . Robust Reversible Watermarking (RRW) has gained prominence due to its unique ability to maintain robustness against distortions while ensuring the lossless recovery of the original cover and watermark bits. This dual functionality makes RRW indispensable for high-stakes applications such as data integrity and copyright verification are critical, such as secure content transmission, digital media storage, and scenarios requiring absolute fidelity, such as medical image processing [ 3 , 4 ] . Traditional RRW methods can be broadly categorized into two directions: histogram shifting-based RRW [ 5 , 6 , 7 , 8 , 9 , 10 , 11 ] and two-stage embedding-based RRW [ 12 , 13 , 14 , 15 , 16 ] . Among them, the two-stage embedding strategy is the most representative. In this approach, the first stage embeds the watermark bits into the cover image using a robust watermarking technique, while the second stage conceals the auxiliary information required for cover image recovery into the stego image through reversible data hiding [ 17 ] as illustrated in Figure 1 (a). Although these methods achieve a certain balance between robustness and reversibility, they often involve intricate designs and result in increased embedding time, limiting their practicality. Recently, Invertible Neural Networks (INNs) have gained widespread attention in fields such as digital watermarking [ 18 , 19 ] and steganography [ 20 , 21 , 22 , 23 , 24 , 25 ] . These networks serve as an invertible function to support invertible mappings between cover images-watermark pair and stego image, making them highly suitable for steganography and watermark tasks. INNs are particularly appealing because they can embed the watermark while maintaining the high imperceptibility of the original cover, which is crucial for applications in copyright protection and secure data transmission. Despite these advantages, a significant challenge arises from the majority of current INN-based image data hiding methods, which operate in the real-value domain, consequently, these methods also can be called real-valued flow-based data hiding. The bad thing is that these real-valued flow-based methods can only map real-valued data distributions, leading to an inherent issue in image storage: the need to quantize the generated stego images into 8-bit integers for storage. This quantization introduces information loss, which significantly impacts the performance of real-valued flow-based steganography. For instance, we evaluate the effects of quantization on the classic image-to-image steganography method, HiNet [ 20 ] . As illustrated in Figure 2 , when the stego image is not restricted to the valid 8 -bit pixel value, the revealed secret image exhibits exceptional visual quality. However, after quantizing the stego image, the visual quality of the revealed secret image degrades significantly. We analyze the PSNR of the revealed secrets as shown in Figure 3 . We can observe that the PSNR of the revealed secrets has a dramatic drop of about 30 dB after restricting the stego image to an 8-bit image format. This experiment highlights the profound impact of quantization on steganography, showing that secret information is often hidden within the fractional components of pixel values in stego images in INN-based steganography. Consequently, storing unquantized stego images in formats such as HDR or TIFF may alleviate this issue, albeit at the cost of reduced storage efficiency. To sum up, this quantization-induced information loss not only impairs the performance of INNs in image steganography but also restricts their applicability in robust reversible watermarking tasks. Fig. 2: Comparison of revealed secret (without stego quantization) and Q-revealed secret (with stego quantization) in real-valued flow-based HiNet [ 20 ] . To address this issue, we propose a novel two-stage robust reversible watermarking framework, termed Deep Robust Reversible Watermarking (DRRW), as illustrated in Figure 1 (b). The core of DRRW is the adoption of integer Invertible Watermark Networks (iIWNs), which enable lossless, invertible mappings between integer-discrete data distributions. By establishing an invertible mapping between the cover image-watermark pair and the stego image, iIWN fundamentally eliminates the irreversibility issues caused by quantization errors in real-valued flow-based data hiding methods. In training, DRRW employs an encoder-noise layer-decoder framework to learn robustness against various distortions. During inference, iIWN maps the cover image-watermark pair to an overflow stego image and a latent variable, and then three challenges need to be solved: 1) Pixel values in the overflow stego image may exceed the valid range of [0,255] ; 2) The latent variable must be losslessly stored within the stego image; 3) The auxiliary information needs to be compressed into a short bitstream for embedding into the clipped stego image by RDH. To address these challenges, we introduce an overflow penalty loss during training to constrain pixel values within the allowable range. Additionally, for overflow pixels, we compute the overflow map and compress it and the latent variable into a compact bitstream by arithmetic coding [ 26 ] , which is then embedded into the clipped stego image using RDH. This ensures lossless reconstruction of the cover image and embedded watermark. The main contributions of this work are as follows: Fig. 3: PSNR distributions of revealed secret (without stego quantization) and Q-revealed secret (with stego quantization) in real-valued flow-based HiNet [ 20 ] . • We propose a two-stage robust reversible watermarking framework called Deep Robust Reversible Watermarking (DRRW). DRRW leverages an integer invertible watermark network to learn robustness under various distortions and achieve lossless and invertible mappings between the cover image-watermark pair and stego image. • We introduce an overflow penalty loss during the training of DRRW. This loss not only significantly reduces the length of the auxiliary bitstream, but also improves the visual quality of stego images and enhances the robustness of the watermark, achieving a threefold benefit. • We propose a training strategy with automatic adjustment of the watermark loss weight in DRRW. This strategy adaptively adjusts watermark loss weight based on the training process, eliminating the need for manual hyperparameter tuning and ensuring the model converges to optimal performance under different settings. • Experimental results demonstrate the superior effectiveness of the DRRW framework, outperforming conventional robust reversible and irreversible watermarking methods. The framework has been successfully applied to large-scale datasets, proving its practical utility and scalability. The rest of this paper is organized as follows: Section II reviews related work, Section III describes the DRRW framework, Section IV presents experimental results, and Section V concludes the paper. II Related Work II-A Robust Reversible Watermarking Reversible data hiding (RDH) is a form of watermarking designed to allow both the lossless recovery of the original cover and the extraction of embedded watermark bits in the lossless channel. Early contributions to RDH largely focused on spatial-domain techniques, exemplified by methods like Difference Expansion (DE) [ 27 ] , Histogram Shifting (HS) [ 17 ] , and Prediction-Error Expansion (PEE) [ 28 ] . However, as applications began to demand robustness in lossy channels, robust reversible watermarking (RRW) emerged as a specialized extension of RDH. RRW not only ensures lossless recovery of the cover image and watermark in lossless channels but also enhances the resistance of the watermark to distortions in lossy channels. The dual goals of robustness and reversibility impose additional complexity compared to traditional robust watermarking approaches. Mainstream RRW methods include histogram shifting-based RRW [ 5 , 6 , 7 , 8 , 9 , 10 , 11 ] and two-stage embedding-based RRW [ 12 , 13 , 14 , 15 , 29 , 30 , 16 , 31 ] . HS-based methods embed watermarks by manipulating robust image features through histogram shifting. Such as Pioneering studies in this domain, such as Ni et al. introduced a robust lossless data hiding method using statistical quantities derived from patchwork theory, achieving both robustness to JPEG compression and losslessness [ 6 ] . Gao et al. [ 8 ] proposed a lossless data embedding framework leveraging generalized statistical quantity histograms, offering adaptability to diverse image types and scalability for varying capacities. The approach enhances robustness against JPEG compression. Furthermore, An et al. [ 9 ] introduced WSQH-SC, a robust reversible watermarking framework employing wavelet-domain histogram shifting and clustering. The method balances robustness and invisibility through enhanced pixel-wise masking, achieving superior performance across various image types. These strategies excel in their simplicity and effectiveness but often struggle with scalability for complex distortions. In contrast, two-stage embedding-based RRWs focus on integrating robust watermarking with reversible data hiding. This strategy was first proposed by Coltuc [ 13 ] . Firstly the watermark is embedded by using a robust watermarking scheme and subsequently hides the bitstream required for recovery of cover and watermark into the stego image through RDH. Such as, Kumar et al. [ 15 ] introduced a RRW scheme leveraging a two-layer embedding strategy. By embedding secret data into the higher significant bit plane using PEE, the scheme ensures robustness against non-malicious attacks like JPEG compression while achieving high embedding capacity. Hu et al. [ 12 ] proposed a cover-lossless robust watermarking scheme leveraging low-order Zernike moments to resist geometric deformations like scaling and rotation. Recently, Tang et al. [ 16 ] proposed an RRW scheme that enhances watermark robustness and embedding capacity by using attack-simulation-based adaptive normalization. Their method utilizes polar harmonic transform moments as watermark cover and optimizes embedding strength through multi-level quantization in spread transform dither modulation. This method has robustness against common signal processing and geometric deformations. However, these schemes are often high time-complexity and complex in design. In addition, two-stage embedding-based RRWs using deep learning-based robust watermarking [ 32 , 33 ] first embed watermarks via CNN-based robust watermarking. Due to the irreversibility of CNN-based processes, the residual image between the cover and stego image is then embedded into the stego image through RDH. However, these methods challenge RDH capacity, making them impractical for large-scale dataset applications. II-B Real-Valued Flow-Based Data Hiding Normalizing flow has emerged as a powerful tool for both density estimation [ 34 ] and generative modeling [ 35 , 36 ] . These models leverage invertible mapping constructed through coupling layers, enabling complex data distributions to be mapped into simple, tractable ones with precise likelihood evaluation [ 36 ] . The dual-input structure of coupling layers makes flow-based models particularly effective in information hiding tasks, such as robust image watermarking [ 18 , 19 ] and image-in-image steganography [ 20 , 21 , 22 , 23 , 24 , 25 ] . However, existing flow-based watermarking and steganography methods primarily rely on real-valued computations throughout their forward and inverse processes. Consequently, although cover images are discrete and integer-valued, the outputs of these models are continuous-valued, necessitating a quantization step to map the outputs to valid pixel intensities for image storage and practical usage. This quantization process inevitably results in information loss, hindering the exact recovery of cover images in reversible watermarking applications. Recent studies have attempted to minimize the residual error between cover and stego images through real-valued flow-based approaches [ 24 ] . Nevertheless, these methods still fail to entirely circumvent performance degradation stemming from the information loss induced by quantization, particularly in high-fidelity recovery scenarios where precision is critical. II-C Integer Discrete Flows Integer Discrete Flows (IDFs) [ 37 ] are specifically tailored for modeling discrete data by employing integer-only operations in both forward and inverse transformations. This design ensures that the data remains in integer form throughout the entire encoding and decoding process, thereby eliminating the need for a quantization step and avoiding the information loss typically introduced in real-valued flow models. Unlike real-valued flows, which rely on continuous-valued coupling layers, IDFs utilize integer coupling layers to better preserve the integrity and precision of discrete data representations. This integer-based approach has garnered significant attention and recognition in fields such as lossless data compression [ 38 , 37 , 39 , 40 , 41 ] and generative modeling [ 42 ] . In the context of reversible watermarking and information hiding, IDFs are particularly promising because their lack of quantization error and inherent reversibility align closely with the stringent requirements of such tasks, especially when exact cover image recovery and distortion-free reconstruction are crucial. III Proposed Deep Robust Reversible Watermarking This section introduces the DRRW method, which consists of three key components. First, we design the integer invertible watermark network (iIWN) with integer coupling layers as shown in Figure 4 . This design ensures lossless forward and inverse mappings for integer-valued data, avoiding irreversible issues caused by quantization errors. Second, the DRRW uses an encoder-noise layer-decoder training framework as shown in Figure 6 . Compared to existing RRW methods, DRRW can learn robustness against different distortions through a differentiable noise pool. Third, the DRRW inference process shown in Figure 7 follows the two-stage embedding, similar to traditional RRW methods. III-A Integer Invertible Watermark Network Fig. 4: Computation diagram of the forward and inverse mappings in the i th integer coupling layer of the integer invertible watermark network. Flow-based networks can be considered as compositions of L coupling layers, forming an invertible neural network denoted as \mathcal{F}_{\theta}=\mathcal{G}_{\theta}^{1}\circ\mathcal{G}_{\theta}^{2}\circ\cdots\circ\mathcal{G}_{\theta}^{L} , where the inverse function \mathcal{F}_{\theta}^{-1} shares the same parameters \theta . The primary distinction between real-valued flows and integer discrete flows lies in their ability to perform invertible mappings: real-valued flows operate between real-valued data distributions ( \mathbf{x},\mathbf{y}\in\mathbb{R} ), while integer discrete flows map between discrete data distributions ( \mathbf{x},\mathbf{y}\in\mathbb{Z} ), where \mathbf{y}=\mathcal{F}_{\theta}(\mathbf{x}) . The coupling layer designed in the flow model has become a fundamental building block for constructing such INNs. The dual-input structure of coupling layers, which can process both the cover image and watermark, enhances their suitability for watermark embedding and extraction. As a result, INN has been widely applied in image steganography and watermarks. Existing flow-based watermark methods are all based on real-valued flow-based, both the watermark embedding and extraction processes were modeled as an invertible function \mathcal{F}_{\theta}(\cdot) , with embedding and extraction corresponding to the forward and inverse mappings of the function, respectively. Let \mathbf{I}_{\text{org}}\in\{0,1,\ldots,255\}^{H\times W\times C} represent the cover image, and \mathbf{w}\in\{0,1\}^{M} denote the watermark bits. The watermark embedding process can be written as [\mathbf{I}_{\text{stego}},\mathbf{z}]=\mathcal{F}_{\theta}([\mathbf{I}_{\text{org}},\mathbf{w}]) , while the extraction process is expressed as [\mathbf{I}_{\text{rec}},\hat{\mathbf{w}}]=\mathcal{F}_{\theta}^{-1}([\mathbf{I}_{\text{stego}},\hat{\mathbf{z}}]) , where \hat{\mathbf{z}} sampled from a tractable distribution, \mathbf{I}_{\text{rec}} is the reconstructed cover image and \hat{\mathbf{w}} is the extracted watermark bits. Although real-valued flow methods have demonstrated performance in image steganography and watermark tasks, they are inherently designed for real-valued data distributions, and can not handle mapping between integer data distributions. III-A 1 Integer Coupling Layer To address the limitations of real-valued flow-based models, we design the iIWN, which utilizes integer coupling layers to perform invertible mappings between discrete data distributions. As illustrated in Figure 4 , for the i -th integer coupling layer, the outputs from the preceding layer, denoted as \mathbf{r}_{i}^{1} and \mathbf{r}_{i}^{2} , undergo a forward mapping expressed as: \displaystyle\mathbf{s}_{i}^{1} \displaystyle=\mathbf{r}_{i}^{1}+\lfloor\mathcal{U}_{i}(\mathbf{r}_{i}^{2})\rceil, (1) \displaystyle\mathbf{s}_{i}^{2} \displaystyle=\mathbf{r}_{i}^{2}\odot\lfloor\exp(\sigma(\mathcal{S}_{i}(\mathbf{s}_{i}^{1})))\rceil+\lfloor\mathcal{Q}_{i}(\mathbf{s}_{i}^{1})\rceil, where \odot denotes element-wise multiplication, \sigma(\cdot) is the sigmoid function, and \lfloor\cdot\rceil represents the rounding operation. In contrast, the inverse mapping is given by: \displaystyle\mathbf{r}_{i}^{2} \displaystyle=(\mathbf{s}_{i}^{2}-\lfloor\mathcal{Q}_{i}(\mathbf{s}_{i}^{1})\rceil)\oslash\lfloor\exp(\sigma(\mathcal{S}_{i}(\mathbf{s}_{i}^{1})))\rceil, (2) \displaystyle\mathbf{r}_{i}^{1} \displaystyle=\mathbf{s}_{i}^{1}-\lfloor\mathcal{U}_{i}(\mathbf{r}_{i}^{2})\rceil, where \oslash represents element-wise division, \mathbf{s}_{i}^{1} and \mathbf{s}_{i}^{2} are the outputs of the current layer. Here, \mathcal{U}_{i}(\cdot) and \mathcal{S}_{i}(\cdot) , \mathcal{Q}_{i}(\cdot) are the up/down-sampling networks respectively. It is important to ensure that \exp(\sigma(\mathcal{S}_{i}(\mathbf{s}_{i}^{1})))\notin(-1,1) when designing the coupling layers, particularly for the term \mathbf{r}_{i}^{2}\cdot\exp(\sigma(\mathcal{S}_{i}(\mathbf{s}_{i}^{1}))) . This constraint prevents division-by-zero issues during the inverse mapping in Eqn. ( 2 ), thereby avoiding illegal numerical operations. While the rounding operator ( \lfloor\cdot\rceil ) in Eqns. ( 1 ) and ( 2 ) ensure a lossless and invertible mapping between the discrete integer data, however, the gradient of the rounding operator is zero almost everywhere, making it impossible to optimize the model parameters via backpropagation. To address this, we adopt the Straight-Through Estimator [ 43 ] to solve this problem. For a variable \mathbf{y}=\lfloor\mathbf{x}\rceil , the gradient with respect to \mathbf{x} is approximated as \nabla_{x}\lfloor\mathbf{x}\rceil\approx\mathbf{I} . This can be implemented as: \mathbf{y}=\mathbf{x}+\texttt{stop\_gradient}(\lfloor\mathbf{x}\rceil-\mathbf{x}), (3) This approximation resolves the gradient vanishing problem, facilitating effective optimization of the network parameters. Fig. 5: The up/down-sampling network architecture of the DRRW framework. The up-sampling and down-sampling networks exhibit a symmetric structure, where the red arrows represent the down-sampling network and the blue arrows indicate the up-sampling network. Both networks have an initial convolutional layer, multiple sampling blocks, and a final convolutional layer. III-A 2 The Up/Down-Sampling Network Architecture Recognizing that the image and watermark often have significantly different dimensionalities. Therefore, the architecture of the networks \mathcal{U}_{i}(\cdot) , \mathcal{Q}_{i}(\cdot) , and \mathcal{S}_{i}(\cdot) within the integer coupling layer are different. This distinction arises because dimensional consistency must be preserved when performing numerical operations between elements, ensuring the numerical operations are mathematically valid. In this context, \mathcal{U}_{i}(\cdot) usually serves as an up-sampling network to increase the dimensionality of the input features, aligning them with the watermark. Conversely, \mathcal{Q}_{i}(\cdot) and \mathcal{S}_{i}(\cdot) are designed as down-sampling networks, decreasing the dimensionality for extraction tasks. In the proposed DRRW framework, the up-sampling and down-sampling networks are structurally symmetric as shown in Figure 5 . Both consist of three fundamental components: an initial convolutional layer, multiple sampling blocks, and a final convolutional layer. The initial convolutional layer maps the input image to a fixed number of feature maps, providing essential features for subsequent sampling blocks. Suppose the input image is \mathbf{x}\in\mathbb{R}^{C\times H\times W} , the output features after the initial convolutional layer can be expressed as \mathbf{z}_{\text{initial}}=\text{Conv2D}(\mathbf{x},\mathbf{w}_{\text{initial}},\mathbf{b}_{\text{initial}}), (4) where \mathbf{w}_{\text{initial}},\mathbf{b}_{\text{initial}} represents the convolutional weights and the bias terms respectively. The output features \mathbf{z}_{\text{initial}}\in\mathbb{R}^{N_{f}\times H\times W} contain N_{f} feature channels. The subsequent layers consist of several down-sampling blocks. Each block is composed of a convolution, a spatial attention module, and a down-sampling convolution. Let \mathbf{z}^{\text{l}}_{i-1} represent the output of the (i-1) -th down-sampling block. The transformation process within the i -th sampling block can be expressed as: \displaystyle\mathbf{z}_{i}^{\text{f}} \displaystyle=\text{Conv2D}(\mathbf{z}^{\text{l}}_{i-1},\mathbf{w}_{i}^{\text{f}},\mathbf{b}_{i}^{\text{f}}), (5) \displaystyle\mathbf{z}_{i}^{\text{s}} \displaystyle=\text{SpatialAttention}(\mathbf{z}_{i}^{\text{f}}), (6) \displaystyle\mathbf{z}_{i}^{\text{l}} \displaystyle=\text{Conv2D}(\mathbf{z}_{i}^{\text{s}},\mathbf{w}_{i}^{\text{l}},\mathbf{b}_{i}^{\text{l}}). (7) It is important to note that the final output feature \mathbf{z}_{i}^{\text{l}} has a spatial resolution reduced to half of the original, while the number of feature channels increases by N_{f} . After bypassing through N_{d} down-sampling block, the final feature representation is fed into the final convolutional layer to obtain the watermark feature representation: \mathbf{z}_{w}=\text{Conv2D}(\mathbf{z}^{\text{l}}_{N_{d}},\mathbf{w}_{l},\mathbf{b}_{l}), (8) where \mathbf{z}_{w}\in\mathbb{R}^{L\times L} represents the final watermark feature map. As shown in Figure 5 , the blue arrows represent the up-sampling network. Since the up-sampling network is symmetric to the down-sampling network, the main difference from the down-sampling network is that the down-sampling convolution in the down-sampling network is replaced by a transposed convolution in the up-sampling network, which is used to increase the dimensionality of the features. This enables the up-sampling to extract features for stego images. III-B Training Fig. 6: The training framework of DRRW. DRRW adopts the encoder-noise layer-decoder training structure common to other deep learning-based watermarking methods. Unlike traditional robust reversible watermarking approaches, DRRW enhances robustness against various distortions by learning. As shown in Figure 6 , in the training process, we adopt the encoder-noise layer-decoder framework: in the forward mapping, the cover image \mathbf{I}_{\text{org}} and watermark \mathbf{w} are mapped through \mathcal{F}_{\theta} to obtain an overflowed stego image \mathbf{I}_{\text{stego}}^{\text{o}} and a latent variable \mathbf{z} as \left[\mathbf{I}_{\text{stego}}^{\text{o}},\mathbf{z}\right]=\mathcal{F}_{\theta}(\left[\mathbf{I}_{\text{org}},\mathbf{w}\right]) . Then, \mathbf{I}_{\text{stego}}^{\text{o}} undergoes distortions through a noise layer \mathcal{N}(\cdot) , resulting in \mathbf{I}_{\text{noised}}=\mathcal{N}(\mathbf{I}_{\text{stego}}^{\text{o}}) . In the reverse mapping, \mathbf{I}_{\text{noised}} and a latent variable \hat{\mathbf{z}} sampled from a Gaussian distribution are used with the inverse mapping \mathcal{F}_{\theta}^{-1} to reconstruct the cover image and extract the watermark bits as \left[\mathbf{I}_{\text{rec}},\hat{\mathbf{w}}\right]=\mathcal{F}_{\theta}^{-1}(\left[\mathbf{I}_{\text{noised}},\mathbf{z})\right] . III-B 1 Differentiable Noise Pool To enhance the robustness of the watermark, the overflowed stego image \mathbf{I}_{\text{stego}}^{\text{o}} is subsequently imputed into a differentiable noise pool \mathcal{N}(\cdot) . This introduces a variety of distortions to the stego image, producing a noised stego image \mathbf{I}_{\text{noised}}=\mathcal{N}(\mathbf{I}_{\text{stego}}^{\text{o}}) . The differentiable noise pool includes six common distortions: JPEG compression, Gaussian blur, Gaussian noise, salt&pepper noise, median filtering, and dropout. III-B 2 Loss Functions The loss function for our proposed method consists of forward and reverse losses. The forward loss aims to reduce the number of overflowed pixels while minimizing the difference between the overflowed stego image and the original cover image. The loss related to the stego image is defined as: \displaystyle\mathcal{L}_{\text{s}}=\text{MSE}(\mathbf{I}_{\text{stego}}^{\text{o}},\mathbf{I}_{\text{org}}),~~\mathcal{L}_{\text{l}}=\text{LPIPS}(\mathbf{I}_{\text{stego}}^{\text{o}},\mathbf{I}_{\text{org}}). (9) where \text{LPIPS}(\cdot,\cdot) is the learned perceptual image patch similarity [ 44 ] . Furthermore, To suppress pixel overflow in \mathbf{I}_{\text{stego}}^{\text{o}} , we propose a penalty loss, which defined as: \mathcal{L}_{\text{p}}=\text{MSE}(\mathbf{I}_{\text{stego}}^{\text{+}},\mathbf{0})+\text{MSE}(\mathbf{I}_{\text{stego}}^{\text{-}},\mathbf{0}), (10) where \mathbf{I}_{\text{stego}}^{\text{+}}=\texttt{relu}(\mathbf{I}_{\text{stego}}^{\text{o}}-255) and \mathbf{I}_{\text{stego}}^{\text{-}}=\texttt{relu}(\mathbf{0}-\mathbf{I}_{\text{stego}}^{\text{o}}) . The \texttt{relu}(\cdot) function suppresses pixel values that exceed the valid range [0,255] , and by penalizing pixels outside this range, it not only solves overflow and underflow issues but also improves the visual quality of stego image. In addition, we introduce a regularization loss term on the latent variable \mathbf{z} , defined as follows: \mathcal{L}_{\text{z}}=\text{MSE}(\mathbf{z},\mathbf{0}). (11) This regularization loss penalizes excessively large network parameters that lead to numerical overflow during inference, and it also reduces the length of the encoded bitstream. Experimental analysis is provided in Section IV-D . In the reverse mapping, the objective is to improve the accuracy of watermark extraction. The loss for watermark extraction is formulated as: \mathcal{L}_{\text{w}}=\text{MSE}(\hat{\mathbf{w}},\mathbf{w}), (12) where \hat{\mathbf{w}},\mathbf{w} are the extracted watermark and the original watermark, respectively. Combining all the loss functions, the overall loss function is formulated as: \mathcal{L}=\lambda_{s}\cdot\mathcal{L}_{\text{s}}+\lambda_{l}\cdot\mathcal{L}_{\text{l}}+\lambda_{z}\cdot\mathcal{L}_{\text{z}}+\lambda_{p}\cdot\mathcal{L}_{\text{p}}+\lambda_{w}\cdot\mathcal{L}_{\text{w}}. (13) where \lambda_{s} , \lambda_{l} , \lambda_{z} , \lambda_{p} , and \lambda_{w} represent weighting coefficients that balance the contribution of each loss term. III-B 3 Training Strategy During training, different loss terms often require careful weighting to stabilize optimization. However, tuning these weights is typically labor-intensive and computationally costly. To address this, we propose an adaptive loss weight adjustment strategy. In watermarking tasks, the primary goal is to embed the watermark and accurately extract it, while preserving image quality. Importantly, watermark extraction accuracy is often prioritized over image imperceptibility during training. Therefore, can we adjust the watermark loss weight to gradually balance the watermark extraction accuracy and imperceptibility by fixing the weights of other losses? We consider this idea is feasible. Specifically, we initialize the watermark loss weight with a large value and adaptively adjust it based on extraction accuracy over recent epochs. Let \mathbf{A}=[a_{t-n},\dots,a_{t}] denote the extraction accuracies from epoch t-n to t . The average accuracy is computed as: \text{acc}=\frac{1}{n}\sum_{i=t-n}^{t}\mathbf{A}(i), where n is the average window size. When acc exceeds a target threshold or the extraction error falls below a preset tolerance \delta , it indicates stable watermark embedding under the current weight \lambda_{w}^{t} . We then reduce the weight to enhance image quality: \lambda_{\text{w}}^{t+1}=\lambda_{\text{w}}^{t}\times v,~~~\text{if}\ \text{acc}>1-\delta, where \delta\in(0,1) is the tolerable error, and v\in(0,1) is a discount factor. This adaptive adjustment stabilizes training and facilitates a progressive balance between watermark robustness and image quality. Furthermore, we adopt the stochastic round for training. As shown in Figure 6 , The quantized outputs are added with a uniformly distributed noise as \mathbf{y}=\mathbf{x}+\texttt{stop\_gradient}(\lfloor\mathbf{x}\rceil-\mathbf{x})+\mathbf{u} , where \mathbf{u}\sim U(\mathbf{-0.5},\mathbf{+0.5}) . III-C Inference Fig. 7: Overview of the inference process in DRRW. DRRW employs a two-stage embedding strategy. In the first stage, the cover image-watermark pair is forward-mapped into an overflowed stego image and latent variables through an integer invertible watermark network. In the second stage, auxiliary bitstreams are embedded into the clipped stego image using reversible data hiding. The inference phase proceeds as shown in Figure 7 . The overflowed stego image generated through forward mapping via the iIWN is similar to the process in the training stage. Simultaneously, the overflow map and latent variables are losslessly compressed into a bitstream using arithmetic coding [ 26 ] . This bitstream is then embedded into the stego image using an RDH [ 28 ] . III-C 1 Embedding Process During the embedding process, two primary challenges must be addressed: (1) storing overflowed pixels in the stego image, and (2) storing the latent variable. For the overflowed pixels, we extract the overflowed portion as an overflow map \mathbf{O} , defined as: \mathbf{O}(i,j,c)=\begin{cases}\mathbf{I}_{\mathrm{stego}}^{\text{o}}(i,j,c)-255,&\text{if }\mathbf{I}_{\mathrm{stego}}^{\text{o}}(i,j,c)>255,\\ 0-\mathbf{I}_{\mathrm{stego}}^{\text{o}}(i,j,c),&\text{if }\mathbf{I}_{\mathrm{stego}}^{\text{o}}(i,j,c)<0,\\ 0,&\text{otherwise}.\end{cases} (14) Here, pixel values within the valid range are recorded as zeros in \mathbf{O} , while overflowed pixel values are stored as their overflow amounts in \mathbf{O} . Both \mathbf{O} and the latent variable \mathbf{z} are encoded into a bitstream using arithmetic coding. This bitstream is then embedded into \mathbf{I}_{\mathrm{stego}}^{\mathrm{clip}}=\mathrm{clip}(\mathbf{I}_{\mathrm{stego}}^{\text{o}},0,255) via RDH, resulting in the final stego image \mathbf{I}_{\mathrm{stego}} . III-C 2 Watermark Extraction and Lossless Cover Recovery Watermark extraction and lossless cover recovery are performed over lossy and lossless channels, respectively. Lossy Channels For the lossy channels, the primary goal is robust watermark extraction. Given a noised stego image \mathbf{I}_{\mathrm{noised}} , the watermark is extracted via inverse mapping, i.e., \left[\mathbf{I}_{\text{rec}},\hat{\mathbf{w}}\right]=\mathcal{F}_{\theta}^{-1}(\left[\mathbf{I}_{\text{noised}},\mathbf{z})\right] . Lossless Channels For lossless channels, our primary goal is to recover the original cover image and watermark bit. First, we extract the auxiliary bitstream from the stego image \mathbf{I}_{\mathrm{stego}} using the RDH method. Then, we decode the auxiliary bitstream with arithmetic coding to retrieve the overflow map \mathbf{O} and latent variable \mathbf{z} . Subsequently, the overflowed stego image \mathbf{I}_{\mathrm{stego}}^{\text{o}} is reconstructed as: \mathbf{I}_{\mathrm{stego}}^{\text{o}}=\mathbf{I}_{\mathrm{stego}}^{\mathrm{clip}}+\mathbf{I}_{\mathrm{mask}}^{255}\odot\mathbf{O}-\mathbf{I}_{\mathrm{mask}}^{0}\odot\mathbf{O}, (15) where the masks are defined as: \displaystyle\mathbf{I}_{\mathrm{mask}}^{255}(i,j,c) \displaystyle=\begin{cases}1,&\text{if }\mathbf{O}(i,j,c)>0,\\ 0,&\text{otherwise},\end{cases} (16) \displaystyle\mathbf{I}_{\mathrm{mask}}^{0}(i,j,c) \displaystyle=\begin{cases}1,&\text{if }\mathbf{O}(i,j,c)<0,\\ 0,&\text{otherwise}.\end{cases} (17) It should be noted that the clipped image \mathbf{I}_{\mathrm{stego}}^{\mathrm{clip}} is recovered via RDH. Finally, the original cover image and watermark are recovered through inverse mapping, ensuring perfect recovery of both the original cover image \mathbf{I}_{\mathrm{org}} and the watermark \mathbf{w} . In summary, DRRW enables robust watermark extraction in lossy channels and perfect recovery of the cover image and watermark in lossless channels. IV Experimental Results The experimental analysis consists of four parts. Section IV-A details the experimental settings, including descriptions of the training and testing datasets, implementation details, and hyperparameter configurations. Section IV-B conducts a comparative evaluation between the proposed DRRW framework and SOTA two-stage RRW methods. The evaluation assesses watermark imperceptibility, robustness under various distortions, bitstream length required for recovery, and computational complexity. Section IV-C provides a comparative analysis with irreversible robust watermarking methods, demonstrating that DRRW not only offers competitive robustness but also enables cover image recovery in lossless channels. Section IV-D presents ablation studies to investigate the contributions of components within the DRRW framework. Overall, experimental results demonstrate that the proposed DRRW framework exhibits significant and irreplaceable advantages over existing methods, representing a critical step toward the practical deployment of RRW. IV-A Experimental Setups IV-A 1 Training and Test Datasets In all experiments, the training set for all the learning-based methods is the DIVK dataset [ 45 ] . The testing set primarily consists of two datasets: the classical USC-SIPI [ 46 ] and Kodak24 [ 47 ] . IV-A 2 Implementation Details All comparison methods are trained on an NVIDIA 4090 Ti GPU using the same training set as DRRW. The DRRW framework is implemented in PyTorch and optimized with AdamW (batch size 8 , \gamma=10^{-4} , \beta_{1}=0.5 , \beta_{2}=0.999 ). It uses L=5 integer coupling layers, with \delta=10^{-2} , v=0.75 , \lambda_{p}=10^{6} , \lambda_{w}=10^{4} , \lambda_{s}=1 , \lambda_{l}=5 , \lambda_{z}=10^{-3} . In the second stage, arithmetic coding [ 26 ] and PEE [ 28 ] enable lossless compression and reversible embedding of auxiliary information, respectively. Details for other methods are provided in their respective comparative sections. Fig. 8: Visual quality comparison between DRRW and STDM-PCET [ 16 ] , PZM [ 31 ] under various distortions. The residual images demonstrate that DRRW achieves stronger coupling between the stego and cover images, leading to better imperceptibility compared to traditional RRW methods. Fig. 9: Quantitative visual quality comparison between the proposed DRRW and the STDM-PCET [ 16 ] , PZM [ 31 ] . IV-B DRRW vs. Traditional Robust Reversible Watermarking This section evaluates the proposed two-stage DRRW method against the two-stage RRW methods STDM-PCET [ 16 ] and PZM [ 31 ] , examining four critical aspects: visual quality, watermark robustness, time complexity, and auxiliary bitstream length. To ensure fairness, experimental setups are meticulously aligned. DRRW is trained on the DIV2K dataset [ 45 ] , with images resized to 512\times 512 , converted to grayscale, and embedded with a 256-bit bitstream. STDM-PCET [ 16 ] and PZM [ 31 ] adopt identical configurations. DRRW and DRRW-R denote stego images from the first and second stages, respectively. Experimental results follow below. Fig. 10: Comparison of auxiliary bitstream lengths: STDM-PCET [ 16 ] and PZM [ 31 ] (left) versus proposed DRRW (right). IV-B 1 Visual Quality Comparison Figure 8 compares visual examples of the proposed DRRW with PZM [ 31 ] and STDM-PCET [ 16 ] . Residual images show that DRRW strengthens watermark-cover image coupling, unlike STDM-PCET and PZM, which rely on template-based embedding, weaken coupling, and produce more artifacts. We assess visual quality using PSNR and SSIM, as summarized in Figure 9 . DRRW and DRRW-R yield average PSNR/SSIM of 38.54/0.978 and 38.47/0.977 , outperforming PZM ( 38.17/0.986 ) and STDM-PCET ( 36.54/0.960 ). DRRW boosts PSNR by 2.00 dB and SSIM by 0.018 compared to STDM-PCET, and increases PSNR by 0.37 dB over PZM, demonstrating enhanced image quality and imperceptibility. Fig. 11: Extraction accuracy (%) comparison between STDM-PCET [ 16 ] , PZM [ 31 ] and the proposed DRRW under various distortions, including Dropout, Gaussian blur, median filtering, salt-and-pepper noise, Gaussian noise, and JPEG compression. DRRW exhibits superior robustness against spatial-domain distortions while maintaining competitive performance under noise-based attacks. IV-B 2 Robustness Comparison Six common types of distortions test robustness, with extraction accuracy for each distortion shown in Figure 11 . Experimental results reveal that the proposed DRRW method outperforms PZM [ 31 ] and STDM-PCET [ 16 ] in most distortions. For example, under Dropout distortion with p=0.9 , DRRW achieves an extraction accuracy of 84.19\% , far surpassing PZM’s 56.07\% and STDM-PCET’s 52.77\% . With Gaussian blur ( \sigma=4.5 ), DRRW reaches 91.24\% , significantly exceeding PZM’s 65.26\% and STDM-PCET’s 57.46\% . Median filtering ( w=15 ) yields 86.24\% for DRRW, compared to PZM’s 68.18\% and STDM-PCET’s 63.76\% . For salt-and-pepper noise ( p=0.5 ), DRRW attains 57.11\% , outpacing PZM’s 49.71\% and STDM-PCET’s 49.81\% . However, under high JPEG compression ratio ( Q_{f}=10 ), PZM and STDM-PCET outperform DRRW with 98.20\% and 97.96\% , respectively, yet DRRW still maintains a robust 87.03\% ; when Q_{f}>30 , DRRW’s accuracy nears 100\% . For Gaussian noise, PZM, STDM-PCET, and DRRW show similar robustness; at \sigma=0.25 , STDM-PCET achieves 74.33\% , PZM 62.97\% , and DRRW 71.95\% . Overall, DRRW exhibits superior robustness against most distortions compared to SOTA RRW methods. Fig. 12: Time complexity and auxiliary bitstream length comparison between DRRW and STDM-PCET [ 16 ] and PZM [ 31 ] . IV-B 3 Time Complexity Comparison Figure 12 illustrates the time complexity associated with the embedding, extraction, and recovery processes for STDM-PCET [ 16 ] , PZM [ 31 ] , and the proposed DRRW. As depicted, PZM requires 195.17 to 286.40 seconds per sample for embedding, averaging 248.65 seconds, while STDM-PCET takes 147.75 to 232.90 seconds, averaging 184.26 seconds. In contrast, DRRW completes embedding within 4.04 to 6.94 seconds per cover image, averaging 4.51 seconds, achieving a 55.14 \times speedup over PZM and 40.86 \times over STDM-PCET. This demonstrates DRRW’s superior embedding efficiency for large-scale applications. For extraction, PZM processes each cover image in 6.86 to 10.01 seconds, averaging 8.54 seconds, and STDM-PCET ranges from 6.65 to 14.24 seconds, averaging 8.93 seconds. DRRW achieves extraction within 1.21 to 3.73 seconds, averaging 1.50 seconds, yielding a 5.69 \times speedup over PZM and 5.95 \times over STDM-PCET. Regarding recovery, PZM averages 17.71 seconds with a range of 14.13 to 19.80 seconds, STDM-PCET ranges from 12.70 to 20.12 seconds, averaging 15.89 seconds, while DRRW completes recovery within 4.16 to 6.83 seconds, averaging 4.96 seconds—a 3.57 \times reduction over PZM and 3.20 \times over STDM-PCET. Overall, DRRW significantly reduces computational costs across all stages, ensuring efficiency in applications on large-scale datasets. IV-B 4 Auxiliary Bitstream Length Comparison The length of the auxiliary bitstream is a crucial factor that directly impacts the reversibility of robust reversible watermarking methods. This is because an excessively long bitstream may prevent reversible embedding in the second stage. Figure 12 illustrates the auxiliary bitstream length required for recovery in STDM-PCET [ 16 ] , PZM [ 31 ] , and the proposed DRRW. The auxiliary bitstream length in PZM fluctuates widely, spanning 27{,}248 to 438{,}784 bits, averaging 61{,}896.94 bits. STDM-PCET exhibits greater variability, ranging from 20{,}480 to 840{,}432 bits, with an average of 56{,}968.52 bits. In contrast, DRRW significantly reduces the auxiliary bitstream length, ranging from 919 to 3{,}140 bits, with an average of 1{,}411.32 bits, achieving 43.86 \times and 40.37 \times reductions compared to PZM and STDM-PCET, respectively. More specifically, encoding the latent variable \mathbf{z} requires an average of 1{,}046.03 bits, while the overflow map accounts for 344.29 bits on average. Notably, for images with limited grayscale variations, such as those with extensive regions near pixel values of 255 or 0 , traditional RRW methods often produce overly long auxiliary bitstreams, rendering reversibility impractical. For example, in the sample shown in Figure 8 , the auxiliary bitstream length reaches 438{,}784 bits for PZM and 840{,}432 bits for STDM-PCET, whereas DRRW requires only 3{,}140 bits. Moreover, DRRW successfully achieves reversible embedding for all cover images, without failures. These results underscore the significant advantage of DRRW in reducing auxiliary bitstream length, thus improving practicality. In summary, the above comparative analysis demonstrates the overall superiority of the proposed DRRW framework over STDM-PCET [ 16 ] and PZM [ 31 ] . DRRW consistently achieves higher visual quality with fewer embedding artifacts and exhibits stronger robustness against various distortions. Furthermore, DRRW significantly reduces the computational complexity of embedding, extraction, and recovery, achieving up to 55.14 \times speedup during embedding. Additionally, DRRW drastically minimizes the auxiliary information bitstream length, yielding 43.86 \times and 40.37 \times reductions compared to PZM and STDM-PCET, respectively. These results demonstrate that DRRW offers a more practical and reliable solution for robust reversible watermarking by enhancing imperceptibility, robustness, efficiency, and practicality. Fig. 13: Visual quality comparison between DRRW and the MBRS [ 16 ] , FIN [ 18 ] , R-DRRW under various distortions. The residual images demonstrate that DRRW achieves stronger coupling between the stego and cover images, leading to better imperceptibility compared to other methods. Fig. 14: Quantitative visual quality comparison between the proposed DRRW and the MBRS [ 16 ] , FIN [ 18 ] , R-DRRW in terms of PSNR and SSIM. IV-C DRRW vs. Irreversible Robust Image Watermarking This section evaluates DRRW against irreversible robust watermarking methods. The evaluation focuses on visual quality and robustness. Three methods for comparison include real-valued flow-based FIN [ 18 ] , MBRS [ 48 ] , and real-valued DRRW (R-DRRW). FIN and R-DRRW utilize the differentiable noise layer of DRRW for training. R-DRRW deviates from DRRW by removing the quantization operator in the coupling layer and adopting a real-valued flow while keeping other settings identical. For fairness, all methods train on the DIV2K dataset [ 45 ] , with images resized to 256\times 256 and watermark bit length set to 64 . IV-C 1 Visual Quality Comparison Figure 13 visualizes stego images from different methods. We observe that the MBRS method [ 48 ] introduces visible distortions, appearing as grid-like blocking artifacts on the stego image. These deviate from the image content, reducing imperceptibility and leaving detectable watermark traces. The FIN method [ 18 ] exhibits low-frequency texture artifacts, evident in smooth regions with occasional white noise, yet offers better imperceptibility than grid artifacts of MBRS. In contrast, the proposed DRRW achieves superior visual quality, aligning more closely with human visual perception. Consequently, DRRW and DRRW-R attain enhanced imperceptibility, rendering watermark traces nearly imperceptible to subjective evaluation. Quantitative evaluations further confirm the enhancement in visual quality. Figure 14 summarizes the PSNR and SSIM results for each method. The proposed DRRW and DRRW-R methods achieve average PSNR values of 40.9473 dB and 40.8971 dB, respectively, with SSIM values of 0.9995 and 0.9995 , indicating minimal embedding distortion. In contrast, the real-valued flow-based model R-DRRW yields a PSNR of 33.9180 dB and an SSIM of 0.9971 . DRRW surpasses R-DRRW by 7.03 dB in PSNR and 0.0024 in SSIM. For the FIN method, the PSNR reaches 39.7445 dB and the SSIM 0.9988 , with DRRW improving PSNR by 1.2028 dB and SSIM by 0.0007 . The MBRS method records a PSNR of 40.7302 dB and an SSIM of 0.9996 , where DRRW boosts PSNR by 0.2171 dB but slightly reduces SSIM by 0.0001 . Although its quantitative metrics are close to those of DRRW, the presence of highly noticeable grid-like artifacts results in significantly lower subjective visual quality. In summary, DRRW and DRRW-R achieve the best visual quality in both subjective perception and objective evaluation metrics. Fig. 15: Extraction accuracy (%) comparison between MBRS [ 16 ] , FIN [ 18 ] , R-DRRW and the proposed DRRW under various distortions, including Dropout, Gaussian blur, median filtering, salt-and-pepper noise, Gaussian noise, and JPEG compression. IV-C 2 Robustness Comparison We thoroughly assess the robustness of various methods against six prevalent digital distortions, illustrated in Figure 15 . The proposed integer flow-based DRRW and DRRW-R demonstrate overall superior robustness compared to the real-valued flow-based R-DRRW, MBRS [ 48 ] , and FIN [ 18 ] across most distortions. Specifically, under median filtering ( w=19 ), DRRW achieves 90.01\% , surpassing R-DRRW ( 85.12\% ) by 4.89\% , MBRS ( 53.83\% ) by 36.18\% , and FIN ( 51.01\% ) by 39.00\% . For salt&pepper noise ( p=0.9 ), DRRW reaches 74.46\% , exceeding R-DRRW ( 65.28\% ) by 9.18\% , MBRS ( 60.04\% ) by 14.42\% , and FIN ( 52.27\% ) by 22.19\% . Under Gaussian blur ( \sigma=3.0 ), DRRW attains 99.94\% , outperforming R-DRRW ( 94.35\% ) by 5.59\% , MBRS ( 99.65\% ) by 0.29\% , and FIN ( 70.56\% ) by 29.38\% . For Gaussian noise ( \sigma=0.45 ), DRRW ( 74.14\% ) aligns closely with MBRS ( 76.70\% ) and other methods like DRRW-R ( 75.71\% ) and R-DRRW ( 73.31\% ), all outperforming FIN ( 72.75\% ). Under dropout distortion, DRRW and DRRW-R achieve extraction accuracies of 97.68\% and 97.75\% at p=0.5 , slightly below MBRS ( 99.42\% ), yet outperforming R-DRRW ( 84.03\% ) by 13.65\% and FIN ( 94.99\% ) by 2.69\% . At p=0.9 , DRRW and DRRW-R reach 75.81\% and 75.98\% , exceeding FIN ( 69.78\% ) by 6.03\% and MBRS ( 82.86\% ) by 6.95\% , while R-DRRW ( 55.86\% ) trails by 19.95\% behind DRRW. For JPEG compression, DRRW and DRRW-R perform equally well, achieving 64.18\% and 64.21\% at Q_{f}=10 , surpassing MBRS ( 58.47\% ) by 5.71\% and R-DRRW ( 54.87\% ) by 9.31\% , though FIN outperforms with 80.09\% . However, at Q_{f}\geq 30 , DRRW and DRRW-R approach 100\% , exceeding FIN ( 96.98\% ) by about 3\% . In summary, DRRW and DRRW-R outperform R-DRRW, MBRS [ 48 ] , and FIN [ 18 ] in robustness across most distortions, excelling in spatial-domain attacks (dropout, Gaussian blur, median filtering, salt-and-pepper noise) while competitive under JPEG compression and Gaussian noise. DRRW maintains robustness without reduction due to the second-stage reversible embedding. It should be noted that as a robust reversible watermarking method, DRRW uniquely recovers the cover image and watermark perfectly in a lossless channel, whereas other competitive methods cannot. Fig. 16: The time complexity and auxiliary bitstream length of proposed DRRW trained on color images. IV-C 3 Auxiliary Bitstream Length and Time Complexity Figure 16 presents the auxiliary bitstream length and time complexity of the proposed DRRW trained on color images. Compared to PZM [ 31 ] and STDM-PCET [ 16 ] in Section IV-B , DRRW reduces the auxiliary bitstream length to a range of 384 to 8{,}271 bits, with an average of 1{,}962.19 bits, achieving a 31.55 \times and 29.03 \times reduction over PZM and STDM-PCET, respectively. More specifically, DRRW comprises an average of 382.61 bits for encoding the latent variable \mathbf{z} and 1{,}558.58 bits for the overflow map. Furthermore, Figure 16 illustrates the time complexities of different methods. DRRW completes embedding in 2.70 to 4.44 seconds, averaging 3.18 seconds, significantly outperforming PZM, which requires 195.17 to 286.40 seconds (average 248.65 seconds), and STDM-PCET, which takes 147.75 to 232.90 seconds (average 184.26 seconds), achieving speedups of 78.19 \times and 57.94 \times , respectively. Extraction is completed in 0.40 to 1.13 seconds, averaging 0.76 seconds, compared to PZM’s 6.86 to 10.01 seconds (average 8.54 seconds) and STDM-PCET’s 6.65 to 14.24 seconds (average 8.93 seconds), resulting in 11.24 \times and 11.75 \times speedups. Recovery takes 2.01 to 3.59 seconds, averaging 3.05 seconds, outperforming PZM’s 14.13 to 19.80 seconds (average 17.71 seconds) and STDM-PCET’s 12.70 to 20.12 seconds (average 15.89 seconds), achieving 5.81 \times and 5.21 \times speedups. Notably, DRRW successfully embedded watermarks in 16,762 images from PASCAL VOC 2012 [ 49 ] without failures, addressing and improving the infeasibility of traditional RRW methods on large-scale datasets. IV-D Ablation Experiments This section conducts ablation experiments on three key components. First, we analyze how Penalty Loss affects auxiliary bitstream length. Second, we evaluate the influence of latent variable \mathbf{z} loss on auxiliary bitstream length. Third, we examine the effectiveness of the training strategy in Section III-B3 . IV-D 1 Penalty Loss To evaluate the impact of Penalty Loss in the DRRW framework, we conduct ablation experiments by adjusting the penalty weight \lambda_{p} and analyzing its effects on auxiliary bitstream length. Specifically, \lambda_{p} are set to \{0,10^{2},10^{4},10^{6}\} , where \lambda_{p}=0 serves as the baseline without overflow penalty during training. Fig. 17: DRRWs trained with different \lambda_{p}\in\{0,10,10^{2},10^{4},10^{6}\} exhibit varying extraction accuracies across six common distortions. The results show that Penalty Loss improves average extraction accuracy by over 10\% under maximum distortion strengths. Fig. 18: PSNR curves of stego images over training epochs for different \lambda_{p} . Fig. 19: PSNR and SSIM comparsion between DRRW under various \lambda_{p} . Before analyzing the impact of Penalty Loss on auxiliary bitstream length, we first assess its effect on the visual quality of the stego image. To better visualize the relationship between Penalty Loss weights \lambda_{p} and image quality, we plot PSNR curves over training epochs for various \lambda_{p} settings, as shown in Figure 18 . The results show that higher \lambda_{p} values consistently increase PSNR, demonstrating that Penalty Loss effectively enhances visual quality. Furthermore, we report the average PSNR and SSIM of stego images after 600 training epochs for different \lambda_{p} values, as shown in Figure 19 . With \lambda_{p}=0 , the average PSNR and SSIM are 29.6822\,\mathrm{dB} and 0.9942 , respectively. Increasing \lambda_{p} to 10^{2} raises these values to 31.6585\,\mathrm{dB} and 0.9963 , while \lambda_{p}=10^{4} further improves them to 34.1974\,\mathrm{dB} and 0.9975 . At \lambda_{p}=10^{6} , the metrics reach 40.9473\,\mathrm{dB} and 0.9995 , reflecting gains of 11.2651\,\mathrm{dB} in PSNR and 0.0053 in SSIM compared to \lambda_{p}=0 ( i.e. , no Penalty Loss). These results highlight that Penalty Loss significantly enhances watermark imperceptibility and improves stego image quality in the DRRW framework. Fig. 20: Encoded bitstream lengths of the latent variable \mathbf{z} and the overflow map for different \lambda_{p} values. As \lambda_{p} increases, the bitstream length of \mathbf{z} gradually increases, while that of the overflow map decreases significantly. We also evaluate the impact of Penalty Loss on watermark robustness under various distortion conditions with different \lambda_{p} . Figure 17 shows that Penalty Loss significantly enhances robustness. Under six common distortions, it improves average extraction accuracy by over 10\% at maximum distortion strengths. Finally, We analyze the impact of Penalty Loss on auxiliary bitstream length. Figure 20 shows that increasing \lambda_{p} has opposite effects on the bit lengths of the latent variable \mathbf{z} and the overflow map. As \lambda_{p} increases, the bit length for encoding \mathbf{z} gradually rises, while the overflow map bit length decreases significantly. This indicates that Penalty Loss reduces the number of overflow pixels in the first stage, thereby lowering the bits required for encoding the overflow map. Although the bit length of \mathbf{z} increases with \lambda_{p} , it remains below 400 bits on average even at \lambda_{p}=10^{6} , causing negligible impact on reversible data hiding performance in the second stage. In summary, Penalty Loss provides three key advantages within the DRRW framework: it significantly improves the visual quality of stego images, enhances watermark robustness, and effectively reduces the auxiliary bitstream length, greatly increasing the practicality of DRRW. Fig. 21: Impact of regularization loss on the latent variable \mathbf{z} and its corresponding bitstream length (DRRW trained on grayscale images in Section IV-B ). The blue boxplot represents the case without regularization loss, while the green boxplot represents the case with regularization loss. IV-D 2 Regularization loss for Latent Variable \mathbf{z} To justify the addition of regularization loss to the latent variable \mathbf{z} , we observe that omitting this loss leads to a significant increase in the encoding bit length. Moreover, the network encounters numerical overflow issues during inference. To verify its necessity, we conduct the following ablation study. As shown in Figure 21 , without this loss function, the absolute values of \mathbf{z} can exceed 3\times 10^{5} , mostly ranging from -5\times 10^{4} to +5\times 10^{5} . This causes frequent computational overflow in both forward and inverse mappings, preventing complete image recovery. In the DRRW model for grayscale images (Section IV-B ), about 46.123\% of test images fail to recover perfectly, while in the color model (Section IV-C ), the failure rate is 9.7\% . As shown in Figure 21 , After applying the regularization loss, \mathbf{z} is constrained within [-18,+13] , and the bitstream length is significantly reduced from 11,292.83 bits to 1,046.03 , achieving a \textbf{10.79}\times reduction. This demonstrates that the regularization loss not only reduces the bitstream length of the latent variable \mathbf{z} but also solves the numerical overflow issue, as all test cover images are perfectly recovered without failure. These results demonstrate that the regularization loss not only prevents numerical overflow but also improves encoding efficiency by reducing the bitstream length, ensuring reversibility. To ensure reliability, We recommend using FLOAT64 precision during inference to avoid irreversibility caused by numerical precision errors. IV-D 3 Training Strategy In Section III-B3 , we introduce a training strategy that dynamically adjusts the watermark loss weight during training. To assess its effectiveness, we plot the curves of \lambda_{w} against training epochs for various \lambda_{p} settings, as shown in Figure 22 . The results reveal that \lambda_{w} stabilizes progressively as training advances. We further report the converged values of \lambda_{w} for \lambda_{p}\in\{0,10^{2},10^{4},10^{6}\} , which are 0.312 , 0.78 , 2.53 , and 7.53 , respectively. These findings show that the final \lambda_{w} increases with higher \lambda_{p} . Remarkably, \lambda_{w} converges to a stable value irrespective of the \lambda_{p} choice. This proves that the proposed training strategy not only eliminates the need for manual adjustment of the watermark loss weight but also ensures convergence. Fig. 22: Curves of \lambda_{w} over training epochs for different \lambda_{p} , demonstrating its automatic adjustment and convergence. V Conclusion This paper presented Deep Robust Reversible Watermarking (DRRW), a novel watermark method enabling lossless cover image recovery in lossless channels and robust watermark extraction in lossy channels. DRRW effectively overcomes the limitations of traditional robust reversible watermarking (RRW) methods, such as complex design, high time complexity, limited robustness, and impracticality for large-scale datasets. We developed an integer Invertible Watermark Network (iIWN) to map the cover-watermark pair and the stego image invertiblely. During training, DRRW utilizes an encoder-noise layer-decoder architecture to learn the robustness of various distortions. At inference, DRRW maps the cover-watermark pair into an overflowed stego image and latent variables, compresses them into a bitstream, and embeds it via reversible data hiding into the clipped stego image to achieve reversibility. To improve practicality, DRRW introduced a Penalty loss, reducing the auxiliary bitstream length by 43.86 \times compared to existing RRW methods, while simultaneously improving the visual quality of stego image and watermark robustness, achieving a threefold benefit. Furthermore, we modeled an adaptive weight adjustment strategy that dynamically optimizes the watermark loss weight during training, removing manual tuning and ensuring stable convergence. Experiments demonstrate DRRW surpasses existing robust reversible and irreversible watermarking methods in robustness and visual quality, with computational efficiency improved by 55.14 \times for embedding, 5.95 \times for extraction, and 3.57 \times for recovery over existing RRWs. Remarkably, DRRW successfully achieves reversible embedding across all 16,762 images, significantly advancing the practical deployment of RRW.