# Weakly Supervised U-Net with Limited Upsampling for Sound Event Detection
## 4 Experiments
### Model Configurations
\(AvgPool(2,2)\) is usually added after a convolutional layer, and \(AvgPool(1,f)\) is used in concatenating the output maps of different sizes in U-Net. The baseline CNN for the SED task is configured as shown in Table 4. It is constructed by stacking \(3\times 3\) convolutional layers, gradually enlarging the number of output maps from 1 to 128. There is no pooling layer between the convolutional layers, so the output map sizes are all the same as the input sizes. The last layer is a \(1\times 1\) convolutional layer and converts 128 output maps to the number of classes (C). The advantage of the baseline CNN is that it is very simple and the sound events are detected either in the time or frequency domain. However, if there is not enough training data, the model may underestimate. The classification targets are obtained by global weighted rank pooling (GWRP) on the individual feature maps, as explained in Section 2.4. The detailed configuration of the conventional U-Net in Figure 3 is shown in Table 5 [26]. In encoding, there are 3 convolutional blocks with average pooling of size \(2\times 2\), so the feature map sizes are divided by 2 in both the \(x\)- and \(y\)-axes. Therefore, the original input size \(312\times 64\) is divided by \(2^{3}=8\), resulting in feature maps of size \(39\times 8\). Another convolutional block without average pooling, but with dropout is added to the end of the encoder. The number of convolutional kernels is 16, 32, 64, and 128, so the final 3-dimensional output is of size \(39\times 8\times 128\). The decoder basically reverses the encoding process. The _DeConv_22 layer applies convolution with doubling both the \(x\)- and \(y\)-axes, followed by the _Concat_ layer with a skip connection to the corresponding encoder output, as shown in Figure 3. The final feature maps for \(C\) classes are obtained by the \(1\times 1\) convolutional layer, \(Conv(1,C)\), and GWRP is applied. The proposed U-Net with limited upsampling, denoted as LUU-Net, is similarly configured as the conventional U-Net. It also consists of four convolutional blocks, three deconvolutional blocks without residual connection [36], and one of \(1\times 1\) convolutional layer. Because the decoder of LUU-Net performs \(2\times 1\) upsampling instead of \(2\times 2\), an additional average pooling is employed to match the input size at the skip connection. The detailed configuration with the input and output shape is shown in Table 6. The _Concat_ layer concatenates the output of the last _DeConv_22 block and _Conv_ block, which has the same number of channels. The proposed method uses about 20% fewer parameters than the conventional U-Net. We trained the three models by applying GWRP to the baseline CNN, U-Net, and LUU-Net, respectively. The performances were evaluated by the prediction accuracies of the audio tagging (AT) and sound event detection (SED) tasks. We also trained the three models by applying MEX [37], AlphaMEX [6], and the proposed global threshold average pooling (GTAP) in Section 3.2. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Name** & **Input Shape** & **Output Shape** & **Output Size** \\ \hline \(Conv(3,32)\) & \((311,64,1)\) & \((311,64,32)\) & \(636,928\) \\ \(Conv(3,64)\) & \((311,64,32)\) & \((311,64,64)\) & 1,273,856 \\ \(Conv(3,128)\) & \((311,64,64)\) & \((311,64,128)\) & 2,547,712 \\ \(Conv(3,128)\) & \((311,64,128)\) & \((311,64,128)\) & 2,547,712 \\ \(Conv(1,C)\) & \((311,64,128)\) & \((311,64,C)\) & 19,904\(\times\)C \\ \hline total output size & & & 7,006,208 + 19,904\(\times\)C \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Baseline CNN design. It is composed of 4 convolutional layers with kernel size \(3\times 3\), followed by a \(1\times 1\) convolutional layer. The output of the last layer is for sound event detection.