Interpretable Self-Supervised Learning for Fault Identification in Printed Circuit Board Assembly Testing
Source abstract
Abstract
Fault identification in Printed Circuit Board Assembly (PCBA) testing is essential for assuring product quality; nevertheless, conventional methods still have difficulties due to the lack of labeled faulty data and the “black box” nature of advanced models. This study introduces a label-free, interpretable self-supervised framework that uses two pretext tasks: (i) an autoencoder (reconstruction error and two latent features) and (ii) isolation forest (faulty score) to form a four-dimensional representation of each test sequence. A two-component Gaussian Mixture Model is used, and the samples are clustered into normal and fault groups. The decision is explained with cluster mean differences, SHAP (LinearSHAP or LinearExplainer on a logistic-regression surrogate), and a shallow decision tree that generated if–then rules. On real PCBA data, internal indices showed compact and well-separated clusters (Silhouette 0.85, Calinski–Harabasz 50,344.19, Davies–Bouldin 0.39), external metrics were high (ARI 0.72; NMI 0.59; Fowlkes–Mallows 0.98), and the clustered result used as a fault predictor reached 0.98 accuracy, 0.98 precision, and 0.99 recall. Explanations show that the IForest score and reconstruction error drive most decisions, causing simple thresholds that can guide inspection. An ablation without the self-supervised tasks results in degraded clustering quality. The proposed approach offers accurate, label-free fault prediction with transparent reasoning and is suitable for deployment in industrial test lines.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Industrial Vision Systems and Defect Detection · Fault Detection and Control Systems
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Artificial Intelligence and Intelligent Systems Research Group, School of Innovation, Design and Engineering, Mälardalen University, Högskoleplan 1, 722 20 Västerås, Sweden
Funding
VINNOVA · VR (Vetenskapsrådet—The Swedish Research Council) · SESAR JU
References (50)
Show source-provided references
1. Kim, J., Ko, J., Choi, H., and Kim, H. (2021). Printed circuit board defect detection using deep learning via a skip-connected convolutional autoencoder. Sensors, 21.10.3390/s21154968 ↗
2. Pham, T.T.A., Thoi, D.K.T., Choi, H., and Park, S. (2023). Defect detection in printed circuit boards using semi-supervised learning. Sensors, 23.10.3390/s23063246 ↗
3. Automated detection of printed circuit boards (PCB) defects by using machine learning in electronic manufacturing: Current approaches10.1088/1757-899X/767/1/012064 ↗
4. Kazatzidis, S., and Mehrkanoon, S. (July, January 30). A novel dual-stream time-frequency contrastive pretext tasks framework for sleep stage classification. Proceedings of the 2024 International Joint Conference on Neural Networks (IJCNN), Yokohama, Japan.10.1109/IJCNN60899.2024.10650151 ↗
5. An interpretable fault detection approach for industrial processes based on improved autoencoder10.1109/TIM.2025.3604931 ↗
6. Explainable AI for industrial fault diagnosis: A systematic review
7. Li, Y., Wang, Y., Liu, J., Wu, K., Abdullahi, H.S., Lv, P., and Zhang, H. (2025). Lightweight PCB defect detection method based on SCF-YOLO. PLoS ONE, 20.10.1371/journal.pone.0318033 ↗
8. Weerakkody, K.D., Balasundaram, R., Osagie, E., and Alshehabi Al-Ani, J. (2025). Automated Defect Identification System in Printed Circuit Boards Using Region-Based Convolutional Neural Networks. Electronics, 14.10.3390/electronics14081542 ↗
9. Printed circuit board defect detection methods based on image processing, machine learning and deep learning: A survey10.1109/ACCESS.2023.3245093 ↗
10. PCB defect detection with self-supervised learning of local image patches10.1016/j.measurement.2023.113611 ↗
11. Chen, I.C., Hwang, R.C., and Huang, H.C. (2023). PCB defect detection based on deep learning algorithm. Processes, 11.10.3390/pr11030775 ↗
12. Zhang, H., Li, Y., Sharid Kayes, D.M., Song, Z., and Wang, Y. (2025). Research on PCB defect detection algorithm based on LPCB-YOLO. Front. Phys., 12.10.3389/fphy.2024.1472584 ↗
13. Shen, M., Liu, Y., Chen, J., Ye, K., Gao, H., Che, J., Wang, Q., He, H., Liu, J., and Wang, Y. (2024). Defect detection of printed circuit board assembly based on YOLOv5. Sci. Rep., 14.10.1038/s41598-024-70176-1 ↗
14. Adibhatla, V.A., Huang, Y.C., Chang, M.C., Kuo, H.C., Utekar, A., Chih, H.C., Abbod, M.F., and Shieh, J.S. (2021). Unsupervised anomaly detection in printed circuit boards through student–teacher feature pyramid matching. Electronics, 10.10.3390/electronics10243177 ↗
15. Ahmed, I., Ahmad, M., Chehri, A., and Jeon, G. (2023). A smart-anomaly-detection system for industrial machines based on feature autoencoder and deep learning. Micromachines, 14.10.3390/mi14010154 ↗
16. Liu, F.T., Ting, K.M., and Zhou, Z.H. (2008, January 15–19). Isolation forest. Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, Pisa, Italy.10.1109/ICDM.2008.17 ↗
17. Self-supervised anomaly detection in computer vision and beyond: A survey and outlook10.1016/j.neunet.2024.106106 ↗
18. Liu, Y., Wu, J., Zhang, J., and Leung, M.F. (2025). Graph-Regularized Orthogonal Non-Negative Matrix Factorization with Itakura–Saito (IS) Divergence for Fault Detection. Mathematics, 13.10.3390/math13152343 ↗
19. Tran, D.H., Nguyen, V.L., Nguyen, H., and Jang, Y.M. (2022). Self-supervised learning for time-series anomaly detection in Industrial Internet of Things. Electronics, 11.10.3390/electronics11142146 ↗
20. Zhou, J., Li, G., Wang, R., Chen, R., and Luo, S. (2023). A novel contrastive self-supervised learning framework for solving data imbalance in solder joint defect detection. Entropy, 25.10.3390/e25020268 ↗
21. Gong, S., Kim, T., and Jeong, J. (2025). SPT-AD: Self-Supervised Pyramidal Transformer Network-Based Anomaly Detection of Time Series Vibration Data. Appl. Sci., 15.10.3390/app15095185 ↗
22. CARLA: Self-supervised contrastive representation learning for time series anomaly detection10.1016/j.patcog.2024.110874 ↗
23. Sánchez-Ferrera, A., Calvo, B., and Lozano, J.A. (2025). A Review on Self-Supervised Learning for Time Series Anomaly Detection: Recent Advances and Open Challenges. arXiv.
24. Shapley additive explanations (shap) for efficient feature selection in rolling bearing fault diagnosis10.3390/make6010016 ↗
25. Brusa, E., Cibrario, L., Delprete, C., and Di Maggio, L.G. (2023). Explainable AI for machine fault diagnosis: Understanding features’ contribution in machine learning models for industrial condition monitoring. Appl. Sci., 13.10.3390/app13042038 ↗
26. Zou, J., and Petrosian, O. (2020). Explainable AI: Using Shapley value to explain complex anomaly detection ML-based systems. Machine Learning and Artificial Intelligence, IOS Press.10.3233/FAIA200777 ↗
27. de la Peña, M.F., Gómez, Á.L.P., and Maimó, L.F. (2025). ShaTS: A Shapley-based Explainability Method for Time Series Artificial Intelligence Models applied to Anomaly Detection in Industrial Internet of Things. arXiv.
28. Birihanu, E., and Lendák, I. (2025). Explainable correlation-based anomaly detection for Industrial Control Systems. Front. Artif. Intell., 7.10.3389/frai.2024.1508821 ↗
29. Explaining deep learning-based anomaly detection in energy consumption data by focusing on contextually relevant data10.1016/j.enbuild.2024.115177 ↗
30. Shapley-based explainable AI for clustering applications in fault diagnosis and prognosis10.1007/s10845-024-02468-2 ↗
31. Fault detection and quantitative assessment method for process industry based on feature fusion10.1016/j.measurement.2022.111267 ↗
32. (2025, July 30). PCB vs PCBA: What’s the Difference—PCBasic. PCB vs PCBA: What’s the Difference. Available online: https://www.pcbasic.com/blog/difference_between_pcb_and_pcba.html.
33. (2025, July 30). Embedded Test System (ETS)—Nordic Engineering Partner. Embedded Test System (ETS). Available online: https://nepartner.se/en/tjanster/embedded-test-system/.
34. Rahman, H., Begum, S., and Ahmed, M.U. (2016, January 18–19). Ins and outs of big data: A review. Proceedings of the International Conference on IoT Technologies for HealthCare, Västerås, Sweden.10.1007/978-3-319-51234-1_7 ↗
35. Barua, A., Ahmed, M.U., and Begum, S. (2023, January 2). Multi-scale data fusion and machine learning for vehicle manoeuvre classification. Proceedings of the 2023 IEEE 13th International Conference on System Engineering and Technology (ICSET), Shah Alam, Malaysia.10.1109/ICSET59111.2023.10295109 ↗
36. Ahsan, M.M., Mahmud, M.P., Saha, P.K., Gupta, K.D., and Siddique, Z. (2021). Effect of data scaling methods on machine learning algorithms and model performance. Technologies, 9.10.3390/technologies9030052 ↗
37. Improving cluster recovery with feature rescaling factors10.1007/s10489-020-02108-1 ↗
38. Fast and precise single-cell data analysis using a hierarchical autoencoder10.1038/s41467-021-21312-2 ↗
39. Adversarial autoencoder based feature learning for fault detection in industrial processes10.1109/TII.2021.3078414 ↗
40. Overfitting in neural nets: Backpropagation, conjugate gradient, and early stopping
41. Practical autoencoder based anomaly detection by using vector reconstruction error10.1186/s42400-022-00134-9 ↗
42. Gaussian mixture model using semisupervised learning for probabilistic fault diagnosis under new data categories10.1109/TIM.2017.2654552 ↗
43. Lindström, K. (2021). Fault Clustering with Unsupervised Learning Using a Modified Gaussian Mixture Model and Expectation Maximization. [Master’s Thesis, Linköping University].
44. A Comparative Analysis of Dbscan and Gaussian Mixture Model for Clustering Indonesian Provinces Based on Socioeconomic Welfare Indicators10.30598/barekengvol19iss3pp2039-2056 ↗
45. Wang, W. (2024). Clustering Task. Principles of Machine Learning: The Three Perspectives, Springer.10.1007/978-981-97-5333-8_14 ↗
46. Misra, I., and Maaten, L.v.d. (2020, January 13–19). Self-supervised learning of pretext-invariant representations. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA.10.1109/CVPR42600.2020.00674 ↗
47. Akram, A.S., and Choi, W. (2025). Performance Enhancement of Second-Life Lithium-Ion Batteries Based on Gaussian Mixture Model Clustering and Simulation-Based Evaluation for Energy Storage System Applications. Appl. Sci., 15.10.20944/preprints202505.2428.v1 ↗
48. Maliuk, A.S., Prosvirin, A.E., Ahmad, Z., Kim, C.H., and Kim, J.M. (2021). Novel bearing fault diagnosis using gaussian mixture model-based fault band selection. Sensors, 21.10.3390/s21196579 ↗
49. A multi-objective optimization design to generate surrogate machine learning models in explainable artificial intelligence applications10.1016/j.ejdp.2023.100040 ↗
50. Fault diagnosis and abnormality detection of lithium-ion battery packs based on statistical distribution10.1016/j.jpowsour.2020.228964 ↗