## 3 Proposed Method  
### Spectral-Temporal Feature Fusion  
The Mel spectrogram is an important tool for processing and analyzing sound signals. By simulating the human ear's perception of sound frequencies, it extracts the characteristic parameters in the sound signal and serves as the input for the abnormal sound detection task. The length of the gearbox sound signal is L, which is expressed as \(x\in R^{1\times\mathrm{L}}\), and the Mel spectrogram of \(x\) is \(F_{S}\in R^{\mathrm{M}\times\mathrm{N}}\), where M is the number of Mel filters and N is the number of frames. The formula for generating the Mel spectrogram is as follows:  
\[F_{S}=\log(W_{\mathrm{M}}.\|STFT(x)\|^{2}) \tag{2}\]  
In Equation (2), \(W_{\mathrm{M}}\in R^{\mathrm{M}\times\mathrm{D}}\) represents the Mel filter bank, and D is the number of frequency parameters of the spectrogram obtained through Short-Time Fourier Transform.  
The specific flow chart is shown in Figure 4.  
However, the Mel filter bank might filter out the high-frequency components that contain the information on abnormal sounds. In order to compensate for the missing abnormal information in the Mel spectrogram, a method that fuses the Mel spectrogram and  
Figure 4: Flow chart of Mel spectrogram extraction.  
Figure 3: Flow chart of abnormal sound detection of self-supervised model.  
time-domain features as the input of self-supervised classification features was designed. Tgram is the time-domain feature extracted from the original wave through a CNN-based network (TgramNet) [28].  
The specific structure of TgramNet is shown in Figure 5 and Table 1. Firstly, a one-dimensional convolutional kernel is used, and its number of channels, kernel size, and stride are set the same as the number of Mel filters, the window size, and stride of the Mel spectrogram. Then, three CNN blocks are used. Each block consists of a normalization layer, a Relu activation function, and a one-dimensional convolution. The resulting time-domain features can be expressed as:  
\[F_{T}=TN(x) \tag{3}\]  
In Equation (3), \(TN(.)\) represents the features extracted from the time domain, and \(F_{T}\in R^{M\times N}\) has the same dimension as \(F_{S}\).  
In Table 1, c, k, s, p, and n represent the number of channels, kernel size, stride, padding size, and number of layers, respectively. M represents the number of Mel filters, and W and H represent the window size and the highest frequency of the Fast Fourier Transform, respectively.  
Finally, the Mel spectrogram \(F_{S}\) and the time-domain feature \(F_{T}\) are fused through a simple concatenation fusion strategy to obtain the time-frequency fusion feature STgram, and the formula can be expressed as:  
\[F_{ST}=Concat(F_{S},F_{T}) \tag{4}\]  
In Equation (4), \(concat(.)\) represents the operation of concatenating and adding channels. The overall framework diagram of the proposed time-domain and frequency-domain feature fusion method is shown in Figure 6.  
\begin{table}
\begin{tabular}{l l l l l l} \hline \hline
**Operation** & **c** & **k** & **s** & **p** & **n** \\ \hline Conv1D & M & W & H & W/2 & \(\times 1\) \\ \hline LayerNorm & - & - & - & - & \\ LeakyRelu & - & - & - & - & \(\times 3\) \\ Conv1D & M & 3 & 1 & 1 & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Structure of TgramNet.  
Figure 5: Structural diagram of TgramNet.