For training, we treated the ICD coding task as a multi-label classification problem following previous work (McCallum 1999;<cite> Mullenbach et al. 2018)</cite> . The training objective is to minimize the binary cross entropy loss between the predictionỹ and the target y: where w denotes the input word sequence and θ denotes all the parameters.