# A Low-Complexity Deep Learning Model for Predicting Targeted Sequencing Depth from Probe Sequence
## 2 Materials and Methods
### Sequencing Depth Prediction Model  
Figure 3C presents the process used to predict the sequencing depth of the probe sequence. The process took the feature matrix (**X**) obtained from the sequence encoding module as input and the predicted log sequencing depth (\(y_{pred}\)) as output, which proceeded as follows. The RNN module employed a pair of two-layer Bi-LSTMs to capture the forward and backward higher-order features of the target sequence and probe sequence. Then, the attention module assigned weights to the output results of the RNN module to improve prediction accuracy. The dense module combined the results of the attention module with the local feature and outputted the predicted log sequencing depth of the probe sequence. First, in the RNN module, Bi-LSTM was chosen to implement the proposed model because it solved the long-term dependency problem and captured the long-range interactions in sentences using neurons in the hidden layer [26]. The RNN module used a dual approach, where two sets of Bi-LSTMs with two layers were employed to process the probe sequence and target sequence. The basic unit of each layer of the Bi-LSTM included the forward-propagating LSTM and the backward-propagating LSTM. The LSTM unit consisted of three crucial gates and two state vectors, which were a forget gate (\(\mathbf{f}_{j}\)), input gate (\(\mathbf{i}_{j}\)), output gate (\(\mathbf{o}_{j}\)), hidden state (\(\mathbf{h}_{j}\)), and cell state (\(\mathbf{c}_{j}\)). At each time step (\(j\)), the operation of the LSTM memory cell was formulated as  
\[\mathbf{f}_{j}=\sigma\Big{(}\mathbf{W}_{xf}\mathbf{x}_{j}+\mathbf{W}_{hf} \mathbf{h}_{j-1}+\mathbf{b}_{f}\Big{)}, \tag{4}\]  
\[\mathbf{i}_{j}=\sigma\big{(}\mathbf{W}_{xi}\mathbf{x}_{j}+\mathbf{W}_{hi} \mathbf{h}_{j-1}+\mathbf{b}_{i}\big{)}, \tag{5}\]  
\[\mathbf{c}_{j}=\mathbf{f}_{j}\odot\mathbf{c}_{j-1}+\mathbf{i}_{j}\odot\tanh \big{(}\mathbf{W}_{xc}\mathbf{x}_{j}+\mathbf{W}_{hc}\mathbf{h}_{j-1}+\mathbf{ b}_{c}\big{)}, \tag{6}\]  
\[\mathbf{o}_{j}=\sigma\big{(}\mathbf{W}_{xo}\mathbf{x}_{j}+\mathbf{W}_{ho} \mathbf{h}_{j-1}+\mathbf{b}_{o}\big{)}, \tag{7}\]  
\[\mathbf{h}_{j}=\mathbf{o}_{j}\odot\tanh\big{(}\mathbf{c}_{j}\big{)}, \tag{8}\]  
where \(\mathbf{W}_{xf}\), \(\mathbf{W}_{xi}\), \(\mathbf{W}_{xc}\), and \(\mathbf{W}_{xo}\) are weight matrices for the input \(\mathbf{x}_{j}\); \(\mathbf{W}_{hf}\), \(\mathbf{W}_{hi}\), \(\mathbf{W}_{hc}\), and \(\mathbf{W}_{ho}\) are the learnable weight matrices of the hidden state; \(\mathbf{b}_{f}\), \(\mathbf{b}_{i}\), \(\mathbf{b}_{c}\), and \(\mathbf{b}_{o}\) are bias vectors; \(\sigma\) is the sigmoid function; \(\odot\) denotes element-wise multiplication; and \(\tanh\) is the hyperbolic tangent function. The output of each Bi-LSTM, including hidden-state information (\(\mathbf{h}_{j}\)), was the element-wise sum of the forward-propagating output (\(\overrightarrow{\mathbf{h}_{j}}\)) and backward-propagating output (\(\overleftarrow{\mathbf{h}_{j}}\)) of each LSTM at time step \(j\), as in  
\[\mathbf{h}_{j}=\left[\overrightarrow{\mathbf{h}_{j}}\odot\overleftarrow{ \mathbf{h}_{j}}\right], \tag{9}\]  
where \(\oplus\) represents the element-wise sum. The output of the Bi-LSTM in the first layer was used as the input of the Bi-LSTM in the second layer, and the output of the Bi-LSTM in the second layer was used as the input of the attention module. Secondly, the self-attention mechanism was used to construct attention modules, which input the hidden state feature (\(\mathbf{h}_{j}\)) obtained from Bi-LSTM for the probe sequence and the target sequence at each time step (\(j\)). The output was obtained by adaptively performing weight assignments according to the importance of each time step. The attention mechanism was the transfer of attentional behavior from human perception modality to machine learning. At present, it is widely utilized in the fields of CV, NLP, and other fields in which machines are trained to focus on crucial positions or extract keywordsfrom sentences, ignoring other unimportant parts [27; 28; 29; 30].