In the manufacturing process of power amplifier (PA), various defects on the circuit surface will seriously affect the circuit performance and its operation. To solve the above problems, this article proposes a circuit defect detection method based on improved patch‐based support vector data description algorithm (Patch SVDD), which uses contrastive learning to enhance the feature extraction ability of neural network. An image calibration algorithm is used for calibration preprocessing to enhance the robustness of the model. The Euclidean distance between a query image patch and its nearest normal patch is defined to be an anomaly score. For verification, three defects in the PA circuit, including components missing, solder contamination and component orientation dislocation, were detected. The experimental results show that, compared with conventional method, the area under receiver operating characteristic (AUROC) of the improved anomaly detection model increased from 90.1% to 95.1%, which improves the detection accuracy effectively.