## 1 Introduction  
PCB defect detection is a critical step in ensuring the quality and reliability of PCBs [1]. As the manufacturing requirements for PCBs are evolving in the direction of high density and integration [2], it is of great significance to study efficient methods for achieving low-cost defect detection. Traditional PCB manual inspection is a time-consuming, laborious, and inefficient method [3], which cannot meet the basic requirements of modern production, thus giving rise to electrical inspection, automatic ray detection, thermal imaging inspection [4, 5, 6], and other inspection means. Although these means can meet the needs of PCB defect detection, they have their limitations, such as electrical inspection, which may cause potential defects, while radiographic and thermographic inspection require expensive equipment to obtain defect information. In recent years, deep learning has become increasingly mature during target inspection. Deep learning-based target detection algorithms are categorized into single-stage and two-stage detection algorithms [7]. Two-stage detection algorithms are mainly represented by the SPP-Net model, FastRCNN, and Faster-RCNN algorithms [8, 9, 10], but there are problems such as a complex training process, slow detection speed, and inability to perform real-time detection, which does not apply to industrial PCB defect detection. Single-stage algorithms are mainly represented by YOLOv2, YOLOv3, YOLOv4, YOLOv5, YOLOv6, YOLOv7, and SSD network structure [11; 12; 13; 14; 15; 16], which have the advantages of fast detection speed and less computation and can satisfy the basic needs of industrial detection. [PERSON] et al. [17] proposed an online PCB detection algorithm in which GPP (Group Pyramid Pooling Module) can efficiently use features at different scales. [PERSON] et al. [18] introduced an extended feature pyramid network detection model that efficiently combines high-level semantic details with low-level geometrical features and introduced a focus loss function. The model exhibits strong transferability; however, in an actual industrial production environment, the algorithm's accuracy is still low, and the generalization ability is poor due to problems such as noise interference and uneven exposure, solidifying it as unsuitable for industrial production applications. [PERSON] et al. [19] constructed a TDD-Net using the FasterR-CNN framework, which employs k-means clustering to design suitable anchor points, and TDD-Net enhances the relationship between different levels of feature maps and utilizes the underlying structural information, making it particularly ideal for detecting tiny defects. [PERSON] et al. [20] introduced a lightweight network model, which is an improvement of YOLOv5, and adopts the GhostConv and GhostBottleneck methods to achieve a more lightweight algorithmic structure, which significantly reduces the number of parameters and computational complexity (Flops) required by the model, and integrates a dual-attention mechanism, combining the SE structure and CBAM, to enhance the algorithmic performance and effectively solve the difficulties of tiny defect detection. In addition, [PERSON] and [PERSON] proposed a fast PCB-accurate localization method based on deep neural network regression, significantly improving the efficiency and accuracy of PCB defect detection [21]. In terms of the attention mechanism, [PERSON] et al. proposed a transformer-YOLO-based PCB defect detection method, which significantly improves the model's ability to detect small target defects by introducing channel attention and spatial attention mechanisms [22]. [PERSON] et al. proposed an improved YOLOv5 algorithm for PCB surface defect detection, which improves the detection performance of the model by introducing a lightweight feature fusion network [23]. [PERSON] et al.