Manuscript Offprint
arXiv:2610.32491L0-Norm-Based CycleGAN for Unpaired Brain CT-to-MR Synthesis
Abstract
Computed tomography (CT) and magnetic resonance (MR) imaging provide complementary information for the brain, but acquiring both modalities is not always possible. The cycle-consistent adversarial network (CycleGAN) enables unpaired CT-to-MR synthesis, but because the standard L1-norm cycle-consistency penalty grows linearly with the residual magnitude, the network tends to focus on large residuals. This paper introduces an L0-norm-based cycle-consistency term, in which the L0-norm is approximated by a smooth and bounded function. This approximation not only increases sensitivity to small residuals but also effectively suppresses the influence of large residuals. The proposed model and an otherwise identical L1-norm baseline were trained on 102 images and evaluated on 9 test images. The proposed model achieves a lower mean squared error (0.02746 versus 0.03464, a 20.7% reduction), a higher mean peak signal-to-noise ratio (15.80 versus 14.77 dB), and a higher mean structural similarity index (0.5689 versus 0.5407). It also has a lower maximum MSE and higher minimum PSNR and SSIM than the baseline. These results indicate that modifying the cycle-consistency penalty can improve reconstruction accuracy on this dataset.
Keywords: CycleGAN; L0-norm; cycle-consistency loss; unpaired CT-to-MR synthesis; brain imaging.
1 Introduction
Disorders of the nervous system are among the largest contributors to ill health worldwide. In the Global Burden of Disease Study 2021, 37 neurological conditions ranked as the leading group cause of disability-adjusted life-years, affecting 3.40 billion people, or 43.1% of the world population [1]. Stroke, Alzheimer's disease, and other dementias are among the ten conditions with the highest age-standardised rates of disability-adjusted life-years [1].
Imaging is central to the diagnosis and treatment of neurological disease, and computed tomography (CT) and magnetic resonance (MR) imaging provide complementary information for the brain. MR resolves soft tissue, which is central to most assessments of the brain, whereas CT depicts bone clearly, is faster, is more widely available, and is routinely used for radiotherapy treatment planning [2]. Neither modality supplies what the other does, so both are used in the diagnosis and treatment planning of diseases such as cancer [2]. However, in clinical practice, imaging costs and equipment accessibility pose practical barriers to acquiring both CT and MR [3], and some patients are unable to undergo MR imaging due to metallic implants or other contraindications [4]. Consequently, many patients end up with only a brain CT and lack a brain MR. Synthesising an MR image from an existing CT image could reduce the need for an additional MR acquisition when synthetic images are acceptable for the intended task.
Supervised convolutional models are widely used in medical image analysis [5]. For CT-to-MR synthesis, representative examples include a three-dimensional fully convolutional network for CT estimation from MR [6] and a SegNet-based two- and three-dimensional CNN for synthetic CT generation from T1-weighted MR [7]. These supervised models require spatially aligned CT-MR image pairs from the same patient [8], which are difficult to assemble because the two examinations are acquired on different scanners, in different sessions, and with different fields of view. To overcome the bottleneck of scarce paired data, the cycle-consistent adversarial network (CycleGAN) is used to learn from unpaired datasets [9]. The network trains two generators with a cycle-consistency loss, which encourages each translation to be approximately invertible on the data support. Cycle-consistent models have since been applied to unpaired cross-modality synthesis [3, 10, 11]. For example, Wolterink et al. [12] applied CycleGAN to MRI and CT images to synthesize CT of the head and neck. Hiasa et al. [13] added a gradient-consistency loss to improve boundary accuracy in pelvic MRI-to-CT synthesis.
To the best of our knowledge, current cycle-consistency losses in CycleGAN and its variants employ the L1-norm, where the penalty grows linearly with the residual magnitude. This means that the network focuses more on reducing large residuals, potentially overlooking the correction of finer details. In contrast, the L0-norm assigns equal weight to every non-zero residual. It is equally sensitive to small residuals and does not diminish its attention to them in the presence of large ones.
Therefore this study replaces the L1-norm penalty with an L0-norm-based cycle-consistency term implemented through a smooth approximation of the L0 indicator. This forces the network to drive the error of each pixel toward zero, thereby effectively preserving reconstruction details. Moreover, the approximation makes the L0-norm differentiable and gives it a redescending influence function: the per-residual gradient is bounded and exhibits an initial rise followed by a decline as the residual increases from 0 to 1. This approximation not only increases sensitivity to small residuals but also effectively suppresses the influence of large residuals. Finally we apply the proposed cycle-consistency term to unpaired brain CT-to-MR synthesis and evaluates it against an otherwise identical L1-norm baseline in an image-level split. The contributions are as follows.
-
An L0-norm-based cycle-consistency term is introduced for unpaired brain CT-to-MR synthesis. The L0-norm is replaced by a smooth, bounded approximation that substitutes a redescending influence function for the linear weighting of the L1-norm penalty, so the loss remains sensitive to small residuals while the influence of very large residuals decays.
-
The evaluation is performed at the image level on 111 images, with 102 images used for training and 9 images held out for testing.
-
The comparison reports aggregate performance and the extreme-case value of each metric on the test set. The proposed model has a lower maximum MSE and higher minimum PSNR and SSIM.
The remainder of the paper is organised as follows. Section 2 sets out the problem, recalls the CycleGAN formulation, and develops the L0-norm-based cycle-consistency term together with the smooth approximation that makes it differentiable, and it then introduces the least-squares adversarial loss and states the training objective and procedure. Section 3 describes the data and split, defines the three evaluation metrics, and reports the quantitative and qualitative results, including the analysis of where in the distribution the two models differ. Section 4 explains the mechanism behind the observed pattern and discusses the interpretation of the three metrics. Section 5 concludes.
2.1 Problem setting
Let and denote the source and target domains, where denotes a brain CT image and denotes a brain MR image. Our model aims to learn a mapping that produces a synthetic MR image from a CT image alone. Let denote an image with pixels.
2.2 The cycleGAN model
The model comprises two generators and two discriminators. The generators are and . The discriminator distinguishes between real and synthetic MR images, while is trained to distinguish between real and synthetic CT images. Because X and Y are unpaired, the adversarial loss alone cannot determine which y should correspond to a given x. The cycle-consistency term resolves this ambiguity by encouraging each translation to be approximately invertible, that is, and . In the original CycleGAN, both directions are measured with the L1-norm penalty [9]:
(1)
And the adversarial losses are as follows [14]:
The full objective is a weighted combination of (1), (2), and (3). Training is performed by solving the following minimax problem:
where is a scalar that weights the cycle-consistency term relative to the adversarial terms.
2.3 L0-norm cycle-consistency penalty
For an image , the L0-norm is the number of non-zero entries:
where denotes the pixel value at the -th position of image I.
Then, we replace the L1-norm term in (1) with the L0-norm to obtain the new cycle-consistency loss:
(5)
We follow the common convention of referring to this quantity as the L0-norm, although strictly speaking it is a cardinality function rather than a true norm.
The Eq. (5) differs from the L1-norm in how it weights residuals of different size. Under the L1-norm penalty, a residual of size r contributes to the loss and induces a gradient of magnitude one, so the loss value grows linearly with residual magnitude.
Under the L0-norm, every non-zero residual contributes one; this increases the sensitivity to small residuals and shifts the generator's objective to minimizing the number of mismatching pixels.
2.4 Smooth approximation and gradient properties
Since the indicator function is discontinuous at the origin and has zero derivative elsewhere, it provides no useful gradient information. Therefore, Eq. (5) cannot be directly optimized by gradient descent. To address this, we adopt a smooth approximation [15] that retains the intended L0-norm properties while remaining differentiable. This function is defined as
where is a parameter. It satisfies .
The derivative of is given by:
By introducing the variable substitution , we can separate the scale parameter from the inherent profile of the gradient function. The absolute value of the gradient can be expressed as , where the shape function is defined as . Its derivative is written as
To find the maximum value of the gradient, we set and solve for the extremum point . Substituting this result yields the upper bound of gradient magnitude:
and this peak gradient occurs when the residual satisfies .
From Eq. (6), the upper bound of the gradient is . As , this upper bound tends to infinity, the function becomes increasingly stiff, and training is highly prone to gradient explosion, making convergence difficult. Therefore, cannot be allowed to actually approach zero during training. In addition, the gradient of the approximate L0 loss first increases and then decreases, peaking at . This indicates that the loss is most sensitive to residuals with magnitudes close to . Given that our images are normalized to the range , confines the transition region of the loss response within a reasonable range of residuals. Therefore, an appropriate value of should be selected to match the dynamic range of image residuals.
Therefore, the actual L0-norm based cycle-consistency loss is given by:
(7)
2.5 Least-squares adversarial loss
This paper adopts the least squares adversarial loss (LSGAN) as the adversarial constraint between the generator and the discriminator. This loss can alleviate the vanishing gradient problem of the original logarithmic GAN loss and provides stronger training stability [16].
(8)
(9)
2.6 Full objective and optimisation
Combining Sections 2.1 to 2.5, our final objective function is given by:
The generators follow the CycleGAN residual architecture: a convolution with 32 filters, two convolutions with stride two and 64 and 128 filters, nine residual blocks with 128 filters, two transposed convolutions with 64 and 32 filters, and a final convolution to three channels, followed by a tanh output and a skip connection that adds the input of the generator to its output. Instance normalisation and ReLU are used throughout the generators.
The discriminators are PatchGANs, that is, patch-based discriminators, each consisting of five convolutions with 64, 128, 256, 512 and one output channel, the first three with stride two, leaky ReLU activations of slope 0.2, and a linear output layer. The discriminator is trained to output 1 for real images and 0 for synthetic images, while the generator aims to make the discriminator output close to 1 for generated images. When updating the discriminator, samples are drawn from a pool of fifty previously generated images rather than images produced in the current iteration. All comparison experiments in this paper adopt identical adversarial loss, network architecture, training schedule and cycle weight . Only the cycle-consistency penalty is modified to guarantee a fair comparison.
Both models were trained for 200 epochs with the Adam optimiser [17] at an initial learning rate of with , a batch size of one image, and a pool of fifty previously generated images for the discriminator updates. Images were resized to pixels, randomly cropped to during training, and flipped horizontally at random. Intensities were scaled to . The cycle weight was and the approximation scale was . The baseline is the same model with an L1-norm penalty in place of the approximation, trained on the same data, architecture, adversarial loss, and schedule, so that the two models differ only in the cycle-consistency term within a common training configuration.
A schematic diagram of the final network is shown in Figure 1. The training steps are summarized in Algorithm 1.

Fig. 1: Structure of the proposed L0-norm-based CycleGAN framework.
3 Experiments
3.1 Data and split
The evaluation in this study relies on the publicly available dataset introduced by Han [18], the dataset can be downloaded from https://github.com/ChengBinJin/MRI-to-CT-DCNN-TensorFlow. This dataset contains 367 CT and MR images of size . We cropped each image into two images of the same modality (CT or MR). In the original CT images, white curvilinear artifacts were visible at the bottom of both the left and right sides; these artifacts were manually removed. In addition, the dataset contains CT and MRI slices from various angles and anatomical regions, which substantially increases the difficulty of training the generator and
Algorithm 1 Training procedure of the proposed L0-norm based CycleGAN framework
Require: Image pool size . Generators ; Discriminators .
1: Initialize parameters of ; Initialize empty image pools .
2: for each epoch do
3: for each mini-batch with batch size = 1 do
4: Sample real images .
5: Generate fake images: and .
6: Step 1: Update Generator
7: Compute loss for : Eq. (8) + Eq. (7).
8: Optimize parameters of via Adam; push into pool .
9: Step 2: Update Discriminator
10: Sample a historical image from .
11: Compute LSGAN loss for (Eq. (8)) using real and fake .
12: Optimize parameters of via Adam (parameters of are frozen).
13: Step 3: Update Generator
14: Compute loss for : Eq. (9) + Eq. (7).
15: Optimize parameters of via Adam; push into pool .
16: Step 4: Update Discriminator
17: Sample a historical image from .
18: Compute LSGAN loss for (Eq. (9)) using real and fake .
19: Optimize parameters of via Adam (parameters of are frozen).
20: end for
21: end for
22: Pool Rule: Before pool is full, save new fakes directly. Once full, replace a stored sample with the new fake with probability 0.5.
exposes it to the risk of mode collapse. To this end, we selected 111 paired images with similar structures for each modality, of which 102 were used for training and 9 for testing.
3.2 Evaluation metrics
Three pixel-level metrics are reported. Let denote the synthetic image and the reference image, both of size . The mean squared error (MSE) [3] is
the peak signal-to-noise ratio (PSNR) [3] is
(dB), and the structural similarity index (SSIM) [19] is
in which , and compare luminance, contrast and structure respectively. A lower MSE, a higher PSNR and an SSIM closer to one each indicate closer agreement with the reference image.
3.3 Quantitative results
Table 1 reports the two models on the test set. The proposed model achieved a lower mean MSE, a higher mean PSNR, and a higher mean SSIM than the L1-norm baseline. The mean MSE was lower, and the mean SSIM was higher by 0.0282, representing a relative increase.
Table 1: Test-set performance of the L1-norm baseline and the proposed L0-norm-based model. Values are mean standard deviation, with the minimum and maximum of the same statistic over the test set in parentheses. The images were scaled to , so MSE is expressed in squared normalised intensity units.
| Model | MSE | PSNR (dB) | SSIM |
|---|---|---|---|
| Baseline (L1-norm) | |||
| L0-norm (proposed) |
The change in PSNR is consistent with the change in MSE. The reduction in MSE from 0.03464 to 0.02746 corresponds to a gain of dB, close to the reported mean gain of 1.03 dB. The small difference reflects the fact that the mean of the per-case PSNR is not equal to the PSNR of the mean MSE.
3.4 Extreme-case performance
The aggregate means in Table 1 summarise overall performance. The extrema in the same table describe the worst and best observed values across the test cases for each metric.
On the test set, the proposed model lowered the maximum MSE from 0.04770 to 0.04048 (15.1%), raised the minimum PSNR from 13.22 to 13.93 dB, and raised the minimum SSIM from 0.3599 to 0.3776 (4.9%). The baseline retained a higher maximum SSIM (0.6850 versus 0.6419). These observations indicate that the proposed model achieves more favorable extreme values for each metric.
3.5 Qualitative comparison
Figure 2 presents a qualitative comparison of the synthesized results. Compared with the original CycleGAN, the proposed L0-norm model is visually closer to the reference
MR image. Specifically, the proposed L0 model preserves sharper tissue boundaries while suppressing unnatural artifacts.

Fig. 2: Two representative cases, one per row. Columns, from left to right: input CT, synthetic MR of the proposed model, synthetic MR of the L1-norm baseline, reference MR.
4 Discussion
Taken together, the test results show that replacing the L1-norm cycle penalty with the approximation of the L0-norm improves mean reconstruction accuracy and the extreme-case value of each metric in this dataset. The CycleGAN architecture and the other training components are shared by the two models, so the observed differences can be examined under a common training configuration.
4.1 Interpretation of the observed improvement
The lower maximum MSE and higher minimum PSNR and SSIM reported in Section 3.4 are consistent with the design of the approximation. Under the L1-norm penalty, every non-zero residual has a gradient of magnitude one. Under the approximation, the gradient is bounded, peaks at , and decays for larger residuals. The latter therefore reduces the relative influence of very large residuals, while retaining sensitivity near the transition band.
What’s more, the scale parameter governs the location of the transition region on the gradient curve of the proposed approximation. For , the gradient reaches its maximum value of 7.87 at . The gradient of the approximate loss remains larger than that of the L1-norm penalty for residuals below approximately 0.21, and decays afterwards to about 0.19 at residual 0.25 and 0.015 at residual 0.3.
The root-mean-square reconstruction error for the synthetic reference is 0.166, i.e., 1.66σ, which indicates that the typical scale of reconstruction errors on this dataset lies near this transition band and facilitates the desirable residual-modulating property of the loss function. It should be noted that the cycle residual is not identical to the reconstruction residual, so the above matching is only qualitative. The overall balance of the cycle-consistency constraint is jointly controlled by the hyperparameters λ and σ.
4.2 Relation to previous work and metric interpretation
Most existing improvements to CycleGAN focus on network architecture design or introduce additional loss terms while retaining the original cycle-consistency penalty. The core contribution of this paper lies in directly modifying the cycle-consistency loss itself. Consequently, the proposed scheme can be readily transferred to other existing CycleGAN variants.
MSE and PSNR measure global error and are closely related for a fixed dynamic range, whereas SSIM compares local luminance, contrast, and structure. Agreement between the mean MSE and mean SSIM therefore supports the observed improvement.
5 Conclusion
This paper introduced an L0-norm-based cycle-consistency term, implemented through a smooth, bounded approximation, and applied it to unpaired brain CT-to-MR synthesis. The approximation provides a redescending influence function: its per-residual gradient is bounded, peaks at residuals of order , and decays for much larger residuals. This design offers a principled alternative to the linear L1-norm penalty, which weights the loss by residual magnitude.
After training on 102 images and holding out the remaining 9, the proposed model achieved a lower mean MSE (0.02746 versus 0.03464), a higher mean PSNR (15.80 versus 14.77 dB), and a higher mean SSIM (0.5689 versus 0.5407) on the test set. It also produced a lower maximum MSE and higher minimum PSNR and SSIM.
These results show that changing the cycle-consistency penalty can improve reconstruction accuracy in this dataset. Future work will incorporate a systematic sensitivity analysis, multi-centre data, and downstream task evaluation.
Data Availability Statement
The datasets analyzed during the current study were originally introduced in the article by Han [18] and are available in the GitHub repository at https://github.com/ChenBinJin/MRI-to-CT-DCNN-TensorFlow [20]. This toy dataset consists of 367 paired images and is accessible via the download link provided in the repository's documentation.
Declarations
- This work is supported by the National Natural Science Foundation of China (Grant No. 12371304).
• The authors declare no competing interests.
References
[1] Steinmetz JD, Seeher KM, Schiess N, et al (2024) Global, regional, and national burden of disorders affecting the nervous system, 1990–2021: a systematic analysis for the Global Burden of Disease Study 2021. Lancet Neurol 23(4): 344–381. https://doi.org/10.1016/S1474-4422(24)00038-3
[2] Wang T, Lei Y, Fu Y, Wynne JF, Curran WJ, Liu T, Yang X (2021) A review on medical imaging synthesis using deep learning and its clinical applications. J Appl Clin Med Phys 22(1): 11–36. https://doi.org/10.1002/acm2.13121
[3] Wang JY, Wu QMJ, Pourpanah F (2023) DC-cycleGAN: bidirectional CT-to-MR synthesis from unpaired data. Comput Med Imaging Graph 108: 102249. https://doi.org/10.1016/j.compmedimag.2023.102249
[4] Shellock FG, Crues JV (2004) MR procedures: biologic effects, safety, and patient care. Radiology 232:635-652. https://doi.org/10.1148/radiol.2323030830
[5] Litjens G, Kooi T, Bejnordi BE, Setio AAA, Ciompi F, Ghafoorian M, van der Laak JAWM, van Ginneken B, Sánchez CI (2017) A survey on deep learning in medical image analysis. Med Image Anal 42:60-88. https://doi.org/10.1016/j.media.2017.07.005
[6] Nie D, Cao X, Gao Y, Wang L, Shen D (2016) Estimating CT image from MRI data using 3D fully convolutional networks. In: Carneiro G, Mateus D, Peter L, et al (eds) Deep Learning and Data Labeling for Medical Applications. Lecture Notes in Computer Science, vol 10008. Springer, Cham, pp 170–178. https://doi.org/10.1007/978-3-319-46976-8_18
[7] Fu J, Yang Y, Singhrao K, Ruan D, Chu FI, Low DA, Lewis JH (2019) Deep learning approaches using 2D and 3D convolutional neural networks for generating male pelvic synthetic computed tomography from magnetic resonance imaging. Med Phys 46(9):3788-3798. https://doi.org/10.1002/mp.13672
[8] Roy S, Wang WT, Carass A, Prince JL, Butman JA, Pham DL (2014) PET attenuation correction using synthetic CT from ultrashort echo-time MR imaging. J Nucl Med 55(12):2071-2077. https://doi.org/10.2967/jnumed.114.143958
[9] Zhu JY, Park T, Isola P, Efros AA (2017) Unpaired image-to-image translation using cycle-consistent adversarial networks. In: Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV). IEEE, Venice, Italy, pp 2242–2251. https://doi.org/10.1109/ICCV.2017.244
[10] Yang H, Sun J, Carass A, Zhao C, Lee J, Prince JL, Xu Z (2020) Unsupervised MR-to-CT synthesis using structure-constrained CycleGAN. IEEE Trans Med Imaging 39(12):4249-4261. https://doi.org/10.1109/TMI.2020.3015379
[11] Liu Y, Chen A, Shi H, Huang S, Zheng W, Liu Z, Zhang Q, Yang X (2021) CT synthesis from MRI using multi-cycle GAN for head-and-neck radiation therapy. Comput Med Imaging Graph 91:101953. https://doi.org/10.1016/j.compmedimag.2021.101953
[12] Wolterink JM, Dinkla AM, Savenije MHF, Seevinck PR, van den Berg CAT, Isgum I (2017) Deep MR to CT synthesis using unpaired data. In: Tsaftaris S, Gooya A, Frangi A, Prince J (eds) Simulation and synthesis in medical imaging, Lecture Notes in Computer Science, vol 10557. Springer, Cham, pp 14-23. https://doi.org/10.1007/978-3-319-68127-6_2
[13] Hiasa Y, Otake Y, Takao M, Matsuoka T, Takashima K, Carass A, Prince JL, Sugano N, Sato Y (2018) Cross-modality image synthesis from unpaired data using cyclegan. In: Gooya A, Goksel O, Oguz I, Burgos N (eds) Simulation and synthesis in medical imaging, Lecture Notes in Computer Science, vol 11037. Springer, Cham, pp 31-41. https://doi.org/10.1007/978-3-030-00536-8_4
[14] Goodfellow IJ, Pouget-Abadie J, Mirza M, Xu B, Warde-Farley D, Ozair S, Courville A, Bengio Y (2014) Generative adversarial networks. Preprint at https://arxiv.org/abs/1406.2661
[15] Zhao R, Lin W, Li H, Hu S (2012) Reconstruction algorithm for compressive sensing based on smoothed L0 norm and revised Newton method. J. Comput. Aided Des. Comput. Graph. 24(4):478–484. https://doi.org/10.3969/j.issn.1003-9775.2012.04.008 (In Chinese)
[16] Mao X, Li Q, Xie H, Lau RYK, Wang Z, Smolley SP (2017) Least squares generative adversarial networks. In: Proceedings of the IEEE International Conference on Computer Vision (ICCV), pp 2813–2821. https://doi.org/10.1109/ICCV.2017.304
[17] Kingma DP, Ba J (2014) Adam: a method for stochastic optimization. Preprint at https://arxiv.org/abs/1412.6980
[18] Han X (2017) MR-based synthetic CT generation using a deep convolutional neural network method. Med Phys 44(4):1408–1419. https://doi.org/10.1002/mp.12155
[19] Wang Z, Bovik AC, Sheikh HR, Simoncelli EP (2004) Image quality assessment: from error visibility to structural similarity. IEEE Trans Image Process 13(4):600–612. https://doi.org/10.1109/TIP.2003.819861
[20] Cheng B (2020) MRI-to-CT DCNN TensorFlow [Dataset]. GitHub. https://github.com/ChenBinJin/MRI-to-CT-DCNN-TensorFlow