# Trident: A Deep Learning Framework for High-Resolution Bridge Vibration Monitoring
## 5 Performance Evaluations  
This section contains Trident's evaluation metrics for the bridge damage dataset mentioned earlier. The design of this model involves several hyperparameters that could substantially affect its robustness. The network starts with three ConvLSTM3D branches, followed by a concatenation of features and stacks of 3D convolution, batch normalization, and activations. Further details are provided in Table 3.  
The damage dataset is highly imbalanced towards the undamaged nodes, and proper selection of training hyperparameters is critical. We have utilized the focal loss function as described in what follows [41]:  
\[L_{f}=\alpha_{t}(1-p_{t})^{7}\log p_{t} \tag{7}\] \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Description** & **Range** \\ \hline \(\sigma_{n}\) & Load intensity noise & [0.05, 0.02] \\ \hline \(dt_{n}\) & Sampled noise time steps (s) & [0.01, 0.02] \\ \hline v & Vehicle speed (mph) & [10; 50] \\ \hline \(\alpha\) & Axle load modification factor & [0.8, 1.2] \\ \hline \(n_{d}\) & Number of damaged elements & [0; 10] \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Ranges of sampling for different coefficients used for data diversification. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Layer** & **Hidden Units** & **Kernel Size** & **Padding** \\ \hline \(3\times\) ConvLSTM3D & 125 & (3,1,1) & - \\ \hline Concatenation & - & - & - \\ \hline
3D Convolution & 512 & (3,3,3) & (1,1,1) \\ \hline Batch normalization + ReLU & - & - & - \\ \hline
3D Convolution & 256 & (3,3,3) & (1,1,1) \\ \hline Batch normalization + ReLU & - & - & - \\ \hline
3D Convolution & 1 & (3,3,3) & (1,1,1) \\ \hline Sigmoid & - & - & - \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Trident layer specifications. where:  
\[p_{t}=\left\{ \begin{array}{cc}p&y=1\,(\text{damage})\\ 1-p&y=0\end{array} \right. \tag{8}\]  
\(p\) values are Trident's output probabilities for each structural node and \(\alpha_{t}\) is a weight factor that depends on the target labels (\(y\)). The focal loss hyperparameters \(\alpha\) and \(\gamma\) affect the model's sensitivity to the imbalance. \[\alpha_{t}=\left\{ \begin{array}{cc}\alpha&y=1\,(\text{damage})\\ 1-\alpha&y=0\end{array} \right. \tag{9}\]  
Learning rate, L2 regularization coefficient, scheduled learning rate decay coefficient, and decay step size are considered the other training hyperparameters. Bayesian optimization is utilized to tune these values and the ranges provided in Table 4.  
A model may predict all nodes as damaged (D) or undamaged (ND) depending on the choice of hyperparameters. These circumstances are not desired as a model provides constant predictions regardless of input and is caused by improper training hyperparameters. Mean class accuracy, defined as the average of damage and undamaged classes, yields a 50% accuracy for such cases. As a more meaningful metric, we construct the confusion matrix for all nodes in the structure and take the geometric mean of D and ND classes for each node. The Node Average Geometric Mean Accuracy (NAGMA) is obtained by averaging the geometric means over all nodes in the structure. NAGMA obtained on the validation set is the objective function output of Bayesian optimization. Unlike mean class accuracy, NAGMA is 0 for models with constant predictions. An early stopping patience of 3 epochs is considered to stop training before overfitting. The model with weights in the epoch with the lowest validation loss is selected for further testing, and a maximum of 50 epochs is considered for training. The performance metrics of the best model after 25 iterations are provided in Table 5. The test confusion matrices for each structural node are also provided in Figure 7.