# Neural-Network-Assisted Polar Code Decoding Schemes
## 3 Neural Network-Assisted Polar Code Decoding Scheme
### Neural Network-Assisted (NNA) Decoding  
The NNA decoding scheme is composed of a node recognizer and a decoder. The former recognizes the code as a concatenation of smaller constituent codes that were simply named nodes, which includes the NNN, and then the latter decodes these nodes. Note that the NNN is decoded by the trained model from the neural network model. Since the decoding scheme proposed in this paper is only for the receiving end, we use BER as the metric to measure the decoding performance. To avoid the computational complexity of the recursive structure of the successive-cancellation decoder (SCD), a vector of size \(2\times N-1\) is used to store the intermediate calculation results of the SC decoding algorithm. The decoding error rate will decrease as the SNR increases, i.e., when a BER is \(6\times 10^{-7}\) at a lower signal noise rate (SNR), the BERs at higher SNRs with the same parameters are definitely lower than \(6\times 10^{-7}\). Let \(6\times 10^{-7}\) denote BER threshold. If a BER is lower than the threshold, it will not be displayed in the figures. Therefore, the calculations of higher SNRs with BERs lower than \(6\times 10^{-7}\) can be skipped to further improve the calculation speed. To determine how to recognize the NNN, we must determine how it works. The progress of the signal process is shown in the training part of Figure 7. When \(N=16\), \(K\) ranges from \(1\) to \(16\). As shown in Figure 7 and as explained in Section 3.1, \"Polar Encoder1\" generates \(2^{K_{S}}\) possible codewords of \(N_{S}\) bits size in the training part. Considering the multiple possibilities of node recognition, we trained the polar code with \(N_{S}=16\), \(K_{S}=1-16\), with \(N_{S}=8\), \(K_{S}=1-8\), and with \(N_{S}=4\), \(K_{S}=1-4\) in epochs. The gradient of the loss function is calculated in each epoch using the Adam optimizer [36], and the trained model is finally saved to be used in the decoding part. When only four kinds of traditional special nodes need to be identified, we first identify the polar code with the entire length of \(N\) and judge whether the code is one of the above four kinds of nodes. If so, we directly perform maximum likelihood decoding. If not, we continue to identify the first half and the second half, and the above process is repeated until the original code is completely decomposed into nodes. Although the recognition process is a recursive process, this process is only performed once, and the computational complexity increase is limited. This method of transferring half of the original sequence into the recursive operation to identify the subcode is called dichotomy. Assuming that the length of the NNN is \(8\), if we execute dichotomy, when the subcode with a code length of \(8\) does not belong to the four traditional special nodes mentioned before, it will be recognized as an NNN. In practice, the decoding performance will be greatly reduced in some cases. To find the reasons and explore a proper division method of the NNN, we recognized and decoded polar codes with a code length of \(16\) and information bit length \(1\)-\(16\). In this experiment, the codewords were constructed using the GA method. Taking polar codes with \(N=16\) and \(K=3\) as an example, we write R0(8) to denote an R-0 node with a code length of \(8\), SPC(4) to denote the SPC node with a code length of \(4\), and NNN(8/3) to denote an NNN with \(N_{S}=8\) and \(K_{S}=3\). When the code is recognized in the traditional way, the node-type structure is R0(8) + R0(4) + SPC(4) and the node can be recognized as R0(8) + NNN(8/3) by the node recognizer as well, that is, the NNN structure is R0(4) + SPC(4). Note that when \(N_{S}=16\), the code can also be recognized as NNN(16/3). We simulated multiple times and found that when the NNN is the last node of the original code, the decoding performance is always better than that of the traditional fast SC decoding algorithm. When an NNN is decoded as the non-last subcode, the polarization effect cannot be generated sometimes.