INTRODUCTIONSteganography, or the art of hiding information in plain sight, is a means of covert communication used commonly throughout history. In steganography, a secret message is embedded in a seemingly harmless physical or digital medium, termed a cover. This combined message (secret + cover = container) is then relayed to an intended recipient. Due to the hidden nature of the secret message, communication can occur between parties without arousing suspicion as to the true intent of the dispatched container. This process can be applied to both physical mediums (e.g., microdots, invisible ink, embedded objects, etc.) as well as digital mediums, including images, videos, audio, and text. The pervasive nature of digital media presents a heightened risk for steganography. Its widespread accessibility and ease of dissemination make digital platforms more susceptible to covert manipulations, potentially enabling malicious actors to spread concealed information or malware at an unprecedented scale and speed. In addition to the widespread effect of malware propagation, steganography via digital mediums can also be used to exfiltrate victim data and communicate with other bad actors. As such, advanced detection and prevention mechanisms are necessary to combat against these harmful use cases. While various digital mediums can be used as covers, we focus on the use of images in this work, as these are more accessible and commonly used in the wild.Current image steganography defenses utilize a technique known as steganalysis, or the detection of hidden messages in images Johnson & Jajodia (1998b); Bachrach & Shih (2011). Steganalysis tools analyze images for known signatures and/or anomalies in pixel values, noise distributions, and other statistical measures to indicate the presence of steganographic content. Recent work has also incorporated machine learning strategies to enhance detection accuracy Zhang et al. (2018); Xu et al. (2016); Xu (2017); Ye et al. (2017); Qian et al. (2018). These defense strategies, however, rely upon data curated from preexisting steganographic techniques and are referred to as non-blind. While adept at detecting known steganography, these defense mechanisms are useless against new forms of steganography in the wild -especially ones engineered to bypass these existing systems Li et al. (2022); Hayes & Danezis (2017); Tang et al. (2019).Another defense mechanism against steganography is sanitization, which eliminates the presence of any potential secret message while maintaining the integrity of the cover media. For instance, a picture of a dog containing an executable malware binary would be sanitized if the malware binary is removed and the original image is minimally changed. The authors in Robinette et al. (2023) demonstrate the success of such an approach, utilizing a variational autoencoder strategy termed SUDS. The authors show that SUDS is able to protect against least significant bit (LSB), dependent deep hiding (DDH), and universal deep hiding (UDH) steganography, each of which is an unseen method by the sanitizer prior to testing (blind). Sanitization, therefore, is able to blindly protect systems and is a more robust defense strategy compared to detection.While SUDS is able to successfully sanitize secrets, its ability to reconstruct the original image deteriorates as image complexity increases, which is a result of utilizing a variational autoencoder approach. To address the limited reconstruction capabilities of SUDS while maintaining sanitization performance, we propose a diffusion model approach to SUDS, termed DM-SUDS. While diffusion models are most commonly used for their generative properties, they are trained as denoising mechanisms. By using a diffusion model to denoise potentially steganographic images, we believe that this approach will provide an improved alternative to SUDS, advancing the state-of-the-art in blind deep learning sanitization techniques for image steganography while increasing the potential breadth of its impact. All code to reproduce experiments is available at: https://anonymous.4open.science/r/dmsuds-1D7C/README.md. The contributions of this work, therefore, are the following:1. Implementation of a Novel Sanitization Framework: We introduce a novel blind deep learning steganography sanitization method that utilizes a diffusion model framework to sanitize universal and dependent steganography. 2. Demonstration of Sanitizer Capabilities: We compare this approach with the current state-of-the-art sanitization method (SUDS) and demonstrate a 71.32% (MSE), 22.43% (PSNR), and 17.30% (SSIM) improvement in recovered image quality while maintaining sanitization performance.
Ablation Study:We further analyze this approach by conducting an ablation study on the model framework and evaluating sanitization performance on the ImageNet dataset.
BACKGROUNDIn this section, we introduce steganography, existing sanitization techniques, and the metrics used for evaluation. While this work is medium agnostic, we focus on images represented by a matrix (c, h, w), where c is the number of color channels, h is the height, and w is the width of the image.
STEGANOGRAPHYNotation As shown by the Pre-Sanitization section in figure 1, steganography typically consists of a cover, secret, container, and a revealed secret. A secret S is hidden within a cover C using a hide function H to create a container C ′ such that the difference between the cover and the container is minimal, orH(C, S) = C ′ | MSE(C, C ′ ) → 0.The revealed secret S ′ can then be obtained from the container using a reveal function R, which is usually the inverse of H. The revealed secret should be minimally different from the original secret hidden in the cover, or R(C ′ ) = S ′ | MSE(S, S ′ ) → 0. In regard to sanitization, an image is sanitized with a sanitization function P to create a sanitized image Ĉ, or P(X) = Ĉ | X ∈ {C, C ′ }. An attempted revealed secret from a sanitized image is denoted as Ŝ, or R( Ĉ) = Ŝ. In this work, P ∈ {SUDS, DM-SUDS}, where DM-SUDS is the introduced diffusion model approach.Hiding Methods There are many types of hiding techniques in steganography, including traditional and deep hiding.  & Jajodia (1998a). While information loss is inevitable, the user must strike a balance between maximizing the secret retained in the container and avoiding detection, hiding capacity vs. invisibility. With a higher hiding capacity, a secret is more likely to be detected in a container, but with  Baluja (2017) and universal deep hiding (UDH) Zhang et al. (2020). In DDH, the resulting container is cover dependent, and in UDH, the secret can be combined with any cover. In this work, we utilize a method from each of these categories 1) traditional = least significant bit (LSB) method Kurak & McHugh (1992), 2) dependent deep = DDH, and 3) universal deep = UDH. The implementations for DDH and UDH are CNN-based implementations from the same code base1 , and the LSB implementation is from the SUDS codebase2 . Please see the supplementary material for more information on these methods.
SANITIZATIONTraditional Sanitization Sanitization, or active steganalysis, is the process of removing hidden information from potentially steganographic images while preserving the image quality of the cover.  2023) also utilize a variational autoencoder approach in a framework called SUDS but provide a more thorough analysis of this approach, including comparisons to traditional sanitization (Gaussian noise), incorporating more robust steganography techniques (LSB, DDH, UDH), and evaluating performance on encoded image secrets rather than text secrets. As SUDS is the most applicable to our introduced implementation, we provide a direct comparison to their work and utilize similar evaluation techniques.
IMAGE METRICSThe metrics used to evaluate sanitization are extended from the work in Robinette et al. (2023): the mean squared error (MSE) and peak-signal-to-noise ratio (PSNR), which measure the absolute error between corresponding pixels of the reference and the altered images. In addition to these metrics, we also utilize the structural similarity index measure (SSIM), which measures the perceptual quality of an image or video in comparison to a reference. We utilize these metric implementations from the scikit-image metrics library. For more information on these metrics, please see the supplementary material.
DIFFUSION MODEL SANITIZATIONOur goal is to improve the image quality of sanitized images using a diffusion model approach to sanitization. A diffusion model is a generative model that consists of two main features: a forward diffusion process and a reverse diffusion process. In the forward diffusion process, an input image x 0 from a given data distribution x 0 ∼ q(x 0 ) is perturbed at timestep t with Gaussian noise with a variance β t ∈ (0, 1) to produce a sequence of latent images x 0 , x 1 , ..., x T . This forward noising process is defined by equations 1 and 2 and is commonly reparameterized by equation 3, which allows for direct sampling of noised latents at arbitrary steps. Here, α t := 1β t , ᾱt := t s=0 α s , and 1ᾱt represents the variance of the noise for an arbitrary timestep. return mse 1 , psnr 1 , ssim 1 , mse 2 , psnr 2 , ssim 2 ▷ Return metrics 10: end procedureq(x 1 , . . . , x T |x 0 ) := T t=1 q(x t |x t-1 ) (1) q(x t |x t-1 ) := N x t ; 1 -β t x t-1 , β t I (2) q(x t |x 0 ) = N x t ; √ ᾱt x 0 , (1 -ᾱt )I (3)The model then learns to reverse this diffusion process by refining the noised sample until it resembles a sample from the target distribution. The posterior q(x t-1 |x t , x 0 ) can be calculated using Bayes theorem in terms of βt and μt (x t , x 0 ), which are defined in the equations below:βt := 1 -ᾱt-1 1 -ᾱt β t (4) μt (x t , x 0 ) := ᾱt-1 β t 1 -ᾱt x 0 + α t (1 -ᾱt-1 ) 1 -ᾱt x t (5) q(x t-1 |x t , x 0 ) = N x t-1 ; μ(x t , x 0 ), βt I(6)To represent µ θ (x t , t) for the reverse diffusion process, we use a U-Net model to predict the noise ϵ added to the input image. The original image can then be predicted using equation 7.x 0 = 1 √ α t x t - β t √ 1 -ᾱt ϵ (7)While diffusion models are most commonly used for generative purposes, we instead make use of the denoising capabilities developed during training. To use the diffusion model as a sanitizer, we can apply t timesteps of noise to a potential container using equation 3 with a cosine beta scheduler from Ho et al. (2020), predict the noise using a neural network, and then refine the image using equation 7, effectively preserving the image quality while maintaining sanitization performance. As this is a blind approach to sanitization, prior knowledge of steganography techniques is not required for the training process. To highlight this feature of the framework and to emphasize the accessibility of this approach, we make use of a state-of-the-art, publicly available pretrained diffusion model from Nichol & Dhariwal (2021)4 . For the remainder of this paper, the diffusion model sanitization process is referred to as DM-SUDS. An image sanitized with this process is denoted as ĈDM , and an attempted revealed secret from ĈDM is denoted as Ŝ.
EXPERIMENTSIn this section, we evaluate the sanitization capabilities of DM-SUDS compared to SUDS (see section 2.2), which is the only other blind deep learning sanitization approach tested against image secrets.
SETUPTo compare DM-SUDS and SUDS, we evaluate their sanitization performance on image secrets hidden with LSB, DDH, and UDH steganography using the CIFAR-10 test dataset (10000 RGB images). This process is demonstrated in algorithm 1. The CIFAR-10 dataset was chosen as it was used to demonstrate SUDS ability to sanitize RGB images, and it is also where the reconstruction capabilities of SUDS start to break down. As this is the issue we are trying to address with DM-SUDS, it provides a great comparison playground for the two approaches. In order to provide fair comparisons, the same cover and secret combinations used to make containers are kept constant for each hiding technique, and DM-SUDS and SUDS are also evaluated on the same containers. The SUDS model used during this evaluation is from the repository provided by the authors. For the DM-SUDS model discussed in section 3, we use a timestep variable t = 250 in the forward and reverse diffusion processes. The image metrics discussed in section 2.3 (MSE, PSNR, and SSIM) are used to compare covers C with sanitized images Ĉ (Image Preservation) as well as secrets S to revealed secrets post sanitization Ŝ (Secret Elimination). To provide a baseline comparison to the effect that steganography has on images, a None column is also calculated, which uses these same metrics to compare covers C with containers C ′ (Image Preservation) as well as secrets S to revealed secrets pre sanitization S ′ (Secret Elimination).
RESULTSSanitization From the results shown in table 1, DM-SUDS and SUDS are both able to successfully sanitize secrets as indicated by the high MSE values for Secret Elimination. In addition to the high MSE values, the low SSIM values also indicate that information retaining to the original secrets is eliminated as the similarity between the attempted reveal secret and the actual secret is small.  andc) UDH steganography. Sanitization performance is determined from the last two columns in each subfigure. As S is not discernible from Ŝ for any of the approaches, sanitization is successful for both methods.Image Preservation While both methods successfully sanitize secrets, they differ largely in their ability to preserve image quality in the sanitization process. In the Image Preservation section of table 1, the MSE of the sanitized image compared to the original cover is smaller for DM-SUDS than SUDS for all steganography methods, achieving an average % improvement of 71.32% across LSB, DDH, and UDH. Additionally, the PSNR values are higher for DM-SUDS for all steganography methods as well. This indicates that sanitized images with DM-SUDS have a higher image quality with an average improvement of 22.43% for this metric. Lastly, the higher SSIM values of DM-SUDS demonstrate that the sanitized images are even more structurally similar to the original covers   
ANALYSIS AND DISCUSSIONDiffusion Steps For the previous experiments, we utilized a timestep t = 250 in the diffusion process, which means that we sample a noisy version of the input image at t = 250. In the reverse diffusion process, this number is then encoded, and the neural network estimates the added noise to the image from this timestep. To evaluate the robustness of the diffusion model approach and the pervasiveness of the selected steganographic hiding methods, we evaluate the diffusion model at various timesteps t as shown in figure 4. In regard to the sanitized image Ĉ, with too many timesteps, the image quality of the reconstructed image starts to deteriorate, as shown by t = 1000.The blurry nature of the resulting processed image indicates that the more noise that is added to a container, the more difficult it is to predict the amount of added noise, affecting the resulting refined image Ĉ. With too few timesteps, however, the secret persists after sanitization (see DDH Ŝ). This  is particularly important for secrets hidden with DDH, which seem to persist up until t = 125. This is also an interesting result for the robustness of each hiding method. The order of robustness as determined by the persistence of the secret with increased timesteps is DDH, UDH, and LSB. DDH, therefore, is a more robust hiding method than the other two. While the number of selected timesteps impacts performance near the edges, this value is not particularly sensitive.Direct Denoising In the majority of this work, we sample a noisy image of the container at timestep t, and then denoise this image to a sanitized version of the input. Another way to sanitize via DM-SUDS is to treat the potentially steganographic image as the direct input to the denoiser, skipping the forward diffusion process. With this approach, however, we still have to provide an estimate t as input to the reverse diffusion neural network. To evaluate this approach, we sanitize directly from the containers hidden with DDH at various timesteps, as DDH creates the most persistent secrets (see the previous paragraph). From the results shown in figure 5, the secret is never really sanitized from DDH as indicated by the t = 1000 column. Even at this timestep, the secret is still distinguishable. This indicates that the true power of the diffusion model sanitization approach lies in the added Gaussian noise in the forward diffusion process.
Evaluation on ImageNetAs the reconstruction ability of SUDS decreases with an increase in image complexity Robinette et al. (2023), we seek to determine if DM-SUDS is able to maintain its abilities with more complex images using the ImageNet dataset with images of size R 3×64×64 . For this experiment, we evaluate the sanitization of ImageNet secrets hidden with DDH. DDH was chosen as it is the most robust of the tested hiding methods as determined by the experiments conducted in Diffusion Steps. From the results shown in figure 6, DM-SUDS also works for more complex datasets, as the image preservation is conserved (C to Ĉ), and the secrets are successfully sanitized (S to Ŝ). This result is further verified by the metrics presented in table 2.  Potential Improvements and Use Cases While DM-SUDS successfully outperforms SUDS in the sanitization of steganography, there are areas for future improvement. One potential drawback of this approach (as with SUDS) is that DM-SUDS is trained on a specific data distribution. While it may successfully sanitize images of various distributions, the reconstructed image quality will be sacrificed. Most use cases, however, will likely be of the same distribution. For instance, a bank company's network traffic might contain images of customer identification documents, signature cards, check images, etc., which would exhibit the same data distribution. DM-SUDS could be used to protect the exfil of proprietary information of that bank from bad actors, as well as bad actors attempting to introduce malware payloads into the system via steganography.
CONCLUSIONIn this work, we introduce a novel blind deep learning steganography sanitization method that utilizes a diffusion model framework to restore images called DM-SUDS. We demonstrate the success of such an approach compared to SUDS, a previous VAE-based approach, and analyze features specific to a diffusion model to wholistically evaluate DM-SUDS. Where SUDS has difficulty in reconstructing images, DM-SUDS achieves a higher reconstruction ability while maintaining sanitization performance, improving image preservation MSE by 71.32%, PSNR by 22.43% and SSIM by 17.3%. One of the most impactful features of DM-SUDS lies in its accessibility, as any pretrained diffusion model of a target domain's data distribution can be implemented to protect a system against steganography. This work, therefore, introduces a highly effective and beneficial use case for a diffusion model while marking a significant advancement in the field of steganography sanitization. In the future, we hope to focus on optimizing DM-SUDS further and explore its application in various domains.Figure 1 :1Figure1: DM-SUDS (center) takes as input a cover or a container image x 0 ∈ {C, C ′ } created with any type of steganographic technique. A noisy image is then sampled from this image at timestep t. In the reverse diffusion process, a denoising U-Net is used to predict the amount of noise added to the image, which is then used to recover the original image, resulting in a sanitized image Ĉ. In the pre-sanitization phase, the secret is recoverable, as demonstrated in the bottom-left of the figure S ′ . After sanitization with DM-SUDS, however, a secret is not recoverable, as indicated by the bottom-right of the figure Ŝ. This image, therefore, is successfully sanitized.
Figure 2: A comparison between DM-SUDS and SUDS sanitization for a) LSB, b) DDH,and c) UDH steganography. Sanitization performance is determined from the last two columns in each subfigure. As S is not discernible from Ŝ for any of the approaches, sanitization is successful for both methods.
Figure3visually compares an original cover to images sanitized with Gaussian noise, SUDS, and DM-SUDS. While some fine details are not reproduced in the sanitized images via DM-SUDS (e.g., muscles along the neck of the horse), the image quality compared to Gaussian noise and SUDS is drastically better. Gaussian noise causes significant damage to the image, and the blurry nature of the reconstructed SUDS image compromises both its visual appeal and informational content. DM-SUDS, therefore, improves sanitization image quality while maintaining sanitization abilities, outperforming SUDS by 71.32% (MSE), 22.43% (PSNR), and 17.30% (SSIM).
Figure 3 :3Figure 3: Image preservation comparison between an original cover and sanitization with Gaussian noise, SUDS, and DM-SUDS. DM-SUDS achieves the highest image quality of a sanitized image.
Figure 4 :4Figure 4: DM-SUDS with varying forward diffusion timesteps. With too few timesteps, secrets are not sanitized, and with too many timesteps, the refined image quality degrades.
Figure 5 :5Figure5: Sanitized images for DDH steganography with no added noise in the diffusion process (skip forward diffusion). Even at t = 1000 timesteps, the secret survives, meaning that added noise is necessary for the sanitization process.
Figure 6 :6Figure 6: DM-SUDS sanitization on ImageNet steganography using DDH. Secrets are successfully sanitized, as indicated by the last two columns -the secret is not discernable from Ŝ.
Traditional sanitization approaches attempt to remove hidden information by modifying the pixels of the image or the frequency distribution of the image, much like traditional steganographic approaches. Examples include flipping the bits of N LSB planesPaul & Mukherjee (2010), adding Gaussian noise to the image, and applying image filters Ameen & Al-Badrany (2013);Amritha et al. (2019);Geetha et al. (2021). While traditional sanitization techniques are effective on traditional hiding algorithms, they largely degrade the image quality of the restored image and are ineffective on deep hiding techniques. Their approach is extremely inefficient and also requires known information about common hiding areas from steganographic techniques to train the edge distribution model. InWei et al. (2022), the authors use a median filter as a secret data remover (SDR). While the data removal process is blind, the image fusion and latent removal components utilize steganographic images embedded with text-secrets in the training process. Convolutional neural network (CNN) based approaches are introduced in Zhu et al. (2021),Zhu et al. (2022), andHatoum et al. (2021) to sanitize steganography and/or watermarked images. Each of these methods, however, only considers text-based secrets.To further enhance the resulting image quality of a sanitized image, some approaches have used generative models. InCorley et al. (2019), the authors apply a generative adversarial network (GAN) based approach called Deep Digital Steganography Purifier (DDSP). Their framework is only tested on traditional hiding methods and only considers text-based malware payloads as secrets. Additionally, DDSP requires previous knowledge of steganographic techniques in the training process and is, therefore, a non-blind approach. InLi et al. (2021), the authors present another GAN based approach, where a U-Net generator is trained to attack watermarked images. This approach is nonblind as steganographic images are used in the training process. The authors inZuppelli et al. (2021) introduce a variational autoencoder (VAE) sanitizer, which is tested by sanitizing images embedded with malware powershell scripts via Invoke-PSImage 3 . The approach is evaluated by an open-source detection tool for LSB, StegExpose, which has comparable results to random guessingBaluja (2017). While the authors introduce VAE sanitization, they only evaluate LSB text embeddings, which are more fragile than image embeddings as small perturbations can drastically affect text semantics. The authors inRobinette et al. (Deep Learning Sanitization Deep learning sanitization attempts to improve upon the limited capabilities of traditional sanitization, especially in regard to deep learning steganography. InJung et al. (2021), the authors present PixelSteganalysis which uses an 'analyzer' to predict pixel and edge distributions of a container, and an 'eraser' to sterilize the images by adjusting suspicious pixels indicated by the analyzer.
C ′ ← H(C, S) where H ∈ {H lsb , H ddh , H udh }Algorithm 1 Hide, Sanitize, and Evaluate1: procedure SANITIZEANDEVALUATE (C, P, H, R) 2: S ← RandomPermute(C) 3: 4: S ′ ← R(C ′ ) where R ∈ {R lsb , R ddh , R udh } 5: Ĉ ← P(C ′ ) where P ∈ {DM-SUDS, SUDS} 6: Ŝ ← R( Ĉ) where R ∈ {R lsb , R ddh , R udh } 7: mse 1 , psnr 1 , ssim 1 ← CalcImageMetrics(C ′ , Ĉ) 8: mse 2 , psnr 2 , ssim 2 ← CalcImageMetrics(S, Ŝ) 9:▷ Shuffle covers to get secrets ▷ Make containers ▷ Reveal secrets prior to sanitization ▷ Sanitize containers ▷ Reveal secrets post sanitization ▷ Image Preservation ▷ Secret Elimination
Table 1 :1SUDS vs. Diffusion Model Test StatsCompareHMetricNoneSUDSDM-SUDS% Imp.MSE37.69382.33103.5272.92LSBPSNR32.4722.7528.1523.73SSIM0.960.760.9119.74Image PreservationDDHMSE PSNR SSIM119.72 28.46 0.94288.63 23.93 0.8090.18 28.74 0.9168.76 20.10 13.75MSE23.91392.03108.6572.29UDHPSNR34.5822.6227.9323.47SSIM0.970.760.9018.42MSE79.299519.549147.77LSBPSNR29.178.468.65SSIM0.970.010.02SecretMSE86.915231.903300.94EliminationDDHPSNR29.5411.3213.29SSIM0.950.080.21MSE157.0514985.7615201.37UDHPSNR26.756.926.84SSIM0.910.030.03compared to using SUDS (average 17.30% improvement). All three metric values demonstrate that DM-SUDS has better image preservation capabilities compared to sanitization with SUDS.
Table 2 :2DM-SUDS ImageNet Image MetricsCompareMetricDM-SUDSImage PreservationMSE PSNR SSIM68.57 30.21 0.88Secret EliminationMSE PSNR SSIM7664.38 9.60 0.07
			DDH/UDH: https://github.com/ChaoningZhang/Universal-Deep-Hiding
			SUDS Code: https://github.com/pkrobinette/suds-ecai-2023
			Invoke-PSImage: https://github.com/peewpw/Invoke-PSImage
			Diffusion Model: https://github.com/openai/improved-diffusion