# Exploiting Global Structure Information to Improve Medical Image Segmentation
## 3 Proposed Method
### Segmentation Network to Learn the Anatomical Structures  
The goal of the segmentation network is to learn how to produce segmentation results from the anatomical structure space modeled by the DAE. To accomplish this goal, the output features from the segmentation encoder and DAE encoder should be tightly coupled. The proposed strategy is to apply the constraint by using a loss function to transfer the anatomical information being learned using the DAE to the segmentation network. In the proposed method, the U-Net architecture is used as a segmentation network. The overall training scheme of the proposed method is illustrated in Figure 2. First, the segmentation network receives an image \(x\) as an input, and outputs a segmentation result \(\hat{x}\) whose spatial resolution is exactly the same with that of the input image. Specifically, the input image is embedded by the encoder \(f_{SEG}\), resulting in the representation \(h\), and then the decoder \(g_{SEG}\) upsamples \(h\) through consecutive convolutional layers to produce  
Figure 1: Architecture of the denoising convolutional autoencoder (DAE). a segmentation result. This network is trained using a loss function \(L_{SEG}\) to perform pixel-level classification, which can be selected from various alternatives such as the binary cross-entropy, dice coefficient, etc. In this work, the binary cross-entropy loss for \(L_{SEG}\) is adapted, which can be computed as:  
\[L_{SEG}=L(\hat{x},y) \tag{2}\]  
where \(\hat{x}=g_{SEG}(h;\theta_{g_{SEG}})\) and \(h=f_{SEG}(x;\theta_{f_{SEG}})\). \(\theta_{f_{SEG}}\) and \(\theta_{g_{SEG}}\) denote the learnable parameters of the encoder \(f_{SEG}\) and decoder \(g_{SEG}\), respectively. The second component is the DAE. As explained in Section 3.1, the inputs of the DAE are the ground-truth labels to learn compact representations of the anatomical structures. The key concept of the proposed method is to impose a constraint on the feature spaces constructed using the segmentation encoder \(f_{SEG}\) and DAE encoder \(f_{DAE}\) to ensure that the features for a specific data are similar. This constraint can be implemented by introducing an embedding loss function for \(h\) and \(z\) denoted as \(L_{E}(h,z)\). Several loss functions can be used for \(L_{E}\), e.g., mean squared error (MSE), mean absolute error (MAE), Kullback-Leibler divergence (KL), cosine loss, etc. We experimentally validated certain candidates for \(L_{E}\) and finally selected the MSE. In general, both the model parameters of \(f_{DAE}\) and \(f_{SEG}\) can be simultaneously trained using the embedding loss \(L_{E}\). However, if the gradient update due to \(L_{E}\) occurs in the segmentation network and DAE concurrently, the learning of the DAE may be affected, and the quality of the anatomical structure space constructed using the DAE may be degraded. Therefore, we intentionally design the gradient considering \(L_{E}\) to update only the segmentation encoder \(f_{SEG}\). In this framework, the segmentation encoder learns the mapping from the input space to the anatomical structure space, and the segmentation decoder is trained to perform segmentation with the features on the structure space. The  
Figure 2: Training scheme of the proposed method. The green, blue, and red arrows show the gradient flow from \(L_{SEG},L_{E}\), and \(L_{DAE}\), respectively. Note that the gradient from \(L_{E}\) flows only through the encoder of the segmentation network. proposed strategy for the gradient flow was empirically validated through experiments (refer to Section 4.3). The total loss function \(L_{Total}\) for the proposed method can be expressed as  
\[L_{Total}=L_{SEG}+L_{DAE}+\lambda L_{E} \tag{3}\]  
where \(\lambda\) is a parameter that controls the weight of the embedding loss \(L_{E}\). The optimal value is determined through the validation process. Note that the DAE in our proposed method is used as an auxiliary component during training, which helps the segmentation encoder learn better anatomical representations.