## 3 Methods  
This study proposes a Dual-Branch Network that combines supervised classification learning (SCL) and self-supervised contrastive learning (SSCL). This method leverages a multi-task learning framework to optimize classification loss and contrastive loss simultaneously. The strong discriminative features of supervised classification integrates with the generalizable and robust features of SimCLR, which enhances the ability of model to deal with complex environments and improve classification accuracy. The overall structure of the method is illustrated in Figure 3. The model inference process is shown in Algorithm 1.  
\begin{table}
\begin{tabular}{l c c c c} \hline
**ID** & **Latin Name** & **Genus** & **Family** & **Sample** \\ \hline
6 & _Coturnix coturnix_ & _Coturnix_ & _Phasiantidae_ & 1367 \\
7 & _Asio otus_ & _Asio_ & _Strigidae_ & 696 \\
8 & _Asio flammeus_ & _Asio_ & _Strigidae_ & 1900 \\
9 & _Grus grus_ & _Grus_ & _Gruidae_ & 758 \\
10 & _Numenius phaeopus_ & _Numenius_ & _Scolopacidae_ & 1802 \\
11 & _Gallus gallus_ & _Gallus_ & _Phasiantidae_ & 1024 \\
12 & _Glareal maldiarum_ & _Glarealo_ & _Glarealoidae_ & 956 \\
13 & _Larus cantus_ & _Larus_ & _Laridae_ & 692 \\
14 & _Milvus migrants_ & _Milvus_ & _Accipitidae_ & 1668 \\
15 & _Haliaeetus albicilla_ & _Haliaeetus_ & _Accipitridae_ & 812 \\
16 & _Accipiter nius_ & _Accipiter_ & _Accipitridae_ & 1066 \\
17 & _Accipiter gentilis_ & _Accipiter_ & _Accipitridae_ & 647 \\
18 & _Falco tinnuculus_ & _Falco_ & _Falconidae_ & 803 \\
19 & _Phasianus colchicine_ & _Phasianus_ & _Phasianidae_ & 1001 \\
20 & _Lagopus muta_ & _Lagopus_ & _Phasianidae_ & 973 \\
21 & _Lyrurus tetrix_ & _Lyrurus_ & _Phasianidae_ & 1180 \\
22 & _Cygnus olor_ & _Cygnus_ & _Anatidae_ & 1444 \\
23 & _Cygnus cygnus_ & _Cygnus_ & _Anatidae_ & 1135 \\
24 & _Branta canadensis_ & _Branta_ & _Anatidae_ & 580 \\
25 & _Anas platyryrhchosiidae_ & _Anas_ & _Anatidae_ & 594 \\
26 & _Cetita cetti_ & _Cettia_ & _Sylviidae_ & 1500 \\
27 & _Acrocephalus arundinaceus_ & _Acrocephalus_ & _Sylviidae_ & 2934 \\
28 & _Phylloscopus trochiloides_ & _Phylloscopus_ & _Sylviidae_ & 1022 \\
29 & _Phylloscopus plumbeitarsus_ & _Phylloscopus_ & _Sylviidae_ & 1236 \\
30 & _Francolinus pintadeanus_ & _Francolinus_ & _Phasianidae_ & 690 \\ \hline \end{tabular}
\end{table}
Table 1: _Cont._  
Figure 3: The proposed framework.  
```
0: Labeled audio segments \(\{v_{i},y_{i}\in I\}\)
0: Predicted class labels \(\hat{y}\)
1: Initialize Unsupervised Branch Encoding \(f_{u}(\cdot)\), Supervised Branch Encoding \(f_{s_{i}jDAFF}(\cdot)\), Projection head \(g_{h}(\cdot)\), Number of epochs \(E\), batch size N, weight coefficient \(\alpha\), \(\beta\), Data augmentation functions \(t_{1}(\cdot),t_{2}(\cdot),t_{3}(\cdot)\)
2://Step1: Data preprocessing, Convert audio segments \(v_{i}\) to spectrogram \(x_{i}\) using wavelet transform(WT)
3:\(x_{m}=WT(v_{i})\), \(\{x_{m},y_{m}\in D\}\)
4://Step2
5:for epoch=1 to \(E\)do
6: for each batch \(x_{k},y_{k}\) from \(N\)do
7://2.1: Data augmentation, generate two related views \(\hat{x}_{i},\hat{x}_{j}\) of the same example for Unsupervised branch, \(\hat{x}_{z}\) data augmentation for supervised branch
8:\(\hat{x}_{i}=t_{1}(x_{k})\); \(\hat{x}_{j}=t_{2}(x_{k})\); \(\hat{x}_{z}=t_{3}(x_{k})\)
9://2.2: Encoder feature extraction
10: #Unsupervised branch
11: \(z_{i}=g\big{(}f_{u}(\hat{x}_{i})\big{)}\)
12: \(z_{j}=g\big{(}f_{u}(\hat{x}_{j})\big{)}\)
13: #Supervised branch
14: \(\hat{z}_{z}=f_{s_{i}jDAFF}(\hat{x}_{z})+Linear\big{(}f_{s_{i}jDAFF}(\hat{x}_{z}) \big{)}\)
15://2.3: Compute Loss
16: \(L_{unsup}=Info\_nce\_loss(z_{i},z_{j})\)
17: \(L_{sup}=CrossEntropyLoss(z_{z},y_{k})\)
18: \(L_{total}=\alpha*L_{unsup}+\beta*L_{sup}\)
19://2.4: Optimize model
20: update networks \(g\) and \(f\) to minimize \(L_{total}\)
21:endfor
22:endfor
23://Step3: predict the result
24:\(\hat{y}=\text{argmax}(z_{z})\)
```  
**Algorithm 1** DBS-Net inference algorithm