Semi-Supervised Biomedical Image Segmentation via Diffusion Models and Teacher-Student Co-Training Luca Ciampi, Gabriele Lagani, Giuseppe Amato, Fabrizio Falchi Abstract Supervised deep learning achieves strong performance in biomedical image segmentation but relies on costly pixel-wise annotations, motivating semi-supervised approaches that exploit unlabeled data. We introduce a diffusion-based teacher–student framework in which segmentation predictions are used to condition image denoising, encouraging the production of more informative pseudo-labels. The teacher is first pretrained through an unsupervised reconstruction task using diffusion-style corruption, timestep conditioning, and denoising. Starting from a corrupted empty mask, the model predicts an intermediate segmentation that conditions image denoising, encouraging the predicted mask to capture structural information useful for recovering the original image. The resulting teacher is then co-trained with a student using supervised segmentation on labeled samples and cross pseudo-supervision on unlabeled data. We further introduce a multi-round extension during co-training, in which the teacher generates multiple stochastic image reconstructions and corresponding segmentation predictions, providing additional reconstruction and alignment signals to improve its pseudo-labels. We evaluate the proposed framework on three public 2D biomedical segmentation datasets and a 3D left atrial segmentation benchmark. Across several labeling regimes, our method achieves competitive or superior performance compared with state-of-the-art semi-supervised approaches, with the largest gains observed under severe label scarcity. 1 Introduction Deep learning (DL) models have demonstrated strong performance in biomedical image segmentation [ 40 , 6 , 27 , 34 , 50 , 17 , 4 , 13 , 14 ] . However, these methods typically rely on large amounts of annotated training data for supervised learning. In the biomedical domain, this requirement represents a particularly severe bottleneck, as pixel-wise annotation often requires substantial time from highly specialized domain experts and may also be affected by inter-observer variability. This time-consuming and resource-intensive process significantly limits the applicability of such methods in large-scale clinical settings [ 45 , 20 , 15 , 44 , 2 , 21 ] . To address this limitation, semi-supervised learning combines supervised training on a limited set of labeled samples with additional learning from a larger pool of unlabeled data [ 43 , 19 , 46 , 9 , 24 , 32 , 26 ] . Among semi-supervised approaches, teacher–student methods have proven particularly effective [ 43 , 53 , 10 ] . In these methods, a teacher model provides supervisory signals, typically in the form of pseudo-labels or prediction targets, to guide learning from unlabeled data. A key limitation of pseudo-label-based learning, however, is confirmation bias, whereby inaccurate predictions may be reinforced and accumulate errors during training [ 38 , 25 ] . Thus, the quality of supervisory predictions is critical. In semantic segmentation, this is particularly challenging, as predictions must not only assign the correct semantic classes but also preserve accurate boundaries of the segmented structures [ 55 , 30 , 28 ] . Figure 1 : Overview of the main training procedure of the proposed teacher–student framework for semi-supervised biomedical image segmentation. (a) Unsupervised teacher pretraining. The teacher mask pathway receives the input image together with a noise-corrupted empty segmentation mask and produces an intermediate segmentation prediction. This prediction conditions the teacher image pathway, which processes an independently corrupted version of the input image to reconstruct a clean-image estimate. (b) Semi-supervised teacher–student co-training. The teacher and student mask pathways process the same input image together with independently corrupted empty masks and independently sampled diffusion timesteps, producing the corresponding segmentation predictions. For labeled samples, both predictions are supervised by the ground-truth mask through the supervised segmentation loss. For unlabeled samples, cross pseudo-supervision (CPS) enables the prediction of each model to provide pseudo-supervision to the other. In this paper, we introduce a novel semi-supervised approach to biomedical image segmentation that follows a teacher–student co-training paradigm. Our formulation adopts the forward diffusion process, timestep conditioning, and denoising objectives used in denoising diffusion probabilistic models (DDPMs) [ 18 ] . The core intuition is that, by coupling a segmentation prediction task with a conditional image-denoising objective, the teacher is encouraged to generate an intermediate mask that retains structural information useful for recovering the original image from its corrupted version, thereby improving its suitability as a pseudo-label. Specifically, the proposed framework combines unsupervised teacher pretraining with semi-supervised teacher–student co-training and further incorporates a multi-round extension during co-training. As illustrated in Fig. 1 (a), the teacher first undergoes an unsupervised reconstruction-based pretraining stage using only unlabeled images. Given an input image together with a corrupted empty mask and the corresponding diffusion timestep, the teacher generates an intermediate segmentation prediction, which is then used to condition the denoising of an independently corrupted version of the same image. This objective encourages the segmentation output to preserve information relevant to the input image and prepares the teacher to produce informative pseudo-labels. During the subsequent co-training stage (Fig. 1 (b)), the pretrained teacher and the student are jointly optimized. Both models receive the same input image together with independently corrupted empty masks and independently sampled diffusion timesteps and produce the corresponding segmentation predictions. Ground-truth masks supervise both models on labeled samples, whereas cross pseudo-supervision enables them to learn from each other’s predictions on unlabeled samples. Finally, in the multi-round extension, the teacher generates multiple stochastic image reconstructions and corresponding segmentation predictions, which provide additional reconstruction and alignment signals to improve its pseudo-labels during co-training. We evaluate our methodology on three widely used public datasets for 2D medical image segmentation [ 45 , 44 , 2 , 21 ] , covering different imaging modalities and segmentation tasks. Specifically, we assess our approach on GlaS [ 41 ] for colorectal gland segmentation in Hematoxylin and Eosin (H&E)-stained histological images, PH2 [ 33 ] for skin lesion segmentation in dermoscopic images, and HMEPS [ 31 ] for pupil segmentation in grayscale eye images. Additionally, we extend our evaluation to volumetric data using the LA [ 51 ] dataset for left atrial segmentation in MRIs. We benchmark our method against several state-of-the-art semi-supervised approaches, including methods based on pseudo-labeling, consistency regularization, and entropy minimization [ 47 , 53 , 36 , 10 , 30 , 29 ] , as well as two-stage pipelines that employ recent self-supervised learning (SSL) paradigms during the initial unsupervised pretraining phase [ 37 , 39 ] . Our results show that the proposed approach achieves competitive performance across different levels of label scarcity and reaches state-of-the-art performance in several experimental settings. Concretely, our contributions are as follows: • We propose a novel semi-supervised teacher–student framework for biomedical image segmentation that integrates the forward diffusion process, timestep conditioning, and denoising objectives used in DDPMs. The teacher is first trained on unlabeled images through a reconstruction-based pretraining objective that couples segmentation prediction with conditional image denoising, and is subsequently co-trained with a student using ground-truth supervision on labeled samples and cross pseudo-supervision on unlabeled samples. • We introduce a multi-round extension in which the teacher generates multiple stochastic image reconstructions and corresponding segmentation predictions, providing additional reconstruction and alignment signals to improve its pseudo-labels during co-training. • We evaluate the proposed framework on three public 2D biomedical image segmentation benchmarks across different imaging modalities and levels of label availability, and further evaluate it on a 3D left atrial segmentation dataset. We also conduct ablation studies to assess the contribution of the main components and configurations of the proposed framework. 2 Related Work Deep learning has led to substantial advances in semantic segmentation, with architectures such as FCN [ 27 ] , SegNet [ 1 ] , and DeepLabV3 [ 6 ] , while U-Net-like models have become particularly widespread in biomedical imaging [ 15 , 34 , 17 , 4 , 20 , 12 , 11 ] . However, the scarcity of labeled biomedical data has motivated label-efficient learning strategies that exploit unlabeled samples alongside limited annotations [ 3 , 23 ] . Pseudo-labeling and teacher–student approaches. Pseudo-labeling methods exploit model predictions as supervisory targets for unlabeled samples. These predictions may be generated by the same model or by a separate network, and can substantially improve segmentation performance when sufficiently accurate [ 43 , 19 ] . The Mean Teacher (MT) framework [ 43 ] employs teacher and student models with the same architecture and updates the teacher parameters as an exponential moving average of the student parameters. The uncertainty-aware Mean Teacher (UAMT) method [ 53 ] adapts this strategy to biomedical image segmentation by incorporating uncertainty estimation. Cross pseudo-supervision (CPS) [ 10 ] , instead, employs two independently initialized networks that supervise each other using their predicted label maps. Our framework builds on the mutual-supervision principle of CPS, while introducing an unsupervised reconstruction-based pretraining stage for the teacher and a multi-round mechanism that provides additional reconstruction and alignment signals during co-training. Consistency-, entropy-, and adversarial methods. Consistency-based semi-supervised methods exploit unlabeled samples by encouraging compatible predictions under different perturbations of the same input or representation [ 19 , 42 ] . Cross-consistency training (CCT) [ 36 ] perturbs latent representations and enforces agreement among the resulting segmentation outputs. Uncertainty-rectified pyramid consistency (URPC) [ 30 ] instead promotes consistency among predictions produced at different decoder levels, while DTC [ 29 ] jointly predicts a pixel-wise segmentation map and a geometry-aware level-set representation and enforces consistency between the two task outputs. Unlabeled data can also be exploited through entropy-based objectives. Vu et al. [ 47 ] introduced direct entropy minimization and adversarial entropy alignment for unsupervised domain adaptation; the former can also be used in semi-supervised segmentation to encourage confident predictions on unlabeled images. Two-stage label-efficient approaches. An alternative label-efficient strategy separates the use of unlabeled and labeled data into two stages: an initial unsupervised or self-supervised pretraining phase followed by adaptation to the target task using a limited set of annotations [ 3 , 23 , 22 , 54 ] . The method proposed in [ 37 ] , for example, learns representations using superpixel-derived pseudo-labels. More recently, large-scale biomedical encoders such as RAD-DINO [ 39 ] , UNI [ 7 ] , and Prov-GigaPath [ 52 ] have leveraged large-scale self-supervised DINO-based pretraining [ 5 ] to learn transferable representations for downstream tasks. Unlike these two-stage approaches, our framework does not restrict the use of unlabeled data to pretraining: after unsupervised teacher pretraining, teacher and student remain jointly optimized using ground-truth supervision on labeled samples and cross pseudo-supervision on unlabeled samples. Diffusion-based segmentation methods. Denoising diffusion models have recently been applied to biomedical image segmentation by formulating mask prediction as an image-conditioned denoising process. MedSegDiff [ 48 ] and MedSegDiff-V2 [ 49 ] progressively recover segmentation maps through iterative reverse diffusion, whereas BerDiff [ 8 ] formulates the diffusion process in the Bernoulli domain to better accommodate discrete binary masks and exploits stochastic sampling to generate diverse segmentation outputs. These approaches primarily use diffusion as the segmentation model itself, commonly within fully supervised or probabilistic segmentation settings. In contrast, our framework employs forward diffusion, timestep conditioning, and conditional denoising objectives to support pseudo-label generation within a semi-supervised teacher–student setting, rather than relying on iterative reverse diffusion as its primary segmentation inference mechanism. Figure 2 : Mask and image computational pathways. The mask pathway predicts a segmentation mask from a clean image, a corrupted mask, and the diffusion timestep. The image pathway predicts the noise added to a corrupted image conditioned on a mask, and the corresponding clean-image estimate is then recovered through the reconstruction operator. During teacher pretraining, the predicted mask from the first pathway conditions the image pathway, as illustrated in Fig. 1 . 3 Method Our approach to semi-supervised biomedical image segmentation follows a teacher–student co-training framework and adopts the forward diffusion process, timestep conditioning, and denoising objectives used in denoising diffusion probabilistic models (DDPMs) [ 18 ] . The framework combines unsupervised reconstruction-based teacher pretraining with semi-supervised teacher–student co-training and further incorporates a multi-round extension during co-training. During pretraining, an intermediate segmentation prediction generated by the teacher is used to condition the denoising of a corrupted version of the input image. During co-training, ground-truth masks supervise teacher and student predictions on labeled samples, whereas cross pseudo-supervision is used on unlabeled samples. The multi-round extension additionally generates stochastic reconstruction–segmentation pairs during co-training, providing further reconstruction and alignment signals to improve the teacher’s pseudo-labels. 3.1 Unsupervised Reconstruction-based Teacher Pretraining The teacher contains two distinct U-Net-based computational pathways: (i) a mask pathway , which operates in the segmentation-mask domain, and (ii) an image pathway , which operates in the image domain, as illustrated in Fig. 2 . Both pathways receive inputs corrupted according to the forward diffusion process used in DDPMs. For a normalized image \mathbf{i} and a normalized C -channel mask representation \mathbf{m} , their corrupted versions at timestep t are \displaystyle\tilde{\mathbf{i}}_{t} \displaystyle=\sqrt{\bar{\alpha}_{t}}\,\mathbf{i}+\sqrt{1-\bar{\alpha}_{t}}\,\boldsymbol{\nu}_{i}, (1) \displaystyle\tilde{\mathbf{m}}_{t} \displaystyle=\sqrt{\bar{\alpha}_{t}}\,\mathbf{m}+\sqrt{1-\bar{\alpha}_{t}}\,\boldsymbol{\nu}_{m}, where \boldsymbol{\nu}_{i} and \boldsymbol{\nu}_{m} are independent standard Gaussian tensors, \boldsymbol{\nu}_{i},\boldsymbol{\nu}_{m}\sim\mathcal{N}(\mathbf{0},\mathbf{I}) . The coefficient \bar{\alpha}_{t}\in(0,1] is the cumulative signal-retention coefficient associated with the predefined noise schedule, with larger timesteps corresponding to stronger corruption. For each sample, the timestep is drawn from t\sim\mathrm{Unif}\{0,\ldots,T-1\} , where T is the total number of diffusion timesteps. The two pathways use different prediction objectives. Given a corrupted mask-domain input and a clean conditioning image, the mask pathway directly predicts a clean mask-domain output: \hat{\mathbf{m}}=f_{m}\left(\mathbf{i},\tilde{\mathbf{m}}_{t},t\right). (2) Conversely, given a corrupted image and an uncorrupted mask-domain conditioning tensor, the image pathway predicts the Gaussian noise added to the image: \hat{\boldsymbol{\nu}}_{i}=f_{i}\left(\tilde{\mathbf{i}}_{t},\mathbf{m},t\right). (3) Both pathways are conditioned on the sampled timestep through a sinusoidal embedding processed by a multi-layer perceptron and incorporated into the internal feature representation. Each pathway produces its prediction in a single forward pass at the sampled timestep; no iterative reverse-diffusion chain is used. Given the predicted noise, the corresponding clean-image estimate is \hat{\mathbf{i}}=\sqrt{\frac{1}{\bar{\alpha}_{t}}}\,\tilde{\mathbf{i}}_{t}-\sqrt{\frac{1}{\bar{\alpha}_{t}}-1}\,\hat{\boldsymbol{\nu}}_{i}. (4) For compactness, we define the corresponding image-reconstruction operator \displaystyle g_{i}\left(\mathbf{x},\mathbf{m},t\right) \displaystyle=\sqrt{\frac{1}{\bar{\alpha}_{t}}}\,\mathbf{x} (5) \displaystyle-\sqrt{\frac{1}{\bar{\alpha}_{t}}-1}\,f_{i}\left(\mathbf{x},\mathbf{m},t\right). Hence, for \mathbf{x}=\tilde{\mathbf{i}}_{t} , the clean-image estimate is \hat{\mathbf{i}}=g_{i}(\tilde{\mathbf{i}}_{t},\mathbf{m},t) . Both pathways are conditioned on the sampled timestep through a sinusoidal embedding processed by a multi-layer perceptron and incorporated into the internal feature representation. Each pathway produces its prediction in a single forward pass at the sampled timestep; no iterative reverse-diffusion chain is used. During teacher pretraining (Fig. 1 (a)), the mask pathway receives a corrupted empty mask instead of an annotated segmentation mask. Let \mathbf{m}^{(\emptyset)} denote an all-background one-hot mask. At a randomly sampled timestep t , this mask is corrupted as \tilde{\mathbf{m}}^{(\emptyset)}_{t}=\sqrt{\bar{\alpha}_{t}}\,\mathbf{m}^{(\emptyset)}+\sqrt{1-\bar{\alpha}_{t}}\,\boldsymbol{\nu}_{m}. (6) The mask pathway then produces an intermediate C -channel mask-domain prediction conditioned on the clean image: \hat{\mathbf{m}}=f_{m}\left(\mathbf{i},\tilde{\mathbf{m}}^{(\emptyset)}_{t},t\right). (7) An independent timestep t^{\prime} and Gaussian tensor \boldsymbol{\nu}^{\prime}_{i} are then sampled, and the original image is independently corrupted as \tilde{\mathbf{i}}_{t^{\prime}}=\sqrt{\bar{\alpha}_{t^{\prime}}}\,\mathbf{i}+\sqrt{1-\bar{\alpha}_{t^{\prime}}}\,\boldsymbol{\nu}^{\prime}_{i},\;t^{\prime}\sim\mathrm{Unif}\{0,\ldots,T-1\}. (8) Conditioned on the intermediate mask prediction, the image pathway estimates the noise added to the image: \hat{\boldsymbol{\nu}}^{\prime}_{i}=f_{i}\left(\tilde{\mathbf{i}}_{t^{\prime}},\hat{\mathbf{m}},t^{\prime}\right), (9) and reconstructs the corresponding clean-image estimate as \hat{\mathbf{i}}^{\prime}=g_{i}\left(\tilde{\mathbf{i}}_{t^{\prime}},\hat{\mathbf{m}},t^{\prime}\right). (10) The reconstruction branch is optimized using the DDPM noise-prediction objective \mathcal{L}_{\mathrm{rec}}^{(\mathrm{pre})}=\operatorname{MSE}\left(\boldsymbol{\nu}^{\prime}_{i},\hat{\boldsymbol{\nu}}^{\prime}_{i}\right). (11) Because \hat{\boldsymbol{\nu}}^{\prime}_{i} is predicted conditionally on \hat{\mathbf{m}} , gradients from Eq. 11 propagate through both computational pathways. The reconstruction objective therefore encourages the intermediate mask-domain output to retain information about the input image. No segmentation annotations are used during teacher pretraining. Once pretraining is completed, the resulting parameters initialize the teacher used in the subsequent co-training process. 3.2 Semi-supervised Teacher–Student Co-training The co-training stage uses the mask pathways of the teacher and student (Fig. 1 (b)). Given an input image \mathbf{i} , each model receives an independently corrupted empty-mask initialization at a sampled timestep and produces a segmentation prediction: \hat{\mathbf{m}}^{(k)}=f_{m}^{(k)}\left(\mathbf{i},\tilde{\mathbf{m}}^{(\emptyset,k)}_{t_{k}},t_{k}\right),\ k\in\{\mathrm{Teach.},\mathrm{Stud.}\}. (12) Each output is a C -channel segmentation score map containing one class score at each pixel. A hard segmentation mask is obtained by applying \operatorname*{arg\,max}_{c} along the class dimension. Let \ell_{\mathrm{seg}} denote the pixel-wise segmentation loss used for co-training. For unlabeled samples, cross pseudo-supervision is defined as \displaystyle\mathcal{L}_{\mathrm{CPS}}={} \displaystyle\ell_{\mathrm{seg}}\left(\hat{\mathbf{m}}^{(\mathrm{student})},\operatorname*{arg\,max}_{c}\hat{\mathbf{m}}^{(\mathrm{teacher})}\right) (13) \displaystyle+\ell_{\mathrm{seg}}\left(\hat{\mathbf{m}}^{(\mathrm{teacher})},\operatorname*{arg\,max}_{c}\hat{\mathbf{m}}^{(\mathrm{student})}\right). The first term uses the teacher prediction as a hard pseudo-label for the student, whereas the second term uses the student prediction as a hard pseudo-label for the teacher. Thus, both models are updated during joint optimization. For labeled samples with ground-truth annotation \mathbf{l} , both predictions are additionally supervised through \mathcal{L}_{\mathrm{sup}}=\ell_{\mathrm{seg}}\left(\hat{\mathbf{m}}^{(\mathrm{teacher})},\mathbf{l}\right)+\ell_{\mathrm{seg}}\left(\hat{\mathbf{m}}^{(\mathrm{student})},\mathbf{l}\right). (14) The complete co-training objective additionally incorporates the reconstruction and alignment terms introduced by the multi-round extension. GlaS PH2 HMEPS Labeled % 1% 2% 5% 10% 20% 1% 2% 5% 10% 20% 1% 2% 5% 10% 20% Dice Coefficient (DC) \uparrow Method Fully Sup. (100%) 90.62 92.44 96.98 SuperpixSSL 68.51 70.10 75.18 77.82 81.33 70.78 77.61 81.78 85.21 88.31 87.45 88.47 91.34 92.82 93.18 RAD-DINO 68.06 68.52 73.40 76.51 82.18 77.18 79.66 85.05 88.01 91.52 86.69 85.81 88.72 90.10 91.17 EM 68.92 70.23 75.34 78.08 81.20 73.24 79.34 81.89 84.94 86.30 90.24 91.35 92.31 92.56 93.04 CCT 68.97 70.05 76.33 80.36 84.22 73.42 80.13 82.78 87.93 89.95 91.09 91.48 93.25 93.45 93.30 UAMT 69.12 69.71 75.14 79.31 83.03 74.72 79.76 83.75 87.37 88.95 90.18 92.42 93.03 93.14 93.42 URPC 68.38 68.67 74.32 78.59 82.34 71.23 78.88 83.41 88.06 91.73 89.15 89.78 90.85 90.96 91.30 CPS 69.32 70.60 76.17 80.35 83.90 76.07 79.64 82.86 84.33 86.49 90.39 91.07 92.89 92.83 93.04 Ours 70.03 72.22 77.30 80.06 84.55 78.18 81.51 86.15 89.45 92.42 91.69 92.86 93.79 94.12 94.37 Jaccard Index (JI) \uparrow Method Fully Sup. (100%) 82.85 85.96 94.70 SuperpixSSL 52.11 54.00 60.28 63.78 68.60 54.87 63.59 69.23 74.28 79.10 77.80 79.53 84.16 86.65 87.23 RAD-DINO 51.59 52.11 57.15 61.46 68.47 63.19 66.22 74.05 78.02 84.38 75.06 75.16 79.73 81.99 83.77 EM 52.60 54.16 60.45 64.06 68.38 57.92 65.95 69.37 73.85 75.92 82.25 84.14 85.78 86.20 87.00 CCT 52.65 53.92 61.76 67.19 72.76 58.06 66.90 70.66 78.46 81.74 84.03 84.34 87.38 87.70 87.45 UAMT 52.83 53.55 60.19 65.72 71.00 59.70 66.38 72.08 77.59 80.12 82.12 86.06 87.02 87.16 87.68 URPC 51.96 52.31 59.17 64.78 70.12 55.39 65.22 71.65 78.89 84.71 80.45 81.47 83.23 83.44 84.05 CPS 53.05 54.59 61.54 67.16 72.27 61.50 66.39 70.78 72.93 76.23 82.49 83.60 86.72 86.63 86.99 Ours 53.92 56.58 63.01 66.69 73.23 64.21 68.84 75.69 80.94 85.90 84.66 86.69 88.12 88.90 89.32 Table 1 : Quantitative comparison with SOTA methods on GlaS, PH2, and HMEPS. Mean DC and JI scores (%) over 10 cross-validation folds across labeling ratios. Best results are shown in bold. 3.3 Multi-round Reconstruction and Segmentation The basic co-training formulation in Sec. 3.2 uses only the mask pathways. To additionally exploit the teacher image pathway during co-training, we generate R stochastic reconstruction–segmentation pairs. The corresponding rounds are independent conditional branches rather than the timesteps of a sequential reverse-diffusion chain. Starting from the initial teacher prediction \hat{\mathbf{m}}^{(\mathrm{teacher})} , each round r independently samples a timestep t^{\prime}_{r} and Gaussian noise tensor \boldsymbol{\nu}^{(r)}_{i} . The input image is corrupted as \tilde{\mathbf{i}}^{(r)}_{t^{\prime}_{r}}=\sqrt{\bar{\alpha}_{t^{\prime}_{r}}}\,\mathbf{i}+\sqrt{1-\bar{\alpha}_{t^{\prime}_{r}}}\,\boldsymbol{\nu}^{(r)}_{i}. (15) The teacher image pathway predicts the corresponding noise, \hat{\boldsymbol{\nu}}^{(r)}_{i}=f_{i}^{(\mathrm{teacher})}\left(\tilde{\mathbf{i}}^{(r)}_{t^{\prime}_{r}},\hat{\mathbf{m}}^{(\mathrm{teacher})},t^{\prime}_{r}\right), (16) and produces the clean-image estimate \hat{\mathbf{i}}_{r}=g_{i}^{(\mathrm{teacher})}\left(\tilde{\mathbf{i}}^{(r)}_{t^{\prime}_{r}},\hat{\mathbf{m}}^{(\mathrm{teacher})},t^{\prime}_{r}\right). (17) A second independent timestep t^{\prime\prime}_{r} and Gaussian tensor \boldsymbol{\nu}^{(r)}_{m} are used to construct a corrupted empty-mask initialization: \tilde{\mathbf{m}}^{(\emptyset,r)}_{t^{\prime\prime}_{r}}=\sqrt{\bar{\alpha}_{t^{\prime\prime}_{r}}}\,\mathbf{m}^{(\emptyset)}+\sqrt{1-\bar{\alpha}_{t^{\prime\prime}_{r}}}\,\boldsymbol{\nu}^{(r)}_{m}. (18) The reconstructed image is then processed by the teacher mask pathway to obtain an additional segmentation prediction: \hat{\mathbf{m}}_{r}=f_{m}^{(\mathrm{teacher})}\left(\hat{\mathbf{i}}_{r},\tilde{\mathbf{m}}^{(\emptyset,r)}_{t^{\prime\prime}_{r}},t^{\prime\prime}_{r}\right). (19) The additional mask prediction is optimized through the alignment objective \mathcal{L}_{r}^{(\mathrm{align})}=\ell_{\mathrm{seg}}\left(\hat{\mathbf{m}}_{r},\hat{\mathbf{l}}\right), (20) where \hat{\mathbf{l}}=\begin{cases}\mathbf{l},&\text{labeled},\\ \operatorname*{arg\,max}_{c}\hat{\mathbf{m}}^{(\mathrm{student})},&\text{unlabeled}.\end{cases} (21) Consistently with the image-pathway objective used during pretraining, the reconstruction loss for each round is defined in noise-prediction space: \mathcal{L}_{r}^{(\mathrm{rec})}=\operatorname{MSE}\left(\boldsymbol{\nu}^{(r)}_{i},\hat{\boldsymbol{\nu}}^{(r)}_{i}\right). (22) The R rounds use independently sampled noise tensors and timesteps and can therefore be computed in parallel. For notational simplicity, each loss term below denotes an average over the subset of samples to which it applies. For a minibatch containing labeled and unlabeled samples, the complete training objective is \displaystyle\mathcal{L}={} \displaystyle\mathcal{L}_{\mathrm{sup}}+\lambda_{\mathrm{diff}}\frac{1}{R}\sum_{r=1}^{R}\left(\mathcal{L}_{r,L}^{(\mathrm{align})}+\mathcal{L}_{r,L}^{(\mathrm{rec})}\right) (23) \displaystyle+\lambda_{\mathrm{u}}\left[\mathcal{L}_{\mathrm{CPS}}+\lambda_{\mathrm{diff}}\frac{1}{R}\sum_{r=1}^{R}\left(\mathcal{L}_{r,U}^{(\mathrm{align})}+\mathcal{L}_{r,U}^{(\mathrm{rec})}\right)\right]. Here, the subscripts L and U denote loss terms evaluated on labeled and unlabeled samples, respectively. As defined in Eq. 21 , alignment uses the ground truth for labeled samples and the hard student pseudo-label for unlabeled ones. The weights \lambda_{\mathrm{u}} and \lambda_{\mathrm{diff}} are specified in the suppl. material. GlaS Sample Prediction Target PH2 Sample Prediction Target HMEPS Sample Prediction Target LA Sample Prediction Target Figure 3: Qualitative segmentation results using 20% of the annotations. For each dataset, we show the input image, final prediction, and ground-truth target. For LA, a representative 2D slice from a predicted 3D volume is shown. 4 Experiments 4.1 Datasets and Evaluation Metrics We evaluate the proposed method on three publicly available datasets for 2D biomedical image segmentation, covering histological, dermoscopic, and infrared eye imaging. We adopt a 10-fold cross-validation protocol, with further details provided in the supplementary material. GlaS [ 41 ] . The gland segmentation in colon histology images challenge (GlaS) dataset consists of 165 Hematoxylin and Eosin (H&E)-stained colorectal histology images with a resolution of 775 \times 522 pixels. PH2 [ 33 ] . The PH2 dataset contains 200 dermoscopic images of melanocytic lesions. The images are 8-bit RGB images with a resolution of 768 \times 560 pixels and are provided with lesion segmentation masks. HMEPS [ 31 ] . The human and mouse eyes for pupil semantic segmentation (HMEPS) dataset comprises 11,897 grayscale images of human (4,285) and mouse (7,612) eyes acquired under infrared (IR, 850 nm) illumination. Pupil regions are manually annotated using polygonal masks. For evaluation, we report the Dice coefficient (DC) and Jaccard index (JI), two commonly used metrics for biomedical image segmentation [ 30 , 29 , 34 , 17 ] . 4.2 Comparison with SOTA We quantitatively compare our approach with representative semi-supervised segmentation methods covering entropy minimization, consistency regularization, and pseudo-labeling strategies: EM [ 47 ] , CCT [ 36 ] , UAMT [ 53 ] , CPS [ 10 ] , and URPC [ 30 ] . Since the original works adopt different experimental protocols, we reimplement all methods within a common evaluation framework using the same U-Net backbone while retaining the method-specific auxiliary components required by each approach. Table 2 : Quantitative comparison on the volumetric Left Atrium (LA) dataset. Results are reported as mean DC and JI scores (%) over five cross-validation folds. Best result in bold. Labeled % 1% 2% 5% 10% 20% Method DC \uparrow /JI \uparrow DC \uparrow /JI \uparrow DC \uparrow /JI \uparrow DC \uparrow /JI \uparrow DC \uparrow /JI \uparrow EM 64.00/47.09 73.53/58.36 80.80/67.84 85.33/74.41 89.51/81.01 CCT 61.12/44.27 75.49/60.63 84.70/73.47 88.11/78.75 90.74/83.05 UAMT 60.42/43.39 74.80/59.93 84.22/72.80 88.95/80.09 90.91/83.34 URPC 68.48/52.14 77.53/63.37 83.26/73.09 86.84/76.75 89.12/80.38 CPS 71.69/56.57 83.65/71.91 87.31/77.48 89.57/81.12 90.41/82.51 DTC 62.63/45.66 76.87/62.51 83.28/71.43 86.43/76.13 89.46/80.93 Ours 73.58/58.33 82.78/70.63 87.95/78.50 89.70/81.32 90.61/82.83 We additionally consider two-stage representation-learning baselines based on self-supervised pretraining [ 37 , 39 ] . These approaches first learn visual representations from unlabeled images and subsequently adapt them to the segmentation task using the available labeled samples. We specifically evaluate SuperpixSSL [ 37 ] , which learns representations using superpixel-derived pseudo-labels, and RAD-DINO [ 39 ] , which employs a transformer-based encoder [ 16 , 35 ] and is therefore the only baseline in our comparison that does not use a U-Net-based backbone. For reference, we also include a fully supervised U-Net trained using all available annotations. In the semi-supervised experiments, we retain 1\% , 2\% , 5\% , 10\% , or 20\% of the training images as labeled samples and treat the remaining training images as unlabeled. Results are averaged over 10 cross-validation folds. Further details on training configurations and baseline implementations are provided in the supplementary material. Quantitative results are reported in Table 1 , while qualitative examples are shown in Fig. 3 . GlaS PH2 HMEPS Teacher pretraining Diffusion rounds Figure 4: Ablation studies on teacher pretraining and the number of diffusion rounds \mathbf{R} . Top: DC with and without reconstruction-based teacher pretraining; values above the bars indicate the performance difference. Bottom: DC for R\in\{3,5,10\} . Results are shown on GlaS, PH2, and HMEPS across labeling ratios. GlaS. On the GlaS dataset, the proposed method achieves the best performance in terms of both DC and JI for four of the five labeling ratios considered. The improvements are particularly evident in the most label-scarce settings, from 1\% to 5\% , indicating that the proposed approach effectively exploits unlabeled images when only a limited number of annotations is available. At the 10\% labeling ratio, CCT and CPS obtain slightly higher scores, although our method remains competitive, with differences of at most 0.3 percentage points in DC and 0.5 percentage points in JI. At 20\% , our approach again achieves the best results. PH2. On PH2, the proposed method outperforms all competing semi-supervised approaches in terms of both DC and JI across all labeling ratios. The improvements are observed consistently from the most label-scarce setting to the 20\% configuration. Notably, when using only 20\% of the available annotations, our method reaches 92.42\% DC and 85.90\% JI, closely matching the fully supervised baseline. HMEPS. On HMEPS, the proposed method consistently outperforms all competing semi-supervised approaches in terms of both DC and JI across all labeling ratios. The advantage is maintained from the 1\% setting to the 20\% setting, where our method reaches 94.37\% DC and 89.32\% JI. 4.3 Ablation Studies We ablates the main components and configurations of our method on all three 2D benchmarks across all labeling ratios using DC. Effect of teacher pretraining. We first evaluate the contribution of the unsupervised reconstruction-based teacher pretraining stage by comparing the complete method with a variant in which the teacher is initialized without the proposed pretraining. As shown in Fig. 4 (top), pretraining improves DC performance in nearly all evaluated configurations, with particularly consistent gains on PH2 and HMEPS. Number of diffusion rounds \mathbf{R} . We analyze the effect of R , which controls the number of stochastic reconstruction–segmentation pairs introduced in Sec. 3.3 . As shown in Fig. 4 (bottom), performance is relatively stable across the evaluated values of R , with no consistent monotonic trend across datasets and labeling ratios. Among the tested configurations, R=10 provides the strongest overall performance and is therefore used in the main experiments. However, the differences between R=5 and R=10 are generally modest, suggesting that R=5 can provide a lower-cost alternative when computational efficiency is prioritized. 4.4 Experiments with Volumetric Images To further assess the applicability of the proposed framework beyond 2D segmentation, we conduct experiments on the volumetric Left Atrium (LA) dataset [ 51 ] . The dataset contains 100 3D MRI volumes from the 2018 Atrial Segmentation Challenge. We evaluate the methods using 5-fold cross-validation, with further details provided in the supplementary material. For this volumetric setting, we compare against EM, CCT, UAMT, URPC, CPS, and DTC [ 29 ] . Quantitative results are reported in Table 2 , while qualitative examples are provided in Fig. 3 . The results are consistent with the trends observed on the 2D benchmarks. Our method achieves the best DC and JI scores at the 1%, 5%, and 10% labeling ratios. At 2%, CPS obtains the highest scores, while our method remains within 0.87 percentage points in DC. At 20%, UAMT performs best, with our method within 0.30 points in DC. 5 Conclusion In this work, we introduced a semi-supervised framework for biomedical image segmentation that combines teacher–student co-training with the forward diffusion process, timestep conditioning, and conditional denoising objectives used in DDPMs. The teacher is first pretrained through an unsupervised reconstruction task in which an intermediate segmentation prediction conditions image denoising, encouraging the predicted mask to retain information useful for recovering the input image. The pretrained teacher and the student are then jointly optimized using supervised segmentation on labeled samples and cross pseudo-supervision on unlabeled data. A multi-round extension further exploits the teacher image pathway during co-training by generating stochastic reconstruction–segmentation pairs that provide additional reconstruction and alignment signals. We evaluated the proposed framework on three public 2D biomedical segmentation datasets, GlaS, PH2, and HMEPS, and on the volumetric LA benchmark for left atrial segmentation. Across datasets and labeling ratios, the proposed method achieved competitive or superior performance compared with representative semi-supervised approaches. The ablation studies further showed the benefit of reconstruction-based teacher pretraining and examined the effect of the number of reconstruction–segmentation rounds. Overall, the results support the use of diffusion-based corruption and denoising objectives as complementary training signals within teacher–student semi-supervised segmentation. Supplementary Material Appendix A Experimental and Implementation Details In this section, we provide implementation details for the proposed method and the competing approaches. Our model is implemented using PyTorch, with all training and inference processes conducted on an NVIDIA DGX-A100. We also refer the reader to our repository available at https://github.com/ciampluca/diffusion_semi_supervised_biomedical_image_segmentation . A.1 Data Preprocessing and Evaluation Protocol To ensure fair comparisons, we followed a common experimental setting across all experiments. For the 2D datasets, data augmentation during training includes random vertical and horizontal flips as well as random rotations. Input images are resized to 128\times 128 for both training and inference. For the LA dataset [ 51 ] , the same augmentation strategy is applied during training. Random patches of size 96\times 96\times 80 are extracted for training, whereas inference is performed using a sliding-window approach with a 0.5 overlap ratio and patches of the same size. We use a 10-fold cross-validation protocol for the 2D datasets and a 5-fold cross-validation protocol for LA, varying the training, validation, and test splits. A.2 Training and Optimization For the proposed method, training is performed using the Adam optimizer with an initial learning rate of 0.01 , momentum coefficients \beta_{1}=0.9 and \beta_{2}=0.99 , and a weight decay of 5\cdot 10^{-5} . We use a multi-step learning rate scheduler that reduces the learning rate by a factor of 10 every 50 epochs. These hyperparameters were selected through a grid-search procedure based on validation performance. We set the number of training epochs to 200. For the proposed method, the model snapshot obtained at the end of the unsupervised teacher-pretraining stage is used to initialize the teacher in the subsequent teacher–student co-training stage. Similarly, for two-stage baselines requiring unsupervised pretraining on the target dataset, the model snapshot from the final pretraining epoch is used to initialize the corresponding model for the second-stage training. For the proposed method, the weight \lambda_{\mathrm{u}} applied to the unlabeled-data objective is increased linearly during training according to \lambda_{\mathrm{u}}(e)=\lambda_{\mathrm{u}}^{\max}\frac{e+1}{E}, (24) where e\in\{0,\ldots,E-1\} denotes the current training epoch and E is the total number of training epochs. We set \lambda_{\mathrm{u}}^{\max}=1 . The reconstruction and alignment terms introduced by the multi-round extension share the same fixed weight, which is set to \lambda_{\mathrm{diff}}=1 . For the competing methods, we use the SGD optimizer together with a multi-step learning rate scheduler to train the semi-supervised baselines and the second stage of the two-stage approaches, with RAD-DINO treated separately as described below. For two-stage approaches requiring unsupervised pretraining on the target dataset, we use the Adam optimizer during the first stage. Specifically, the initial learning rate is set to 0.5 with SGD for the 2D datasets and to 0.1 for the 3D LA dataset. For baseline pretraining performed with Adam, we use smaller initial learning rates of 0.001 for the 2D datasets and 0.0001 for LA. These optimization settings were selected through a grid-search procedure based on validation performance. Additionally, for the weight \lambda in the unsupervised loss functions of the competitor pseudo-labeling- and consistency-based methods, we increase \lambda linearly with the number of epochs, following previous works, i.e., \lambda=\lambda_{\max}\frac{\mathrm{epoch}}{\mathrm{max\_epoch}}. (25) We set \lambda_{\max}=5 , which was selected through a grid-search procedure based on validation performance. A.3 Two-stage Baseline Implementations Concerning the two-stage competitor approaches, we occasionally applied architectural modifications to better align each method’s original task with the target task—semantic segmentation. Specifically, we added segmentation branches that were fine-tuned in the second stage and built on top of the features learned during the unsupervised stage. SuperpixSSL [ 37 ] : no changes were necessary, as its architecture was already designed for semantic segmentation. RAD-DINO [ 39 ] : we initialized the model using the pretrained image encoder from the original work and kept it frozen during the second stage. Since RAD-DINO relies on a large-scale pretrained encoder, we do not retrain it from scratch on the comparatively small datasets considered in this work. Instead, we directly exploit the pretrained representation and train a task-specific segmentation decoder. To produce segmentation maps, we added a decoding branch on top of the frozen RAD-DINO encoder. Each input image is mapped to a 37\times 37\times 768 feature representation. The decoder consists of a sequence of transpose convolutions: first, a layer with 768 input and 256 output channels (kernel size 3, stride 1), followed by ReLU and BatchNorm; then a layer with 256 input and 128 output channels (kernel size 3, stride 2), followed by ReLU and BatchNorm; and a layer with 128 input and 64 output channels (kernel size 7, stride 3), also followed by ReLU and BatchNorm. The resulting features are upsampled through bilinear interpolation to 222\times 222 pixels and finally processed by a transpose convolution with 64 input channels and one output channel per class (kernel size 3, stride 1) to obtain the segmentation map. This decoder configuration was selected through empirical evaluation of different architectural configurations. The decoder is trained independently on each dataset using the available labeled samples and the Adam optimizer with a learning rate of 0.01 , while the pretrained RAD-DINO encoder remains frozen. A.4 Diffusion Configuration Following standard denoising diffusion models [ 18 ] , the cumulative signal-retention coefficient used in the main paper is defined as \bar{\alpha}_{t}=\prod_{s=0}^{t}\alpha_{s},\qquad\alpha_{s}=1-\beta_{s}. (26) The diffusion rates \beta_{s} follow a linear schedule ranging from \beta_{0}=0.0001 to \beta_{T-1}=0.02 . The total number of diffusion timesteps is set to T=1000 . Unless otherwise specified, we use R=10 stochastic reconstruction–segmentation rounds in the main experiments. To analyze the sensitivity of the proposed method to this parameter, the ablation study evaluates R\in\{3,5,10\} .