# Deep Learning for Audio Event Detection and Tagging on Low-Resource Datasets
## 2 Task Factorisation
### Audio Event Detection (WHEN)
#### 2.2.1 Neural Network Architecture  
For our audio event detector, we use a state-of-the-art stacked convolutional and recurrent neural network architecture. Table 1 describes the parameters of the proposed architecture.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Layer** & **Size** & **\#Fmaps** & **Activation** & **l2\_regularisation** \\ \hline Convolution 2D & \(3\times 3\) & 64 & Linear & 0.001 \\ Batch Normalisation & - & - & - & - \\ Activation & - & - & ReLU & - \\ Convolution 2D & \(3\times 3\) & 64 & Linear & 0.001 \\ Batch Normalisation & - & - & - & - \\ Activation & - & - & ReLU & - \\ Max Pooling & \(1\times 5\) & - & - & - \\ Convolution 2D & \(3\times 3\) & 64 & Linear & 0.001 \\ Batch Normalisation & - & - & - & - \\ Activation & - & - & ReLU & - \\ Convolution 2D & \(3\times 3\) & 64 & Linear & 0.001 \\ Batch Normalisation & - & - & - & - \\ Activation & - & - & ReLU & - \\ Max Pooling & \(1\times 4\) & - & - & - \\ Convolution 2D & \(3\times 3\) & 64 & Linear & 0.001 \\ Activation & - & - & ReLU & - \\ Max Pooling & \(1\times 2\) & - & - & - \\ Reshape & - & - & - & - \\ Bidirectional GRU & 64 & - & tanh & 0.01 \\ Bidirectional GRU & 64 & - & tanh & 0.01 \\ Time Distributed Dense & 64 & - & ReLU & 0.01 \\ Time Distributed Dense & 1 & - & Sigmoid & 0.01 \\ Flatten & - & - & - & - \\ \hline \hline \end{tabular}
\end{table}
Table 1: WHEN network architecture. Size refers to either kernel shape or number of units. #Fmaps is the number of feature maps in the layer. Activation denotes the activation used for the layer and l2_regularisation the amount of l2 kernel regularisation used in the layer.  
The log mel-band energy feature extracted from the audio is fed to the neural network, which sequentially produces the predicted strong labels for each recording. The input to the proposed network is a \(T\times 40\) feature matrix. The convolutional layers in the beginning of the network are in charge of learning the local shift-invariant features of this input. We use a 3 \(\times\) 3 receptive field and the padding arguments set as'same' in order to maintain the same size as the input in all our convolutional layers. The max-pooling operation is performed along the frequency axis after every convolutional layer to reduce the dimension for the feature matrix while preserving the number of frames \(T\). The output of the convolutional part of the network is then fed to bi-directional gated recurrent units (GRUs) with tanh activation to learn the temporal structure of audio events. Next, we apply time distributed dense layers to reduce feature-length dimensionality. Note that the time resolution of \(T\) frames is maintained in both the GRU and dense layers. A sigmoid activation is used in the last time-distributed dense layer to produce a binary prediction of whether there is an event present in each time frame. This prediction layer outputs the strong labels for a recording. The dimensions of each prediction are \(T\times 1\). Finally, we calculate the loss on this output as explained in Section 2.2.2.