# DC2 Anet: Generating Lumbar Spine MR Images from CT Scan Data Based on Semi-Supervised Learning
## 3 Method
### Optimization of DC\({}^{2}\)Anet with Semi-Supervised Learning
3:for number of training iterations do
4:for\(n_{sup}\) steps do
5: Sample \(\left(I_{\text{CT}}^{(i)},v_{\text{MR}}^{(i)}\right)_{i=1}^{m}\sim P_{aligned} \left(I_{\text{CT}},I_{\text{MR}}\right)\) a batch from the aligned data
6: Update the discriminator networks \(Dis_{\text{MR}}\) and \(Dis_{CT}\) by ascending their stochastic gradient: \[L_{sup-actor}^{(i)}\gets L_{sup-actor}^{(i)}\left(Syn_{\text{MR}},Syn_{ \text{CT}},Dis_{\text{MR}},Dis_{CT},I_{\text{CT}^{\prime}}^{(i)},I_{\text{ MR}}^{(i)}\right)\] \[Dis_{\text{MR}},Dis_{CT}\gets Adam\Big{(}\
abla_{Dis_{\text{MR}},Dis_{CT }}\frac{1}{m}\sum_{i=1}^{m}-L_{sup-adver}^{(i)},\;Dis_{\text{MR}},\;Dis_{CT}, \;\alpha,\;\beta_{1},\;\beta_{2}\Big{)}\]
7: Update the synthesis networks \(Syn_{\text{MR}}\) and \(Syn_{\text{CT}}\), by descending their stochastic gradient: \[L_{sup}^{(i)}\gets L_{sup}^{(i)}\left(Syn_{\text{MR}},Syn_{\text{CT}}, Dis_{\text{MR}},Dis_{CT},I_{\text{CT}}^{(i)},I_{\text{MR}}^{(i)}\right)\] \[Syn_{\text{MR}},Syn_{\text{CT}}\gets Adam\Big{(}\
abla_{Syn_{\text{MR}}, Syn_{\text{CT}}}\frac{1}{m}\sum_{i=1}^{m}L_{sup}^{(i)},\;Syn_{\text{MR}},\;Syn_{ \text{CT}},\;\alpha,\;\beta_{1},\;\beta_{2}\Big{)}\]
8:endfor
9:endfor
10:for\(n_{unsup}\) steps do
11: Sample \(\left\{I_{\text{CT}^{\prime}}^{(i)},I_{MR}^{(i)}\right\}_{i=1}^{m}\sim P_{ unaligned}\left\{I_{\text{CT}},I_{\text{MR}}\right\}\) a batch from the unaligned data
12: Update the discriminator networks \(Dis_{\text{MR}}\) and \(Dis_{CT}\), by ascending their stochastic gradient: \[L_{unsup-adver}^{(i)}\gets L_{unsup-adver}^{(i)}\left(Syn_{\text{MR}}, Syn_{\text{CT}},Dis_{\text{MR}},Dis_{CT},I_{\text{CT}}^{(i)},I_{\text{MR}}^{(i)}\right)\] \[Dis_{\text{MR}},Dis_{CT}\gets Adam\Big{(}\
abla_{Dis_{\text{MR}}, Dis_{\text{CT}}}\frac{1}{m}\sum_{i=1}^{m}-L_{unsup-adver}^{(i)},\;Dis_{\text{MR}},\;Dis_{ \text{CT}},\;\alpha,\;\beta_{1},\;\beta_{2}\Big{)}\]
13: Update the synthesis networks \(Syn_{\text{MR}}\) and \(Syn_{\text{CT}}\), by descending their stochastic gradient: \[L_{unsup}^{(i)}\gets L_{unsup}^{(i)}\left(Syn_{\text{MR}},Syn_{\text{CT }},Dis_{\text{MR}},Dis_{\text{CT}},I_{\text{CT}}^{(i)},I_{\text{MR}}^{(i)}\right)\] \[Syn_{\text{MR}},Syn_{\text{CT}}\gets Adam\Big{(}\
abla_{Syn_{\text{MR}}, Syn_{\text{CT}}}\frac{1}{m}\sum_{i=1}^{m}L_{unsup}^{(i)},\;Syn_{\text{MR}},\;Syn_{ \text{CT}},\;\alpha,\;\beta_{1},\;\beta_{2}\Big{)}\]
14:endfor
15:endfor
16:return\(Syn_{\text{MR}}\)
```  
**Algorithm 1** Mini-batch stochastic gradient descent training of DC\({}^{2}\)Anet. We used default values of \(m=1\), \(n_{sup}=n_{unsup}=1\), \(\alpha=0.0002\), \(\beta_{1}=0.5\), and \(\beta_{2}=0.999\). The batch size \(m\), the number of alternative iterations between supervised learning and unsupervised learning \(n_{sup}\) and \(n_{unsup}\), the learning rate \(\alpha\), and Adam hyperparameters \(\beta_{1}\) and \(\beta_{2}\). The most difficult complication of adversarial training is that one network may inevitably become more potent than the other, and this generally proved to be the discriminator network in most cases. When the discriminator network becomes too strong, the synthetic images are much easier to distinguish from the reference images. In this case, the gradients from the discriminator network approach zero. This results in no guidance for the further training of the synthesis network. To overcome this issue, alternating optimization is an effective approach for DC\({}^{2}\)Anet. DC\({}^{2}\)Anet with semi-supervised learning is described in Algorithm 1. ```
1:The batch size \(m\), the number of alternative iterations between supervised learning and unsupervised learning \(n_{sup}\) and \(n_{unsup}\), the learning rate \(\alpha\), and Adam hyperparameters \(\beta_{1}\) and \(\beta_{2}\). 2:Construct unaligned data \(P_{unaligned}\{I_{\text{CT}},I_{\text{MR}}\}\) based on aligned data \(P_



### Network Architecture

The synthesis networks \(Syn_{MR}\) and \(Syn_{CT}\) in DC\({}^{2}\)Anet adopt the same architecture as used in the network reported by Johnson et al.