HEVC inter-frame video steganalysis method based on transfer learning mechanism
By constructing a HEVC inter-frame video steganalysis method based on transfer learning mechanism and combining it with deep neural network technology, the detection challenge of HEVC video steganalysis in low-embedding scenarios is solved, achieving efficient detection of PU steganalysis and improving detection accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NINGBO UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2025-08-12
- Publication Date
- 2026-07-21
AI Technical Summary
Existing HEVC video steganalysis methods struggle to effectively detect steganalysis algorithms in low-embedding scenarios, especially in PU steganalysis, where the lack of deep learning technology results in insufficient detection accuracy and robustness.
We employ a HEVC inter-frame video steganalysis method based on transfer learning, combining the HEVC standard coding structure with deep neural network technology. By constructing a video steganalysis neural network, we utilize PU distribution images for feature extraction and classification, including a preprocessing module, a local feature extraction module, and a global feature enhancement module. We use the ResNet18 architecture and the Swin Transformer block for supervised training to improve detection performance.
It significantly improves the detection accuracy and robustness of weak steganalytic perturbations in the compressed domain, and can adapt to video steganalysis under different resolutions, embedding strategies and compression parameters, especially showing excellent detection performance in low embedding rate scenarios.
Smart Images

Figure CN121056573B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of HEVC technology and artificial intelligence, and relates to a video steganalysis method, and more particularly to an HEVC inter-frame video steganalysis method based on a transfer learning mechanism. Background Technology
[0002] With the popularization of the internet and the widespread application of digital media, the methods and efficiency of information transmission have undergone qualitative changes, and the information security situation has become increasingly severe. Information hiding technology, as an important research direction in the field of information security, mainly includes steganography and steganalysis, and has broad application prospects in the military, commercial, and industrial sectors. Steganography is an information hiding technology that achieves covert communication by embedding hidden information in multimedia data in a way that does not cause perceptible changes, thereby improving the security of covert communication. However, steganography is also easily exploited by criminals or hostile forces, causing serious security impacts. Therefore, to curb the harm caused by the illegal use of steganography, steganalysis technology has emerged. As a countermeasure to steganography, steganalysis technology analyzes the statistical characteristics of the carrier to determine whether there is hidden information in the carrier, and can even estimate the amount of hidden information embedded and obtain the content of the hidden information. Research on steganalysis is of great significance for preventing the leakage of confidential information, combating terrorism and criminal activities, and maintaining internet security, and has received high attention from governments and research institutions around the world.
[0003] In the field of digital video, due to the massive amount of video data, it is usually transmitted in compressed form over public transmission channels. H.265 / HEVC (High Efficiency Video Coding), as the latest generation of video compression coding standard, aims to double the compression efficiency compared to H.264 / AVC, playing a crucial role in high-definition and ultra-high-definition video applications. However, compared to steganalysis research in text, image, and audio domains, video steganalysis targeting HEVC transform coefficients is still in its early stages due to the complexity of H.265 / HEVC encoding. Existing research mainly utilizes pixel correlation theory to decode compressed video into the spatial domain and extracts statistical correlation features in the spatial and temporal domains by transferring relevant methods from image steganalysis. These studies essentially belong to manual feature extraction methods, i.e., manually designing algorithms to extract statistical features related to steganalysis. However, due to the differences between compressed video and images, this manual feature extraction method often struggles to adapt to diverse steganalysis algorithms in practical applications, especially in low-embedding scenarios, making it difficult to effectively detect steganalysis algorithms.
[0004] In recent years, the rapid development of deep learning technology has provided new tools for steganalysis. By building more complex and powerful models, deep learning can improve the accuracy and robustness of steganalysis, effectively addressing complex cybersecurity threats. However, there is still a lack of work on HEVC video steganalysis combining deep learning technology, especially in video steganalysis targeting PU (Prediction Unit) steganography. Therefore, researching a deep learning-based HEVC video steganalysis method has significant practical implications. Summary of the Invention
[0005] The technical problem to be solved by this invention is to provide a HEVC inter-frame video steganalysis method based on transfer learning mechanism. It combines the HEVC standard coding structure with deep neural network technology to perform HEVC encoded video steganalysis, which can improve the detection accuracy and robustness of weak steganalytic perturbations in the compressed domain. At the same time, it has strong adaptability and can adapt to the video steganalysis detection needs under different resolutions, different embedding strategies and different compression parameters. In particular, it can also show excellent detection performance in low embedding rate scenarios.
[0006] The technical solution adopted by this invention to solve the above-mentioned technical problems is as follows: a HEVC inter-frame video steganalysis method based on transfer learning mechanism, characterized by including the following steps: Step 1: Obtain multiple raw video sequences in YUV format; then, use various video steganography methods to steganize each raw video sequence, resulting in multiple steganographic video sequences; next, perform HEVC standard encoding on each raw video sequence and its corresponding steganographic video sequence to obtain the corresponding HEVC encoded video; then, obtain multiple PU distribution images for each HEVC encoded video, and select a preset number of PU distribution images for each HEVC encoded video; furthermore, for each raw video sequence corresponding to the HEVC encoded video, define the selected PU distribution images as raw PU distribution images, and divide these raw PU distribution images into two parts, which are assigned to the training set and validation set respectively; similarly, for each steganographic video sequence corresponding to the HEVC encoded video, define the selected PU distribution images as steganographic PU distribution images, and divide these steganographic PU distribution images into two parts, which are assigned to the training set and validation set respectively; then, perform data augmentation and normalization operations on the raw PU distribution images and steganographic PU distribution images in the training set and validation set respectively, and use the raw normalized PU distribution images and steganographic normalized PU distribution images obtained after normalization as normalized PU distribution images; Step 2: Construct a video steganalysis neural network, which includes a preprocessing module, a local feature extraction module, a global feature enhancement module, and a classification module. The local feature extraction module is based on the ResNet18 architecture, and the global feature enhancement module uses the Swin Transformer block. First, the normalized PU distribution image is input into the preprocessing module to obtain the local perturbation enhancement feature map corresponding to the normalized PU distribution image. Then, the size of the local perturbation enhancement feature map is transformed to meet the input requirements of the local feature extraction module and the global feature enhancement module, respectively, and then input into the local feature extraction module and the global feature enhancement module. The local feature extraction module obtains the corresponding local feature vector, and the global feature enhancement module obtains the corresponding global feature vector. Next, the local feature vector and the global feature vector are concatenated to form a fused feature vector. Finally, the fused feature vector is input into the classification module to obtain a probability vector representing the steganalysis detection result. Step 3: Use the training set and validation set to perform supervised training on the video steganalysis neural network. During the training process, a transfer learning mechanism is used between the local feature extraction module and the global feature enhancement module. In the transfer learning process, the pre-trained weights of the ResNet18 architecture are called as the initial weights of the local feature extraction module, and the pre-trained weights of the SwinTransformer block are called as the initial weights of the global feature enhancement module. After training, the trained video steganalysis neural network is obtained. Step 4: For any acquired test video sequence, perform HEVC standard encoding on the test video sequence to obtain the corresponding test HEVC encoded video. The test video sequence can be either a raw video sequence or a steganalytic video sequence in YUV format. Then, acquire multiple PU distribution images of the test HEVC encoded video and select a preset number of PU distribution images as test PU distribution images. Next, perform data augmentation and normalization operations on the test PU distribution images in sequence to obtain normalized test PU distribution images. Then, input each normalized test PU distribution image corresponding to the test HEVC encoded video into the trained video steganalysis neural network, and output the probability vector corresponding to each normalized test PU distribution image, thus obtaining the corresponding steganalytic detection result. Finally, determine whether the test HEVC encoded video is a steganalytic video based on the steganalytic detection results of all normalized test PU distribution images corresponding to the test HEVC encoded video.
[0007] In step 1, the data augmentation operation includes horizontal flipping, vertical flipping, and brightness perturbation; the normalization process is to normalize the pixels in the image obtained after the data augmentation operation to the [0,1] interval.
[0008] In step 2, the preprocessing module consists of a first convolutional block, a second convolutional block, a third convolutional block, channel attention, spatial attention, and a fourth convolutional block. The first convolutional block receives a normalized PU distribution image of size 1×H×W and extracts low-level local texture features. The second convolutional block receives a feature map of size 32×H×W output from the first convolutional block and extracts mid-level local texture features. The third convolutional block receives a feature map of size 64×H×W output from the second convolutional block and extracts high-level local texture features. The channel attention receives the output of the third convolutional block. The first convolutional block takes a feature map of size 30×H×W and outputs a channel weight vector of size 30. The channel weight vector is multiplied channel by channel by the feature map output by the third convolutional block to obtain a channel weighted feature map of size 30×H×W. The spatial attention receives the channel weighted feature map and generates a spatial attention map of size 1×H×W. The spatial attention map is multiplied element by element by channel weighted feature map to obtain an attention feature map of size 30×H×W. The fourth convolutional block receives the attention feature map and outputs a local perturbation enhancement feature map of size 3×H×W.
[0009] The first convolutional block includes a first convolutional layer, a first batch of normalized layers, and a first ReLU activation layer connected in sequence; the second convolutional block includes a second convolutional layer, a second batch of normalized layers, and a second ReLU activation layer connected in sequence; the third convolutional block includes a third convolutional layer, a third batch of normalized layers, and a Tanh activation layer connected in sequence; and the fourth convolutional block includes a fourth convolutional layer. The first convolutional layer has a 3×3 kernel size, 1 input channel, and 32 output channels; the second convolutional layer has a 3×3 kernel size, 32 input channels, and 64 output channels; the third convolutional layer has a 3×3 kernel size, 64 input channels, and 30 output channels; and the fourth convolutional layer has a 1×1 kernel size, 30 input channels, and 3 output channels.
[0010] In step 2, the local feature extraction module consists of a fifth convolutional block, a max pooling layer, a first residual block, a second residual block, a third residual block, a fourth residual block, a first global average pooling layer, and a first fully connected layer, connected sequentially. The module transforms the 3×H×W local perturbation enhancement feature map output by the fourth convolutional block into a 3×224×224 local perturbation enhancement feature map. The fifth convolutional block receives the 3×224×224 local perturbation enhancement feature map. The max pooling layer receives the 64×(H / 2)×(W / 2) local perturbation enhancement feature map output by the fifth convolutional block. 2) Feature maps; The first residual block receives a feature map of size 64×(H / 4)×(W / 4) from the output of the max pooling layer; The second residual block receives a feature map of size 64×(H / 4)×(W / 4) from the output of the first residual block; The third residual block receives a feature map of size 128×(H / 8)×(W / 8) from the output of the second residual block; The fourth residual block receives a feature map of size 256×(H / 16)×(W / 16) from the output of the third residual block; The first global average pooling layer receives a feature map of size 512×ceil(H / 32)×(W / 32) from the output of the fourth residual block, where ceil() is the floor function; The first fully connected layer receives a feature vector of dimension 512 from the output of the first global average pooling layer, and the first fully connected layer outputs a local feature vector of dimension 256.
[0011] The fifth convolutional block comprises a fifth convolutional layer, a fourth batch normalization layer, and a third ReLU activation layer connected in sequence. The fifth convolutional layer has a kernel size of 7×7, 3 input channels, 64 output channels, and a stride of 2. The max pooling layer has a kernel size of 3×3, 64 input channels, 64 output channels, a stride of 2, and padding of 1. The first residual block has a stride of 1, and the second, third, and fourth residual blocks all have a stride of 2.
[0012] In step 2, the global feature enhancement module consists of a Patch Embed, a first window multi-head self-attention layer, a first downsampling layer, a second window multi-head self-attention layer, a second downsampling layer, a third window multi-head self-attention layer, a third downsampling layer, a fourth window multi-head self-attention layer, a second global average pooling layer, and a second fully connected layer, connected sequentially. It transforms the 3×H×W local perturbation enhancement feature map output by the fourth convolutional block into a 3×224×224 local perturbation enhancement feature map. The Patch Embed receives the 3×224×224 local perturbation enhancement feature map. The first window multi-head self-attention layer receives the Patch Embed local perturbation enhancement feature map. The Embed output features a size of 96×(H / 4)×(W / 4); the first downsampling receives the first window multi-head self-attention output features a size of 96×(H / 4)×(W / 4); the second window multi-head self-attention receives the first downsampling output features a size of 192×(H / 8)×(W / 8); the second downsampling receives the second window multi-head self-attention output features a size of 192×(H / 8)×(W / 8); the third window multi-head self-attention receives the second downsampling output features a size of 384×(H / 16)×(W / 16); the third downsampling receives the third window multi-head self-attention output features a size of 384×(H / 16)×(W / 16); the fourth window multi-head self-attention receives the third downsampling output features a size of 768×ceil (H / 32)× (W / 32); the second global average pooling layer receives the fourth window multi-head self-attention output features a size of 768×ceil. The feature map is (H / 32)×(W / 32); the second fully connected layer receives the feature vector with dimension 768 output from the second global average pooling layer, and the second fully connected layer outputs a global feature vector with dimension 256.
[0013] The Pach Embed has a kernel size of 4×4, 3 input channels, 96 output channels, and a stride of 4; the ratios of the first downsampling, the second downsampling, and the third downsampling are all 2.
[0014] In step 2, the classification module consists of a third fully connected layer, a fourth fully connected layer, and a fifth fully connected layer connected in sequence. The third fully connected layer receives a fused feature vector with a dimension of 512, the fourth fully connected layer receives a feature vector with a dimension of 256 output by the third fully connected layer, the fifth fully connected layer receives a feature vector with a dimension of 128 output by the fourth fully connected layer, and the fifth fully connected layer outputs a probability vector with a dimension of 2.
[0015] The training process in step 3 is as follows: Step 3.1: Set the batch size; use a tiered learning rate, setting the learning rate of the first, second, third, and fourth convolutional blocks in the preprocessing module to 1×10⁻⁶. -5 The learning rate for channel attention and spatial attention in the preprocessing module is set to 1×10. -4 The learning rate for both the local feature extraction module and the global feature enhancement module is set to 3×10. -4 The learning rate of the classification module is set to 1×10. -3 The weight decay is set to 1×10. -5 ; Step 3.2: Use the pre-trained weights of the ResNet18 architecture as the initial weights of the local feature extraction module, and use the pre-trained weights of the Swing Transformer block as the initial weights of the global feature enhancement module. Step 3.3: Input all normalized PU distribution images in each batch of the training set into the video steganalysis neural network for steganalysis to obtain the probability vector representing the steganalysis detection result corresponding to each normalized PU distribution image in each batch of the training set, calculate the cross-entropy loss for each normalized PU distribution image in each batch of the training set, and train the parameters of the video steganalysis neural network using the Adam optimizer. Step 3.4: Input all normalized PU distribution images in each batch of the validation set into the video steganalysis neural network for steganalysis to obtain the probability vector representing the steganalysis result corresponding to each normalized PU distribution image in each batch of the validation set, and calculate the cross-entropy loss for each normalized PU distribution image in each batch of the validation set. Step 3.5: Repeat steps 3.3 and 3.4 until the average cross-entropy loss of the video steganalysis neural network trained on the training set reaches the early stopping condition or the training epochs reach the preset number of epochs, and finally obtain the trained video steganalysis neural network.
[0016] Compared with the prior art, the advantages of the present invention are as follows: 1) By directly using the PU image as input, the PU block partitioning information (grayscale coding features from 64×64 to 8×8) generated during HEVC encoding can be fully utilized, enabling the video steganalysis neural network to perceive steganalytic perturbations in the compressed domain that traditional spatial domain analysis methods cannot capture (such as an abnormal increase in the proportion of 8×8 PU blocks), which can significantly improve the detection sensitivity of weak steganalytic signals.
[0017] 2) The innovative dual-branch network structure (a local feature extraction module based on the ResNet18 architecture + a global feature enhancement module using the SwinTransformer block) simultaneously captures local anomalies in PU partitioning and intra-frame global dependencies, enhancing the adaptability to complex steganography strategies.
[0018] 3) Transfer learning strategies improve the generalization performance of video steganalysis neural networks across coding parameters.
[0019] 4) It can detect mainstream intra-frame steganography algorithms and has a wide range of applications.
[0020] 5) Compared with the current mainstream deep learning-based intra-frame steganalysis methods, the method of this invention has a significant performance improvement at low embedding rates. Attached Figure Description
[0021] Figure 1 This is a block diagram illustrating the overall implementation of the method of the present invention; Figure 2 This is a schematic diagram of the composition structure of the video steganalysis neural network constructed in the method of the present invention; Figure 3 This is a schematic diagram of the composition structure of the local feature extraction module in the video steganalysis neural network constructed in the method of the present invention; Figure 4 This is a schematic diagram of the composition structure of the global feature enhancement module in the video steganalysis neural network constructed in the method of the present invention. Detailed Implementation
[0022] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0023] This invention proposes a HEVC inter-frame video steganalysis method based on transfer learning mechanism, the overall implementation block diagram of which is shown below. Figure 1 As shown, it includes the following steps: Step 1: Obtain multiple raw video sequences in YUV format; then, use multiple (e.g., 5) existing video steganography methods to steganize each raw video sequence, resulting in multiple (e.g., 5) stegated video sequences corresponding to each raw video sequence; next, use an HEVC encoder to encode each raw video sequence and its corresponding stegated video sequence using the HEVC standard encoding structure in IPPP format, resulting in HEVC encoded videos for each raw video sequence and HEVC encoded videos for each stegated video sequence; then, use existing technology to obtain multiple PU distribution images for each HEVC encoded video, and select a preset number (e.g., 37) of PU distribution images for each HEVC encoded video. The image is a grayscale image. Then, for each original video sequence corresponding to an HEVC-encoded video, the selected PU distribution image is defined as the original PU distribution image. These original PU distribution images are divided into two parts and assigned to the training set and validation set, respectively. Similarly, for each steganographic video sequence corresponding to an HEVC-encoded video, the selected PU distribution image is defined as the steganalytic PU distribution image. These steganalytic PU distribution images are divided into two parts and assigned to the training set and validation set, respectively. Then, data augmentation and normalization operations are performed sequentially on the original PU distribution images and steganalytic PU distribution images in the training set and validation set, respectively. The resulting normalized original PU distribution image and steganalytic normalized PU distribution image are both used as normalized PU distribution images.
[0024] Further defining the data augmentation operations, they include horizontal flipping, vertical flipping, brightness perturbation, etc., which can further enhance the robustness of the data; the normalization process is to normalize the pixels in the image obtained after the data augmentation operation to the [0,1] interval.
[0025] Step 2: Construct a video steganalysis neural network, such as... Figure 2As shown, it includes a preprocessing module, a local feature extraction module, a global feature enhancement module, and a classification module. The local feature extraction module is based on the ResNet18 architecture, and the global feature enhancement module uses the Swin Transformer block to learn the spatial dependencies between different regions in the image. First, the normalized PU distribution image is input into the preprocessing module to obtain the local perturbation enhancement feature map corresponding to the normalized PU distribution image. Then, the size of the local perturbation enhancement feature map is transformed to meet the input requirements of the local feature extraction module and the global feature enhancement module, and then input into the local feature extraction module and the global feature enhancement module respectively. The local feature extraction module obtains the corresponding local feature vector, and the global feature enhancement module obtains the corresponding global feature vector. Finally, the local feature vector and the global feature vector are concatenated to form a fusion vector. The system combines local and global feature vectors. The local feature extraction module extracts local texture features to capture subtle texture perturbations caused by steganography. The global feature enhancement module models global long-distance dependencies to characterize cross-regional non-local structural anomalies. Since a single branch cannot fully depict the complex patterns of steganography traces, local and global feature vectors are fused. The fused feature vector is then input into the classification module to obtain a probability vector representing the steganography detection result. Based on the probability vector, the normalized PU distribution image can be determined as either the original carrier or the steganography carrier. The classification module uses the fused features to achieve accurate steganography detection, significantly improving the ability to discriminate perturbations in the PU distribution image.
[0026] Here, since the local perturbations in PU distribution images often have extremely low pixel visibility, this weakness makes it easy for traditional convolutional features to ignore potential embedded signals in the early extraction stage. In order to improve the early perception ability of video steganalysis neural networks for local perturbations in PU distribution images, this invention designs a preprocessing module with a dual attention mechanism, which integrates shallow convolution and attention enhancement structure to enhance the expression effect of local perturbations.
[0027] To enhance the selective representation ability of the video steganalysis neural network for different semantic channels, the preprocessing module introduces a channel attention mechanism. Building upon this, the preprocessing module further introduces a spatial attention mechanism to further strengthen the video steganalysis neural network's ability to focus on specific regions of the image. In step 2, as... Figure 2As shown, the preprocessing module consists of a first convolutional block, a second convolutional block, a third convolutional block, channel attention, spatial attention, and a fourth convolutional block. The first convolutional block receives a normalized PU distribution image of size 1×H×W and extracts low-level local texture features. The second convolutional block receives a feature map of size 32×H×W output from the first convolutional block and extracts mid-level local texture features. The third convolutional block receives a feature map of size 64×H×W output from the second convolutional block and extracts high-level local texture features. The channel attention receives a feature map of size 64×H×W output from the third convolutional block and extracts high-level local texture features. A feature map of size 30×H×W is generated, resulting in a channel weight vector of size 30. This channel weight vector is then multiplied channel-by-channel with the feature map output from the third convolutional block to obtain a channel-weighted feature map of size 30×H×W. The spatial attention module receives this channel-weighted feature map and generates a spatial attention map of size 1×H×W. This spatial attention map is then multiplied element-by-element with the channel-weighted feature map to obtain an attention feature map of size 30×H×W. The fourth convolutional block receives this attention feature map and outputs a local perturbation enhancement feature map of size 3×H×W. In implementation, H×W = 240×416.
[0028] Here, the first convolutional block includes a first convolutional layer, a first batch normalization layer, and a first ReLU activation layer connected in sequence; the second convolutional block includes a second convolutional layer, a second batch normalization layer, and a second ReLU activation layer connected in sequence; and the third convolutional block includes a third convolutional layer, a third batch normalization layer, and a Tanh activation layer connected in sequence, using Tanh... To preserve the response to weak negative perturbations, the fourth convolutional block includes a fourth convolutional layer for channel mapping, compressing 30 channels into 3 channels to accommodate the input requirements of subsequent local feature extraction and global feature enhancement modules. Specifically, the first convolutional layer has a kernel size of 3×3, 1 input channel, and 32 output channels; the second convolutional layer has a kernel size of 3×3, 32 input channels, and 64 output channels; the third convolutional layer has a kernel size of 3×3, 64 input channels, and 30 output channels (compressing 64 channels into 30 channels for subsequent attention enhancement processing); and the fourth convolutional layer has a kernel size of 1×1, 30 input channels, and 3 output channels.
[0029] Here, the core of channel attention lies in performing global average pooling on the feature map output by the third convolutional block to obtain a channel description vector z with dimension 30, where the c-th element of z is z_c. c , Where c = 1, 2, ..., 30, F c(i,j) represents the pixel value of the pixel at coordinate (i,j) in the c-th channel of the feature map output by the third convolutional block; then the channel description vector z is fed into a two-layer perceptron (MLP), the intermediate dimension is reduced to 4, forming a non-linear channel selection function, and thus a channel weight vector with a dimension of 30 is obtained.
[0030] Here, spatial attention is applied to the channel-weighted feature map, and a spatial attention map is generated through a 7×7 convolution with a large receptive field (30 input channels and 1 output channel).
[0031] In step 2, as Figure 3 As shown, the local feature extraction module consists of a fifth convolutional block, a max pooling layer, a first residual block, a second residual block, a third residual block, a fourth residual block, a first global average pooling layer, and a first fully connected layer, connected in sequence. It transforms the 3×H×W local perturbation enhancement feature map output by the fourth convolutional block into a 3×224×224 local perturbation enhancement feature map. The fifth convolutional block receives this 3×224×224 local perturbation enhancement feature map. The max pooling layer receives the 64×(H / 2)×(W / 2) output of the fifth convolutional block. The first residual block receives a feature map of size 64×(H / 4)×(W / 4) from the output of the max pooling layer; the second residual block receives a feature map of size 64×(H / 4)×(W / 4) from the output of the first residual block; the third residual block receives a feature map of size 128×(H / 8)×(W / 8) from the output of the second residual block; the fourth residual block receives a feature map of size 256×(H / 16)×(W / 16) from the output of the third residual block; the first global average pooling layer receives a feature map of size 512×ceil(H / 32)×(W / 32) from the output of the fourth residual block, where ceil() is the floor function. Since H / 32=7.5 is not an integer when H=240, the integer obtained after floor function is used; the first fully connected layer receives a feature vector of dimension 512 from the output of the first global average pooling layer, and the first fully connected layer outputs a local feature vector of dimension 256.
[0032] Here, as Figure 3 As shown, the fifth convolutional block includes a fifth convolutional layer, a fourth batch normalization layer, and a third ReLU activation layer connected in sequence. The kernel size of the fifth convolutional layer is 7×7, the number of input channels is 3, the number of output channels is 64, and the stride is 2. The kernel size of the max pooling layer is 3×3, the number of input channels is 64, the number of output channels is 64, the stride is 2, and the padding is 1. The stride of the first residual block is 1, and the strides of the second, third, and fourth residual blocks are all 2.
[0033] Here, the local feature extraction module uses an improved ResNet18 as the base network. Max pooling layers are used for initial downsampling and feature condensation. Each residual block contains several residual units, and each residual unit consists of two 3×3 convolutional layers, each equipped with a batch normalization layer and a ReLU activation function. In each residual block, identity mapping and skip connection structures are used to alleviate the gradient vanishing problem and maintain the stable propagation of deep features.
[0034] This invention selects the ResNet18 architecture as the backbone network. ResNet18 contains 18 layers and alleviates the gradient vanishing problem through residual connections, capturing weak local perturbations caused by changes in the PU distribution image. To adapt to the input, the first convolutional layer of ResNet18 is modified to receive three-channel input, with a kernel size of 7×7, a stride of 2, and 64 output channels. Subsequently, high-level features are extracted through a series of residual blocks, and then the 512-dimensional output features of the ResNet18 convolutional backbone are mapped to 256-dimensional embedded features through fully connected layers, serving as the final feature representation for subsequent feature fusion.
[0035] In step 2, as Figure 4As shown, the global feature enhancement module consists of a Patch Embed, a first-window multi-head self-attention layer, a first downsampling layer, a second-window multi-head self-attention layer, a second downsampling layer, a third-window multi-head self-attention layer, a third downsampling layer, a fourth-window multi-head self-attention layer, a second global average pooling layer, and a second fully connected layer, connected sequentially. It transforms the 3×H×W local perturbation enhancement feature map output by the fourth convolutional block into a 3×224×224 local perturbation enhancement feature map. The Patch Embed receives the 3×224×224 local perturbation enhancement feature map. The first-window multi-head self-attention layer receives the Patch Embed local perturbation enhancement feature map. The Embed output features a size of 96×(H / 4)×(W / 4); the first downsampling receives the first window multi-head self-attention output features a size of 96×(H / 4)×(W / 4); the second window multi-head self-attention receives the first downsampling output features a size of 192×(H / 8)×(W / 8); the second downsampling receives the second window multi-head self-attention output features a size of 192×(H / 8)×(W / 8); the third window multi-head self-attention receives the second downsampling output features a size of 384×(H / 16)×(W / 16); the third downsampling receives the third window multi-head self-attention output features a size of 384×(H / 16)×(W / 16); the fourth window multi-head self-attention receives the third downsampling output features a size of 768×ceil (H / 32)× (W / 32); the second global average pooling layer receives the fourth window multi-head self-attention output features a size of 768×ceil. The feature map is (H / 32)×(W / 32); the second fully connected layer receives the feature vector with dimension 768 output from the second global average pooling layer, and the second fully connected layer outputs a global feature vector with dimension 256.
[0036] Here, the Pach Embed convolution kernel size is 4×4, the number of input channels is 3, the number of output channels is 96, and the stride is 4; the ratio of the first downsampling, the second downsampling, and the third downsampling is 2.
[0037] Here, Patch Embed divides the local perturbation enhancement feature map output from the fourth convolutional block into 4×4 non-overlapping patches, generating 2496 patches, each projected as a 96-dimensional feature vector. Multi-head self-attention within a 4×4 window computes inter-patch dependencies, while a sliding window strategy models cross-window associations through a shifted window, adapting to HEVC steganalysis and capturing multi-scale nonlocal anomalies caused by perturbations in the PU distribution image. Unlike the standard Transformer, to control computational complexity and parameter count, the Swin Transformer does not perform attention operations on the entire image; instead, it achieves cross-regional information flow through a "sliding window mechanism" and "inter-layer cross-connections."
[0038] In step 2, as Figure 2 As shown, the classification module consists of a third fully connected layer (used to reduce computational complexity and retain key information), a fourth fully connected layer, and a fifth fully connected layer connected in sequence. The third fully connected layer receives a fused feature vector with a dimension of 512, the fourth fully connected layer receives a feature vector with a dimension of 256 output from the third fully connected layer, the fifth fully connected layer receives a feature vector with a dimension of 128 output from the fourth fully connected layer, and the fifth fully connected layer outputs a probability vector with a dimension of 2.
[0039] Step 3: Supervised training of the video steganalysis neural network is performed using the training and validation sets to achieve automatic detection of video steganalysis. During training, a transfer learning mechanism is used between the local feature extraction module and the global feature enhancement module. In the transfer learning process, the pre-trained weights of the ResNet18 architecture built into PyTorch are directly called as the initial weights of the local feature extraction module, and the pre-trained weights of the Swin Transformer block are called through the huggingface website as the initial weights of the global feature enhancement module. After training, the trained video steganalysis neural network is obtained.
[0040] To further define the process, step 3, the training process is as follows: Step 3.1: Set the batch size, e.g., set the batch size to 16; use a tiered learning rate, setting the learning rate of the first, second, third, and fourth convolutional blocks in the preprocessing module to 1×10. -5 The learning rate for channel attention and spatial attention in the preprocessing module is set to 1×10. -4 The learning rate for both the local feature extraction module and the global feature enhancement module is set to 3×10. -4 The learning rate of the classification module is set to 1×10. -3 The weight decay is set to 1×10. -5 .
[0041] Step 3.2: Use the pre-trained weights of the ResNet18 architecture as the initial weights of the local feature extraction module, and use the pre-trained weights of the Swing Transformer block as the initial weights of the global feature enhancement module.
[0042] Step 3.3: Input all normalized PU distribution images in each batch of the training set into the video steganalysis neural network for steganalysis to obtain the probability vector representing the steganalysis detection result corresponding to each normalized PU distribution image in each batch of the training set, calculate the cross-entropy loss for each normalized PU distribution image in each batch of the training set, and train the parameters of the video steganalysis neural network using the Adam optimizer.
[0043] Step 3.4: Input all normalized PU distribution images in each batch of the validation set into the video steganalysis neural network for steganalysis to obtain the probability vector representing the steganalysis result for each normalized PU distribution image in each batch of the validation set, and calculate the cross-entropy loss for each normalized PU distribution image in each batch of the validation set.
[0044] Step 3.5: Repeat steps 3.3 and 3.4 until the average cross-entropy loss of the video steganalysis neural network trained on the training set reaches the early stopping condition or the preset number of training epochs is reached. The trained video steganalysis neural network is then obtained. Here, the early stopping condition is that the average cross-entropy loss does not decrease for 10 consecutive epochs, and the preset number of epochs is 100.
[0045] Step 4: For any acquired test video sequence, perform HEVC standard encoding on the test video sequence to obtain the corresponding test HEVC encoded video. The test video sequence can be either a raw video sequence or a steganalytic video sequence in YUV format. Then, acquire multiple PU distribution images of the test HEVC encoded video and select a preset number of PU distribution images as test PU distribution images. Next, perform data augmentation and normalization operations on the test PU distribution images sequentially to obtain normalized test PU distribution images. Then, input each normalized test PU distribution image corresponding to the test HEVC encoded video into a trained video steganalysis neural network, outputting the probability vector corresponding to each normalized test PU distribution image, thus obtaining the corresponding steganalytic detection result. Finally, determine whether the test HEVC encoded video is a steganalytic video based on the steganalytic detection results of all normalized test PU distribution images corresponding to the test HEVC encoded video. To improve the stability of the video-level determination, a weighted average or a Yao-based method can be used to calculate the steganalytic detection results of all normalized test PU distribution images corresponding to the test HEVC encoded video. The voting strategy proposed by Yao et al. (which counts the number of HEVC-encoded videos that are judged as steganographic carriers and non-steganographic carriers, i.e., the original carriers, and uses the class with the larger number as the final judgment result) yields an overall conclusion on whether the HEVC-encoded video contains steganographic operations. Here, the voting strategy proposed by Yao et al. originates from Yao H, Ni R, Amirpour H, Timmerer C, Zhao Y. Detection and localization of video transcoding from AVC to HEVC based on deep representations of decoded frames and PU maps. IEEE Transactions on Multimedia, 2022, early access, Jun. 23, 2022.
[0046] To verify the effectiveness of the method of the present invention, multiple sets of simulation experiments and comparative experiments were conducted.
[0047] The experiment used 110 original video sequences in YUV format with resolutions of 1920 × 1080 (1080p) and 1280 × 720 (720p). The video steganography method adopts mainstream steganography algorithms, such as the anti-steganalysis algorithm proposed by Li et al. (derived from Li Z, Jiang X, Dong Y, Meng L, Sun T. An anti-steganalysis HEVC videosteganography with high performance based on CNN and PU partition modes. IEEE Transactions on Dependable and Secure Computing, 2023, 20(1): 606-619. (Anti-steganalysis HEVC video steganography based on CNN and PU partition modes)), the adaptive double-layer embedding algorithm proposed by He et al. (derived from He S, Xu D, Yang L, Liu Y. HEVC video information hiding scheme based on adaptive double-layer embedding strategy. Journal of Visual Communication and Image Representation, 2022, 87: 103549. (HEVC video information hiding scheme based on adaptive double-layer embedding strategy)), and the Level4 algorithm proposed by Yang et al. (derived from Yang Y, Li Z, Xie W, Zhang Z. Highcapacity and multi-level information hiding algorithm based on PU partition modes) for HEVC videos. Multimedia Tools and Applications, 2019, 78(7): 8423-8446. (A high-capacity multi-level information hiding algorithm based on HEVC video PU partitioning modes) and the Level4 algorithm proposed by Xie et al. (derived from Xie W, Yang Y, Li Z, Wang J, Zhang M. An information hiding algorithm for HEVC videos based on PU partitioning modes. In: Sun X, Pan Z, Bertino E, editors. Proc. Int.)Conf. on Cloud Computing and Security (ICCCS), LectureNotes in Computer Science. vol. 11066. Cham, Switzerland: Springer, 2018. p.252-264. (HEVC video information hiding algorithm based on PU partition modes) and the diamond-coded algorithm proposed by Liu et al. (derived from Liu J, Li Z, Jiang X, Zhang Z. A high-performance CNN-applied HEVCsteganography based on diamond-coded PU partition modes. IEEE Transactions on Multimedia, 2022, 24: 2084-2097. (High-performance HEVC steganography based on CNN, based on diamond-coded PU partition modes)). Each video steganography method generates steganalytic video sequences with embedding rates of 0.4, 0.7, and 1.0. HEVC standard encoding uses the HEVC reference software HM 16.15, with an IPPP (Group of Pictures) structure, QP=32 quantization parameter, a frame rate of 25 fps, and the configuration file is encoder_lowdelay_P_main.cfg. After obtaining all HEVC encoded videos, a portion of the HEVC encoded videos are used to construct training and validation sets according to the training and validation set construction method described in this invention. The remaining HEVC encoded videos are used as test HEVC encoded videos.
[0048] Table 1 shows the average detection accuracy of the method of the present invention for detecting HEVC encoded videos under different embedding rates (0.4, 0.7, 1.0).
[0049] Table 1. Average detection accuracy of the method of this invention for detecting HEVC-coded videos under different embedding ratios (0.4, 0.7, 1.0).
[0050] As can be seen from Table 1, the method of the present invention exhibits significant performance under all video steganography methods and embedding rate configurations, with the highest detection accuracy reaching over 95%. It maintains high detection accuracy even with a low embedding rate of 0.4, demonstrating the good robustness and generalization ability of the method of the present invention.
[0051] The frame-level (i.e., PU distribution image for each test) detection accuracy comparison experiment was conducted on five video steganalysis methods at 720p and 1080p resolutions. Each video steganalysis method was tested at PU embedding rates of 0.4, 0.7, and 1.0 bp and a QP value of 32. The results are shown in Table 2. Compared with the most advanced intra-frame steganalysis algorithm (PUSN method), the PUSN method originated from Dai H, Wang R, Xu D, He S, Yang L. HEVC video steganalysis based on PU map and multi-scale convolutional residual network. IEEE Transactions on Circuits and Systems for Video Technology, 2024, 34(4): 2663-2676. (HEVC video steganalysis based on PU map and multi-scale convolutional residual network).
[0052] Table 2 compares the average detection accuracy of the proposed method and the PUSN method under different embedding rates (0.4, 0.7, 1.0).
[0053] As can be seen from Table 2, compared with the most advanced intra-frame steganalysis algorithm, the method of the present invention has significant performance at low embedding rates. For example, at 720p and an embedding rate of 0.4, the performance of the method of the present invention is improved by 16.28% compared with the PUSN method, which shows the superiority of the method of the present invention.
Claims
1. A method for HEVC inter-frame video steganalysis based on transfer learning mechanism, characterized in that... Includes the following steps: Step 1: Obtain multiple raw video sequences in YUV format; then, use various video steganography methods to steganize each raw video sequence, resulting in multiple steganographic video sequences; next, perform HEVC standard encoding on each raw video sequence and its corresponding steganographic video sequence to obtain the corresponding HEVC encoded video; then, obtain multiple PU distribution images for each HEVC encoded video, and select a preset number of PU distribution images for each HEVC encoded video; furthermore, for each raw video sequence corresponding to the HEVC encoded video, define the selected PU distribution images as raw PU distribution images, and divide these raw PU distribution images into two parts, which are assigned to the training set and validation set respectively; similarly, for each steganographic video sequence corresponding to the HEVC encoded video, define the selected PU distribution images as steganographic PU distribution images, and divide these steganographic PU distribution images into two parts, which are assigned to the training set and validation set respectively; then, perform data augmentation and normalization operations on the raw PU distribution images and steganographic PU distribution images in the training set and validation set respectively, and use the raw normalized PU distribution images and steganographic normalized PU distribution images obtained after normalization as normalized PU distribution images; Step 2: Construct a video steganalysis neural network, which includes a preprocessing module, a local feature extraction module, a global feature enhancement module, and a classification module. The local feature extraction module is based on the ResNet18 architecture, and the global feature enhancement module uses the SwinTransformer block. First, the normalized PU distribution image is input into the preprocessing module to obtain the local perturbation enhancement feature map corresponding to the normalized PU distribution image. Then, the size of the local perturbation enhancement feature map is transformed to meet the input requirements of the local feature extraction module and the global feature enhancement module, respectively, and then input into the local feature extraction module and the global feature enhancement module. The local feature extraction module obtains the corresponding local feature vector, and the global feature enhancement module obtains the corresponding global feature vector. Next, the local feature vector and the global feature vector are concatenated to form a fused feature vector. Finally, the fused feature vector is input into the classification module to obtain a probability vector representing the steganalysis detection result. Step 3: Use the training set and validation set to perform supervised training on the video steganalysis neural network. During the training process, a transfer learning mechanism is used between the local feature extraction module and the global feature enhancement module. In the transfer learning process, the pre-trained weights of the ResNet18 architecture are called as the initial weights of the local feature extraction module, and the pre-trained weights of the Swin Transformer block are called as the initial weights of the global feature enhancement module. After training, the trained video steganalysis neural network is obtained. Step 4: For any acquired test video sequence, perform HEVC standard encoding on the test video sequence to obtain the corresponding test HEVC encoded video. The test video sequence can be either a raw video sequence or a steganalytic video sequence in YUV format. Then, acquire multiple PU distribution images of the test HEVC encoded video and select a preset number of PU distribution images as test PU distribution images. Next, perform data augmentation and normalization operations on the test PU distribution images in sequence to obtain normalized test PU distribution images. Then, input each normalized test PU distribution image corresponding to the test HEVC encoded video into the trained video steganalysis neural network, and output the probability vector corresponding to each normalized test PU distribution image, thus obtaining the corresponding steganalytic detection result. Finally, determine whether the test HEVC encoded video is a steganalytic video based on the steganalytic detection results of all normalized test PU distribution images corresponding to the test HEVC encoded video.
2. The HEVC inter-frame video steganalysis method based on transfer learning mechanism according to claim 1, characterized in that... In step 1, the data augmentation operation includes horizontal flipping, vertical flipping, and brightness perturbation; the normalization process is to normalize the pixels in the image obtained after the data augmentation operation to the [0,1] interval.
3. The HEVC inter-frame video steganalysis method based on transfer learning mechanism according to claim 1, characterized in that... In step 2, the preprocessing module consists of a first convolutional block, a second convolutional block, a third convolutional block, channel attention, spatial attention, and a fourth convolutional block. The first convolutional block receives a normalized PU distribution image of size 1×H×W and extracts low-level local texture features. The second convolutional block receives a feature map of size 32×H×W output from the first convolutional block and extracts mid-level local texture features. The third convolutional block receives a feature map of size 64×H×W output from the second convolutional block and extracts high-level local texture features. The channel attention receives the output of the third convolutional block. The first convolutional block takes a feature map of size 30×H×W and outputs a channel weight vector of size 30. The channel weight vector is multiplied channel by channel by the feature map output by the third convolutional block to obtain a channel weighted feature map of size 30×H×W. The spatial attention receives the channel weighted feature map and generates a spatial attention map of size 1×H×W. The spatial attention map is multiplied element by element by channel weighted feature map to obtain an attention feature map of size 30×H×W. The fourth convolutional block receives the attention feature map and outputs a local perturbation enhancement feature map of size 3×H×W.
4. The HEVC inter-frame video steganalysis method based on transfer learning mechanism according to claim 3, characterized in that... The first convolutional block includes a first convolutional layer, a first batch of normalized layers, and a first ReLU activation layer connected in sequence; the second convolutional block includes a second convolutional layer, a second batch of normalized layers, and a second ReLU activation layer connected in sequence; the third convolutional block includes a third convolutional layer, a third batch of normalized layers, and a Tanh activation layer connected in sequence; and the fourth convolutional block includes a fourth convolutional layer. The first convolutional layer has a 3×3 kernel size, 1 input channel, and 32 output channels; the second convolutional layer has a 3×3 kernel size, 32 input channels, and 64 output channels; the third convolutional layer has a 3×3 kernel size, 64 input channels, and 30 output channels; and the fourth convolutional layer has a 1×1 kernel size, 30 input channels, and 3 output channels.
5. The HEVC inter-frame video steganalysis method based on transfer learning mechanism according to claim 3, characterized in that... In step 2, the local feature extraction module consists of a fifth convolutional block, a max pooling layer, a first residual block, a second residual block, a third residual block, a fourth residual block, a first global average pooling layer, and a first fully connected layer, connected in sequence. The module transforms the 3×H×W local perturbation enhancement feature map output by the fourth convolutional block into a 3×224×224 local perturbation enhancement feature map. The fifth convolutional block receives the 3×224×224 local perturbation enhancement feature map. The max pooling layer receives the output of the fifth convolutional block... The first residual block receives a feature map of size 64×(H / 2)×(W / 2); the second residual block receives a feature map of size 64×(H / 4)×(W / 4) from the output of the max pooling layer; the third residual block receives a feature map of size 128×(H / 8)×(W / 8) from the output of the second residual block; and the fourth residual block receives a feature map of size 256×(H / 16)×(W / 16) from the output of the third residual block. The first global average pooling layer receives a feature map of size 512×ceil (H / 32)×(W / 32) from the output of the fourth residual block, where ceil() is the floor function; the first fully connected layer receives a feature vector of dimension 512 from the output of the first global average pooling layer, and the first fully connected layer outputs a local feature vector of dimension 256.
6. The HEVC inter-frame video steganalysis method based on transfer learning mechanism according to claim 5, characterized in that... The fifth convolutional block comprises a fifth convolutional layer, a fourth batch normalization layer, and a third ReLU activation layer connected in sequence. The fifth convolutional layer has a kernel size of 7×7, 3 input channels, 64 output channels, and a stride of 2. The max pooling layer has a kernel size of 3×3, 64 input channels, 64 output channels, a stride of 2, and padding of 1. The first residual block has a stride of 1, and the second, third, and fourth residual blocks all have a stride of 2.
7. The HEVC inter-frame video steganalysis method based on transfer learning mechanism according to claim 5, characterized in that... In step 2, the global feature enhancement module consists of Patch Embed, a first window multi-head self-attention layer, a first downsampling layer, a second window multi-head self-attention layer, a second downsampling layer, a third window multi-head self-attention layer, a third downsampling layer, a fourth window multi-head self-attention layer, a second global average pooling layer, and a second fully connected layer, connected sequentially. It transforms the 3×H×W local perturbation enhancement feature map output by the fourth convolutional block into a 3×224×224 local perturbation enhancement feature map. Patch Embed receives the 3×224×224 local perturbation enhancement feature map. The first window multi-head self-attention layer receives the 96×(H / 4)×(W / 4) feature map output by Patch Embed. The first downsampling layer receives the first window multi-head self-attention layer's... The feature map with a self-attention output size of 96×(H / 4)×(W / 4); the feature map with a first downsampled output size of 192×(H / 8)×(W / 8) of the second window multi-head self-attention receiver; the feature map with a second downsampled receiver with a second window multi-head self-attention output size of 192×(H / 8)×(W / 8); the feature map with a second downsampled output size of 384×(H / 16)×(W / 16) of the third window multi-head self-attention receiver; the feature map with a third downsampled receiver with a third window multi-head self-attention output size of 384×(H / 16)×(W / 16); the feature map with a third downsampled output size of 768×ceil (H / 32)× (W / 32) of the fourth window multi-head self-attention receiver; The second global average pooling layer receives a feature map of size 768×ceil (H / 32)×(W / 32) from the multi-head self-attention output of the fourth window; the second fully connected layer receives a feature vector of dimension 768 from the output of the second global average pooling layer, and the second fully connected layer outputs a global feature vector of dimension 256.
8. The HEVC inter-frame video steganalysis method based on transfer learning mechanism according to claim 7, characterized in that... The Pach Embed has a kernel size of 4×4, 3 input channels, 96 output channels, and a stride of 4; the ratios of the first downsampling, the second downsampling, and the third downsampling are all 2.
9. The HEVC inter-frame video steganalysis method based on transfer learning mechanism according to claim 7, characterized in that... In step 2, the classification module consists of a third fully connected layer, a fourth fully connected layer, and a fifth fully connected layer connected in sequence. The third fully connected layer receives a fused feature vector with a dimension of 512, the fourth fully connected layer receives a feature vector with a dimension of 256 output by the third fully connected layer, the fifth fully connected layer receives a feature vector with a dimension of 128 output by the fourth fully connected layer, and the fifth fully connected layer outputs a probability vector with a dimension of 2.
10. The HEVC inter-frame video steganalysis method based on transfer learning mechanism according to claim 1, characterized in that... The training process in step 3 is as follows: Step 3.1: Set the batch size; use a tiered learning rate, setting the learning rate of the first, second, third, and fourth convolutional blocks in the preprocessing module to 1×10⁻⁶. -5 The learning rate for channel attention and spatial attention in the preprocessing module is set to 1×10. -4 The learning rate for both the local feature extraction module and the global feature enhancement module is set to 3×10. -4 The learning rate of the classification module is set to 1×10. -3 The weight decay is set to 1×10. -5 ; Step 3.2: Use the pre-trained weights of the ResNet18 architecture as the initial weights of the local feature extraction module, and use the pre-trained weights of the Swing Transformer block as the initial weights of the global feature enhancement module. Step 3.3: Input all normalized PU distribution images in each batch of the training set into the video steganalysis neural network for steganalysis to obtain the probability vector representing the steganalysis detection result corresponding to each normalized PU distribution image in each batch of the training set, calculate the cross-entropy loss for each normalized PU distribution image in each batch of the training set, and train the parameters of the video steganalysis neural network using the Adam optimizer. Step 3.4: Input all normalized PU distribution images in each batch of the validation set into the video steganalysis neural network for steganalysis to obtain the probability vector representing the steganalysis result corresponding to each normalized PU distribution image in each batch of the validation set, and calculate the cross-entropy loss for each normalized PU distribution image in each batch of the validation set. Step 3.5: Repeat steps 3.3 and 3.4 until the average cross-entropy loss of the video steganalysis neural network trained on the training set reaches the early stopping condition or the training epochs reach the preset number of epochs, and finally obtain the trained video steganalysis neural network.