## 3 Proposed Method
### Unsupervised Sample Synthesis for Classifier Training  
One of the challenges posed by our proposed method is the training sources of the classification model. To address this, we devise a sample synthesis strategy that generates training samples tailored to the specific detector and application. Note that the training samples for the classification model are not images but the vectors capturing distribution characteristics of false-positive and true-positive patches. As previously mentioned, the distribution characteristics, specifically considering the centroid and scale of each bounding box, of false positives in the testing dataset are similar to high-score regions on the anomaly maps of anomaly-free images. This distribution characteristics can be further expanded into other patch-level features, such as color, texture, shape, and other features. The choice of patch-level features dictates the dimensions of our training samples (vectors), determined by the discriminative attributes relevant to the specific application. As depicted in Figure 4, the training samples (vectors) are consistent with synthetic false alarm samples and synthetic defect samples. The synthetic false alarm samples originate from high-score patches on the anomaly maps of the trained segmentation detector for the anomaly-free training dataset. The synthetic defect samples come from fuzzy domain-specific knowledge. Figure 4: Sample synthesis workflow. Training samples for the classifier are represented as vectors, with their dimensions tailored to the selected discriminative prior knowledge descriptions. Synthetic defect samples are generated based on fuzzy knowledge, while synthetic false alarm samples are derived from high-response regions within the anomaly-free training dataset. The synthetic false alarm samples provide insights into the anomaly maps of the training dataset, particularly in regions where their high-score regions are similar to those of false alarm patches. To acquire information regarding false alarms, we closely examine the anomaly maps generated from the training dataset. The anomaly map serves as an intermediate output of pixel-wise predictions and reflects the detector's estimations of anomaly levels within the input image. Even the anomaly maps of the training samples may manifest high-response regions when the trained detector demonstrates sub-optimal performance in intrinsic industrial scenarios. As pixel-wise predictions are derived from thresholding the anomaly map, regions highlighted in yellow or green in Figure 5 correspond to false alarms. This observation underscores the limited discrimination ability of the detector on the training dataset, leading to false alarms during the testing stage. By treating these high-response patches as synthetic false alarms, we can extract their patch-level features to form synthetic false alarm samples (vectors). Synthetic defect samples are generated from fuzzy domain knowledge, encompassing intuitive patch-level features such as centroid, size, color, texture, and shape. For instance, when detecting faults related to a specific rigid component, the centroid and scale of the patch occupied by this component, like a common component tend to be relatively stable due to the fixed distance between the capturing camera and the surveillance target in industrial anomaly detection scenarios. In the case of missing faults, the patch corresponding to true defects aligns with the original centroid and scale of the component. For locally damaged faults, the pixels of the corresponding patch represent a subset of the originally occupied area of the component. In the case of foreign object faults, the distribution attributes of the image block can be inferred based on the common types of foreign objects and their typical attachment forms, utilizing latent images of foreign objects to extract shape and texture features. The fuzzy prior knowledge is derived from the empirical understanding of fault categories in specific industrial settings.