Bulletin of Electrical Engineering and Informatics
Vol 15, No 4: August 2026

Decoder-only transformer with multi-scale attention for efficient printed circuit board defect inspection

Chi Kien Ha (Industrial University of Ho Chi Minh City)
Hoanh Nguyen (Industrial University of Ho Chi Minh City)



Article Info

Publish Date
01 Aug 2026

Abstract

Printed circuit boards (PCBs) are critical components in modern electronics, detecting defects rapidly, and accurately is crucial in manufacturing. We propose a novel real-time PCB defect detection model based on a Transformer decoder-only architecture. The framework first extracts multi-scale features via a backbone with a feature pyramid network (FPN) and generates candidate regions using a region proposal network (RPN). These region proposals are encoded as query embeddings that drive an adaptive multi-scale deformable attention (AMDA) module in the Transformer decoder, replacing the standard encoder-decoder attention. By dynamically weighting multi-scale feature maps for each query, AMDA emphasizes the feature scale most relevant to each defect’s size and texture, and yielding enhanced discriminative representations for subtle defect detection. The decoder-only design drastically reduces computational overhead compared to full encoder-decoder Transformers, enabling real-time inference, and faster training convergence. Experiments on benchmark PCB defect datasets demonstrate that our approach outperforms state-of-the-art methods in both accuracy and speed. The proposed model’s efficiency and high precision make it well suited for deployment in fast-paced PCB manufacturing lines that demand stringent real-time performance and reliable defect detection.

Copyrights © 2026






Journal Info

Abbrev

EEI

Publisher

Subject

Electrical & Electronics Engineering

Description

Bulletin of Electrical Engineering and Informatics (Buletin Teknik Elektro dan Informatika) ISSN: 2089-3191, e-ISSN: 2302-9285 is open to submission from scholars and experts in the wide areas of electrical, electronics, instrumentation, control, telecommunication and computer engineering from the ...