A loss function in an NN training is defined as the errors between the ground truth label and the estimated output.
The cross-entropy loss function has been widely used for the classification problems [1]} to minimize the errors between two probability distributions.
By considering the BPSK constellation, we define \(\hat{\mathcal {D}}_i^m(x_i)\)  as the LLR of the VN \(x_i\)  at the \(m\) -th iteration and \(m_{max}\)  as the maximum number of iterations of DL-SPDA.
The cross-entropy function can be defined as \(\mathcal {F}_{ce}({\mathcal {D}}, {\hat{\mathcal {D}}}^m) = -\frac{1}{N}\sum _{i=1}^{N}\big {(}\mathcal {D}_{x_i}\text{log}(\frac{1}{1+e^{-\hat{\mathcal {D}}^m_{x_i}}}) + (1-\mathcal {D}_{x_i})\text{log}(1-\frac{1}{1+e^{-\hat{\mathcal {D}}^m_{x_i}}})\big {)}\) , where \({\mathcal {D}}\)  is the ground-truth label of the transmitted bits.
The multi-loss function introduced in [2]} and [3]} can also be setup to train the tuneable parameters in the FG, which includes the tuneable weights in (REF ) and the weights and biases introduced in the CNN.
The final loss function for training the NN is then given by:
\(\Lambda = \sum _{m=1}^{m_{max}}\gamma ^{m_{max}-m}\mathcal {F}_{ce}({\mathcal {D}}, {\hat{\mathcal {D}}}^m),\) 
