## 7 Visualization
### Learned Filters  
Previous work in the music domain is limited to visualizing learned filters only on the first convolution layer [8; 9; 36] or visualizing responses after a filter is applied on a specific input [37; 38]. The gradient ascent method has been proposed for directly seeing what is learned at a filter [39] and this technique has provided deeper understanding of what convolutional neural networks learn from images [40; 41]. We applied the technique to our SampleCNN to observe how each filter in a layer processes the raw waveforms. The gradient ascent method is as follows. First, we generate random noise and back-propagate the errors in the network. The loss is set to the target filter activation. Then, we add the bottom gradients to the input with gradient normalization. By repeating this process several times, we can obtain the accumulated gradients-based waveform like signal at the input which is optimized to maximize the target filter activation. Examples of learned filters at each layer are in Figure 2. Although we can find the patterns that low-frequency filters are more visible along the layer, the estimated filters are still noisy. To show the patterns more clearly, we visualized them as spectrum in the frequency domain and sorted them by the frequency of the peak magnitude in Figure 3. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**MODEL**} & **GTZAN** & **MTAT** & **TAGTRUM** & **MSD** \\  & **(Acc.)** & **(AUC)** & **(Acc.)** & **(AUC)** \\ \hline Bag of multi-scaled features [29] & - & 0.898 & - & - \\ End-to-end [8] & - & 0.8815 & - & - \\ Transfer learning [30] & - & 0.8800 & - & - \\ Persistent CNN [31] & - & 0.9013 & - & - \\ Time-frequency CNN [32] & - & 0.9007 & - & - \\ Timbre CNN [33] & - & 0.8930 & - & - \\
2-D CNN [19] & - & 0.8940 & - & 0.851 \\ CRNN [20] & - & - & - & 0.862 \\
2-D CNN [24] & 0.632 & - & - & - \\ Temporal features [34] & 0.659 & - & - & - \\ CNN using artist-labels [35] & 0.7821 & 0.8888 & - & - \\ multi-level and multi-scale features & & & & \\ (pre-trained with MSD) [15] & 0.720 & 0.9021 & 0.766 & 0.8878 \\ \hline SampleCNN (\(3^{9}\) model) [13] & - & 0.9055 & - & 0.8812 \\ \hline \(-3\) layer (pre-trained with MSD) & 0.778 & 0.8988 & 0.760 & 0.8831 \\ \(-2\) layer (pre-trained with MSD) & 0.811 & 0.8998 & 0.768 & 0.8838 \\ \(-1\) layer (pre-trained with MSD) & 0.821 & 0.8976 & 0.768 & 0.8842 \\ last 3 layers (pre-trained with MSD) & 0.805 & 0.9018 & 0.768 & 0.8842 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparison with previous work. We report SampleCNN results on MagnaTAgaTune (MTAT) and Million Song Dataset (MSD). Furthermore, the result acquired from multi-level and multi-scale feature aggregation technique is also reported at the bottom 4 lines. “-\(n\) LAYER” indicates features of \(n\) layers below from the output are used for the transfer learning setting. Note that we set the input waveform estimate to 729 samples in length because, if we initialize and back-propagate to the whole input size of the networks, the estimated filters will have large dimensions such as 59,049 samples in computing spectrum. Thus, the results are equivalent to spectra from a typical frame size. The layer 1 shows the three distinctive filter bands which are possible with the filter size with 3 samples (say, a DFT size of 3). The center frequency of the filter banks increases linearly in low frequency filter banks but, as the layer goes up, it progressively becomes steeper in high frequency filter banks. This nonlinearity was found in learned filters with a frame-level end-to-end learning [8] and also in perceptual pitch scales such as mel or bark. Finally, we visualized spectrum of the learned filter for each sampling rate up to 4 th layers. In Figure 4, we can observe that all SampleCNN models focus (or zoom in) on the important low-frequency bands.