Image steganography method based on diffusion model
Patent Information
- Application Number
- CN202211574439.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-12-08
AI Technical Summary
然而这类大容量方法,通常要求载体图像和含密图像要足够接近,额外需要用一个评价标准去约束含密载体的生成使得在训练的模型时收敛较慢
[0032]1本发明实现简单,仅需要训练两个扩散模型,分别作为消息嵌入网络和消息提取网络即可完成训练过程,消息嵌入网络和消息提取网络为相同的结构,只是训练数据不同。
Smart Images

Figure CN116091288B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of deep learning and information security technology, and in particular relates to an image steganography method based on a diffusion model. Background Technology
[0002] Image steganography hides secret information within natural images to covertly transmit messages. Currently, most image steganography methods employ modification strategies to embed secret information into images. This is primarily because images themselves possess high complexity and information redundancy; carefully designed modifications can maintain the naturalness of the image while minimizing detectable anomalies introduced by the modifications to the original natural image. However, with advancements in deep learning-based steganalysis techniques, traditional image steganography faces increasingly serious security threats. In recent years, deep generative models have become a research hotspot in the field of deep learning, particularly those represented by generative adversarial networks (GANs), variational autoencoders (VAEs), and flow-based generative models, which have been widely applied in computer vision. The significant improvement in the ability of generative models to construct natural images provides technical support for realizing image steganography methods based on image synthesis. In recent years, some researchers have utilized generative adversarial networks (GANs), variational autoencoders (VAEs), and flow-based generative models to achieve image steganography. Currently, these methods mainly fall into three categories. The first category utilizes the generator of a GAN model to construct the original image and then embeds the message using traditional steganography methods. Typically, a steganalysis analyzer is introduced to improve the steganalysis resistance of the encrypted image. The second category uses a GAN model or a variational autoencoder (Encoder-DecoderModel) to directly construct the encrypted carrier through encoding or generation, and then trains a separate message extraction network to extract the encrypted message. The third category uses a stream-based generative model to construct a reversible neural network, requiring only one neural network to achieve message embedding and extraction. Among these generative models, the GAN model is considered to have potential training instability and small generation differences due to its adversarial training characteristics. Image steganography based on the GAN model also suffers from these drawbacks, particularly low-quality generated images and low message extraction accuracy. Stream models require specially designed model structures to construct reversible transformations, making implementation relatively complex. Furthermore, generative model-based steganography is also divided into low-embedding-weight steganography and high-capacity steganography, depending on the size of the embedded message. In low-embedding-weight steganography, the message is typically a short string of binary bits. In high-capacity steganography, the secret message is usually an image. Steganography methods based on encoder-decoder networks and stream-based methods can typically encode an image into a carrier image, thus forming a steganographic image similar to the carrier image. The message can then be recovered using a message extraction network.However, such high-capacity methods usually require the carrier image and the dense image to be sufficiently close, and an additional evaluation criterion is needed to constrain the generation of the dense carrier, which makes the convergence slower when training the model. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention proposes an image steganography method based on a diffusion model. This method first trains diffusion models using two different datasets to obtain two diffusion models. Then, it achieves message embedding and extraction by combining the two diffusion models in different sequences. In particular, this method does not require the original carrier as a reference and can directly encode the message image into a dense carrier to achieve high-capacity steganography.
[0004] To achieve the above objectives, this invention provides an image steganography method based on a diffusion model, comprising:
[0005] The diffusion probability model is trained using a real image sample set to obtain an image generation model;
[0006] The images in the real image sample set are embedded into the image generation model to obtain dense images;
[0007] The image generation model is used to extract the cryptic image, obtain the message image, and complete image steganography.
[0008] Optionally, the image generation model includes a first image generation model and a second image generation model;
[0009] Obtaining the image generation model includes:
[0010] The diffusion probability model is trained using a first set of real image samples to obtain a first image generation model; wherein, the first set of real image samples is a set of images of the same type, such as a set of face images.
[0011] The diffusion probability model is trained using a second set of real image samples to obtain a second image generation model; wherein the second set of real image samples is a set of secret images of a different type from the first set of real image samples, such as a set of cat images.
[0012] Optionally, obtaining the dense image includes:
[0013] Select an image from the second real image sample as a secret message, and convert the image as the secret message into first Gaussian noise;
[0014] The first Gaussian noise is input into the first image generation model to obtain the dense image.
[0015] Optionally, acquiring the message image includes:
[0016] The dense image is converted into second Gaussian noise;
[0017] The second Gaussian noise is input into the second image generation model to obtain the message image.
[0018] Optionally, the diffusion probability model includes: an autoencoder sub-model; the autoencoder sub-model adopts a U-Net structure;
[0019] Training the diffusion probability model using a real image sample set includes:
[0020] The autoencoder module is used to estimate the noise ∈ at time t in the real image sample set.
[0021] Optionally, estimating the noise ∈ at time t in the real image sample set using the autoencoder sub-model includes:
[0022] First, a training sample x0 is randomly selected from the real image sample set. Then, a sample t is randomly drawn from 1-T. Next, noise ∈ ~N(0,1) is randomly generated. The generated noise is calculated and input into the diffusion probability model ∈ θ Predicting noise, i.e. T represents the total maximum iteration time, and t represents time t. α t =1-β t , where β t Let x represent the noise variance at time t during the forward diffusion process, and let x0 represent the image data at time t = 0.
[0023] The L2 loss of the generated noise and the predicted noise is calculated, then the gradient is calculated and the network parameters θ are updated until the diffusion probability model converges to obtain the network parameters θ.
[0024] Optionally, the autoencoder sub-model of the U-Net structure is constructed based on a two-stream convolutional structure, while introducing residual connections;
[0025] The U-Net structure combines downsampling and upsampling, and employs remote jumpers;
[0026] The U-Net structure includes a residual module and a self-attention mechanism module; wherein the residual module introduces a temporal embedding vector.
[0027] Optionally, inputting the first Gaussian noise into the first image generation model includes:
[0028] The first Gaussian noise is input into the first image generation model, and the first image generation model is iterated over a preset number of iteration steps.
[0029] Optionally, iterating the first image generation model includes:
[0030] First, the first image generation model is used to predict noise. Then, the mean of the conditional distribution is calculated. Finally, the mean plus the standard deviation is multiplied by a random noise z, where z ~ N(0, 1), to obtain the data x. t-1 ,Right now Repeat the preset number of iterations until t=0 to complete the generation of new samples; where α t =1-β t , where β t Let x represent the noise variance at time t during the forward diffusion process. t Let be the image data after adding noise at time t, ∈ θ For self-encoding sub-model, t is the iteration time, σ t Let be the variance parameter of the Gaussian distribution at time t.
[0031] Compared with the prior art, the present invention has the following advantages and technical effects:
[0032] 1. This invention is simple to implement. It only requires training two diffusion models, which serve as the message embedding network and the message extraction network, respectively, to complete the training process. The message embedding network and the message extraction network have the same structure, only the training data is different.
[0033] 2. This invention enables direct encoding of message images into encrypted carriers, thereby avoiding the constraint of using the original carrier image as a reference, thus simplifying the message embedding process and enabling cross-category image generation from message images to encrypted images.
[0034] 3. This invention directly uses images as messages, achieving large-capacity message embedding. At the same time, due to the strong stability of the diffusion model training, the generated dense images have high quality. Attached Figure Description
[0035] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0036] Figure 1 This is a schematic diagram of an image steganography method based on a diffusion model according to an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of the basic process framework of the diffusion model in an embodiment of the present invention;
[0038] Figure 3 In the diffusion model of this invention, a Unet network is used to simulate noise ∈θ A schematic diagram. Detailed Implementation
[0039] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0040] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0041] Example
[0042] In the field of generative models, diffusion models (DM) have emerged. Inspired by nonequilibrium thermodynamics, diffusion models first define a diffusion process based on Markov chains, that is, slowly adding random noise to the data until the data becomes Gaussian noise, and then iteratively learning the reverse diffusion process to gradually transform the noise into the desired data sample. This model views the generation process as a step-by-step iterative denoising process, thus only requiring a simple neural network model to simulate Gaussian noise each time, ensuring the stability of model training. To further improve the generation efficiency and quality of dense carriers and broaden the implementation methods of image steganography based on generative models, this invention proposes a novel high-capacity image steganography method based on diffusion models. This method first trains diffusion models using two types of datasets respectively, obtaining two diffusion models. Then, the two diffusion models are combined in different sequences to achieve message embedding and extraction. In particular, this method does not require the original carrier as a reference; it can directly encode the message image into a dense carrier to achieve high-capacity steganography.
[0043] like Figure 1 As shown, this embodiment provides an image steganography method based on a diffusion model, including:
[0044] S1 Training Phase: Train a diffusion probability model as a message embedding network in the message embedding process.
[0045] S11: Utilizing a large set of real image samples I emb and the diffusion probability model DM emb Training is performed to obtain the image generator DM. emb,θ , where θ are the parameters of the generative model;
[0046] S12: Utilizing a large set of real image samples I ext and the diffusion probability model DM extTraining is performed to obtain the image generator DM. ext,ρ , where ρ are the parameters of the generative model;
[0047] S2 Message Embedding Stage: Encodes the message image into a encrypted carrier.
[0048] S21: From image sample set I ext Select one image as the secret message M in The message is transformed into Gaussian noise Z by gradually adding Gaussian noise. in .
[0049] S22: Gaussian noise Z in The input is fed into a pre-trained message embedding network, i.e., the diffusion model DP. emb In this way, a dense image I is generated. stego .
[0050] S3 Message Extraction Stage: Extract message images from the encrypted carrier.
[0051] S31: From the dense carrier I stego It is transformed into Gaussian noise Z by gradually adding Gaussian noise. out .
[0052] S32: Gaussian noise Z out The input is fed into the trained message extraction network, i.e., the diffusion model DM. ext In this way, message image M is generated. out .
[0053] It should be noted that the second set of real image samples is the real image sample set I. ext Typically, when a secret message is sent, such as a secret image, multiple identical-looking images can be generated by modifying a single secret image with minor noise. These images form a second set of real image samples, all of which can serve as secret messages. The first sample set is the real image sample set I. emb The training set used to generate a specific type of sample can be any type of image set, but it is required that this image set typically contains only one type of sample, such as a set of face images. The diffusion model trained on the first set of real image samples will be used to transform the secret image into a type of image that is indistinguishable from the images in the first set of real images, such as transforming it into a face image.
[0054] Furthermore, the diffusion model described in this embodiment, as referenced... Figure 2As shown, the DM model training phase is divided into two parts: a forward (noise-adding) diffusion process and a reverse diffusion (denoising) process. The model parameters are trained during the reverse diffusion process. Specifically, the diffusion process is a gradual addition of noise to the image; it is a Markov process, which can be represented as ω(xt|xt-1), i.e., given x... t-1 Under the condition, x t Follow the mean The variance is β t I follows a normal distribution, where {β} t} is the variance β at each step. t ∈(0,1). The core objective of the backdiffusion process is to generate an image by repeatedly sampling from any noisy image. However, it is difficult to estimate q(x). t-1 |x t Therefore, a distribution p needs to be estimated using a neural network. θ (x t-1 |x t To approximate q(x) t-1 |x t In the DM model, an autoencoder with a U-Net structure is actually used. θ We use this to estimate the noise ∈ at time t, where θ is the parameter of the autoencoder.
[0055] During the training phase, a real image x0 and a Gaussian noise ∈ are used to train the model ∈ θ The parameter θ. The basic process is to first randomly select a training sample x0, then randomly sample a t from 1-T, then randomly generate noise ∈ ~N(0,1), calculate the generated noisy data and input it into the network ∈ θ Predicting noise, i.e. in, α t =1-β t Calculate the L2 loss of the generated noise and the predicted noise, then calculate the gradient and update the network parameters θ until the model converges to obtain the parameters θ.
[0056] The sampling phase occurs after model training is complete, iteratively generating carrier images through T iterations. Specifically, it starts with random noise x... T ~N(0,1), set the number of iterations T, and then perform stepwise iterations. The iteration process uses the trained network to predict noise ∈ θ (x t Then, calculate the mean of the conditional distribution, and then multiply the mean plus the standard deviation by a random noise z, where z ~ N(0,1), to obtain the data x. t-1 ,Right now Repeat the T-step iteration until t=0 to complete the generation of a new sample. In this embodiment, T=1000, β t Set to start from β1 = 10 -4 to β T A linearly increasing sequence with a value of 0.02.
[0057] Specifically, the dataset used for pre-training the diffusion probability model is CIFAR10, a small image dataset for pattern recognition created by Alex Krizhevsky and Ilya Sutskever. This dataset contains RGB color images for 10 categories, each image is 32×32 pixels in size, and contains 50,000 training images and 10,000 test images.
[0058] Furthermore, in the DM model, the noise is estimated by employing a U-Net-structured autoencoder, as shown in the reference... Figure 3 As shown, this model follows a two-stream (downward and downward + right) convolutional structure and introduces residual connections. First, the architecture combines downsampling and upsampling, allowing the network's internal components to operate on a larger spatial scale, improving computational efficiency. Second, the architecture employs long jumpers, ensuring that every Kth layer provides direct input to the (Kk)th layer, where K is the total number of layers in the network. The network is divided into a six-layer sequence, with most sequences separated by downsampling or upsampling. The U-Net used in the diffusion model DM contains two residual blocks at each step, and some steps also incorporate self-attention modules to enhance the network's global modeling capabilities. Furthermore, the diffusion model actually requires T noise prediction models; in practice, a time embedding vector is typically added to encode the time-series information into the network, such as... Figure 3 As shown, temporal embedding vectors are introduced in each residual block, so only one shared U-Net model needs to be trained.
[0059] Furthermore, the noise addition process for the message image and the dense image in S21 and S31 is also defined as a Markov process. Similarly, the noisy image is obtained after T noise superpositions, which can be represented as p. noise (x t |x t-1 ), that is, given x t-1 Under the condition, x t Follow the mean The variance is β t_noiseThe normal distribution of I. Specifically, in this scheme, T = 1000, β t_noise Set to start from β1 = 10 -4 to β T A linearly increasing sequence with a value of 0.02.
[0060] The beneficial effects of this embodiment are:
[0061] 1. This embodiment is simple to implement. It only requires training two diffusion models, which serve as the message embedding network and the message extraction network, respectively, to complete the training process. The message embedding network and the message extraction network have the same structure, only the training data is different.
[0062] 2. This embodiment can realize the direct encoding of message images into encrypted carriers, thereby avoiding the constraint of using the original carrier image as a reference, thus simplifying the message embedding process and enabling cross-category image generation from message images to encrypted images.
[0063] 3. In this embodiment, the image is directly used as the message, which realizes large-capacity message embedding. At the same time, due to the strong stability of the diffusion model training, the generated dense image has high quality.
[0064] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An image steganography method based on a diffusion model, characterized in that, include: The diffusion probability model is trained using a real image sample set to obtain an image generation model; The images in the real image sample set are embedded into the image generation model to obtain dense images; The image generation model is used to extract the cryptic image to obtain the message image, thus completing image steganography; The image generation model includes a first image generation model and a second image generation model; Obtaining the image generation model includes: The diffusion probability model is trained using a first set of real image samples to obtain a first image generation model; wherein, the first set of real image samples is a set of images of the same type. The diffusion probability model is trained using a second set of real image samples to obtain a second image generation model; wherein, the second set of real image samples is a set of secret images of a different type from the first set of real image samples. Obtaining the dense image includes: Select an image from the second real image sample as a secret message, and convert the image as the secret message into first Gaussian noise; The first Gaussian noise is input into the first image generation model to obtain the dense image; Obtaining the message image includes: The dense image is converted into second Gaussian noise; The second Gaussian noise is input into the second image generation model to obtain the message image; The diffusion probability model includes: an autoencoder sub-model; the autoencoder sub-model adopts a U-Net structure; Training the diffusion probability model using a real image sample set includes: The autoencoder sub-model is used to analyze the noise at time t in the real image sample set. Make an estimate; The autoencoder sub-model is used to analyze the noise at time t in the real image sample set. The estimation includes: First, randomly select a training sample from the set of real image samples. , and then from Randomly sample one Then, random noise is generated. Calculate the noise currently generated and input it into the diffusion probability model. Predicting noise, i.e. , Let t represent the total iteration time. , ,in This represents the noise variance at time t during the forward diffusion process. This represents the image data at time t=0; Calculate the L2 loss for the generated noise and the predicted noise, then calculate the gradient and update the network parameters. Until the diffusion probability model converges to obtain the network parameters. .
2. The image steganography method based on the diffusion model according to claim 1, characterized in that, The autoencoder sub-model of the U-Net structure is built on a two-stream convolutional structure and introduces residual connections. The U-Net structure combines downsampling and upsampling, and employs remote jumpers; The U-Net structure includes a residual module and a self-attention mechanism module; wherein the residual module introduces a temporal embedding vector.
3. The image steganography method based on the diffusion model according to claim 1, characterized in that, Inputting the first Gaussian noise into the first image generation model includes: The first Gaussian noise is input into the first image generation model, and the first image generation model is iterated over a preset number of iteration steps.
4. The image steganography method based on the diffusion model according to claim 3, characterized in that, Iterating the first image generation model includes: First, the first image generation model is used to predict noise. Then, the mean of the conditional distribution is calculated. Finally, the mean plus the standard deviation is multiplied by a random noise level. ,in , obtain data ,Right now Repeat the preset number of iterations until t=0 to complete the generation of a new sample; wherein, ,in This represents the noise variance at time t during the forward diffusion process. The image data at time t is after adding noise. For self-encoding sub-model, , For iteration time, Let be the standard deviation parameter of the Gaussian distribution at time t.