Long-tail balancing for improving recall of rare defect classes without precision degradation in PCB defect detection

Authors

  • A. Verlan National Technical University of Ukraine «Igor Sikorsky Kyiv Polytechnic Institute»
  • Y. Fastovets Norwegian University of Science and Technology

DOI:

https://doi.org/10.31673/2412-9070.2026.056302

Abstract

The paper considers the problem of long-tail balancing in automated optical inspection systems for printed circuit boards, Automated Optical Inspection (AOI) for Printed Circuit Board (PCB). This distribution is typical for manufacturing data: several defect categories occur frequently, whereas rare but technologically important classes are represented by a small number of annotated examples. As a result, a neural detector tends to learn frequent classes more reliably and may miss defects located in the tail of the distribution. In PCB quality control this problem is important because a missed real defect can lead to product failure, while an uncontrolled growth of false positive detections increases the workload of a human operator and reduces the throughput of the production line. The main idea of the study is not to increase recall at any cost, but to improve recall for rare defect classes while preserving an acceptable level of precision and a controlled number of False Positive (FP) detections per board. The paper describes a methodological scheme for combining training-time and post-processing approaches: controlled sampling, hard negatives, Focal Loss, Class-Balanced Loss, Equalization Loss v2, Seesaw Loss, two-stage training, calibration, and class-specific threshold selection. Particular attention is paid to the evaluation protocol, which includes recall at a target precision level, FP per board, macro-recall, per-class precision-recall curves, and inference latency. The practical value of the work lies in a controlled scheme for tuning an AOI detector in which the improvement of rare-class detection quality is not considered separately from production constraints and the risk of precision degradation.

Keywords: AOI, PCB, printed circuit boards, long tail, class imbalance, neural detection, recall, precision.

Published

2026-11-13

Issue

Section

Articles