Deep learning to overcome human error and bias in electrode position extraction in tDCS-fMRI studies

Journal: bioRxiv
Published Date:

Abstract

Combining transcranial direct current stimulation (tDCS) with fMRI enables investigation of stimulation effects, while structural MRI verifies electrode positioning, critical for focal montages where minor misplacements reduce target current dose. Currently, no fully automated methods exist for precise electrode extraction from MRI. We developed an Attention U-Net-based deep learning approach to automate electrode detection in focal tDCS-fMRI studies, using structural pointwise-encoding time reduction with radial acquisition (PETRA) MRI scans from a multicenter trial (N = 392 images; 1,568 electrodes, https://www.memoslap.de/en/home/). Performance was compared to manual and semi-automated methods for a 3x1 montage (three cathodes around a central anode). The network achieved robust segmentation (Dice Score = 0.76, Hausdorff distance = 36.76 mm), identifying all electrodes in 95% of cases (323/340). These metrics compared network-segmented electrodes to highly accurate, manually segmented electrodes, which are also called "ground truth". Linear mixed-effects models on 52 “ground truth” images showed deep learning outperformed manual and semi-automated methods, aligning best with ground truth. Fully/semi-automated methods comparison of 290 images showed highest agreement (ICC = 0.990, bias = 1.3 mm), while manual extraction exhibited larger biases (−5.77 to −7.06 mm) and systematic errors. The automated approach overcomes manual limitations by improving precision, eliminating human variability and bias, and enabling scalability for large studies. It sets a new standard for electrode verification in focal tDCS, particularly for studies requiring precise localization. The model is open-source, with future refinements discussed

Authors

  • F. Niemann; S. Riemann; S. Dabelstein; K. Hering; H. Kocataş; M. Abdelmotaleb; L.M. Caisachana Guevara; R. Fischer; A. Thielscher; D. Antonenko; A. Flöel; M. Meinzer