###### Abstract
[9] proposed an attention-based DL model that can achieve comparable performances to bag-level models without losing interpretability. Using only slide-level weak labels, rather than manually drawn ROIs, [PERSON] et al. [6] designed an attention-based multi-resolution multiple instance learning model, not only predicting slide-level grading scores, but also providing visualization of relevant regions using inherent attention maps. [PERSON] et al. [19] employed a Bi-Attention adversarial network for PCa segmentation, combining attention with a generative adversarial network (GAN). By using channel and position attention simultaneously in one network, key features of PCa regions can be highlighted globally and locally, resulting in satisfying segmentation performance. Inspired by these prior efforts, this study integrates a custom attention module into a backbone CNN that learns to selectively focus on critical patterns of cancerous tumors in a whole-slide image. As the most important prognostic marker for PCa, the Gleason score system was used to guide slide image annotation in most previous work [2; 20]. As supplementary guidance, the International Society of Urological Pathology (ISUP) grading system, released in 2014, has played a crucial role in determining how a patient should be treated. The ISUP grading system is based on the prognosis difference of PCa, simplifying the Gleason grading and has a more distinct clinical significance [21]. Meanwhile, the ISUP grading can address the problem of a decreased accuracy caused by unnecessary classification in clinical practice. For example, three difference Gleason scores (4 + 5, 5 + 4, and 5 + 5) can be converted to the same ISUP grade 5, suggesting the same clinical treatment. However, little work has directly used the ISUP grades as labels for DL model training [22]. In light of this, we adopt the ISUP grading in this work to explore its potentials in building a DL-based PCa grading system. This study proposes a Multi-Channel and Multi-Spatial (MCMS) Attention-based convolutional neural network (CNN) for PCa grading. We customize a novel attention module that incorporates both channel and spatial attention information to enhance feature extraction. The MCMS attention module is independent of any CNN architecture. Once plugged in, an MCMS-assisted CNN is enabled to learn what and where to focus on in an input image such that critical areas and patterns are more attended, and irrelevant features such as excess blank spaces, morphological heterogeneity, and artifacts are neglected. Specifically, the MCMS Attention module boosts feature representation in two aspects: the model learns a channel attention vector to assign weights to channels in the feature map by pooling from multiple attention branches with different reduction ratios; similarly, the model also learns a spatial attention matrix to focus on more relevant areas of the image, by pooling from multiple convolutional layers with different kernel sizes. Compared to other bi-attention-based models [19; 23], our model mines feature information in a finer granularity and achieves superior performance. Two of the main contributions of our proposed method can be summarized as follows:  
* We propose an MCMS attention module in a convolutional neural network that allows end-to-end training for PCa detection and classification with the ISUP grading system. An MCMS-assisted CNN is enabled to quickly zoom in and focus on key areas worth studying, so as to enhance feature representation in a whole-slide image. * The efficacy of the MCMS attention module is verified on a large multi-center PCa dataset and demonstrates superior performance compared to prior studies, providing valuable insights for researchers working on computer-assisted diagnosis. The results offer a credible benchmark for future research in automated PCa grading. The rest of this paper is structured as follows. Section 2 describes the dataset and the technical details of the proposed method. Section 3 discusses experimental settings and implementation details.