# Bidirectional Long Short-Term Memory Neural Networks for Linear Sum Assignment Problems
## 4 Performance Evaluation  
In this section, we evaluate the simulation results of the proposed scheme using a BDLSTM model with different configurations for the LSAP. To obtain the optimized hyper-parameters, such as batch size, number of epochs, and learning rate, the proposed model was trained using several combinations of parameters using grid search, and the best combination was selected. The BDLSTM model with \(L=4\) layers was chosen, and each layer contained \(N^{l}=16\) hidden units at each gate. Figure 5 shows the convergence of the BDLSTM over each training epoch on the training and validation set with \(n=16\) and a batch size \(|\mathcal{B}|=1024\). The loss of the model on both datasets decreased steadily after each epoch, and the gap was minimal, suggesting no overfitting during training. Table 1 shows the accuracy performance comparisons between the proposed BDLSTM model and other neural network structures, where the FNN and CNN were based on [16], and a uni-directional LSTM model was used with the same number of layers and hidden units for the proposed model. The FNN consisted of \(n\) smaller models, each having four layers with 32, 64, 256, and \(n\) hidden neurons. Figure 5: Learning curve of the BDLSTM model with \(n=16\). The CNN consisted of five convolutional layers, each containing 32, 32, 32, 32, and \(n\) kernels, and \(n\) output layers, each with \(n\) neurons. The accuracy was defined as the number of jobs correctly assigned to their optimal agents divided by the total number of jobs according to decision matrices \(\mathbf{X}\) in the dataset. We can see that the proposed BDLSTM performed better than LSTM, FNN, and CNN for all values of \(n\). Because of the bidirectional structure, the proposed BDLSTM exhibited performance improvements between 18% (\(n=16\)) and 27% (\(n=8\)) compared with the conventional LSTM. The performance gap became more significant as \(n\), the size of the LSAP, increased. Figure 6 shows the complexity comparison of deep neural networks with a size \(n\) for the LSAP. Here, we focused on the number of trainable parameters to determine the complexity of the network, where the trainable parameters were the weight and bias values. The proposed BDLSTM was robust with respect to the complexity owing to the change in \(n\) compared to FNN and CNN. This was because the FNN model required \(n\) different fully-connected layers for \(n\) sub-assignment problems, and the sizes of the final layer and output layers of CNN scaled according to \(n\). Because the weights in a layer of the BDLSTM were shared among all sub-assignment problems, the number of trainable parameters was stable to the change in \(n\), resulting in low memory requirements. When \(n=16\), the BDLSTM achieved the best result while requiring 18- and seven-times fewer parameters than FNN and CNN, respectively. Following the proposed BDLSTM model, the collision-avoidance algorithm was applied to obtain the final output. Table 2 shows the performance and operating time after collision avoidance with \(n=8\), where all the tests were conducted on the same system with CPU E5-2620 v4, having eight cores at 2.10 GHz, and 32 GB of RAM. Table 2 shows the accuracy performances and operating time after collision avoidance with \(n=8\), where the accuracy after the collision avoidance could be obtained using \(\mathbf{X}\) and \(\mathbf{Z}\). As shown in Table 2, by achieving the highest classification accuracy, the proposed method reduced the percentage of collisions that occurred in the prediction result, hence limiting the usage of the Hungarian algorithm to solve the collision cases. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \(\mathbf{n=4}\) & \(\mathbf{n=8}\) & \(\mathbf{n=12}\) & \(\mathbf{n=16}\) \\ \hline FNN [16] & 97.63 & 70.19 & 59.18 & 56.14 \\ CNN [16] & 98.29 & 82.95 & 66.05 & 62.74 \\ LSTM & 77.15 & 67.82 & 64.20 & 60.35 \\ BDLSTM & 98.85 & 94.47 & 86.54 & 78.82 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Accuracy performance comparison. Figure 6: Complexity comparison.