## 4 Discussion  
As shown in Table 4, we listed some classical algorithms in the field of detection of myocardial infarction. Most [3; 4; 5; 6; 7] applied machine learning techniques to the detection of myocardial infarction and achieved promising results. However, some of them [3; 4; 5; 6; 7] achieved good results only for some specific ECG leads or ECG records. In our work, the Bi-LSTM network does not require complex feature extraction techniques and we achieved comparable or better performance in a relatively complete PTB diagnostic ECG database. [PERSON] et al. [8] applied a convolutional neural network to classify heartbeats of lead II ECG records, also eliminating the need for manual extraction of features. Simultaneously, it achieved an accuracy of 95.22%. In our work, we do not use any labels of heartbeats to train our model based on the standard 12-lead ECG records. Further, our model is validated by the patients' complete records and their real labels from the PTB diagnostic ECG database. Only a 1-lead ECG is unreliable for detection of myocardial infarction [3] and the beat-wise annotations are of great cost. Accordingly, our method is more effective and practical. The experimental conditions of [PERSON] et al. [9] were the same as for our experiments. They applied multiple instance learning to measure the difference between unlabeled heartbeats based on 12-lead ECG records. Our method can automatically complete this process by a Bi-LSTM network with heartbeat-attention mechanism. As analyzed in the previous section, the heartbeat-attention mechanism  
Figure 7: Weights assigned for different heartbeats in ECG records. can weight different unlabeled heartbeats based on 12-lead ECG records to improve performance. Additionally, our method has been significantly and comprehensively improved in experimental performance in comparison with theirs [9]. In summary, our method has the following advantages:  
1. It does not require any labels of heartbeats and is based on the standard 12-lead ECG records. 2. The heartbeat-attention mechanism is implemented to weight different unlabeled heartbeats. Although our method achieves good performance, we also discovered drawbacks from misclassified samples. As shown in Figure 8, this is a false negative sample with only four abnormal heartbeats. Although the predicted value of this sliding window is correct, the prediction of the ECG record containing this sliding window is wrong. The reason is that the complete ECG record of 'Patient049/s0173' only contains four abnormal heartbeats, which results in many sliding windows to be predicted as HC. Eventually, the output of the decision function is wrong. This problem may be solved in two ways. On the one hand, a larger number of ECG records are needed to optimize the parameters in the decision function. On the other hand, we should add other symptoms of patients into the decision function. For the false positive sample, we can see from Figure 9 that most of the heartbeats in the sliding window are distorted, and patient's motion state or the stable type of acquisition devices has a significant impact on the quality of ECG signals. Poor quality will lead to degraded performance. We believe that the algorithms for evaluating quality of ECG signals [22] will improve this problem. In summary, our method has following drawbacks:  
1. It requires more data to further improve the performance. 2. Its performance is greatly affected by the quality of ECG signals.