## 3 Proposed Method
This lightweight design is specifically intended to extract local semantics and edge information, maintaining critical boundary details with minimal computational overhead, which is essential for guiding subsequent attention mechanisms. \begin{table}
\begin{tabular}{c c c c c c} \hline \multirow{2}{*}{**Stage**} & \multirow{2}{*}{**Output**} & \multicolumn{4}{c}{**STDCNet**} \\ \cline{3-6}  & & **OPR** & **K** & **S** & **R** & **C** \\ \hline Input & 512 \(\times\) 1024 & & & & & 3 \\ S1 & 256 \(\times\) 512 & ConvX & 3 & 2 & 1 & 32 \\ S2 & 128 \(\times\) 256 & ConvX & 3 & 2 & 1 & 64 \\ S3 & 64 \(\times\) 128 & Stage 3 & & 2 & 1 & 256 \\ S4 & 32 \(\times\) 64 & Stage 4 & & 2 & 1 & 512 \\ S5 & 16 \(\times\) 32 & Stage 3 & & 2 & 1 & 1024 \\ \hline \end{tabular}
\end{table} 
Table 1: Detailed Structure of the Encoder. While convolutional operations excel at capturing features within local receptive fields, they inherently lack the capability for explicit modeling of absolute or relative positional relationships. To address this limitation, the PCAM module introduces a learnable positional encoding parameter P with a shape of [1, C\({}_{\text{out}}\),1, 1]. This specific dimensionality ensures that positional information is embedded independently within each output channel while preserving the spatial structure of the feature map. Unlike fixed sinusoidal positional encodings or absolute coordinate embeddings, this per-channel learnable encoding grants the network greater flexibility to adaptively modulate spatial importance across semantic channels. Such adaptability is particularly critical in complex driving environments, where spatial dependencies can vary significantly. This design enables channel-wise modulation of convolutional outputs, allowing the model to effectively learn global spatial biases without compromising the locality inherent to convolution operations. The enhanced feature representation F is then obtained by element-wise addition of this positional encoding with the convolutional features, as formulated in Equation (1):

\[\text{F}=\text{Conv}(\text{X})+\text{P}=(\text{X}\times\text{W}_{\text{conv}}+ \text{b}_{\text{conv}})+\text{P} \tag{1}\]

The convolution kernel \(\text{W}_{\text{conv}}\in\text{R}^{3\times 3\times\text{C}}{}_{\text{in}}{}^{ \times\text{C}}{}_{\text{out}}\) represents the learnable weights, while the bias term \(\text{b}_{\text{conv}}\in\text{R}^{\text{C}}{}_{\text{out}}\) is the bias vector. After the convolution operation, Batch Normalization (BN) is applied to standardize the convolution results, as shown in Equation (2). Subsequently, the ReLU activation function is applied to introduce non-linearity:

\[\text{F}_{1}=\text{BN}(\text{F})=\text{BN}((\text{X}\times\text{W}_{\text{conv }}+\text{b}_{\text{conv}})+\text{P}) \tag{2}\]

Next, the attention score matrix A is computed, and the attention output is obtained through a weighted summation. The outputs from multiple heads are concatenated and passed through a linear transformation to produce the multi-head attention output \(Z_{2}\). Unlike conventional self-attention mechanisms that rely solely on similarity scores between content embeddings (queries and keys), the learnable positional encoding P, introduced at the convolutional stage, modulates spatial representations before attention computation. This modulation injects location-sensitive biases into the feature map, enhancing the

Figure 4: Positional Convolutional Attention Module (PCAM). model's capacity to encode global spatial priors. This allows the attention mechanism to consider not only content similarity but also spatial context, enhancing the modeling of long-range dependencies. Such an approach is particularly effective in complex scenes where semantic classes exhibit spatial structure, such as roads, sidewalks, and buildings. Consequently, the resulting attention map reflects both semantic relevance and spatial alignment, as formulated in Equation (3), leading to feature representations with improved contextual consistency:

\[