# Shared Graph Neural Network for Channel Decoding
## 2 Preliminary
\right. \tag{8}\]

Next, we use an example to illustrate the working principle of the GNN-based channel decoding algorithm. As shown in Figure 1, A parity-check matrix \(H\) of \((N=7,K=4)\) is shown in Figure 1a, and the Tanner graph corresponding to this matrix is shown in Figure 1b, similar to that in ref. [25]. There are three FNs and seven VNs. Figure 2 shows the detailed process of converting the Tanner graph into the GNN-based channel decoding algorithm. After passing through the BPSK modulation and AWGN channels, we receive the LLR, whose dimension is _batchsize_\(\times\) 7, where _batchsize_ denotes the size of the batch. First, we initialize the parameters of the GNN-based channel decoding algorithm and then initialize the graph nodes values, including the values of the FN nodes and VN nodes and \(h_{u}=0\), whose dimension is _batchsize_\(\times\) 3 \(\times\) 20. \(h_{v_{i}}=l_{v_{i}}\cdot\mathbf{w}\), where \(\mathbf{w}\) is input embedding with a dense network, whose dimension is _batchsize_\(\times\) 7 \(\times\) 20, and the number of dimensions for vertex embeddings is 20. The iterative link of the GNN-based channel decoding algorithm is shown in Figure 2, which includes the update of the FN nodes and the update of the VN nodes. Converting the values of the FN nodes and VN nodes into edge features, the edge \(\mathcal{E}\) of this code is 12. After adding a message attribute, we compute messages for all edges using MLPs. In this code, MLPs are implemented by a two-layer dense network; these two layers contain 40 and 20 neurons, respectively. Messages are reduced per receiving vertex by message aggregation, where we use _sum_ aggregation. After aggregation, messages dimension is _batchsize_\(\times\) 3 \(\times\) 20, and then we add a node attribute. After concatenating this information, a new embedding will be calculated by two layers of dense of MLPs, and we update the FN value \(h_{u_{j}}\gets f^{F_{u}}([h_{u_{j}}||\frac{1}{\mathcal{V}(u_{j})}\sum_{ \omega_{0}\in\mathcal{V}(u_{j})}m_{v_{i}\to u_{j}}||g_{u_{j}}|,\mathbf{\theta}_{u})\). The next step is to update the VN value. The update process of the VN value is similar to that of the FN value; the only difference is that the dimension of the feature information after aggregation is _batchsize_\(\times\) 7 \(\times\) 20. We update the VN value \(h_{v_{i}}\gets f^{F_{u}}([h_{v_{i}}||\frac{1}{\mathcal{U}(v_{j})}\sum_{ \omega_{i}\in\mathcal{U}(v_{j})}m_{u_{j}\to v_{i}}||g_{v_{j}}|,\mathbf{\theta}_{v})\), where \(h_{v_{i}}\) is the information recovered after one iteration. Repeat the iteration until the conditions of the iterations are reached. The recovered binary vector \(\hat{x}\) is computed by

Figure 1: The Tanner graph corresponding to the parity matrix, (**a**) parity-check matrix; (**b**) Tanner graph. \(l_{i}\leftarrow\mathbf{q}^{\mathbf{q}}h_{v_{i}}\) as a hard threshold, where \(\mathbf{q}\) is an output embedding of a dense network with one neuron and \(l\) denotes the recovered soft output. ## 3 SGNN Based Channel Decoding Algorithm

In order to reduce the computational complexity and the required storage resources of the GNN-based channel decoding algorithm, the model parameters and multiplication need to be reduced. The parameters of the GNN-based channel decoding algorithm include node attributes, edge attributes, and the weights brought by the mapping of each iteration. Each node has independent properties, and each directed edge also has independent properties. In order to reduce the attributes of half of the edges, we change the attributes of the edges in different directions to the attributes of edges without directions, that is, each edge has only one attribute. Four mappings are used per iteration: an update variable-to-factor node messages, update factor nodes, update factor nodes to variable node messages, and update variable nodes. In order to reduce the parameters of the mapping, we set the weights of the mapping to be shared. Shared parameters are directly linked to performance.