ORIGINAL RESEARCH article
Front. Hum. Neurosci.
Sec. Brain Imaging and Stimulation
YOLOBT: A Novel ERP Bad Trial Detection Network Dynamically Adjusting Based on Global Signal Quality
Provisionally accepted- 1Beijing University of Technology, Beijing, China
- 2Xuanwu Hospital Capital Medical University, Beijing, China
- 3Beijing Anding Hospital Capital Medical University, Beijing, China
- 4Beijing Luhe Hospital Affiliated to Capital Medical University, Beijing, China
Select one of your emails
You have multiple emails registered with Frontiers:
Notify me on publication
Please enter your email address:
If you already have an account, please login
You don't have a Frontiers account ? You can register here
Event-related potentials (ERPs) are time-locked voltage changes in averaged EEG signals reflecting neural responses to specific events. ERPs are extracted from EEG by repeating the same stimulus across multiple trials and averaging the recordings. In ERP studies, artifact-contaminated trials (commonly termed "bad trials") refer to data segments deemed unsuitable for analysis due to excessive noise or artifacts. The criteria for determining such trials depend on overall data quality: researchers increase artifact tolerance when a subject's data quality is poor to retain statistical power, while applying stricter standards when quality is high to ensure analytical purity and accuracy. Current automated bad trial detection methods rely on static thresholds and fail to replicate the adaptive strategies employed by experts. To address this limitation, we propose YOLOBT, a YOLO-based deep learning framework that mimics expert judgment by integrating global signal quality assessment with dynamic threshold adjustment. By treating EEG signals as visualized waveform images, our approach naturally aligns with expert visual inspection methods while enabling context-aware artifact detection. Our technical contributions include: (1) a Cross-Layer Attention Bottleneck (CLAB) enhancing artifact feature extraction through cross-layer attention mechanisms; (2) a Hierarchical Feature Guidance Module (HFGM) leveraging high-level semantic features to guide low-level feature refinement; and (3) a Global Information Classification Module (GICM) enabling dynamic threshold adjustment based on comprehensive signal quality assessment. Experiments on our manually annotated dataset showed YOLOBT achieved 88.76% precision, 86.89% recall, 92.76% mAP, and 87.82% F1 score, outperforming classical models. Heatmap visualization confirmed the model adaptively adjusts artifact detection strategies based on signal quality, similar to expert judgment processes.
Keywords: bad trial, deep learning, Electroencephalography (EEG), transformer, YOLOv5
Received: 26 Sep 2025; Accepted: 09 Feb 2026.
Copyright: © 2026 Chen, Duan, Liu, Zhao and Wang. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
* Correspondence:
Lijuan Duan
Changming Wang
Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.
