BACKGROUND:Parkinson's disease (PD) is a neurodegenerative disorder that affects both motor and cognitive functions, particularly working memory (WM). Machine learning offers an advantage for decoding complex brain activity patterns, but its application to task-based functional magnetic resonance imaging (task-based fMRI) has been limited. This study aimed to develop an explainable machine learning model to classify WM performance levels in PD based on task-based fMRI data. METHODS:We enrolled 45 patients with PD and 15 healthy controls (HCs), all of whom performed an n-back WM task in an MRI scanner. Patients were stratified into three subgroups based on their 3-back task performance: better, intermediate, and worse WM. A three-dimensional convolutional neural network (3D-CNN) model, pre-trained with a 3D convolutional autoencoder, was developed to perform binary classifications between group pairs. RESULTS:The model achieved an accuracy of 93.3% in discriminating task-based fMRI images of PD patients with worse WM from HCs, surpassing the mean accuracy of three expert radiologists (70.0%). Saliency maps identified brain regions influencing the model's decisions, including the dorsolateral prefrontal cortex and superior/inferior parietal lobules. These regions were consistent with both the areas with intergroup differences in the task-based fMRI data and the anatomical areas that are crucial for better WM performance. CONCLUSIONS:We developed an explainable deep learning model that is capable of classifying WM performance levels in PD using task-based fMRI. This approach may enhance the objective and interpretable assessment of brain function in clinical neuroimaging practice.