## 2 Literature Review  
Convolutional networks are deep learning architectures widely used in classifying histopathological images due to their performance and efficiency [17]. They use the convolution process, where the network learns feature extractor filters, allowing the capture of spatial patterns at different scales and levels of abstraction. In this context, ref. [18] proposed a CAD (Computer-Aided Diagnosis) system to detect invasive ductal carcinoma in histopathological images using three convolutional neural network (CNN) models developed from scratch (ConvNet-A, ConvNet-B, and ConvNet-C, with 8, 9, and 19 layers, respectively). Among the architectures, the ConvNet-C model achieved the best accuracy (88.7%) and sensitivity (92.6%) with 100,000 images. Compared to traditional techniques such as SVM, KNN, Random Forest, and Logistic Regression, CNN models performed better, showing their superiority in classifying histopathological images. Ref. [19] used convolutional neural networks (DenseNet-201, ResNet-50, and MobileNet V2) for breast cancer classification. The models with binary and multi-class classifications were trained on the BreakHis [20] and BACH [21] datasets. MobileNet V2 stood out, achieving up to 98% accuracy and up to 92% in multi-class classification, in addition to being faster and more efficient than DenseNet-201 and ResNet-50. Ref. [22] proposed two strategies to improve the early detection of lung and colon cancer using the LC25000 dataset. The first uses pre-trained CNNs, such as VGG, ResNet, and DenseNet, to extract features and increase diagnostic accuracy. The second combines automatic features of the ColonNet model with manual features for a more complete analysis. The approach showed promising results, with an accuracy of 96.31% and sensitivity of 95.67%, demonstrating its diagnostic effectiveness. Despite their success, convolutional networks face challenges in capturing global dependencies and contextualizing distant regions within images. An alternative approach, which has emerged to address these limitations, is the Vision Transformer (ViT) [23]. This architecture uses a self-attention mechanism, and instead of applying convolutions, it divides the image into patches (smaller blocks) and treats these patches as a sequence. The self-attention mechanism allows the model to capture global dependencies between image patches. In the context of histopathological imaging, ref. [24] investigated a ViT-based model for lung cancer classification. It achieved an accuracy of 98.84% with a patch size of 16 \(\times\) 16. Based on ViT, other types of similar architectures were built; ref. [25] proposes the construction of an ensemble Swin Transformers (SwinT), which works with non-overlapping displaced windows with classifying subtypes of breast cancer into histopathological images [26]. The model achieved an average accuracy of 99.6% in binary classification and 96.0% in multi-classification, surpassing previous works. Another work compared different variants of the Vision Transformer and their applications in classifying breast cancer images in digital histopathology [27]. The same was compared to more recent models, such as PiT, CvT, CrossFormer, CrossViT, NesT, MaxViT, and SepViT. These models were tested on the BreakHis and IDC [28] datasets, with MaxViT obtaining the best performance, achieving 91.57% accuracy on BreakHis, 91.8% on IDC, and 92.12% when being pre-trained on BreakHis and tuned on IDC. However, Vision Transformers also have limitations, especially when capturing finer local details [29], which are essential in diagnostic tasks where small cellular patterns can indicate disease. A promising approach to addressing these limitations is to combine the benefits of convolutions with the power of global attention. This allows models to detect pathological structures in complex histopathological images more effectively, addressing limitations such as loss of spatial information and the imprecise focus on extracted features.