LibAUC
LibAUC copied to clipboard
How to train multi-label classification tasks? (like chexpert)
I have started using this library and I've read your paper Robust Deep AUC Maximization: A New Surrogate Loss and Empirical Studies on Medical Image Classification, and I'm still not sure how to train a multi-label classification (MLC) model.
Specifically, how did you fine-tune for the Chexpert multi-label classification task? (i.e. classify 5 diseases, where each image may have presence of 0, 1 or more diseases)
- The first step pre-training with Cross-entropy loss seems clear to me
- You mention: "In the second step of AUC maximization, we replace the last classifier layer trained in the first step by random weights and use our DAM method to optimize the last classifier layer and all previous layers.". The new classifier layer is a single or multi-label classifier?
- In the Appendix I, figure 7 shows only one score as output for Deep AUC maximization (i.e. only one disease)
- In the code, both
AUCMLoss()
andAPLoss_SH()
receive single-label outputs, not multi-label outputs, apparently
How do you train for the 5 diseases? Train sequentially Cardiomegaly, then Edema, and so on? or with 5 losses added up? or something else?
Hi,
We currently focus on binary classification. For multi-label classification, you can consider each task as an individual binary classification task. For CheXpert, multi-label classification is only needed for pretraining step and we finetune the pretrained backbone + a randomized classifier for each disease in the second stage. Figure 7 demonstrates this procedure. Hope this helps.
I see, thanks for the reply!
In your opinion, would it make sense to add-up the 5 binary-classification losses as a total loss for the multi-label task?
This way, we could train for predicting 5 labels at the same (with a multi-label classifier, e.g. nn.Linear(n_features, 5)
), instead of training 5 times independently.
Sorry for the late response! I just finished my summer internship and go back to school.
Adding up 5 binary classification tasks is indeed a possible solution to simplify the training process. However, the performance is not guaranteed since the objective of AUC is a min-max form which is quite different from CrossEntropy. We are currently working on this direction and I will post some examples in near future. Thanks!
Ok, it makes sense. Looking forward to see the examples! Thanks