## 4 Experiment
### Experimental Results and Analysis  
To evaluate our proposed method, we conduct comparative experiments against established benchmarks on the D0 and IP102 datasets. Table 3 presents the comparison results. For the D0 dataset, the multi-level classification framework with unsupervised learning and a multiple kernel boosting algorithm [19] achieved the lowest Acc at 89.3%. Enhanced pre-trained models using transfer learning [12] reached an Acc of 96.0%. Furthermore, a two-stream network combining ConvNeXt and Swin Transformer models [32] achieved an Acc of 98.5%. The GAEnsemble method [33], which uses a genetic algorithm-based weighted voting mechanism, achieved an Acc of 98.8%. However, it struggles to capture fine-grained pest features due to its lack of detailed feature extraction. In contrast, our framework achieves an Acc of 99.7%, and has a shorter inference time of 74 ms compared to their 106 ms, demonstrating superior efficiency and performance. Regarding the IP102 dataset, the ResNet-50 model [31] had the lowest performance. The DMF-ResNet model [35] integrated multi-scale representation learning from three branches and incorporated an SFR module to refine channel-wise feature responses, achiev \begin{table}
\begin{tabular}{c c c} \hline \hline
**Task/** & **Main Task** & **Subsidiary Task** \\
**Hyper-Parameters** & **(DAM-Net)** & **(ResNet-50)** \\ \hline Batch size & 12 & 12 \\ Optimizer & SGD & Adam \\ Learning rate & 0.001 & 0.0001 \\ Scheduler & MultiStep & Exponential \\  & decay rate = 0.1 & decay rate = 0.96 \\ Weight decay & 0.0001 & 0.0001 \\ Dropout & 0 & 0.5 \\ Image size & \(448\times 448\) & \(224\times 224\) \\ Loss & \multicolumn{2}{c}{Categorical cross-entropy} \\ Maximum epochs & 100 & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: General training settings for the multi-task framework. ing an Acc of 59.1%. A feature fusion network synthesizing CNN and Vision Transformer (ViT) models [36] achieved an Acc of 65.6%. An enhanced pre-trained Inception-v3 model [37] achieved an Acc of 67.9%. Additionally, the saliency-guided discriminative learning network (SGDL-Net) [38], utilizing a multi-task learning framework with a dual-branch architecture for global and fine-grained feature extraction, achieved an Acc of 71.2% and an MF1 of 60.6%. However, our multi-task framework, integrating the DAM-Net for the main task and the ResNet-50 for the subsidiary task, outperforms the SGDL-Net with Acc and MF1 improvements of 2.9% and 2.0%, respectively. A model using a genetic algorithm-based hyperparameter optimization strategy [34] achieved an Acc of 71.8%. An ensemble method [29] combined multiple CNN architectures and variant Adam optimization algorithms, achieving an Acc of 73.6%. A model [20] using an EFLM and an AFFM coupled with soft voting achieved an MF1 of 73.6%. Despite using attention mechanisms, it struggles with diverse contextual features and varying pest appearances, achieving an Acc of 73.9%, lower than our 74.1%. In contrast, our framework uses multi-task learning and an adaptive weighted loss mechanism, capturing a broader range of features and adapting better to real-world conditions for superior performance. Our multi-task framework outperformed previous methods in several key metrics. On the D0 dataset, our method achieved the highest performance across all metrics, highlighting its effectiveness in capturing both fine-grained details and diverse contextual information. On the IP102 dataset, our framework achieved an Acc of 74.1% and an MRec of 69.9%, surpassing existing methods. The inference time was 74 ms, further demonstrating the framework's efficiency. To further assess our framework's effectiveness, Figure 7 presents a visual analysis of the accuracy and loss curves on the D0 and IP102 datasets. This comparison provides a comprehensive overview of the performance across these distinct datasets. During training, our framework shows a consistent improvement in accuracy for both datasets. Initially, both training and validation losses decrease, indicating effective learning.