# A Deep Attention Model for Environmental Sound Classification from Multi-Feature Data
## 4 Experiment and Analysis
### Comparative Experiment
#### 4.3.2 Experimental Result Comparison of Network Models  
The attention mechanism can better help the model to extract the feature information from the spectral map. Taking advantage of the improved input feature map, the model \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Feature Map Types** & **ESC-10** & **ESC-50** & **UrbanSound8K** \\ \hline Log-Mel spectrogram & 92.75 & 83.25 & 80.47 \\ Phase spectrogram & 68.25 & 62.50 & 53.18 \\ time-frequency spectrogram & 90.25 & 80.75 & 78.15 \\ Phase, time–frequency spectrogram & 81.75 & 72.00 & 68.26 \\ Log-Mel, time–frequency spectrogram & 93.75 & 85.25 & 81.32 \\ Log-Mel, phase spectrogram & 95.00 & 86.75 & 81.63 \\ Log-Mel, Phase, time–frequency spectrogram & 97.25 & 89.00 & 83.45 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of different feature map types (accuracy, %). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Sampling Frequency /Hz** & **ESC-10** & **ESC-50** & **UrbanSound8K** \\ \hline
8 K & 95.25 & 86.50 & 81.31 \\
16 K & 95.25 & 87.25 & 80.76 \\
44.1 K & 97.25 & 89.00 & 83.45 \\
48 K & 96.00 & 88.50 & 79.94 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of recognition ability under different sampling frequencies (accuracy, %). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Frame Length** & **Frame Shift** & **Number of Mel Filters** & **Feature Map Size** & **Network Accuracy \% (ESC-50)** \\ \hline
1024 & 512 & 40 & (40, 431, 3) & 86.25 \\
1024 & 512 & 64 & (64, 431, 3) & 86.25 \\
2048 & 512 & 64 & (64, 431, 3) & 86.75 \\
2048 & 1024 & 64 & (64, 216, 3) & 88.25 \\
4096 & 2048 & 64 & (64, 108, 3) & 84.00 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Network recognition results of feature maps of different sizes. improves on previous classification performance. The effect of the insertion position of the attention mechanism is shown in Table 4.  
As is suggested by the experimental results in Table 4, when the attention mechanism is put at the input end of the model, the recognition ability is the best. In this way, the feature spectrogram is first treated by the attention mechanism, and then the residual network comes in for feature extraction. The attention mechanism extracts high-dimensional features, and this effectively reduces the interference of the noise and irrelevant frequency bands in the spectrogram. When the attention mechanism is inserted into other places of the network, the low-dimensional features that have been extracted by convolution are not sensitive to attention. Additionally, the attention mechanism increases the complexity of the model. If the positive effect achieved is not enough to compensate for the penalty of the greater model complexity, the recognition ability of the model will deteriorate. Therefore, when the attention mechanism is inserted between the residual blocks, the recognition accuracy of the model decreases compared with the model without the attention mechanism. When the attention mechanism is put at the output side of the model, the effect is not significant. Table 5 compares the proposed environmental sound recognition method and the current advanced methods, both at the optimal feature combination and network model. As can be seen in Table 5, the proposed method performs better than other methods on the ESC10, ESC50, UrbanSound8K (official/unofficial) datasets. The proposed model possesses outstanding recognition ability in environmental sound recognition. The confusion matrices of the experimental results on the ESC10 dataset, ESC50 dataset, and UrbanSound8K dataset are shown in Figure 5a-c, respectively. It can be seen that with these three datasets, the network is more sensitive to instantaneous and short-lasting sound signals, and is therefore more accurate in picking out such sound signals like gunshots and car horns. It is less sensitive to sound signals widely distributed on the time domain axis, such as engine roar, electric drill sound, and air conditioner sound.