# A Novel Perturbation Consistency Framework in Semi-Supervised Medical Image Segmentation
## 3 Method
### Framework Overview  
In order to facilitate comparison and ensure fairness, we utilize a two-dimensional network to segment two-dimensional slices of three-dimensional medical volume images. This approach is not only straightforward but can also be readily extended to three-dimensional segmentation methods and hybrid three-dimensional and two-dimensional methods. The framework comprises an instructor network (\(F_{t}\)) and a main network (\(F_{s}\)), with \(\theta_{t}\) and \(\theta_{s}\) as parameters. The main network is optimized using stochastic gradient descent, while the auxiliary network is optimized by an exponential moving average (EMA) of the main network. The model training process comprises two stages: a pre-training phase and a segmentation phase.  
The pre-training phase is employed to train the auxiliary model \(F_{t}\) from labeled data. In the segmentation phase, the auxiliary model \(F_{t}\) serves a dual role: it generates pseudo labels for unlabeled weakly perturbed images as a supervised signal for the main model \(F_{s}\), and it provides a reference point for evaluating the performance of the main model \(F_{s}\). For simplicity, the auxiliary model \(F_{t}\) is configured identically to the main model \(F_{s}\). In the image segmentation phase, we utilize the FixMatch weak-to-strong consistency regularization method in conjunction with the UniMatch feature layer perturbation idea.  
It can be observed that the effect of weak-to-strong consistency regularization is largely dependent on the specific strong perturbation method employed, with the weakly perturbed branches merely acting as supervisory signals for the other branches. In response, we propose the HCP strong perturbation method, in addition to contrastive learning utilizing the SGCS sampling method, with the aim of optimizing this framework. The specific methods are described in Sections 3.2 and 3.3.  
The segmentation process during the segmentation stage is as follows: Firstly, the unlabeled image \(X_{\text{un}}\) is segmented in three distinct ways. The first method involves directly inputting the image into the auxiliary model \(F_{t}\) to obtain the predicted pseudo-label \(PL_{1}\). The second method adds a weak perturbation (e.g., CROP or RESIZE) and inputs the image into the main network \(F_{s}\) to obtain the predicted pseudo-label \(PL_{2}\). This pseudo-label serves as a supervisory signal for both the feature perturbation branch and the strong perturbation branch. The third method introduces a strong perturbation (HCP) and inputs it into \(F_{s}\) to obtain the prediction result \(P\). The labeled image serves as the source for the HCP, while its ground truth and the prediction results from the auxiliary's model \(F_{t}\) are also considered. Additionally, the HCP operation is used to generate the new pseudo-label \(PL_{3}\), which actsas the supervisory signal for the strong perturbation branch. The prediction result \(P\) of the strong perturbation branch is supervised by the pseudo-labels \(PL_{1}\) and \(PL_{3}\) from the weakly perturbed branch. Finally, the model uses the segmented result \(P\) as the output. The specific HCLM model flow is depicted in Figure 1. The overall operation logic of the framework is illustrated in Algorithm 1.  
Figure 1: Overview of the HCLM (hybrid contrast learning match) model framework, illustrating the weak perturbation branch, feature perturbation branch, and strong perturbation branch, which combine weak-to-strong consistency with contrastive learning to enhance segmentation performance. The auxiliary and main networks are optimized simultaneously to provide consistent predictions for labeled and unlabeled images.