# Swin Transformer Assisted Prior Attention Network for Medical Image Segmentation
###### Abstract
Combining the above excellent works, it is very feasible to apply Transformer-based method in intermediate supervision network for further improving the performance of medical image segmentation, enhancing the transferability of prior attention network, providing the interpretability of Transformer in a certain manner for better performing dual supervision strategy. Specially, Swin Transformer [6] is proposed for expanding applicability of vision Transformer and serving as a general backbone in the field of computer vision. The key design of Swin Transformer is the shifted window-based attention mechanism, in which the shifted windows bridge the windows layer by layer and construct connection for further enhancing the power of modeling long-range dependency. Motivated by the excellent design of prior attention network and the Swin Transformer's success, we propose a novel structure called Swin Transformer Assisted Prior Attention Network (Swin-PANet) to further leverage the power of Transformer on medical image segmentation. To our best knowledge, Swin-PANet is the first dual supervision network structure assisted by Transformer, which consists of two components: a prior attention network and a hybrid Transformer network. These networks are both Transformer complements CNN methods and follow the dual supervision strategy, in which the prior attention network performs intermediate supervision learning, and then hybrid Transformer performs direct supervision learning. The proposed Swin-PANet follows the coarse-to-fine strategy that achieves the two steps of medical segmentation in a network. Swin Transformer block and attention guiding decoder are combined to complete a prior attention network to generate attention prediction. Then Swin-PANet performs the second step of segmentation by inserting the attention prediction in hybrid Transformer network, which further enhances the ability of attention learning by applying window-based self-attention mechanism compared with the traditional prior attention network. Hybrid Transformer network is essentially based on U-Net structure, and its key component is the enhanced attention block that is based on the CCA of UCTransNet and is utilized in decoder layers of hybrid Transformer network. Different from the traditional CCA, the enhanced attention block has the capability of aggregating the features from skip-connections, previous level of decoder blocks, and prior attention network for further achieving better performance of attention learning. This paper adopts a structure of deduction, modeling design, and summary. Introduction in Section 1 is to define the research question of the paper and provide a brief introduction of the research work and contributions. State of the Art and Related Work in Section 2 includes the contributions and outcomes of CNN-based method, Vision Transformer, and Transformer Complements CNN. Modeling, Methods, and Design in Section 3 provide detailed introduction of the proposed Swin-PANet. The last Sections 4 and 5 provide experimental setup and results, and conclusion of the research work, respectively. The contributions of this work lie in three aspects:  
* A novel network structure called Swin-PANet is proposed for medical image segmentation, which consists of a prior attention network and a hybrid Transformer network. The proposed Swin-PANet follows the coarse-to-fine strategy and dual supervision strategy to improve the segmentation performance. * The proposed Swin-PANet addresses the dilemma that traditional Transformer network has poor interpretability in the process of attention calculation, and Swin-PANet can insert its attention predictions into prior attention network for intermediate supervision learning which is humanly interpretable and controllable. * Enhanced attention block is proposed and equipped in the hybrid Transformer network, which is to utilize a feature fusion between global and local contexts along channel-wise for achieving a better performance of attention learning.