# Adaptive Learned Belief Propagation for Decoding Error-Correcting Codes
## Appendix B Spatially Coupled LDPC Codes  
### Construction  
The SC-QC-LDPC codes in this paper are constructed based on the edge spreading process [97]. Denote the PCM of the constituent PB QC-LDPC code by \(\mathrm{H}(\lambda,\omega,M,\mathrm{P})\). Denote the PCM of the corresponding SC-QC-LDPC code by \(\mathrm{H}_{\mathrm{SC}}:=\mathrm{H}_{\mathrm{SC}}(\lambda,\omega,M,\mathrm{P},m_{s},L,\bar{\mathrm{B}})\), with the additional parameters of the syndrome memory \(m_{s}\in\mathbb{N}\), coupling length \(L\in\mathbb{N}\), and the spreading matrix \(\bar{\mathrm{B}}\in[-1{:}m_{s}]^{\lambda\times\omega}\). Then, \(\mathrm{H}_{\mathrm{SC}}\in\mathbb{F}_{2}^{\lambda M(m_{s}+L+1)\times\omega ML}\) is given by\[\begin{CD}\includegraphics[scale=0.5]{0.pdf}\end{CD}\]  
in which \(\mathrm{H}_{t}(\ell),\mathbf{0}\in\mathbb{F}_{2}^{M\times\omega M}\) are \(\lambda\times\omega\) block matrices, \(t\in[0:m_{s}]\), \(\ell\in[0,L-1]\) and \(\mathrm{H}_{t}(\ell)\) is obtained from \(\bar{\mathsf{B}}\) as  
\[\mathrm{H}_{t}(\ell)\text{ at row-block $i$ and column-block $j=\begin{cases} \mathrm{I}^{p_{i,j}},&\text{if $\bar{\mathsf{B}}_{i,j}=t$,}\\ \mathbf{0},&\text{otherwise,}\end{cases} \tag{10}\]  
where \(\mathrm{I}^{p_{i,j}},\mathbf{0}\in\mathbb{F}_{2}^{M\times M}\).  
If \(\mathrm{H}_{t}(\ell_{1})=\mathrm{H}_{t}(\ell_{2})\), \(\forall t\in[0,m_{s}]\) and \(\forall\ell_{1},\ell_{2}\in[0,L-1]\), the code is time-invariant. If \(\mathrm{H}\) and \(\mathrm{H}_{\mathrm{SC}}\) are full-rank, then the rate of SC-QC-LDPC code is \(r=r_{\mathrm{QC}}-\frac{m_{s}\lambda}{L\omega}\), where \(r_{\mathrm{QC}}=1-\frac{\lambda}{\omega}\) is the rate of the component QC-LDPC code. For a fixed \(m_{s}\), as \(L\to\infty\), then \(r\to r_{\mathrm{QC}}\). Thus, the rate loss in SC-LDPC codes can be reduced by increasing the coupling length.  
**Example A3**.: _Consider any QC-LDPC code, \(m_{s}=2\), \(L=4\) and the spreading matrix_  
\[\bar{\mathsf{B}}=\begin{pmatrix}-1&1&0&2&-1\\ 1&-1&1&0&-1\\ 1&2&-1&0&2\end{pmatrix}\]  
_Then, \(\mathrm{H}_{2}(\ell)\) is obtained by replacing each entry of \(\bar{\mathsf{B}}\) that is \(2\) at row \(i\) and column \(j\) with \(\mathrm{I}^{p_{i,j}}\), and other entries with \(\mathbf{0}\). Thus, for all \(\ell\in[0:3]\)_  
\[\mathrm{H}_{2}(\ell)=\begin{pmatrix}\mathbf{0}&\mathbf{0}&\mathbf{0}&\mathrm{ I}^{p_{1,4}}&\mathbf{0}\\ \mathbf{0}&\mathbf{0}&\mathbf{0}&\mathbf{0}&\mathbf{0}\\ \mathbf{0}&\mathrm{I}^{p_{3,2}}&\mathbf{0}&\mathbf{0}&\mathrm{I}^{p_{3,5}} \end{pmatrix}.\]  
_In a similar manner,_  
\[\mathrm{H}_{0}(\ell)=\begin{pmatrix}\mathbf{0}&\mathbf{0}&\mathrm{I}^{p_{1,3} }&\mathbf{0}&\mathbf{0}\\ \mathbf{0}&\mathbf{0}&\mathbf{0}&\mathrm{I}^{p_{2,4}}&\mathbf{0}\\ \mathbf{0}&\mathbf{0}&\mathbf{0}&\mathrm{I}^{p_{3,4}}&\mathbf{0}\end{pmatrix},\quad\mathrm{H}_{1}(\ell)=\begin{pmatrix}\mathbf{0}&\mathrm{I}^{p_{1,2}}& \mathbf{0}&\mathbf{0}&\mathbf{0}\\ \mathrm{I}^{p_{2,1}}&\mathbf{0}&\mathrm{I}^{p_{2,3}}&\mathbf{0}&\mathbf{0}\\ \mathrm{I}^{p_{3,1}}&\mathbf{0}&\mathbf{0}&\mathbf{0}&\mathbf{0}\end{pmatrix}.\]  
_If \(\mathrm{H}_{\mathrm{SC}}\) is full-rank, then \(r=r_{\mathrm{QC}}-\frac{2.3}{4.5}\). If \(\mathrm{H}_{t}(\ell)\) is also full-rank, then \(r_{\mathrm{QC}}=0.4\) and \(r=0.1\)._  
The SC-LDPC code is efficiently encoded sequentially [92] so that at each spatial position \(\ell\), \((\omega-\lambda)M\) information bits are encoded out of \((\omega-\lambda)ML\).  
If an entry of \(\mathrm{B}\) corresponding to an \(\mathrm{H}_{i}(\ell)\) is a sequence, the corresponding entry in \(\bar{\mathsf{B}}\) is also a sequence. Thus, if \(\mathrm{H}_{i}(\ell)\) represents a multi-edge code for some \(i\) or \(\ell\), so does \(\mathrm{H}_{\mathrm{SC}}\).