## 2 Methods
### Establishing the Computation Model  
The Long Short-Term Memory (LSTM) units were first proposed by [PERSON] et al. [26], based on recurrent neural networks. The gating mechanism was used to solve the problem of gradient vanishing. Subsequently, due to their good capability for sequence memory, LSTM units were widely used in the field of natural language processing. An LSTM maintains a memory based on history information, which enables the model to predict the current output conditioned on long distance features. Figure 4 illustrated a single LSTM memory cell. The LSTM memory cell was implemented as the following. The LSTM cell, mainly consisted of the forget gate, input gate, and output gate. Via these gate functions, the LSTM network can effectively capture complicated features within time series in both short and long terms. \[i_{t}=\sigma(W_{xi}x_{t}+W_{ht}h_{t-1}+W_{ci}c_{t-1}+b_{i}) \tag{1}\]  
\[f_{t}=\sigma\Big{(}W_{xf}x_{t}+W_{hf}h_{t-1}+W_{cf}c_{t-1}+b_{f}\Big{)} \tag{2}\]  
Figure 3: Constructed the inputs and outputs of the model; **(a)** segmentation of heart sound signal based on the R-wave positions. The pink circles indicated R-waves. The red diamonds indicated right ventricular systolic blood pressure (RVSBP) values; **(b)** inputs and outputs to the model. \[c_{t}=f_{t}c_{t-1}+i_{t}tanh(W_{xc}x_{t}+W_{hc}h_{t-1}+b_{c}) \tag{3}\]  
\[o_{t}=\sigma(W_{x0}x_{t}+W_{ho}h_{t-1}+W_{c0}c_{t-1}+b_{o}) \tag{4}\]  
\[h_{t}=o_{t}tanh(c_{t}) \tag{5}\]  
\[\sigma(x)=\frac{1}{1+e^{-x}} \tag{6}\]  
\[tanh(x)=\frac{e^{x}-e^{-x}}{e^{x}+e^{-x}} \tag{7}\]  
where \(\sigma\) is the logistic sigmoid function, and \(i,\ f,\ o\) and \(c\) are the input gate, forget gate, output gate and cell vectors, all of which are the same size as the hidden vector. The weight matrix subscripts have the meaning as the name suggests. For example, \(W_{hi}\) is the hidden-input gate matrix, \(W_{x0}\) is the input-output gate matrix. The weight matrices from the cell to gate vectors (e.g., \(W_{ci}\)) are diagonal. In this paper, we applied Bi-LSTM [27] to sequence prediction. Bi-LSTM networks were based on the basic LSTM units. The Bi-LSTM model includes forward and backward LSTM channels, which simultaneously captured past and future information. It can extract deep and robust features regarding prediction tasks of time series. The bidirectional LSTM network was showed as Figure 5. The input layer represents input signals and the output layer represents output tags. The inputs and outputs corresponded to the HS signals and the RVSBP values, respectively, as shown in the purple dash line. The purple gradient boxes with rounded corners indicated the LSTM memory cells. The information was processed in both directions with two different hidden layers and fed forward to an output layer. We can efficiently make use of the past inputs (via forward states) and the future inputs (via backward states) for a specific time frame. Figure 4: A Long Short-Term Memory Cell. Figure 6 was the proposed signal processing framework by the authors. This model was based on supervised learning. The heart sound recordings were segmented into consecutive cardiac cycles based on the R-wave peak locations; at the same time the HS signals were unified into the length of one second time-scaled. In the training stage, the Bi-LSTM model was trained to construct the relations from the inputs (the cyclic heart sound signals) to the outputs (RVSBP values). In the testing stage, the trained model was to estimate RVSBP values with new inputs. Figure 6 illustrated a RVSBP estimation system in which each RVSBP value was tagged with different measured values. For example, in the training set, the Figure 6 showed the HS signals were tagged as 24.2 mmHg, 58.4 mmHg,..., 24.7 mmHg. In the testing set, the new input HS signals were tagged as the estimated results: 34.2 mmHg, 47.5 mmHg,..., 45 mmHg. The input layers had the same dimension with the HS signal size. The output layers had the same dimension with the size of RVSBP.