# An Improved Heteroscedastic Modeling Method for Chest X-ray Image Classification with Noisy Labels
## 3 Methodology
### The Proposed GMM-HM
#### 3.2.4 Optimization  
Algorithm 1 shows the whole training procedures. Let \(g\) denote the classifier of the neural network with parameters \(\varphi\). We denote the predicted logits \(g(x)=g(f(x;\theta),\varphi)\) representing the output logits of \(x\). With \(g(x)\), we optimize the deep network by measuring the classification loss. The classification loss is computed by cross-entropy or binary cross-entropy loss functions determined by the tasks. For the multi-class classification task, the probability \(p(x)\) is obtained by feeding the logits \(g(x)\) into the Softmax function \(p(x)=\frac{exp(g(x))}{\sum_{c=1}^{C}exp(g^{c}(x))}\). The loss is calculated with a cross-entropy loss function as follows,  
\[\mathcal{L}(x;\theta,\varphi)=-\sum_{c=1}^{C}y^{c}log(p^{c}(x)). \tag{8}\]  
For the multi-label classification task, the probability \(p(x)\) is calculated with the Sigmoid function \(p(x)=\frac{1}{1+exp(-g(x))}\). Then the network is optimized by the binary cross-entropy loss function,  
\[\mathcal{L}(x;\theta,\varphi)=-\sum_{c=1}^{C}[y^{c}\cdot log(p^{c}(x))+(1-y^{ c})\cdot log(1-p^{c}(x))]. \tag{9}\]```
Input: Training dataset \(D=\{X,Y\}\), threshold \(T\) Initialization: Weights [\(\theta\), \(\varphi\)] while epoch < MaxEpoch do \(P(X)=GMM(Loss(X,Y),[\theta,\varphi])\) // construct the GMM based on the loss values in the previous epoch. \(S_{clean}=\{(x_{j},y_{j},p_{j})|p_{j}\geq T,\forall(x_{j},y_{j},p_{j})\in(X,Y,P)\}\) \(S_{noisy}=\{(x_{j},y_{j},p_{j})|p_{j}<T,\forall(x_{j},y_{j},p_{j})\in(X,Y,P)\}\) if\((x_{j},y_{j},p_{j})\in S_{clean}\) \(p(x_{j})=g(f(x_{j};\theta),\varphi)\) // inputting the clean branch. else \(p(x_{j})=g(u(f(x_{j};\theta)),\varphi)\) // inputting the noisy branch, and computing the latent vector \(u(x_{j})\) as Equation (7)  computing the classification loss as Equation (8) or Equation (9). updating \(\theta\) with SGD. ```

**Algorithm 1**The trainingprocedures of the proposed GMM-HM

## 4 Experiment

This section evaluates the performance of the proposed GMM-HM. We first introduce the experimental datasets, evaluation metrics, and training details in Section 4.1 and Section 4.2, respectively. Then, we compare and analyze the performance of the GMM-HM on different datasets in Section 4.3. Finally, we also visualize the features to demonstrate the effectiveness of the proposed method. ### Datasets and Evaluation Metrics

**ChestX-ray2017**[2] has a total of 5856 anterior-posterior Chest X-ray images. Each CXR image belongs to either normal, bacterial pneumonia, or viral pneumonia. The training and testing sets include 5232 and 624 images, respectively. On ChestX-ray2017, we conduct experiments with symmetric and asymmetric noise following previous works [33; 34]. ChestX-ray2017 is a clean dataset. We artificially add 20%, 40%, and 60% symmetric or asymmetric noise on the training set, respectively. Symmetric noise means that any class of labels is replaced by any class. Asymmetric noise means that label swapping occurs only for similar categories. We compute the Accuracy (Acc), Sensitivity (Sens), Specificity (Spec), and AUC as the evaluation of the proposed method,

\[Acc=(TP+TN)/(TP+FP+FN+TN) \tag{10}\]

\[Sens=TP/(TP+FN) \tag{11}\]

\[Spec=TN/(FP+TN) \tag{12}\]

where TP, FP, FN, and TN are true positive, false positive, false negative, and true negative, respectively. AUC (Area Under The Curve) is the area under the ROC (Receiver Operating Characteristics) curve. **ChestX-ray14**[4] contains a total of 112,120 frontal-view chest X-ray images of 30,805 patients. ChestX-ray14 is a real asymmetric noisy dataset whose noise labels originate from algorithm errors. The noise proportion of the training set and test set is unknown. This dataset includes 14 pathologies: Atelectasis, Cardiomegaly, Effusion, Infiltration, Mass, Nodule, Pneumonia, Pneumothorax, Consolidation, Edema, Emphysema, Fibrosis, PT, and Hernia. The training set and validation set have 86,524 images, and the test set has 25,596 images.