Image steganalysis method based on reversible neural network and electronic device
By combining multi-layer reversible neural networks and residual augmentation strategies, the problems of insufficient information recovery and generalization ability in existing image steganalysis methods are solved, thus achieving interpretability and efficient detection of image steganalysis.
Patent Information
- Application Number
- CN202511655424.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-11-12
AI Technical Summary
Existing image steganalysis methods are unable to effectively recover hidden information and have insufficient generalization ability, especially in cross-dataset and cross-steganography scenarios where detection performance drops significantly.
An image steganalysis method based on a multilayer reversible neural network is adopted, combined with a residual augmentation strategy. An initial steganalyte is generated by embedding a secret image into a carrier image and subjecting it to random perturbation. The carrier and secret images are then recovered through a reverse recovery process. The network parameters are optimized using the overall loss function to achieve image interpretability and generalization ability.
It can accurately determine whether an image is a steganalysis image and partially recover the hidden information, improving the interpretability of the analysis results, significantly improving the detection performance across datasets and steganalysis methods, and simplifying the training data preparation process.
Smart Images

Figure CN121120355B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of information hiding and digital image processing, and in particular to an image steganalysis method based on an invertible neural network and an electronic device. BACKGROUND
[0002] Image steganography algorithms aim to embed a secret image into a cover image to generate a stego image. The core goal is to achieve high-capacity information embedding and high-concealment secret communication, so it is widely used in secure communication, copyright protection, digital forensics and other fields. Existing image steganography algorithms are mainly divided into two categories: Auto-Encoder (AE) based and Invertible Neural Network (INN) based methods. Among them, the image steganography algorithm based on INN has better comprehensive performance in stego image quality and hidden information recovery effect.
[0003] As a countermeasure to image steganography algorithms, image steganalysis technology can determine whether a given image contains hidden information, which has important research significance for information security. Early image steganalysis methods are mostly based on statistical models, such as detecting steganographic traces by statistical information between adjacent pixels in a region. With the development of deep learning, deep neural networks have been introduced into this field, and a series of end-to-end steganalysis models have emerged. These methods have made some breakthroughs in detection accuracy with the help of large-scale data sets and transfer learning techniques. However, they still have the defects of lack of explainability and insufficient generalization ability.
[0004] Chinese patent publication CN117424963A discloses an image steganalysis method based on CNN and Transformer. This method uses a public steganography data set to train an image steganalysis model based on CNN and Transformer, and uses the trained steganalysis model to determine whether a given image is a stego image. This method has the following defects: (1) it can only determine whether a given image is a stego image, and cannot recover or explain the information hidden in it, resulting in a lack of explainability in the discrimination process; (2) it relies on the training of carrier images and pre-generated stego images, and the training sample size is limited and the diversity of steganography methods in the training set is insufficient, resulting in a significant decline in the detection performance of the trained image steganalysis model in cross-dataset or cross-method scenarios, and insufficient generalization ability. SUMMARY
[0005] The present application provides a reversible neural network-based image steganalysis method and electronic equipment, which can determine whether the image to be analyzed is a stego image, recover hidden information in the stego image, and greatly improve the generalization ability across datasets and across steganography methods through residual augmentation strategy.
[0006] To solve the above problems, the present application adopts the following technical solutions:
[0007] The reversible neural network-based image steganalysis method of the present application comprises the following steps:
[0008] S1: input carrier image and secret image into a multi-layer reversible neural network, the multi-layer reversible neural network embeds the secret image into the carrier image , and outputs an initial stego image ;
[0009] S2: process the initial stego image using a residual augmentation strategy to obtain a final stego image ;
[0010] S3: input the final stego image and the carrier image into the multi-layer reversible neural network respectively with random Gaussian noise for reverse recovery, and the multi-layer reversible neural network outputs recovered secret image and carrier image respectively;
[0011] S4: calculate the overall loss function and update the multi-layer reversible neural network parameters;
[0012] S5: repeat steps S1 to S4 until the multi-layer reversible neural network converges and the training is completed;
[0013] S6: input the image to be analyzed and random Gaussian noise into the trained multi-layer reversible neural network, and the multi-layer reversible neural network outputs a recovered image, and determines whether the image to be analyzed is a stego image according to the recovered image.
[0014] As a preferred embodiment, the step S1 comprises the following steps:
[0015] discrete wavelet transform is performed on the carrier image and the secret image respectively, and the carrier image and the secret image are decomposed into low-frequency subbands and high-frequency subbands respectively, and then input into the multi-layer reversible neural network, and the multi-layer reversible neural network embeds the secret image Embedding carrier image The result of the multi-layer reversible neural network output is subjected to inverse discrete wavelet transform to obtain the initial stego image .
[0016] As a preference, the final stego image The calculation formula is as follows:
[0017] ,
[0018] wherein, is a coefficient randomly sampled from a uniform distribution [0, 1], represents Hadamard product.
[0019] As a preference, the step S3 comprises the following steps:
[0020] The final stego image is subjected to discrete wavelet transform and input together with random Gaussian noise into the multi-layer reversible neural network for reverse recovery, and the multi-layer reversible neural network outputs a recovery result, and the recovery result is subjected to inverse discrete wavelet transform to obtain the secret image ;
[0021] The carrier image is subjected to discrete wavelet transform and input together with random Gaussian noise into the multi-layer reversible neural network for reverse recovery, and the multi-layer reversible neural network outputs a recovery result, and the recovery result is subjected to inverse discrete wavelet transform to obtain the carrier image .
[0022] As a preference, the random Gaussian noise , the random Gaussian noise are different noises sampled from the same Gaussian distribution.
[0023] As a preference, when the image, the random Gaussian noise are input into the multi-layer reversible neural network for reverse recovery, the iterative formula of the i-th layer reversible neural network is as follows:
[0024] ,
[0025] ,
[0026] wherein, is the noise reversely output by the i-th layer reversible neural network, is the noise reversely input by the i-th layer reversible neural network, is the image reversely output by the i-th layer reversible neural network, is the image reversely input by the i-th layer reversible neural network, , , is a non-linear function of a multi-layer reversible neural network, is a Sigmoid activation function.
[0027] As a preference, the formula of the total loss function is as follows:
[0028] ,
[0029] ,
[0030] ,
[0031] ,
[0032] ,
[0033] wherein, is a total loss function, , , , is a hyper-parameter, represents a mean square error, represents a low-frequency wavelet sub-band extraction operation.
[0034] As a preference, the method for judging whether the image to be analyzed is a stego image according to the recovered image is as follows: calculating the similarity between the recovered image and the image to be analyzed, if the similarity is less than or equal to a set threshold value, it indicates that the image to be analyzed is a stego image, if the similarity is greater than the set threshold value, it indicates that the image to be analyzed is not a stego image.
[0035] As a preference, the similarity is represented by a peak signal-to-noise ratio or a structural similarity index.
[0036] An electronic device of the present application comprises a memory and a processor, and the memory stores executable code, when the executable code is executed by the processor, the above-mentioned method is executed.
[0037] The present application has the following advantages: (1) the recovered image can be output according to the input image to be analyzed, and whether the image to be analyzed is a stego image can be judged according to the similarity between the image to be analyzed and the recovered image, if it is a stego image, the recovered image can partially restore the hidden secret image, making the analysis result more intuitive and credible, and improving the explainability of the steganalysis process. (2) the multi-layer reversible neural network is used to realize the secret image embedding into a carrier image , so as to generate an initial stego image , and the residual augmentation strategy is used to process the initial stego image and the carrier image randomly perturb the differences, simulate diversified steganography generation methods, thereby improving the diversity of steganographic image samples, and significantly improve the generalization of the method in the cross-dataset and cross-steganography method scenarios. (3) Without constructing large-scale steganographic image-carrier image pairs in the training stage, the data preparation process is simplified, and the dependence on the training dataset is reduced. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 is a flowchart of an embodiment;
[0039] Figure 2 is a schematic diagram of images used for training in the present embodiment;
[0040] Figure 3 is a schematic diagram of the effect of the present embodiment method on steganographic analysis of steganographic images and output of recovered images;
[0041] Figure 4 is a schematic diagram of the effect of the present embodiment method on steganographic analysis of steganographic images obtained using different steganography methods and output of recovered images. DETAILED DESCRIPTION
[0042] The technical solutions of the present application will be further specifically described below by embodiments, and in conjunction with the drawings.
[0043] Embodiment: A reversible neural network-based image steganographic analysis method of the present embodiment, as shown in Figure 1 , includes the following steps:
[0044] S1: Discrete wavelet transform is performed on the carrier image and the secret image , respectively, and the carrier image and the secret image are decomposed into low-frequency subbands and high-frequency subbands, respectively, and then input into a multi-layer reversible neural network. The multi-layer reversible neural network embeds the secret image into the carrier image , and the output of the multi-layer reversible neural network is subjected to inverse discrete wavelet transform to obtain an initial steganographic image .
[0045] Taking the i-th layer reversible neural network as an example, the input-output mapping relationship of a single layer thereof can be represented as:
[0046] ,
[0047] ,
[0048] wherein, is the carrier image input into the i-th layer reversible neural network, the secret image input to the i-th layer of the reversible neural network, the carrier image output by the i-th layer of the reversible neural network, the secret image output by the i-th layer of the reversible neural network, denotes the Hadamard product, a non-linear function of the multi-layer reversible neural network, a Sigmoid activation function.
[0049] S2: The initial stego image is processed by using a residual augmentation strategy to obtain a final stego image
[0050] The calculation formula of the final stego image is as follows:
[0051]
[0052] wherein, is a coefficient randomly sampled from a uniform distribution [0, 1], denotes the Hadamard product.
[0053] The residual augmentation strategy is used to randomly disturb the difference between the initial stego image and the carrier image , so as to simulate the steganographic mode of different steganographic methods, so that the final stego image generated has more diverse feature distribution in the training process, thereby improving the steganalysis performance in the cross-dataset and cross-steganographic method scenarios, and significantly improving the generalization ability.
[0054] S3: The final stego image is input into a multi-layer reversible neural network together with random Gaussian noise after discrete wavelet transform, the multi-layer reversible neural network outputs a recovery result, and the recovery result is subjected to inverse discrete wavelet transform to obtain a secret image
[0055] Taking the i-th layer of the reversible neural network as an example, the iterative formula thereof is as follows:
[0056]
[0057]
[0058] wherein, is the noise output by the i-th layer of the reversible neural network in reverse, is the noise input by the i-th layer of the reversible neural network in reverse, is the image output by the i-th layer of the reversible neural network in reverse, The image is the inverse input to the i-th layer of the reversible neural network.
[0059] Carrier image After performing discrete wavelet transform and random Gaussian noise The images are input into a multilayer reversible neural network for inverse reconstruction. The network outputs the reconstruction result, which is then subjected to inverse discrete wavelet transform to obtain the carrier image. Random Gaussian noise Random Gaussian noise They are different noises sampled from the same Gaussian distribution;
[0060] Taking the i-th layer of the invertible neural network as an example, its iterative formula is:
[0061] ,
[0062] ,
[0063] in, The noise is the inverse output of the i-th layer of the reversible neural network. The noise is the inverse input to the i-th layer of the reversible neural network. The image is the reverse output of the i-th layer of the reversible neural network. The image is the inverse input of the i-th layer of the reversible neural network.
[0064] S4: Calculate the overall loss function of the multilayer invertible neural network and update the parameters of the multilayer invertible neural network based on gradient descent (e.g., Adam optimization algorithm).
[0065] The formula for the overall loss function is as follows:
[0066] ,
[0067] ,
[0068] ,
[0069] ,
[0070] ,
[0071] in, For the overall loss function, , , , For hyperparameters, Indicates mean square error. This indicates the low-frequency wavelet subband extraction operation.
[0072] denotes the final stego image similarity loss between the carrier image denotes the final stego image , the carrier image consistency loss of low-frequency subband after wavelet transform denotes the secret image recovery loss denotes the carrier image recovery loss. During the training process, the three aspects of stego image quality, secret image recovery and carrier image recovery are balanced and optimized, so that the method of the embodiment can effectively recover the steganographic information and accurately perform steganalysis while realizing high concealment image hiding.
[0073] S5: repeat steps S1 to S4 until the multi-layer reversible neural network converges, and the training is completed.
[0074] S6: input the to-be-analyzed image after discrete wavelet transform and random Gaussian noise into the trained multi-layer reversible neural network, and the multi-layer reversible neural network outputs a recovery result. The recovery result is subjected to inverse discrete wavelet transform to obtain a recovered image. Whether the to-be-analyzed image is a stego image is determined according to the recovered image.
[0075] When the image and the random Gaussian noise are input into the multi-layer reversible neural network for reverse recovery, the iteration formula of the i-th layer reversible neural network is as follows:
[0076] ,
[0077] ,
[0078] wherein, is the noise output by the i-th layer reversible neural network in reverse, is the noise input by the i-th layer reversible neural network in reverse, is the image output by the i-th layer reversible neural network in reverse, is the image input by the i-th layer reversible neural network in reverse.
[0079] The method for determining whether the to-be-analyzed image is a stego image according to the recovered image is as follows: the similarity between the recovered image and the to-be-analyzed image is calculated. If the similarity is less than or equal to a set threshold, it indicates that the to-be-analyzed image is a stego image. If the similarity is greater than the set threshold, it indicates that the to-be-analyzed image is not a stego image. The similarity is expressed by peak signal-to-noise ratio or structural similarity index.
[0080] The discriminant function is:
[0081] ,
[0082] wherein, is a binary discriminant function, is a similarity measure function, represents a reversible neural network in reverse, X is an image to be analyzed, D is random Gaussian noise, is a threshold value. When the input image to be analyzed is a carrier image, the similarity between the recovered image and the image to be analyzed is high; when the input image to be analyzed is a stego image, the similarity is significantly reduced.
[0083] In this scheme, the secret image is first embedded in the carrier image to generate an initial stego image Then, through the residual augmentation strategy, the difference between the initial stego image and the carrier image is randomly disturbed to simulate the steganographic mode of different steganographic methods, so that the final stego image generated has more diverse feature distribution in the training process. Finally, the final stego image and the carrier image are input into the multi-layer reversible neural network with random Gaussian noise to recover in reverse. In the training process, the overall loss function is used to balance and optimize the quality of the stego image, the recovery of the secret image, and the recovery of the carrier image, so that the method can effectively recover the stego information and accurately perform steganalysis while achieving high concealment image hiding.
[0084] The method not only can determine whether the input image to be analyzed is a stego image, but also can partially restore the hidden secret image, making the analysis result more intuitive and credible, and improving the explainability of the steganalysis process. The method does not need to construct a large number of stego image-carrier image pairs in the training stage, simplifying the data preparation process and reducing the dependence on the training data set.
[0085] For example, in the training stage of the multi-layer reversible neural network, the animal type image shown in Figure 2 is used as the carrier image and the secret image for training, and the trained multi-layer reversible neural network is obtained. Figure 3 The secret image in Figure 3 is the information hidden in the upper stego image, and the three stego images in Figure 3 are input into the multi-layer reversible neural network for steganalysis. The multi-layer reversible neural network outputs the corresponding recovered image, and it can be seen that the similarity between the recovered image and the corresponding stego image is low, so it can be determined that the image input into the multi-layer reversible neural network is a stego image. It can be seen that the recovered image partially restores the information of the secret image hidden in the stego image, verifying that the steganalysis result of the embodiment is intuitive and credible, improving the explainability of the steganalysis process, and the detection performance is still effective in the cross-dataset and cross-method scenarios.
[0086] By way of illustration:
[0087] The training data set contains 30000 images, from which image pairs are randomly sampled, each image pair including 1 carrier image and 1 secret image for hiding The resolution of the carrier image , the secret image is 512x512, and the multi-layer reversible neural network is trained using these image pairs, with the value of set to 1.0, set to 10.0, set to 5.0, set to 5.0, the multi-layer reversible neural network is trained using the steps S1 to S5 of the embodiment, and a trained multi-layer reversible neural network is obtained. The images on the public data sets DIV2K, COCO, and ImageNet are steganographically analyzed using the step S6 method, the similarity is represented by the peak signal-to-noise ratio, and the threshold is 25.0, the entire process is recorded as the ZSIIS method. The steganographic analysis accuracy of the ZSIIS method and other existing steganographic analysis methods on the public data sets DIV2K, COCO, and ImageNet is shown in Tables 1 to 3 as follows:
[0088] Table 1. Steganographic analysis accuracy on the public data set DIV2K
[0089]
[0090] Table 2. Steganographic analysis accuracy on the public data set COCO
[0091]
[0092] Table 3. Steganographic analysis accuracy on the public data set ImageNet
[0093]
[0094] The Weng method, HiNet method, LiDiNet method, StegFormer method, and StegMamba method in Tables 1 to 3 are existing single-image steganographic methods, i.e., hiding 1 secret image into 1 carrier image; the DeepMIH method and StegFormer method are existing multi-image steganographic methods, e.g., the DeepMIH method hides 3 secret images into 1 carrier image, and the StegFormer method hides 5 secret images into 1 carrier image; the carrier images and secret images are taken from the corresponding public data sets.
[0095] The ZSIIS method is the method of the embodiment. The XuNet method, the YeNet method, the SRNet method, the StegNet method, the ZhuNet method, and the SiaStegNet method are existing steganalysis methods, which are obtained by training using the same training samples. The training samples are obtained by inputting the randomly sampled image pairs in the training process of the ZSIIS method into the trained multi-layer reversible neural network of the ZSIIS method to perform image steganography, and the initial stego image and the corresponding carrier image output by the trained multi-layer reversible neural network constitute the training samples.
[0096] As can be seen from Tables 1 to 3, the steganalysis accuracy of the method of the embodiment for the stego images generated by various existing image steganography methods is significantly higher than that of other existing steganalysis methods. For example, as shown in Table 3, on the public dataset ImageNet, the highest steganalysis accuracy of other existing steganalysis methods for the stego images generated by the HiNet method is only 63.06% of the StegNet method, while the steganalysis accuracy of the method of the embodiment is 87.28%, which is significantly higher than that of the existing steganalysis methods. As can be seen from Tables 1 to 3, the steganalysis accuracy of the method of the embodiment in the multi-image hiding scene is still significantly higher than that of other existing steganalysis methods, maintaining excellent steganalysis performance.
[0097] The difference between the ZSIIS w / o RA method and the ZSIIS method is that the residual augmentation strategy is not used, and the rest of the methods are consistent with the ZSIIS method. That is, the last row in Tables 1, 2, and 3 shows the steganalysis accuracy of the method of the embodiment without using the residual augmentation strategy. It can be seen that the generalization performance (especially in the cross-method scene) is significantly reduced.
[0098] The XuNet method, the YeNet method, the SRNet method, the StegNet method, the ZhuNet method, and the SiaStegNet method all need to pre-construct large-scale training samples (i.e., stego image-carrier image pairs) in the training stage, while the method of the embodiment does not need to construct training samples (i.e., zero samples) in the training stage, simplifying the data preparation process and reducing the dependence on the training dataset.
[0099] The method of the embodiment performs steganalysis on the stego images obtained by the Weng method, the HiNet method, and the LiDiNet method to output the recovered images, as shown in Figure 4 Figure 4 In the figure, the left side is the carrier image and the secret image, and the right side is the first row of three images, which are the steganographic images obtained by embedding the secret image into the carrier image using the Weng method, the HiNet method, and the LiDiNet method. The second row of three images on the right side are the recovered images output by the steganographic analysis of the first row of three steganographic images using the method of the embodiment. From the recovery results, it can be seen that, in the zero-sample scenario, the method of the embodiment can successfully recover part of the secret image from the steganographic image, thereby realizing zero-sample interpretable image steganographic analysis.
[0100] An electronic device of the embodiment includes a memory and a processor, and the memory stores executable code. When the executable code is executed by the processor, the method described above is performed.
Claims
1. A method of image steganalysis based on reversible neural networks, characterized in that, The method comprises the following steps: S1: inputting a carrier image and a secret image a multi-layer reversible neural network, the multi-layer reversible neural network embedding the secret image into the carrier image , outputting an initial stego image ; S2: using residual augmentation strategy to the initial stego image processing to obtain the final stego image ; the final stego image The calculation formula is as follows: , wherein, is a coefficient randomly sampled from the uniform distribution [0, 1], denotes a Hadamard product; S3: the final stego image , carrier image respectively match the random Gaussian noise input multi-layer reversible neural network for reverse recovery, and the multi-layer reversible neural network respectively outputs the recovered secret image , carrier image ; S4: calculating a total loss function, updating parameters of the multi-layer reversible neural network; S5: repeatedly performing steps S1 to S4 until the multi-layer reversible neural network converges, and the training is completed; S6: inputting the image to be analyzed and random Gaussian noise into the trained multi-layer reversible neural network, and outputting a restored image from the multi-layer reversible neural network, and judging whether the image to be analyzed is a stego image according to the restored image.
2. The method of claim 1, wherein the method is based on a reversible neural network. The step S1 comprises the following steps: The carrier image , the secret image respectively, the carrier image , the secret image are decomposed into low frequency subbands and high frequency subbands respectively, and then input into the multi-layer reversible neural network, the multi-layer reversible neural network embeds the secret image into the carrier image , and the result output by the multi-layer reversible neural network is subjected to inverse discrete wavelet transform to obtain the initial stego image .
3. The method of claim 1, wherein the method is based on a reversible neural network. The step S3 comprises the following steps: steganographic image after discrete wavelet transform and random Gaussian noise input together into a multi-layer reversible neural network for reverse recovery, the multi-layer reversible neural network outputs a recovery result, and the recovery result is subjected to inverse discrete wavelet transform to obtain a secret image ; inputting the carrier image and the noise image into a multi-layer reversible neural network to perform reverse recovery, the multi-layer reversible neural network outputting a recovery result, the recovery result being subjected to inverse discrete wavelet transform to obtain the carrier image after discrete wavelet transform and random Gaussian noise together input a multi-layer reversible neural network for reverse recovery, the multi-layer reversible neural network outputting a recovery result, the recovery result being subjected to inverse discrete wavelet transform to obtain the carrier image .
4. The method of claim 3, wherein the method is based on a reversible neural network. The random Gaussian noise , random Gaussian noise are different noises sampled from the same Gaussian distribution.
5. The method of claim 1, wherein the method is based on a reversible neural network. When the image and the random Gaussian noise are input into the multi-layer reversible neural network for reverse restoration, the iteration formula of the i-th layer of the reversible neural network is as follows: , , wherein, is the noise of the inverse output of the i-th layer reversible neural network, is the noise of the inverse input of the i-th layer reversible neural network, is the image of the inverse output of the i-th layer reversible neural network, is the image of the inverse input of the i-th layer reversible neural network, , , is a non-linear function of the multi-layer reversible neural network, is a Sigmoid activation function.
6. The method of claim 1, wherein the method is based on a reversible neural network. The formula of the total loss function is as follows: , , , , , wherein, is the total loss function, , , , is a hyperparameter, denotes the mean squared error, denotes the low-frequency wavelet subband extraction operation.
7. The method of claim 1, wherein the method further comprises: The method for judging whether the image to be analyzed is a stego image according to the restored image is as follows: calculating the similarity between the restored image and the image to be analyzed, if the similarity is less than or equal to a set threshold, it is indicated that the image to be analyzed is a stego image, and if the similarity is greater than the set threshold, it is indicated that the image to be analyzed is not a stego image.
8. The method of claim 7, wherein the method further comprises: The similarity is expressed by a peak signal-to-noise ratio or a structural similarity index.
9. An electronic device, comprising: The device comprises a memory and a processor, and the memory stores executable code, and when the executable code is executed by the processor, the method according to any one of claims 1 to 8 is executed.
Citation Information
Patent Citations
Image steganalysis method based on CNN and Transform
CN117424963A