# Dual-Path Beat Tracking: Combining Temporal Convolutional Networks and Transformers in Parallel
## 6 Interpretability in Beat Tracking  
Interpreting a model's decisions in a way that is comprehensible to humans is crucial for understanding its behavior. While significant progress has been made in interpretability research for text and image domains, the audio domain remains relatively underexplored. This gap arises because spectrograms, though visually akin to images, are challenging to \begin{table}
\begin{tabular}{c c} \hline \hline
**Models** & **Number of Trainable Parameters** \\ \hline TCN & 86,679 \\ Beat this & -20,000,000 \\ SpecTNT-TCN & 4,637,392 \\ Demixed DSA & 9,290,000 \\ Ours & 3,683,855 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Details of models and number of trainable parameters as mentioned in the publications. translate into auditory concepts that humans can intuitively understand. The difficulty lies in bridging the visual representation of spectrograms with meaningful notions of sound and rhythm [43]. To address this, we employed Grad-CAM to visualize the regions of spectrograms most relevant to the model's predictions for beat positions. Grad-CAM highlights areas that influence specific predictions, providing a visual explanation of the model's decisions. By analyzing these visualizations alongside audio samples and detection outputs, we identified a strong correlation between certain frequency ranges--particularly those associated with drum and snare sounds--and the detected beats. These findings suggest that low- and mid-range frequencies are critical indicators of rhythmic events. Additionally, variations in higher frequency regions often align with beat positions, highlighting the broad spectrum of frequencies involved in defining a \"beat frame\". Another observation from the heatmaps was the periodic activation of both low- and high-frequency ranges, occurring at intervals of approximately 4-5 beats. This recurring pattern suggests that these activations may correspond to downbeat positions. However, visualizations from the early convolutional layers tended to be coarse, capturing features shared across neighboring frames. These crude features are difficult to interpret conceptually since the spectrogram's visual nature does not directly translate into audible elements. In contrast, visualizations from the final layers revealed that mid-range and bass frequencies often play a pivotal role in identifying downbeats. Despite these insights, the framewise classification nature of the task limits our ability to link frequency features from earlier time frames to those at later time points, thereby restricting the interpretability of temporal dependencies. Figure 7 represents the visualizations of one of the pieces from GTZAN dataset on different stages. Grad-CAM effectively highlights spectrogram regions that contribute to individual predictions, such as beat positions. However, it struggles to capture temporal dependencies and cross-frequency interactions, which are essential for a comprehensive understanding of musical rhythms. While it provides valuable insights into immediate contributions, it does not reveal how beats evolve over time or how different frequency bands interact to form rhythmic patterns. Heightened activation in the bass frequency regions across various audio samples was frequently observed, reinforcing the importance of low frequencies in beat detection. However, this pattern was not consistent across tracks, with some compositions showing varying prominence in other frequency regions. This variability reflects the diversity of musical compositions, where beats may arise from a wide array of instruments and frequency ranges. From a spectral perspective, each time frame serves as a primary reference point, focusing on the frequency content at that moment. The model employs an attention mechanism to analyze patterns across time frames, capturing temporal dynamics critical for distinguishing beats from non-beats. However, the inherent variability in musical audio makes it challenging to interpret how beats in one time frame relate to those in another.