# DIR-Net: Deep Residual Polar Decoding Network Based on Information Refinement
## 3 DIR-Net Method
### Attention-Based Decoding Subnetwork  
After being processed by the denoising subnetwork, the signal is further decoded to obtain the original information. According to the encoding rules of polar codes, each encoded bit contains the information of most other bits. Thus, the process of polar encoding can be regarded as a global operation. However, one-dimensional convolution can only obtain local information for each operation. Although the receptive field can be increased to obtain global information by superimposing multilayer convolution, a deeper network is required, and two bits that are far apart cannot establish an effective connection by these means. Considering the above, the fully connected layer with attention mechanism (AFC) is adopted to construct the decoding sub-network. In order to ensure that the decoding network to have sufficient decoding capacity to deal with various codewords, the network is usually designed to extract more feature than the decoding process really needs. For a codeword with length \(N\), the number of neurons in the first layer is often greater than \(N\). With the depth increase of the network, the number of neurons gradually decreases until information bits \(K\). In the training process, the nonlinear operation of the network will automatically learn a decoding algorithm, while there must be some features extract from decoding subnetwork are invalid. Similar to denoising subnetwork, we connect an attention module after each fully connected layer except the last one to preserve useful information and suppress invalid information. Inspired by the structure proposed in image semantic segmentation [35] and translation tasks [36], we construct an encode/decode structure to generate weights for each feature. This structure has been proved to be effective in extracting semantic information. Here, we simplify it to three layers of fully connected layers, in which the number of neurons in the middle layer is less than that in the front and back layers. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Block** & **Layer** & **Number** \\ \hline Input & \(N\times 1\) & \(\times\) 1 \\ \hline \multirow{3}{*}{ResBlock} & Conv + LReLU \(k3s1\)\(N\times 16\) & \multirow{3}{*}{\(\times\) 4} \\  & Conv \(k3s1\)\(N\times 16\) & \multirow{3}{*}{\(\times\) 1} \\  & Add + LReLU \(\mathbf{\longrightarrow}\)\(N\times 16\) & \\ \hline \multirow{3}{*}{Local Attention} & GAP + Sigmoid—\(1\times 16\) & Conv + Sigmoid \(k1s1\)\(N\times 1\) \\ \cline{2-3}  & Multiply \(\mathbf{\longrightarrow}\)\(N\times 16\) & \\ \hline \multirow{3}{*}{ResBlock} & Conv + LReLU \(k3s1\)\(N\times 16\) & \multirow{3}{*}{\(\times\) 1} \\  & Conv \(k3s1\)\(N\times 16\) & \\ \cline{2-3}  & Add + LReLU \(\mathbf{\longrightarrow}\)\(N\times 16\) & \\ \hline \multirow{3}{*}{Global Attention} & Concat \(\mathbf{\longrightarrow}\)\(N\times 64\) & \multirow{3}{*}{\(\times\) 1} \\  & Conv + LReLU \(k1s1\)\(N\times 16\) & \\ \cline{2-3}  & LReLU \(\mathbf{\longrightarrow}\)\(N\times 16\) & \\ \cline{2-3}  & GAP + Sigmoid—\(1\times 16\) & Conv + Sigmoid \(k1s1\)\(N\times 1\) & \\ \cline{2-3}  & Multiply \(\mathbf{\longrightarrow}\)\(N\times 16\) & \\ \hline Output & Conv + Tanh \(k3s1\)\(N\times 1\) & \(\times\) 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Network structure of denoising subnetwork. As shown in Figure 1, the decoding subnetwork is composed of three parts, the feature extraction part, the feature mapping part, and the classification part. As with the denoising subnetwork, a convolution layer is utilized to transform the input data to the feature domain. After that, the features are fed to a series of feature mapping networks composed of AFC units, which map the codeword from the polar encoding feature space to the original codeword feature space. The structure of the AFC is shown in Figure 5. The input features are first copied out and used to calculate the weights of each neuron. The weight calculation subnetwork has an encode/decode structure.