Settings  We extract image features from both datasets with a ResNet-152 [1]}, which is pretrained on ImageNet and fine-tuned on CheXpert dataset [2]}. The extracted features are 2,048 feature maps in the shape of \(7 \times 7\)  which are further projected into 512 feature maps, i.e. \(N_\text{I}\)  is 49 and \(d\)  is 512. According the performance on the validation set, the number of retrieved reports \(N_\text{K}\)  and heads in MHA \(n\)  are set to 100 and 8, respectively. During training, following [3]}, [4]}, we first pre-train our approach with a multi-label classification network and employ a weighted binary cross entropy loss for tag classification. Then we apply the Eq. (REF ) to train our full model. We use the Adam optimizer [5]} with a batch size of 16 and a learning rate of 1e-4 for parameter optimization.
