# Shared Graph Neural Network for Channel Decoding
## 2 Preliminary
```
input : LLRs of the channel observation \(l_{v}\)  Set of trainable parameters: -FN updates and variable-to-factor message updates operate with the same weights \(\theta_{1}\)  VN updates and factor-to-variable message updates operate with the same weights \(\theta_{2}\) -VN attributes \(\left\{g_{v_{i}}\right\}\forall v_{i}\in\mathcal{V}\) -FN attributes \(\left\{g_{u_{j}}\right\}\forall u_{j}\in\mathcal{U}\) -Message attributes \(\left\{g_{m_{v_{i}\
eq j}}\right\},\forall(v_{i},u_{j})\in\mathcal{E}\) -Input embedding \(\mathbf{w}\) -Output embedding \(\mathbf{q}\) output : Soft estimated \(l\) from VN nodes
1\({}^{\circ}\)Initialize graph nodes
2 for\(v_{i}\in\mathcal{V}\)do
3\(h_{v_{i}}\gets l_{v_{i}}\cdot\mathbf{w}\)
4 end for
5\(h_{u}\gets 0\)
6 Run decoding iterations
7 for\(t=0,...,T-1\)do
8\(\%\)Update variable-to-factor node messages
9 for\((v_{i},u_{j})\in\mathcal{E}\)do
10\(m_{v_{i}\to u_{j}}\gets f^{\mathbb{F}_{m}}([h_{v_{i}}||h_{v_{i}}||g_{m_{v_ {i}\
eq j}}],\theta_{1})\)
11 end for
12\(\%\)Update factor nodes
13 for\(u_{j}\in\mathcal{U}\)do
14\(h_{u_{j}}\gets f^{\mathbb{F}_{m}}([h_{u_{j}}||\frac{1}{\mathcal{V}(u_{j})} \sum_{v_{i}\in\mathcal{V}(u_{j})}m_{v_{i}\to u_{j}}||g_{u_{j}}],\theta_{1})\)
15 end for
16\(\%\)Update factor node to variable node messages
17 for\((v_{i},u_{j})\in\mathcal{E}\)do
18\(m_{u_{j}\to v_{i}}\gets f^{\mathbb{F}_{m}}([h_{u_{j}}||h_{v_{i}}||g_{m_{v_ {i}\
eq j}}],\theta_{2})\)
19 end for
20\(\%\)Update variable nodes
21 for\(v_{i}\in\mathcal{V}\)do
22\(h_{v_{i}}\gets f^{\mathbb{F}_{m}}([h_{v_{i}}||\frac{1}{\mathcal{U}(v_{i})} \sum_{u_{j}\in\mathcal{U}(v_{i})}m_{u_{j}\to v_{i}}||g_{v_{i}}],\theta_{2})\)
23 end for
24\(\%\)Return back variable node values
25 for\(v_{i}\in\mathcal{V}\)do
26\(l_{i}\leftarrow\mathbf{q}^{t}h_{v_{i}}\)
27 end for
```

**Algorithm 3**The Proposed Shared GNN-based Channel Decoding Algorithm 2. ## 4 Simulation Results and Discussions

We investigated the performance of the SGNN1 and SGNN2-based channel decoding algorithms for BCH codes and LDPC codes. The hyperparameters of the simulation are shown in Table 1. As in ref. [22], node and edge attributes are also not used. For each list-element in the training parameters, we run the SGD-updates and use a pre-defined number of training iterations. ### BCH Codes

First, the performance of the proposed SGNN1 and SGNN2-based channel decoding algorithms [22] are obtained, in which we use eight iterations as shown in Table 1; other hyperparameters are also provided in Table 1. As shown in Figure 3, the performances of Uncoded, BP, Weighted BP, GNN, SGNN1, and SGNN2-based channel decoding algorithms are consistently improving for the BCH(63,45) code. The blue vertical line is the shannon limit of the code rate corresponding to BCH codes. A fixed number of iterations \(T=8\) is used in training; its model parameters can be used to test a variable number of iterations \(T=2,3,4,6,8,10\), which is also a major advantage of GNN similar to hypernetwork technology [26]. However, a GNN-based channel decoder with only three iterations achieves an almost equivalent performance compared to the traditional BP decoder with twenty iterations. The SGNN1-based channel decoding algorithm with only four iterations achieves an equivalent performance, and the SGNN2-based channel decoding algorithm with only four decoding iterations also achieves an equivalent performance. Overall, the BER performance of the SGNN1 algorithm degrades by 0.75 dB compared to the GNN-based channel decoding algorithm with the same number of iterations, and the BER performance of the SGNN2-based channel decoding algorithm degrades by 0.1 dB. However, SGNN1 and SGNN2 only use 2440 and 4840 parameters compared to the GNN, which uses 9640 parameters; the parameters are reduced to a quarter and a half of those of the GNN, respectively, as listed in Table 2. As the number of iterations increases, the BER performance improves, but when it increases to a certain number, the BER performance degrades, so it is necessary to introduce an early stop mechanism.