As concluded by Claude E. Shannon [shannon1949communication], there are three main types of information security models in cyberspace: encryption system, privacy system, and concealment system. The concealment system is different from other two systems. It mainly protects information security by embedding the secret information into the common carrier, hidding the existence of confidential information to achieve the purpose of not being easily suspected and attacked [Simmons1984The]. For information hidding, media with various forms, including image [fridrich2009steganography, chen2019defining], audio [yang2017sudoku, tian2015optimal], text [xiang2014research, xiang2018linguistic, xiang2017novel], can be adopted as carrier. As the most common and frequently used information interaction carrier in people’s daily lives, using text as carrier to hide and transmit secret information has very important value and significance. Therefore, text steganography has attracted wide attention from researchers in recent years[Luo2016Text, Luo2017Text, yang2018rits, yang2018rnn, yang2018markov].
In recent years, with the rapid development of deep learning in the field of Natural Language Processing, plenty of works related to high-quality readable text generation have appeared, including neural machine translation[Bahdanau2014Neural], dialogue systems [Shang2015Neural], and image caption [yang2017image]. Based on these works, growing interests have been directed to text steganography by cover synthesis [Luo2017Text, fang2017generating, yang2018rnn, yang2018rits]. These methods utilize the powerful feature extraction capabilities of neural networks, analyze the statistical feature distribution of a large number of training texts, and then reconstruct samples that conform to such statistical distribution. Furthermore, based on the generated texts format, there are two different types of methods: natural text steganography [fang2017generating, yang2018rnn, yang2018rits] and special format text steganography [Luo2017Text, Luo2016Text]. The difference is that in the process of generating steganographic texts, in addition to using the learned statistical language model, the special format text steganographic methods also combine some syntactic rules.
Generally, text steganalysis models mainly attempt to analyze and extract some text features first, and then they analyze the differences between these features before and after steganography to determine whether the text contains secret information. Traditional text steganalysis models mainly rely on some simple text features extracted artificially, such as word frequency [Yang2010Linguistic]. However, the features they extracted and analyzed were very simple, which made them difficult to deal with the latest steganographic text generation methods based on neural networks. Recently, some researchers have tried to analyze the high-level semantic relationship between words in texts to determine whether the text contains hidden information[yang2018ts, wen2019convolutional, 8653856].
In this paper, we first analysis that the conditional probability distribution of each word in the automatically generated steganographic texts will be distorted after embedded with hidden information. Then we propose a new text steganalysis mothod based on Recurrent Neural Networks (RNNs), which can extract the conditional probability features of each word in texts. Based on these features, we can then achieve satisfactory steganalysis performance and can even estimate the amount of hidden information contained in the text.
Ii TS-RNN Methodology
For a text of length , we can model it as a sequence signal with length , that is, , where represents the -th word. We hypothesize that once we embed hidden information in the text generation process, it is equivalent to superimposing noise on these conditional probability distributions, which will inevitably affect the probability distribution of the entire text, namely:
Here, represents the generated steganographic text and represents the -th word in it. represents the disturbance caused by the embedded information on the conditional probability distribution of the -th word. Therefore, our core idea is to realize the recognition of steganographic text by analyzing the difference in statistical distribution of texts caused by embedded hidden information.
The biggest characteristics of Recurrent Neural Network (RNN) is the feedback connections which makes it very suitable for modeling sequential signals. To avoid gradient vanish problem [Hochreiter1998The]
, we usually use Long Short-Term Memory (LSTM)[Hochreiter1997Long] as the hidden units. An LSTM unit can be described using the following formulas:
For simplicity, we denote the transfer function of LSTM units by .
For feature extraction, we first map each word to a dense semantic space with a dimension of , that is . Then, for each sentence , we can illustrate it with a matrix , where the -th row indicates the -th word in sentence and is the length of it, that is
In general, a recurrent neural network consists multiple network layers, each of which has multiple LSTM units. We use to indicate the LSTM units number of -th hidden layer , so the units of -th layer can be represented as
The input of each unit at time step is the weighted sum of the elements in , then the output value of at time step is
Where and are learned weights and biases, respectively.
Previous works have shown that within a certain range, the more layers of neural network in space, the stronger the ability to extract and express features [Zeiler2013Visualizing]. So we stack the network with multiple layers of LSTM units and the transfer matrix between -th layer and -th layer can be represented as a matrix , that is
And the output of the -th layer at time step is
According to Equation , the output of the -th hidden layer at time step can be regarded as a summary of all previous words .
In order to further extract the potential correlations of each word to all surrounding words (including the previous words and the following words), we further added a reverse RNN, which has been shown in Figure 1. The forward RNN is more inclined to extract the correlation between each word and the previous words, while the reverse RNN is mainly focused on extracting the correlation between each word and the following words.
We can use and
to represent the correlation features of the words extracted by the forward RNN and the backward RNN, respectively. In order to fuse these two features, we first take out the feature vector of their last moment and splice them together. The spliced vector is named as:
Then we define a Feature Fusion Matrix to fuse the features, where is the dimension of the fused feature vector , where:
Finally, following previous works [yang2019real, yang2018clinical], we pass the feature vector through the softmax classifier and the output is:
The output value reflects the probability that our model believes that the text contains covert information. We can then set a detection threshold and then the final detection result can be expressed as
In other words, the model tries to predict the label (0 for normal, 1 for stego) for a given text.
In the process of training, we update network parameters by applying backpropagation algorithm, and the loss function of the whole network consists of two parts, one is the error term and the other is the regularization term, which can be described as:
where is the batch size of texts. represents the probability that the -th sample is judged to contain covert information, is the actual label of the -th sample. In order to strengthen the regularization and prevent overfitting, we adopt the dropout mechanism [krizhevsky2012imagenet].
Iii Experiments and Analysis
We trained our model by using the T-Steg dataset 111https://github.com/YangzlTHU/TS-CNN which was released by Z. Yang et al. [yang2018ts]. The T-Steg dataset contains two categories of steganographic texts: special format steganographic texts (Chinese) generated by the model proposed by Luo et al. [Luo2017Text], and natural steganographic texts (English) generated by the model proposed by Fang et al. [fang2017generating]. In the T-Steg dataset, two different forms of steganographic Chinese poetries are provided: poetries with five words (FW) per line and poetries with seven words (SW) per line. Each format can be further divided into two categories, that is, each poem contains four lines (FL) or eight lines (EL). For natural texts, T-Steg contains the most common text media on the Internet, including Twitter, movie reviews and News. Both steganographic methods can generate steganographic texts with different embedding rate by altering the number of bits hidden in per word (bpw). In T-Steg dataset, it contains 10,000 steganographic sentences for different types of text with different embedding rates.
The hyper-parameters in the proposed model were finally determined based on the comparison experiment: we mapped each word to a 256-dimensions vector. The number of hidden layers was in TS-RNN and in TS-BiRNN. The number of LSTM units per layer was setted to be for TS-RNN and for TS-BiRNN. We setted the detection threshold to be . We used
as nonlinear activation functionin Equation . We chose Adam [Kingma2014Adam] as the optimization method. The learning rates were initially setted as 0.001 and batch size was setted as 128, dropout rate was 0.5.
Iii-a Evaluation Results and Discussion
Iii-A1 Steganalysis Accuracy
In this section, we compaired with three representative text steganalysis algorithms, which are proposed in [meng2009linguistic], [samanta2016real], [din2015performance], respectively. We use several evaluation indicators commonly used in classification tasks to evaluate the performance of our model, which are precision, recall, F1-score and accuracy. Experiment results have been shown in Table I and Table II.
According to the results, we can draw the following conclusions. Firstly, compared to other text steganalysis methods, the proposed models has achieved the best detection results on various metrics, including different text format and different embedding rates. Secondly, in Table I and Table II, we notice that in most cases, the detection performance of each model has improved with the increasing of the embedding rate. These results do meet our previous conjecture that with the increasing of embedding rate, it will damage the coherence of text semantics.
Iii-A2 Embedded Rate Estimation
We can use t-Distributed Stochastic Neighbor Embedding (t-SNE) [Maaten2014Accelerating] technique for the dimensionality reduction and visualization of this feature space, which can be found in Figure 2. In this feature space, each point represents a sentence and different colors indicate different embedding rates. From Figure 2, we can clearly see that as the embedded rate of hidden information increases in the generated texts, their distribution in the semantic space will gradually change. Further, based on these features, we find our model can estimate the capacity of hidden information inside.
We mixed the texts at various embedding rates, i.e. , and then we used different models to conduct multi-classification experiments. The experimental results are shown in Table III. From Table III, we can see that our model can achieve an estimated accuracy higher than 70% and 90% for the hidden information in the special format texts and natural texts, which outperforms all the other models.
In this paper, we use bidirectional recurrent neural network (BiRNN) to extract the conditional distrubution features of each word in texts. Based on the distribution of these features, the proposed model achieves nearly 100% precision and recall. Besides, the proposed model can even make use of the subtle distribution difference of the features to estimate the capacity of the hidden information inside, which shows state-of-the-art performance.
This work was supported in part by the National Key Research and Development Program of China under Grant SQ2018YGX210002 and the National Natural Science Foundation of China (No.U1536207, No.U1705261 and No.U1636113).