# 3D Convolution Recurrent Neural Networks for Multi-Label Earthquake Magnitude Classification +
## 4 Experiments  
### Data Representation: Feature Extraction  
Here, we propose interpreting log-energies in the Mel scale at the frame level to represent earthquake signals accurately. Log-Mel spectrograms are constructed by linearly spacing triangular-shape filters in the Mel scale. The extraction of log-energies is identical to those of MFCCs [34], except that the extraction of discrete-continuous Transform (DCT) is eliminated while calculating the log-Mel energies. Log-Mel was initially proposed as a speech feature with a log scale filter and gives an impression that extra non-seismic wave components are covered. However, in this work, we need to discriminate seismic waves from a mixture of many types of sources, including various frequencies. Moreover, extracting features from seismic data using the log-Mel scaling help retain maximum spatial components while simultaneously keeping the temporal features. Firstly, 1-min collected waveforms are split into six ten-second chunks. Secondly, each 10-s sample is processed using triangular-shaped filters to produce a single log-Mel time-frequency spectrogram. A 10-s sample is sent through a sequence of 400 ms window signals, which results in 49 windows. However, we have added a zero at the end of the signal to obtain 50 frames to maintain consistency. A 10-s sample contains 1000 samples, but after adding '0' at the end, it makes it 1001 samples, resulting in 50 windows. This zero-padding helps retain the features during the training process in CNNs. Moreover, the short-time Fourier transform is computed using a fast Fourier transform (FFT) of 64 bins and a hamming window with 50% signal overlap (STFT). The number of filters is set to 60 to obtain 60 features in the Mel scale. Moreover, when we increase the number of filters in obtaining the log-Mel spectrogram equal importance is given to higher frequency components (not limited to 1-20 Hz, see Figure 4 for detailed comparison). The remaining five samples are processed following the same procedure, and a stack of six spectrograms is created to provide the data to a neural network to construct feature maps. The complex spectrum of the seismic waveform \(s(t)\) is denoted by the following equation,  
\[S(n,f)=S(n,f)e^{\beta(n,f)} \tag{5}\]  
Using \(\theta(n,f)\) and \(S(n,f)\), we express a signal's amplitude and its phase spectrum at a given frequency \(f\) in frame \(n\). Mel-scale features have substantially benefited low-frequency speech recognition implementations; however, they have not been investigated in low-frequency applications containing seismic signals. We propose to apply [PERSON]. [PERSON] [35; 36] analytical technique to transform Hertz-scale frequencies to Mel-scale and retrieve log energies.  
Figure 3: Label Distributions of Earthquake Magnitudes in Multi-label dataset.  
\[m=2595\log_{10}(1+f/700) \tag{6}\]  
whereas filter bandwidths are computed using the equation below,  
\[f=700(10^{m/2595}-1) \tag{7}\]  
Figure 4: Signal improvements and comparison of short-Time Fourier transform (STFT) with log–Mel spectrograms of the earthquake signals. (**a**) STFT of earthquake magnitude \(>4\); (**b**) log–Mel spectrogram of earthquake magnitude \(>4\); (**c**) STFT of earthquake magnitude \(>2\); (**d**) log–Mel spectrogram of earthquake magnitude \(>2\); (**e**) STFT of earthquake magnitude \(>3\); (**f**) log–Mel spectrogram of earthquake magnitude \(>3\).  
Using the above equations, we constructed linearly spaced triangular filters and extracted 60 features in the spectral domain and 50 features in the time domain. Finally, the magnitude measurements are normalized and transformed as log magnitudes to perform network training.  
\[S(n,f)=\log(S(n,f)) \tag{8}\]  
\(\delta\times 60\times 50\) is the dimensionality of the recovered features, where \(\delta\) indicates the sample size for each ground motion signal. Finally, the \(6\times 60\times 50\) features are fed into the 3D-CNN-RNN architecture as an input. Figure 5 also illustrates the data input stream for the feature extraction phase.