# Semantic Segmentation of Brain Tumors Using a Local-Global Attention Model
Despite the remarkable performance achieved by previous methods, they neglected the complex relationship among different modalities of MRI images (such as T1, T1 Gd, T2, and T2-FLAIR). [PERSON] et al. [12] proposed a model to separately extract features of different modalities and use a bi-directional feature pyramid network to fuse these features. Their method achieved higher segmentation accuracy than conventional UNet and its variants. CNN-based models rely on convolutions to extract features, causing the insufficient capture of global features. In order to overcome these problems, Transformer-based models have recently demonstrated competitive performance in glioma segmentation. [PERSON] [13] presented a Vision Transformer model for biomedical image segmentation. They applied the classical Vision Transformer (ViT) module [14] in a U-shaped encoder-decoder structure to establish long-range dependencies between features. Inspired by dilated convolution, [PERSON] et al. [15] constructed a Dilated Transformer (D-former) for glioma segmentation. They designed Local Scope Modules (LSMs) and Global Scope Modules (GSMs) to capture local and global features, respectively. The LSMs utilized window-based local attention, while the GSMs employed dilated global attention, which significantly reduced the computational complexity of the ViT modules. Furthermore, they applied a dynamic position encoding to enhance the model's translation invariance. [PERSON] et al. [16] proposed a High-Resolution Swin Transformer Network (HRSTNet) for glioma segmentation. Different from the classical U-shaped models, HRSTNet used Swin Transformer blocks to extract local features and followed the design of a High-Resolution Network [17] to fuse features of different resolutions at each stage. Their model achieved better performance than most medical image segmentation methods at that time. Nevertheless, Transformer-based models typically require more computational resources than CNN-based models, making them difficult to deploy in resource-constrained environments. According to [PERSON] et al. [18], ViT inference on mobile devices has a latency and energy consumption up to 40 times higher than CNN models. Furthermore, Transformer-based models demonstrate poor inductive bias when fitting small-scale image datasets. For ease of use and to save computational resources, many researchers are trying to design hybrid models that combine the advantages of both local convolution and global attention. [PERSON] et al. [19] proposed a parallel module that includes convolution blocks and Transformer blocks for extracting local and global features, and designed a cross-attention mechanism to fuse these generated features. [PERSON] et al. [20] inserted a Transformer block into the last layer of a 3D UNet encoder, significantly reducing the computational complexity of self-attention and enhancing the model's global feature extraction capability. The models mentioned above do not fundamentally address the problem of high computational consumption in calculating global attention, and the features extracted by the intermediate layers of both the encoder and decoder lack semantic supervision. In this paper, we develop a novel hybrid segmentation model called Local-Global UNet Transformer (LG UNETR). Our model is built upon Swin UNETR [21], which exhibits low computational complexity by utilizing local attention and residual blocks for feature extraction. We design semantic-oriented masked attention and network-in-network blocks to further improve the segmentation performance of Swin UNETR while reducing the number of model parameters. LG UNETR achieves the highest average Dice score on the BraTS2024-GLI dataset [22, 23] and ranks second on the BraTS2023-GLI dataset [22, 24, 25, 26]. In terms of \(HD_{95}\), our model attains the lowest values. The contributions of this paper can be summarized as follows:  
1.