## 2 Related Work
### Position Embedding  
In 2017, ref. [10] first proposed position coding, which is called sinusoidal position embedding. This coding allows the Transformer architecture to capture the inherent sequence order and absolute positions of elements. Consequently, the Transformer architecture may not effectively capture the relative position information of elements during the calculation of the self-attention matrix. Currently, researchers generally divide location coding into two categories: absolute location coding and relative location coding. Absolute location coding adds the absolute location information of tokens to the sequence, while relative location coding considers the relative location information between tokens when calculating the self-attention distribution. Absolute location coding had been used earlier, but ref. [14; 15] proposed that using relative position coding could significantly improve segmentation accuracy. However, relative location coding generally has the disadvantage of a high overhead and cannot be combined with existing self-attention acceleration algorithms. In view of this, ref. [16] proposed conditional location coding. Different from previous fixed or learned location coding, conditional location coding is dynamically generated and conditioned on the local domain of input tags. The authors of [17] proposed rotating position coding, which realized the effect of relative position coding through the form of absolute position coding, organically unified the two, and reflected the relative position information between tokens in the form of a self-attention matrix bias. Therefore, this study draws on rotational position coding and conditional position coding to enhance location items as context sensitive, making attention location sensitive at a marginal cost. Advantages and limitations of various position coding are shown in Table 1.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Positional Encoding Type** & **Advantages** & **Limitations** \\ \hline Absolute Positional Encoding & Provides precise location information vital for accurate segmentation. & 1. Lacks flexibility and struggles with deformations or transformations in the image. 2. Susceptible to changes in image orientation or scale. \\  & 1. Accommodates image deformations, crucial in tumor-growth monitoring. & Demands complex computations to determine relative positions accurately. \\  & 2. Enhances the model’s ability to handle variations in tumor shape and size. & \\ Conditional Positional Encoding & Adapts to the context of the image, offering superior segmentation accuracy. & Requires sophisticated architectures and training strategies. \\ Conditional Positional Encoding & Addresses rotational variations, essential in handling different imaging angles. & \\  & 1. During the training process, positional offset information is learned to provide more precise segmentation accuracy. & Due to the dynamic learning strategy, overfitting is prone to occur. \\  & 2. Captures intricate spatial relationships within the image. & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Advantages and limitations of various position coding in medical image segmentation.