# A Multi-Path Semantic Segmentation Network Based on Convolutional Attention Guidance
## 3 Method
### Convolutional Attention
Finally, the input features \(X\) are multiplied by \(W_{1}\) and \(W_{2}\) to obtain two weighted features: \(X_{1}^{w}\), with high information content, and \(X_{2}^{w}\), with low information content; features \(X_{2}^{w}\) with little or no spatial content information are considered as redundant. A cross operation is then applied to thoroughly combine these two differently weighted information features, enhancing the information flow between them. The cross-reconstructed features \(X^{w_{1}}\) and \(X^{w_{2}}\) are concatenated to obtain spatially refined features \(X^{w}\). The entire reconstruction process is represented by Equation (7):  
\[\left\{ \begin{array}{l}X_{1}^{w}=W_{i}\otimes X,(i=1,2)\\ X_{ij}^{w}=Split\big{(}X_{i}^{w}\big{)},(i,j=1,2)\\ X_{11}^{w}\oplus X_{22}^{w}=X^{w_{1}},\\ X_{21}^{w}\oplus X_{12}^{w}=X^{w_{2}},\\ X^{w_{1}}\cup X^{w_{2}}=X^{w}.\end{array} \right. \tag{7}\]  
where \(\otimes\) denotes element-wise multiplication, Split denotes the operation of halving along the channel dimension, \(\oplus\) denotes element-wise summation and \(\cup\) denotes concatenation. After applying SRUs to the intermediate input features \(X\), not only are the features with high information content separated from those with low information content, they are also reconstructed to enhance representative features and suppress redundant features in the spatial dimension. For CRU, the aim is to exploit channel redundancy in features, utilizing a split-transform-merge strategy to further reduce redundancy along the channel dimension of spatially refined feature maps. Initially, the split operation is applied. For a given \(X^{w}\in R^{c\times h\times w}\), its channel dimension is decomposed into \(aC\) and \((1-\alpha)C\) components,  
Figure 2: (**a**) The network architecture of MSCAN. (**b**) The network architecture of MSCA. CRU and SRU stand for spatial recurrent unit and channel recurrent unit, respectively. where \(0\leq\alpha\leq 1\), denoted as \(X_{up}\) and \(X_{low}\), respectively. This process is expressed through Equations (8) and (9):  
\[Y_{1}=M^{\mathrm{G}}X_{up}+M^{\mathrm{P_{1}}}X_{up} \tag{8}\]  
\[Y_{2}=M^{\mathrm{P_{2}}}X_{low}\cup X_{low} \tag{9}\]  
where \(M^{\mathrm{G}}\in R^{\frac{\alpha\mathrm{C}}{r}\times k\times k\times C}\) and \(M^{\mathrm{P_{1}}}\in R^{\frac{\alpha\mathrm{C}}{r}\times 1\times 1\times C}\) are learnable weight matrices, \(X_{up}\in R^{\frac{\alpha\mathrm{C}}{r}\times l\times w}\) and \(Y_{1}\in R^{\mathrm{C}\times l\times w}\) represent the input and output from the upper path, \(M^{\mathrm{P_{2}}}\in R^{\frac{(l-\alpha\mathrm{C})}{r}\times 1\times 1\times (1-\frac{l-\alpha\mathrm{C}}{r})\subset\) is a learnable weight matrix, \(\cup\) denotes the concatenation operation, \(X_{low}\in R^{\frac{(l-\alpha\mathrm{C})}{r}\times l\times w}\) and \(Y_{2}\in R^{\mathrm{C}\times h\times w}\) are the input and output from the lower branch and r is the squeeze ratio, controlling the feature channels to balance computational costs (set to 2 in the experiments). Finally, in the fusion stage, after the transformation, there is no direct connection or addition of the two types of features. Instead, a simplified SKNet [25] method is employed to adaptively merge the output features \(Y_{1}\) and \(Y_{2}\) from the upper and lower branches. Initially, global average pooling is applied to gather global spatial information with channel statistics, as shown in Equation (10):  
\[S_{m}=P(Y_{m})=\frac{1}{H\times W}{\sum}_{i=1}^{H}{\sum}_{j=1}^{W}Y_{c}(i,j) \tag{10}\]  
Here, \(P\) represents the pooling operation \((m=1,2)\). Next, the upper and lower global channel descriptors, \(S_{1}\) and \(S_{2}\), are stacked together, and a channel-wise soft attention operation is applied to generate a feature importance vector, as shown in Equation (11):  
\[\left\{ \begin{array}{l}\beta_{1}=\frac{\epsilon^{2}1}{\epsilon^{2}1+ \epsilon^{2}},\\ \beta_{2}=\frac{\epsilon^{2}2}{\epsilon^{2}1+\epsilon^{2}},\\ \beta_{1}+\beta_{2}=1.\end{array} \right.