## 6 Two-Tier Data Source Authentication Scheme
### Evaluation of Tier-2 Authentication  
As we do not yet have access to real ECG sensors, we used publicly available data from the long-term ST ECG database at MIT's PhysioWeb [27] for developing our neural networks. Each patient's ECG data covers a period of 21-24 hours. We set aside some of these patients as a \"reference set.\" For each of the remaining patients, a training data set was constructed consisting of the first 2000 heartbeats from that particular patient's record (associated with a neural network output of 1) and the first 2000 heartbeats from each of the patients in the reference set (associated with a neural network output of 0). We performed some experimentation with different neural network setups by varying the number of reference patients used in training as well as the features extracted from each beat of ECG data. The results in Table 1 suggest that increasing the number of reference patients potentially has the greatest returns on performance. For subsequent experiments, we chose the setup with the best overall performance for the training of each patient's neural network, i.e., 9 reference patients and a four-layer feed-forward neural network model with 8 input cells, 2 layers of 15 hidden cells, 1 output cell, and a log sigmoid activation function on the hidden layers. Table 2 shows how well the trained neural networks could classify the training data from 10 patients (patients are labeled \(P_{1},...P_{10}\), and reference patients are labeled \(R_{1},...R_{9}\)). The number corresponding to (\(P_{i}\), self) indicates the percentage of training samples (heartbeats) from patient \(P_{i}\) that were correctly classified as from that patient. The number (\(P_{i}\), \(R_{j}\)) indicates the percentage of training samples from reference patient \(R_{j}\) that were correctly classified as _not_ being from patient \(P_{i}\). For example, the fourth row of Table 2 indicates that (1) the trained network for patient \(P_{4}\) was able to correctly classify 99.85% of the training inputs from \(P_{4}\) as being from \(P_{4}\) (the first value); and (2) it was able to classify 100% of the training inputs from reference patients \(R_{1}\), \(R_{2}\), \(R_{4}...R_{9}\), and 99.93% of the training inputs from \(R_{3}\), as _not_ being from \(P_{4}\). Overall, the neural networks learned the training data very well, with an average accuracy of 99.8%. Figure 4: A typical ECG signal for a single heartbeat. Next, we use each trained neural network to classify the validation data (i.e., 10,000 heartbeats not used in training) from each of the non-reference patients. As shown in Table 3, the neural networks give accurate results in most cases. For example, the fourth row shows that patient \(P_{4}\)'s neural network was able to correctly classify the validation data from patients \(P_{1}\) through \(P_{6}\) and \(P_{8}\) through \(P_{10}\) almost 100% of the time, but was less accurate with \(P_{7}\). The average validation accuracy for the neural networks over all patients was 87.7%. To see how well these results might generalize, we also expanded the neural network training to a larger set of data from the long-term ST database (26 patients \(P_{1}\)... \(P_{26}\), with the same set of reference patients \(R_{1}\)... \(R_{9}\)). We found that the overall effectiveness of the neural networks on the larger set was \begin{table}
\begin{tabular}{c||c|c|c} \hline
**Structure** & **Features** & **Ref. Patients** & **Accuracy** \\ \hline \hline
8\(\times\)20\(\times\)1 & 8 & 5 & 69.79\% \\
8\(\times\)20\(\times\)1 & 8 & 9 & 81.86\% \\
14\(\times\)20\(\times\)1 & 14 & 5 & 80.07\% \\
14\(\times\)20\(\times\)1 & 14 & 9 & 84.44\% \\
8\(\times\)15\(\times\)15\(\times\)1 & 8 & 9 & 91.31\% \\
14\(\times\)15\(\times\)15\(\times\)1 & 14 & 9 & 89.66\% \\ \hline \hline \end{tabular} Structure refers to the number of input, hidden, and output cells in the neural network. Ref. Patients refers to the number of reference patients.  
The accuracies provided represent the average validation accuracy over _all_ patients.  
\end{table}