## 5 Experiments and Results
### Discussion  
The experimental results presented in Sections 5.2-5.5 provide comprehensive insights into the performance, generalizability, and complexity trade-offs of different attention-enhanced models. While the baseline ResNet-50 already achieved competitive performance on both the standard UrbanSound8K dataset (94.73%) and the more challenging UN15 dataset (81.24%), the introduction of the time-frequency attention (TF-attention) module led to consistent improvements in classification accuracy, robustness, and discriminability. Specifically, the ResNet-TF model reached 95.42% accuracy on UrbanSound8K and 85.19% on UN15, demonstrating strong generalization across both clean and noisy urban acoustic environments. To validate the effectiveness and necessity of modeling both temporal and spectral dependencies, we conducted an ablation study by decomposing the TF-Attention module into two single-branch variants: ResNet-T (temporal attention) and ResNet-F (Frequency attention). On the UN15 dataset, the ResNet-T and ResNet-F models achieved 84.93% and 82.96% accuracy, respectively, both outperforming the baseline but falling short of the full TF-attention model. These results indicate that attention mechanisms focusing on only a single dimension (either time or frequency) fail to capture the full complexity of urban acoustic scenes. Temporal attention enhances the model's ability to identify patterns such as bursts, onsets, or duration-related cues, while frequency attention captures important spectral structures like harmonic peaks or machine-specific resonances. When both aspects \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Method** & **Total Params** & **Mult-Adds** & **Training Time** & **Accuracy** \\ \hline ResNet50 & 9.4786 M & 2.9814 G & 1:47:51 & 81.24\% \\ ResNet-T & 9.5657 M & 2.9845 G & 1:44:48 & 84.93\% \\ ResNet-F & 9.5657 M & 2.9849 G & 1:41:31 & 82.96\% \\ ResNet-TF & 9.6527 M & 2.9880 G & 1:47:11 & 85.19\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparison of model complexity and classification performance among ResNet-50, ablation variants (ResNet-T and ResNet-F), and the proposed ResNet-TF. are combined, as in the proposed TF-attention, the model can more effectively emphasize salient sound components while suppressing background noise and irrelevant features, leading to superior recognition performance. In Section 4.3, we further analyzed how TF-attention differs from and improves upon conventional attention modules. While SE and ECA modules enhance channel-wise feature representations through global pooling, they do not explicitly model temporal or spectral structures. CBAM incorporates spatial attention but treats the spectrogram as a unified 2D space, failing to decouple time and frequency axes. Compared to these designs, TF-attention introduces two independent branches for temporal and frequency attention, allowing the model to learn fine-grained, dimension-specific attention maps that are better aligned with the structure of audio spectrograms. Although transformer-based attention modules are capable of long-range dependency modeling, they introduce substantial computational cost and are less suitable for deployment in real-time or embedded systems. In contrast, our TF-Attention remains lightweight, adding only \(\sim\)1.8% parameters and \(\sim\)0.2% mult-adds over ResNet-50, while achieving significant accuracy improvements (up to +3.95%). Moreover, the confusion matrix analysis (Figures 5 and 6) highlights that TF-attention is especially effective in reducing errors for hard-to-distinguish categories such as fireworks vs. pile driver or helicopter vs. drone, where subtle time-frequency cues are crucial. The model demonstrates strong discriminative capability even under the highly variable and overlapping sound conditions present in the UN15 dataset.