# Dual-Path Beat Tracking: Combining Temporal Convolutional Networks and Transformers in Parallel
## 4 Feature aggregation and classification block  
A learnable parameter is introduced to combine activations generated by the TCN and Transformer branches, allowing the model to balance each branch's contributions to optimize beat prediction accuracy. This is followed by a fully connected layer, which projects the combined 128-dimensional representation for each time frame into a single activation score that indicates the probability of a beat. This final activation score is then passed to a post-processing stage for beat and downbeat extraction. Feature aggregation and classification block is represented in Figure 6.  
Figure 4: Temporal convolutional block. Figure 5: Transformer block. In this beat-tracking framework, the objective was to predict a beat activation function from this input, where peaks in the function align with probable beat locations. This activation function, once trained, enabled the derivation of a sequence of beat times by detecting its peaks. The beat tracking problem was framed as a binary classification task, where each time frame was labeled either as a beat or a non-beat. To match the temporal resolution of the spectrogram input, annotated beat locations were quantized to the spectrogram's frame rate and used as training targets. To enhance model accuracy and account for minor temporal shifts in beat annotations, following the convention, the annotated beat region was expanded by including two additional frames before and after each beat, assigning progressively lower weights to indicate proximity to the true beat location. Frames adjacent to the beat were assigned a weight of 0.5, while the subsequent frames were assigned a weight of 0.25. This method provides the model with additional positive signals near beat locations, allowing it to better capture slight variations in timing during training. Details regarding signal conditioning and model parameters are summarized in Table 1. \begin{table}
\begin{tabular}{c c} \hline \hline
**Signal Conditioning** & **Title 2** \\ \hline Audio sample rate & 44.1 kHz \\ Window shape & Hann \\ Window and FFT size & 4096 samples \\ Hop size & 1024 samples \\ Frequency range & 30 Hz–11,000 KHz \\ Total number of frequency bins & 128 \\
**Convolutional block** & \\ \hline Number of filters & 32, 64, 128 \\ Kernel size & \(3\times 3\), \(1\times 12\), \(3\times 3\), \\ Max-pooling size & \(1\times 3\), \(1\times 3\), \(1\times 3\), \\ Activation function & ELU \\
**TCN** & \\ \hline Number of stacks & 1 \\ Number of layers & 11 \\ Dilations in each layer & \(2^{\text{i}}\)...\(10\) \\ Dropout rate & 0.1 \\ Activation function & ELU \\
**Transformer** & \\ \hline Number of layers & 6 \\ Model dimension & 128 \\ Head dimension & 8 \\ Dropout rate & 0.2 \\ Feed forward multiplier & 4 \\ Positional Encodings & Rotary Encodings \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Details of the signal conditioning and key model parameters. Figure 6: Feature aggregation and classification block. Regarding the datasets used, we used Ballroom [34], Hainsworth [35], Harmonix [36], SMC [37], and GTZAN [38]. These are public datasets widely accepted within the community and have been used by [1; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12]. These datasets are widely accepted within the community due to their rich annotations and the fact that they cover a variety of music genres, albeit limited. This standardization allows for consistent comparisons across different methods and serves as a reliable evaluation framework for initial model development. For the training process, we used the Binary Cross-Entropy (BCE) loss. To optimize the model, we tried the Rectified Adam (RAdam) [39] and AdamW optimizer [40] and found that though the results are the same, AdamW led to faster convergence. The initial learning rate is set to \(1\times 10^{-3}\), which provides a good starting point for convergence. If the validation loss plateaus for 2 consecutive epochs, the learning rate is reduced by a factor of 5. capped at a minimum value of \(1\times 10^{-7}\).