## 2 Related Work  
Early pest recognition relied on manual identification by experts, which was labor-intensive, time-consuming, and prone to inaccuracies due to individual and environmental factors [16]. Advances in computer vision have significantly improved efficiency and accuracy in digital and precision agriculture. These methods are categorized into traditional machine learning [10; 17; 18; 19] and deep learning [2; 12; 13; 20]. Traditional machine learning approaches typically involve extracting features using techniques like the histogram of oriented gradients (HOG) or scale-invariant feature transform (SIFT), followed by classification algorithms such as support vector machines (SVM) or artificial neural networks (ANN). For instance, [PERSON] et al. [17] combined sparse-coding histograms with multiple kernel learning (MKL) for feature fusion. [PERSON] et al. [18] used backpropagation neural networks with geometric feature extraction. [PERSON] et al. [19] developed a dictionary-based approach for robust pest recognition. [PERSON] et al. [10] employed multiple feature extraction techniques to enhance classification precision through a majority voting strategy. Despite their effectiveness, traditional methods depend on expert knowledge and manually designed features, which may not capture all variations in pest appearances, leading to unstable outcomes and reduced accuracy. Deep learning methods, particularly those using CNNs, automatically extract robust features, eliminating the need for manual design and achieving higher recognition efficiency and accuracy [21; 22]. [PERSON] et al. [2] used the ResNet-101 architecture, surpassing traditional methods. [PERSON] et al. [12] applied transfer learning to improve accuracy and reduce training time. [PERSON] et al. [23] fine-tuned GoogLeNet, achieving high accuracy but at a significant computational cost. [PERSON] et al. [24] proposed weakly supervised learning with multi-instance learning (MIL) for better classification. [PERSON] et al. [13] refined a CSP-based network for precise feature extraction, and [PERSON] et al. [14] introduced innovative  
Figure 1: The overview of our proposed multi-task deep learning framework with the discriminative attention multi-network (DAM-Net). In the DAM-Net, the parameters of the convolutional neural networks (CNN) and fully connected (FC) layers in the three branches are shared. The loss function \(\mathbf{L}_{1}(\mathbf{W},\sigma_{1})\) combines the losses from all three branches, allowing the model to learn both global and fine-grained features. The noise parameter \(\sigma_{1}\) adjusts the task weights based on data reliability. modules for multi-scale and deep feature extraction. [PERSON] et al. (2020) used an effective feature localization module (EFLM) for pest location identification and an adaptive filtering fusion module (AFFM) to refine features, with soft voting (SV) for final categorization. However, their method relies heavily on diverse pest images to enrich feature input, making it challenging to extract fine-grained and global context information effectively in real-world applications. Despite the accuracy and flexibility of deep learning in pest recognition, real-world environmental noise remains a challenge due to factors such as varying lighting conditions, occlusion by foliage, and the presence of similar non-target objects ([PERSON] et al., 2019; [PERSON] et al., 2020). However, applying data augmentation techniques and optimization algorithms can enhance model accuracy and generalization. For instance, [PERSON] et al. (2020) used saliency methods for data augmentation, achieving high accuracies on pest datasets. [PERSON] et al. (2020) researched generative models for synthesizing pest images. [PERSON] et al. (2020) combine CNN architectures and introduce Adam variants, Exp and ExpLR, enhancing pest recognition. However, this method is complex and lacks fine-grained feature extraction, making it difficult to handle high intra-class variability in pests.