# Global Structure-Aware Drum Transcription Based on Self-Attention Mechanisms
## 4 Evaluation
### Investigation of Self-Attention Mechanism
\begin{table}
\begin{tabular}{c l c c c c c c c c c c} \hline \hline  & & \multicolumn{6}{c}{**Madmom**} & \multicolumn{6}{c}{**Ground-Truth**} \\ \cline{3-14}  & **Decoder** & **BD** & **SD** & **HH** & **Total** & **TER** & **BD** & **SD** & **HH** & **Total** & **TER** \\ \hline \multirow{2}{*}{Slakh} & SelfAtt & 96.0 & 93.1 & 75.4 & 88.2 & 20.0 & 95.7 & 92.7 & 75.7 & 88.0 & 7.7 \\  & SelfAtt-SyncPE & 95.8 & 93.1 & 79.9 & **89.6** & **18.7** & 95.6 & 92.9 & 79.5 & **89.3** & **6.8** \\ \hline \multirow{2}{*}{RWC} & SelfAtt & 87.5 & 72.0 & 68.8 & 76.1 & 19.2 & 87.5 & 72.2 & 69.1 & 76.3 & 15.5 \\  & SelfAtt-SyncPE & 87.5 & 76.4 & 72.6 & **78.8** & **17.0** & 88.0 & 75.6 & 72.9 & **78.8** & **13.2** \\ \hline \hline \end{tabular}
\end{table} 
Table 7: F-measures (%) and TERs obtained by CNN-SelfAtt with the conventional positional encodings and CNN-SelfAtt-SyncPE with the proposed tatum-synchronous positional encodings. We confirmed that CNN-SelfAtt-SyncPE with the MLM-SyncPE-based regularization learned the global structures of drum scores through attention matrices and yielded globally coherent drum scores. Figure 9 shows examples of attention matrices. In Slakh-Track01930, both the global structure of drums and the repetitive structure of BD were learned successfully. In RWC-MDB-P-2001 No. 25, the repetitive structures of SD and HH were captured. These examples demonstrate that the attention matrices at each layer and head can capture the different structural characteristics of drums. Figure 10 shows examples of estimated drum scores. In RWC-MDB-P-2001 No. 25, the MLM-SyncPE-based regularization improved PPL\({}^{\text{bi}}\) (musical unnaturalness) and encouraged CNN-SelfAtt-SyncPE to learn the repetitive structures of BD, SD, and HH. In RWC-MDB-P-2001 No. 40, in contrast, although the MLM-SyncPE-based regularization also improved PPL\({}^{\text{bi}}\), it yielded an oversimplified score of HH. \begin{table}
\begin{tabular}{l l c c c c c c c c c c} \hline \hline \multicolumn{2}{c}{**Decoder**} & \multicolumn{8}{c}{**Madmom**} & \multicolumn{8}{c}{**Ground-Truth**} \\ \hline \multicolumn{2}{c}{} & **+ Language Model** & **BD** & **SD** & **HH** & **Total** & **TER** & **BD** & **SD** & **HH** & **Total** & **TER** \\ \hline \multirow{8}{*}{Slakh} & SelfAtt-SyncPE & & 95.8 & 93.1 & 79.9 & 89.6 & 18.7 & 95.6 & 92.9 & 79.5 & 89.3 & 6.8 \\  & + Bi-gram & (51) & 95.1 & 93.0 & 80.5 & 89.5 & 18.6 & 94.9 & 93.1 & 80.6 & 89.5 & 6.5 \\  & + GRU & (51) & 96.3 & 92.1 & 80.0 & 89.5 & 18.6 & 96.1 & 92.1 & 79.9 & 89.3 & 6.4 \\  & + MLM-SyncPE & (51) & 95.8 & 93.5 & 79.9 & 89.7 & 19.0 & 95.8 & 93.7 & 79.8 & 89.8 & 7.0 \\  & + Bi-gram & (512) & 95.8 & 92.7 & 80.5 & 89.7 & **18.5** & 95.4 & 93.1 & 80.5 & 89.7 & **6.3** \\  & + GRU & (512) & 96.4 & 93.0 & 80.5 & **90.0** & **18.5** & 96.1 & 92.9 & 80.4 & 89.8 & 6.4 \\  & + MLM-SyncPE & (512) & 96.1 & 93.2 & 80.7 & **90.0** & **18.5** & 95.8 & 93.3 & 80.9 & **90.0** & **6.3** \\ \hline \multirow{8}{*}{RWC} & SelfAtt-SyncPE & & 87.5 & 76.4 & 72.6 & 78.8 & 17.0 & 88.0 & 75.6 & 72.9 & 78.8 & 13.2 \\  & + Bi-gram & (51) & 86.1 & 76.5 & 66.8 & 76.5 & 17.1 & 85.7 & 76.6 & 67.4 & 76.6 & 13.1 \\  & + GRU & (51) & 85.6 & 73.3 & 70.2 & 76.4 & 19.6 & 86.7 & 72.9 & 71.3 & 76.9 & 15.7 \\  & + MLM-SyncPE & (51) & 86.8 & 75.7 & 71.5 & 78.0 & 17.5 & 86.9 & 75.2 & 72.2 & 78.1 & 13.6 \\  & + Bi-gram & (512) & 86.0 & 76.5 & 69.6 & 77.4 & 16.8 & 87.0 & 76.0 & 69.6 & 77.5 & 12.7 \\  & + GRU & (512) & 87.6 & 76.2 & 73.2 & 79.0 & 16.6 & 87.8 & 76.3 & 73.9 & **79.4** & 12.5 \\  & + MLM-SyncPE & (512) & 88.1 & 74.9 & 75.4 & **79.5** & **16.2** & 87.9 & 74.3 & 71.7 & 78.0 & **12.4** \\ \hline \hline \end{tabular}
\end{table} 
Table 8: F-measures (%) and TERs obtained by CNN-SelfAtt-SyncPE regularized by the language models pretrained from 51 or 512 external drum scores. Figure 8: F-measures (%) and TERs obtained by CNN-BiGRU and CNN-SelfAtt-SyncPE trained with 1/32, 1/16, 1/4, 1/2, and all of the training data.