# Shared Graph Neural Network for Channel Decoding
## 2 Preliminary
We propose two different sharing methods, which are introduced below. ### SGNN-Based Channel Decoding Algorithm 1

In order to minimize the number of parameters of the GNN-based channel decoding algorithm, we use the same weights for all mappings \(\mathbf{\theta}\). At the same time, for directed graphs, we change them to non-directed graphs; therefore, edges in different directions in the attributes of the graph use the same assigned edge attribute \(\left\{g_{m_{\pi}u_{j}}\right\}\),\(\forall(v_{i},u_{j})\in\mathcal{E}\). This sharing method is called SGNN1 and is referred to as Algorithm 2 on the next page. Figure 2: GNN-based channel decoding algorithm for code (\(7,A\)) with one iteration. ```
input : LLRs of the channel observation \(l_{o}\)  Set of trainable parameters: -FN updates,VN updates,variable-to-factor message updates and factor-to-variable message updates operate with the same weights \(\mathbf{\theta}\) -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%Initialize graph nodes for\(v_{i}\in\mathcal{V}\)do
2\(h_{v_{i}}\gets l_{v_{i}}\cdot\mathbf{w}\)
3 end for
4\(h_{u}\gets 0\) Run decoding iterations for\(t=0,...,T-1\)do
5%Update variable-to-factor node messages for\((v_{i},u_{j})\in\mathcal{E}\)do
6\(m_{v_{i}\to u_{j}}\gets f^{F_{m}}(|h_{v_{i}}||h_{uj}||g_{m_{v_{i}u_{j}}} |,\mathbf{\theta})\)
7 end for
8%Update factor nodes for\(u_{j}\in\mathcal{U}\)do
9\(h_{u_{j}}\gets f^{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}}|,\mathbf{\theta})\)
10 end for
11%Update factor node to variable node messages for\((v_{i},u_{j})\in\mathcal{E}\)do
12\(m_{u_{j}\to v_{i}}\gets f^{F_{m}}([h_{u_{j}}||h_{v_{i}}||g_{m_{v_{i}u_{j}}} ],\mathbf{\theta})\)
13 end for
14%Update variable nodes for\(v_{i}\in\mathcal{V}\)do
15\(h_{v_{i}}\gets f^{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_{j}}],\mathbf{\theta})\)
16 end for
17
18 end for
19%Return back variable node values for\(v_{i}\in\mathcal{V}\)do
20\(l_{i}\leftarrow\mathbf{q}^{t}h_{v_{i}}\)
21 end for
```
**Algorithm 2**The Proposed Shared GNN-based Channel Decoding Algorithm 1. ### Sgnn-Based Channel Decoding Algorithm 2

In order to balance the number of parameters and the BER performance of the GNN-based channel decoding algorithm, we use the same weights \(\mathbf{\theta_{1}}\) for the FN updates map and the variable-to-factor message updates map, the same weights \(\mathbf{\theta_{2}}\) for the VN updates map, and the factor-to-variable message updates map. At the same time, for directed graphs, we change them to non-directed graphs; therefore, edges in different directions in the attributes of the graph use the same assigned edge attribute \(\left\{g_{m_{v_{i}\
eq j}}\right\}\),\(\forall(v_{i},u_{j})\in\mathcal{E}\). This sharing method is called SGNN2 and is referred to as Algorithm 3.