G ENERALIZED Z ERO - SHOT ICD C ODING
Anonymous authors
Paper under double-blind review
A BSTRACT
The International Classiﬁcation of Diseases (ICD) is a list of classiﬁcation codes for the diagnoses.
Automatic ICD coding is a multi-label text classiﬁcation task with noisy clinical document inputs and extremely long-tailed label distribution, making it difﬁcult to perform ﬁne-grained classiﬁcation on both frequent and zeroshot codes at the same time.
In this paper, we propose a latent feature generation framework for generalized zero-shot ICD coding, where we aim to improve the prediction on codes that have no labeled data without compromising the performance on seen codes.
Our framework generates semantically meaningful features for zero-shot codes by exploiting ICD code hierarchical structure and a novel cycle architecture that reconstructs the relevant keywords.
To the best of our knowledge, this is the ﬁrst adversarial generative model for the generalized zero-shot learning on multi-label text classiﬁcation.
Extensive experiments demonstrate the effectiveness of our approach.
On the public MIMIC-III dataset, our methods improve the F1 score from nearly 0 to 20 .
91% for the zero-shot codes, and increase the AUC score by 3% (absolute improvement) from previous state of the art.
I NTRODUCTION
In healthcare facilities, clinical records are classiﬁed into a set of International Classiﬁcation of
Diseases (ICD) codes that categorize diagnoses.
ICD codes are used for a wide range of purposes including billing, reimbursement, and retrieving of diagnostic information.
Automatic ICD coding (Stanﬁll et al., 2010) is in great demand as manual coding can be labor-intensive and error-prone.
ICD coding is a multi-label text classiﬁcation task with a long-tailed class label distribution.
Majority of ICD codes only have a few or no labeled data due to the rareness of the disease.
In the medical dataset MIMIC III (Johnson et al., 2016), among 17,000 unique ICD-9 codes, more than 50% of them never occur in the training data.
It is extremely challenging to perform ﬁne-grained multi-label classiﬁcation on both codes with labeled data (seen codes) and zero-shot (unseen) codes at the same time.
Automatic ICD coding for both seen and unseen codes ﬁts into the generalized zero-shot learning (GZSL) paradigm (Chao et al., 2016), where test examples are from both seen and unseen classes and we classify them into the joint labeling space of both types of classes.
Nevertheless, current GZSL works focus on visual tasks (Xian et al., 2017; Felix et al., 2018; Liu et al., 2019).
The study of GZSL for multi-label text classiﬁcation is largely under-explored.
Modern automatic ICD coding models (Mullenbach et al., 2018; Rios & Kavuluru, 2018) can accurately assign frequent ICD codes while perform poorly on zero-shot codes. To resolve this discrepancy, we aim to improve the predictive power of existing models on zero-shot codes by ﬁnetuning the models with synthetic latent features. To generate semantically meaningful features, we exploit the domain knowledge about ICD codes. The ofﬁcial ICD guidelines provide each code a short text description and a hierarchical tree structure on all the ICD codes (ICD-9 Guidelines).
We propose AGMC-HTS, an A dversarial G enerative M odel C onditioned on code descriptions with H ierarchical
T ree S tructure to generate synthetic feature.
As illustrated in Figure 1, AGMC-HTS consists of a generator to synthesize code-speciﬁc latent features based on the ICD code descriptions, and a discriminator to decide how realistic the generated features are.
To guarantee the semantic consistency between the generated and real features, AGMC-HTS reconstructs the keywords in the input documents that are relevant to the conditioned codes.
To further facilitate the feature synthesis of zero-shot codes, we take advantage of the hierarchical structure of the ICD codes and encourage the zero-shot codes to generate similar features with their nearest sibling code.
The ICD coding models are ﬁnetuned on the generated features to achieve more accurate prediction for zero-shot codes.
The contributions of this paper are summarized as follows: 1) To the best of our knowledge, we propose the ﬁrst adversarial generative model for the generalized zero-shot learning on multi-label text classiﬁcation.
AGMC-HTS generates latent features conditioned on the code descriptions and ﬁnetunes the zero-shot ICD code assignment classiﬁers.
2) AGMC-HTS exploits the hierarchical structure of ICD codes to generate semantically meaningful features for zero-shot codes without any labeled data. 3) AGMC-HTS has a novel pseudo cycle generation architecture to guarantee the semantic consistency between the synthetic and real features by reconstructing the relevant keywords in input documents.
4) Extensive experiments demonstrate the effectiveness of our approach.
On MIMIC-III dataset, our methods improve the F1 score from nearly 0 to 20 .
91% for the zero-shot codes and AUC score by 3% (absolute improvement) from previous state of the art.
We also show that AGMC-HTS improves the performance on few-shot codes with a handful of labeled data.
R ELATED W ORK
Automated ICD coding.
Several approaches have explored automatic assigning ICD codes on clinical text data (Stanﬁll et al., 2010).
Mullenbach et al.
(2018) proposed to extract per-code textual features with attention mechanism for ICD code assignments.
Shi et al.
(2017) explored character based short-term memory (LSTM) with attention and Xie & Xing (2018) applied tree LSTM with ICD hierarchy information for ICD coding.
Most existing work either focused on predicting the most common ICD code or did not utilize the ICD hierarchy structure for prediction.
Rios & Kavuluru (2018) proposed a neural network models incorporating ICD hierarchy information that improved the performance on the rare and zero-shot codes.
The performance is evaluated in terms of the relative ranks to other infrequent codes. The model hardly ever assign rare codes in its ﬁnal prediction as we show in Section 4.2, making it impractical to deploy in real applications.
Feature generation for GZSL.
The idea of using generative models for GZSL is to generate latent features for unseen classes and train a classiﬁer on the generated features and real features for both seen and unseen classes.
Xian et al.
(2018) proposed using conditional GANs to generate visual features given the semantic feature for zero-shot classes.
Felix et al.
(2018) added a cycle-consistent loss on generator to ensure the generated features captures the class semantics by using linear regression to map visual features back to class semantic features.
Ni et al.
(2019) further improves the semantics preserving using dual GANs formulation instead of a linear model.
Previous works focus on vision domain where the features are extracted from well-trained deep models on large-scale image dataset.
We introduce the ﬁrst feature generation framework tailored for zero-shot ICD coding by exploiting existing medical knowledge from limited available data.
Zero-shot text classiﬁcation.
Pushp & Srivastava (2017) has explored zero-shot text classiﬁcation by learning relationship between text and weakly labeled tags on large corpus.
The idea is similar to Rios & Kavuluru (2018) in learning the relationship between input and code descriptions.
Zhang et al. (2019a) introduced a two-phase framework for zero-shot text classiﬁcation.
An input is ﬁrst determined as from a seen or an unseen classes before the ﬁnal classiﬁcation.
This approach does not directly apply to ICD coding as the input is labeled with a set of codes which can include both seen and unseen codes. It is not possible to determine if the data is from a seen or an unseen class.
M ETHOD 3. O VERVIEW
The task of automatic ICD coding is to assign ICD codes to patient’s clinical notes.
We formulate the problem as a multi-label text classiﬁcation problem.
Let L be the set of all ICD codes and L = | L | , given an input text, the goal is to predict y l ∈ { 0 , 1 } for all l ∈ L .
Each ICD code l has a short text description.
For example, the description for ICD-9 code 403.11 is “Hypertensive chronic kidney disease, benign, with chronic kidney disease stage V or end stage renal disease.”
There is also a known hierarchical tree structure on all the ICD codes: for a node representing an ICD code, the children of this node represent the subtypes of this ICD code.
We focus on the generalized zero-shot ICD coding problem: accurately assigning code l given that l is never assigned to any training text (i.e. y l = 0 ), without sacriﬁcing the performance on codes with training data.
We assume a pretrained model as a feature extractor that performs ICD coding by extracting label-wise feature f l and predicting y l by σ ( g (cid:62) l · f l ) , where σ is the sigmoid function and g l is the binary classiﬁer for code l .
For the zero-shot codes, g l is never trained on f l with y l =and thus at inference time, the pretrained feature extractor hardly ever assigns zero-shot codes.
We propose to use generative adversarial networks (GAN) (Goodfellow et al., 2014) to generate ˜ f l with y l = 1 by conditioning on code l . Figure 1 shows an overview of the generation framework.
The generator G tries to generate the fake feature ˜ f given an ICD code description.
The discriminator D tries to distinguish between ˜ f and real latent feature f from the feature extractor model.
After the GAN is trained, we use G to synthesize ˜ f l and ﬁne-tune the binary classiﬁer g l with ˜ f l for a given zero-shot code l .
Since the binary code classiﬁers are independently ﬁne-tuned for zero-shot codes, the performance on the seen codes is not affected, achieving the goal of GZSL.
3. F EATURE EXTRACTOR
The pretrained feature extractor model is zero-shot attentive graph recurrent neural networks (ZAGRNN) modiﬁed from zero-shot attentive graph convolution neural networks (ZAGCNN), which is the only previous work that is tailored towards solving zero-shot ICD coding (Rios & Kavuluru, 2018).
We improve the original implementation by replacing the GCNN with GRNN and adopting the label-distribution-aware margin loss (Cao et al., 2019) for training.
The detailed discussion of the performance gain by our modiﬁcation is described Appendix E. Figure 2 shows the architecture of the ZAGRNN.
At a high-level, given an input x , ZAGRNN extracts label-wise feature f l and performs binary prediction on f l for each ICD code l .
Label-wise feature extraction.
Given an input clinical document x containing n words, we represent it with a matrix X =
[ w 1 , w 2 , . . .
, w n ] where
w i ∈ R
d is the word embedding vector for the i -th word.
Each ICD code l has a textual description.
To represent l , we construct an embedding vector v l by averaging the embeddings of words in the description.
The word embedding is shared between input and label descriptions for sharing learned knowledge.
Adjacent word embeddings are combined using a one-dimension convolutional neural network (CNN) to get the n-gram text features H = conv( X ) ∈ R N × d c .
Then the label-wise attention feature a l ∈ R d for label l is computed by:
[Equation]
where s l is the attention scores for all rows in H and a l is the attended output of H for label l .
Intuitively, a l extracts the most relevant information in H about the code l by using attention.
Each input then has in total L attention feature vectors for each ICD code.
Multi-label classiﬁcation.
For each code l , the binary prediction ˆ y l is generated by:
[Equation]
We use graph gated recurrent neural networks (GRNN) (Li et al., 2015) to encode the classiﬁer g l .
Let V ( l ) denote the set of adjacent codes of l from the ICD tree hierarchy and t be the number of times we propagate the graph, the classiﬁer g l = g tl is computed by:
[Equation]
where GRUCell is a gated recurrent units (Chung et al., 2014) and the construction is detailed in Appendix A.
The weights of the binary code classiﬁer is tied with the graph encoded label embedding g l so that the learned knowledge can also beneﬁt zero-shot codes since label embedding is computed from a shared word.
The loss function for training is multi-label binary cross-entropy:
[Equation]
As mentioned above, the distribution of ICD codes is extremely long-tailed.
To counter the label imbalance issue, we adopt label-distribution-aware margin (LDAM)
(Cao et al., 2019), where we subtract the logit value before sigmoid function by a label-dependent margin ∆ l :
[Equation]
where function 1 ( · ) outputs 1 if y 1 = 1 and ∆ l = C n 1 / 4 l and n l is the number of training data labeled with l and C is a constant.
The LDAM loss is thus: L LDAM =
L BCE ( y, ˆ y m ) .
3. Z ERO - SHOT L ATENT F EATURE G ENERATION WITH WGAN-GP
For a zero-shot code l , the code label y l for any training data example is y l =
and the binary classiﬁer g l for code assignment is never trained with data examples with y l = 1 due to the dearth of such data.
Previous works have successfully applied GANs for GZSL in the vision domain (Xian et al., 2018; Felix et al., 2018).
We propose to use GANs to improve zero-shot ICD coding by generating pseudo data examples in the latent feature space for zero-shot codes and ﬁne-tuning the code-assignment binary classiﬁers using the generated latent features.
More speciﬁcally, we use the Wasserstein GAN (Arjovsky et al., 2017) with gradient penalty (WGAN-GP)
(Gulrajani et al., 2017) to generate code-speciﬁc latent features conditioned on the textual description of each code.
Detail of WGAN-GP is described in Appendix B.
To condition on the code description, we use a label encoder function C :
L (cid:55)→ C that maps the code description to a low-dimension vector c .
We denote c l = C ( l ) .
The generator, G : Z × C (cid:55)→ F , takes in a random Gaussian noise vector z ∈ Z and an encoding vector c ∈ C of a code description to generate a latent feature ˜ f
l = G ( z, c ) for this code.
The discriminator or critic, D : F × C (cid:55)→ R , takes in a latent feature vector f (either generated by WGAN-GP or extracted from real data examples) and the encoded label vector c to produce a real-valued score D ( f, c ) representing how realistic f is.
The WGAN-GP loss is:
[Equation]
[Equation] where ( · , c ) ∼ P · ,c S is the joint distribution of latent features and encoded label vectors from the set of seen code labels S , ˆ f = α · f + (1 − α ) ·
˜ f with α ∼ U (0 , 1) and λ is the gradient penalty coefﬁcient.
WGAN-GP can be learned by solving the minimax problem: min G max D L WGAN .
Label encoder.
The function C is an ICD-code encoder that maps a code description to an embedding vector.
For a code l , we ﬁrst use a LSTM (Hochreiter & Schmidhuber, 1997) to encode the sequence of M words in the description into a sequence of hidden states [ e 1 , e 2 , . . .
, e M ] .
We then perform a dimension-wise max-pooling over the hidden state sequence to get a ﬁxed-sized encoding vector e l .
Finally, we obtain the eventual embedding c l = e l || g l of code l by concatenating e l with g l which is the embedding of l produced by the graph encoding network.
c l contains both the latent semantics of the description (in e l ) as well as the ICD hierarchy information (in g l ).
Keywords reconstruction loss.
To ensure the generated feature vector ˜ f
l captures the semantic meaning of code l , we encourage ˜ f l to be able to well reconstruct the keywords extracted from the clinical notes associated with code l .
For each input text x labeled with code l , we extract the label-speciﬁc keyword set K l = { w 1 , w 2 , . . .
, w k } as the set of most similar words in x to l , where the similarity is measured by cosine similarity between word embedding in x and label embedding v l .
Let Q be a projection matrix, K be the set of all keywords from all inputs and π ( · , · ) denote the cosine similarity function, the loss for reconstructing keywords given the generated feature is as following:
[Equation]
Discriminating zero-shot codes using ICD hierarchy.
In the current WGAN-GP framework, the discriminator cannot be trained on zero-shot codes due to the lack of real positive features.
In order to include zero-shot codes during training, we utilize the ICD hierarchy and use f sib , the latent feature extracted from real data of the nearest sibling l sib of a zero-shot code l , for training the discriminator.
The nearest sibling code is the closest code to l that has the same immediate parent.
This formulation would encourage the generated feature ˜ f to be close to the real latent features of the siblings of l and thus ˜ f can better preserving the ICD hierarchy.
More formally, let c sib =
C ( l sib ) , we propose the following modiﬁcation to L WGAN for training zero-shot codes:
[Equation]
where c ∼ P
c U is the distribution of encoded label vectors for the set of zero-shot codes U and ( · , c ) ∼ P · ,c U is deﬁned similarly as in Equation 4.
The loss term by the cosine similarity π ( c, c sib ) to prevent generating exact nearest sibling feature for the zero-shot code l .
After adding zero-shot codes to training, our full learning objective becomes:
[Equation]
(7) where β is the balancing coefﬁcient for keyword reconstruction loss.
Fine-tuning on generated features.
After WGAN-GP is trained, we ﬁne-tune the pretrained classiﬁer g l from baseline model with generated features for a given zero-shot code l .
We use the generator to synthesize a set of ˜ f l and label them with y l = 1 and collect the set of f l from training data with y l = 0 using baseline model as feature extractor.
We ﬁnally ﬁne-tune g l on this set of labeled feature vectors to get the ﬁnal binary classiﬁer for a given zero-shot code l .
E XPERIMENTS 4. S ETUP
Dataset description.
We use the publicly available medical dataset MIMIC-III (Johnson et al., 2016) for evaluation, which contains approximately 58,000 hospital admissions of 47,000 patients who stayed in the ICU of the Beth Israel Deaconess Medical Center between 2001 and 2012. Each admission record has a discharge summary that includes medical history, diagnosis outcomes, surgical procedures, discharge instructions, etc. Each admission record is assigned with a set of most
[Table] [Table]
L
[Table]
92.21 L [Table] 92.28 L
[Table]
relevant ICD-9 codes by medical coders.
The dataset is preprocessed as in (Mullenbach et al., 2018).
Our goal is to accurately predict the ICD codes given the discharge summary.
We split the dataset for training, validation, and testing by patient ID.
In total we have 46, discharge summaries for training, 3,280 for validation and 3,285 for testing.
There are 6916 unique
ICD-9 diagnosis codes in MIMIC-III and 6090 of them exist in the training set.
We use all the codes for training while using codes that have more than 5 data examples for evaluation.
There are 96 out of 1,646 and 85 out of 1,630 unique codes are zero-shot codes in validation and test set, respectively.
Baseline methods.
We compare our method with ZAGRNN modiﬁed from previous state of the art approaches on zero-shot ICD coding (Rios & Kavuluru, 2018) as described in Section 3.2, meta-embedding for long-tailed problem (Liu et al., 2019) and WGAN-GP with classiﬁcation loss L CLS (Xian et al., 2018) and with cycle-consistent loss L CYC (Felix et al., 2018) that were applied to GZSL classiﬁcation in computer vision domain.
Detailed description and hyper-parameters of baseline methods are in Appendix C.
Training details.
For WGAN-GP based methods, the real latent features are extracted from the ﬁnal layer in the ZAGRNN model.
Only features f l for which y l = 1 are collected for training.
We use a single-layer fully-connected network with hidden size 800 for both generator and discriminator.
For the code-description encoder LSTM, we set the hidden size to 200.
We train the discriminatoriterations per each generator training iteration.
We optimize the WGAN-GP with ADAM (Kingma & Ba, 2015) with mini-batch size 128 and learning rate 0.0001.
We train all variants of WGAN-GP for 60 epochs.
We set the weight of L CLS to 0.01 and L CYC , L KEY to 0.1.
For L KEY , we predict the top 30 most relevant keywords given the generated features.
After the generators are trained, we synthesize 256 features for each zero-shot code l and ﬁne-tune the classiﬁer g l using ADAM and set the learning rate to 0.00001 and the batch size to 128.
We ﬁne-tune on all zero-shot codes and select the best performing model on validation set and evaluate the ﬁnal result on the test set.
4. R ESULTS
Evaluation metrics.
We report both the micro and macro precision, recall, F1 and AUC scores on the zero-shot codes for all methods.
Micro metrics aggregate the contributions of all codes to compute the average score while macro metrics compute the metric independently for each code and then take the average. All scores are averaged over 10 runs using different random seeds.
[Figure]
Results on seen codes.
Table 1 shows the results of ZAGRNN models on all the seen codes.
Note that ﬁne-tuning the zero-shot code classiﬁers with meta-embedding or WGAN-GP will not affect the classiﬁcation for seen codes since the code assignment classiﬁers are independently ﬁne-tuned. Results on zero-shot codes.
Table 2 summarizes the results for zero-shot codes.
For the baseline ZAGRNN and meta-embedding models, the AUC on zero-shot codes is much better than random guessing.
L LDAM improves the AUC scores and meta-embedding can achieve slighter better F scores.
However, since these methods never train the binary classiﬁers for zero-shot codes on positive examples, both micro and macro recall and F1 scores are close to zero.
In other words, these models almost never assign zero-shot codes at inference time.
For WGAN-GP based methods, all the metrics improve from ZAGRNN and meta-embedding except for micro precision.
This is due to the fact that the binary zero-shot classiﬁers are ﬁne-tuned on positive generated features which drastically increases the chance of the models assigning zero-shot codes.
Ablation studies on WGAN-GP methods.
We next examine the detailed performance of WGANGP methods using different losses as shown in Table 2.
Adding L CLS hurts the micro metrics, which might be counter-intuitive at ﬁrst.
However, since the L CLS is computed based on the pretrained classiﬁers, which are not well-generalized on infrequent codes, adding the loss might provide bad gradient signal for the generator.
Adding L CYC , L KEY and L WGAN-Z improves L WGAN and achieves comparable performances in terms of both micro and macro metrics.
At a closer look, L WGAN-Z improves the recall most, which matches the intuition that learning with the sibling codes enables the model to generate more diverse latent features.
The performance drops when combing L WGAN-Z with L CLS and L CYC .
We suspect this might be due to a conﬂict of optimization that the generator tries to synthesize ˜ f
close to the sibling code l sib and simultaneously maps ˜ f
back to the exact code semantic space of l .
Using L KEY resolves the conﬂict as it reconstructs more generic semantics from the words instead of from the exact code descriptions.
Our ﬁnal model that uses the combination of L WGAN-Z and L KEY achieves the best performance on both micro and macro F1 and AUC score.
T-SNE visualization of generated features.
We plot the T-SNE projection of the generated features for zero-shot codes using WGAN-GP with L WGAN and L WGAN-Z in Figure 3.
Dots with lighter color represent the projections of generated features and those with darker color correspond to the real features from the nearest sibling codes.
Features generated for zero-shot codes using L WGAN-Z are closer to the real features from the nearest sibling codes.
This shows that using L WGAN-Z can generate features that better preserve the ICD hierarchy.
Keywords reconstruction from generated features.
We next qualitatively evaluate the generated features by examining their reconstructed keywords.
We ﬁrst train a keyword predictor using L KEY on the real latent features and their keywords extracted from training data.
Then we feed the generated features from zero-shot codes into the keyword predictor to get the reconstructed keywords.
Table 3 shows some examples of the top predicted keywords for zero-shot codes.
Even the keyword predictor is never trained on zero-shot code features, the generated features are able to ﬁnd relevant words that are semantically close to the code descriptions.
In addition, features generated with
L WGAN-Z can ﬁnd more relevant keywords than L WGAN .
For instance, for zero-shot code V10.62, the
[Table]
[Table]
top predicted keywords from L WGAN-Z include leukemia, myelogenous, CML (Chronic myelogenous leukemia) which are all related to myeloid leukemia, a type of cancer of the blood and bone marrow.
Results on few-shot codes.
As we have seen promising results on zero-shot codes, we also evaluate our feature generation framework on few-shot ICD codes, where the number of training data for such codes are less than or equal to 5.
We apply the exact same setup as zero-shot codes for synthesizing features and ﬁne-tuning classiﬁers for few-shot codes.
There are 220 and 223 unique few-shot codes in validation and test set, respectively.
Table 4 summarizes the results.
The performance of ZAGRNN models on few-shot codes is slightly better than zero-shot codes yet the recall are still very low.
Meta-embedding can boosts the recall and
F1 scores from baseline models.
WGAN-GP methods can further boosts the performance on recall,
F1 and AUC scores and the performance using different combination of losses generally follows the pattern in zero-shot code results.
In particular, our ﬁnal model trained with L WGAN-Z and L KEY can perform slightly better than other WGAN-GP models in terms of F1 and AUC scores.
C ONCLUSION
We introduced the ﬁrst feature generation framework, AGMC-HTS, for generalized zero-shot multilabel classiﬁcation in clinical text domain.
We incorporated the ICD tree hierarchy to design GAN models that signiﬁcantly improved zero-shot ICD coding without compromising the performance on seen ICD codes.
We also qualitatively demonstrated that the generated features using our framework can preserve the class semantics as well as the ICD hierarchy compared to existing feature generation methods.
In addition to zero-shot codes, we showed that our method can improve the performance on few-shot codes with limited amount of labeled data.
A A PPENDIX : G ATED R ECURRENT U NITS
Below is the detailed construction of GRUCell in equation 1 from Section 3.2:
[Equation]
where (cid:12) is the dimension-wise multiplication.
B A PPENDIX : G ENERATIVE ADVERSARIAL NETWORKS
GANs (Goodfellow et al., 2014) have been extensively studied for generate highly plausible data.
The idea of GAN is to train a generator and a discriminator through a minimax game.
The generator takes in a random noise and generate fake data to fool the discriminator while the discriminator tries to distinguish between generated data and real data.
The training procedure of GANs can be unstable, thus Arjovsky et al.
(2017) proposes Wasserstein-GAN (WGAN) to counter the instability problem by optimizing the Wasserstein distance instead of the original Jenson-Shannon divergence.
Gulrajani et al.
(2017) further improves WGAN by using gradient instead of weight clipping for the required 1-Lipschitz constraint in WGAN discriminator.
C A PPENDIX : M ORE TRAINING DETAILS
ICD-9 code information.
We extract the ninth version of the ICD code descriptions and hierarchy from the CDC website 1 .
In addition to the ofﬁcial description, we extend the descriptions with medical knowledge, including synonyms and clinical information, crawled from online resources 2 .
ZAGRNN.
For the ZAGRNN model, we use 100 convolution ﬁlters with a ﬁlter size of 5.
We use 200 dimensional word vectors pretrained on PubMed corpus
(Zhang et al., 2019b).
We use dropout on the word embedding layer with rate 0.5.
We use the ADAM (Kingma & Ba, 2015) for optimization with a minibatch size of 8 and a learning rate of 0.001.
The ﬁnal feature size and
GRNN hidden layer size are both set to 400.
We train the ZAGRNN model for 40 epochs.
Meta-embedding.
Liu et al.
(2019) proposed meta-embedding for solving large long-tail problem by transferring knowledge from head classes to tail classes.
The method naturally ﬁts ICD coding due to the long-tailed code distribution.
To apply meta-embedding in ICD coding, we ﬁrst construct a set of centroids M as the mean of f l for each code l from the training data.
Let (cid:12) denote dimensionwise multiplication, then the meta-embedding for f is calculated as:
[Equation]
where o ( f ) is the attention scores for selecting centroids M and e ( f ) is a dimension-wise coefﬁcient for selecting the attended features.
Both o and r are parameterized as neural networks and are learned during ﬁne-tuning.
The ﬁnal classiﬁcation is performed by ˆ y l = σ ( g (cid:62) l · f metal ) .
For meta-embedding, we ﬁne-tune the neural network modules e and o using ADAM and set learning rate to 0.0001 and batch size to 32.
WGAN-GP with classiﬁcation loss.
Xian et al.
(2018) proposed to add a cross-entropy loss during training WGAN-GP to generate features being correctly classiﬁed as conditioned labels.
In ICD coding, this loss translates to enforcing ˜ f being classiﬁed as positive for code l :
[Equation]
[Equation]
WGAN-GP with cycle consistency loss.
Similar to adding L CLS to prevent the generated features being random, Felix et al.
(2018) proposed to add a loss that constrains the synthetic representations to generate back their original semantic features.
Let R : F (cid:55)→ C be a linear regression estimate the label embedding c l from the generated feature ˜ f l , the cycle consistency loss is deﬁned as:
[Equation]
[Figure]
We plot the precision-recall curve with micro averaged scores for previous state of the art ICD coding model and ours on few-shot codes and zero-shot codes.
As demonstrated in Figure 4, our model can achieve better precision and recall trade-off and also higher area under the curve scores for both zero-shot codes and few-shot codes.
E C OMPARISON OF FEATURE EXTRATORS ON S EEN ICD CODES
[Table]
We compare the performance of our modiﬁed ZAGRNN with the original ZAGCNN proposed by Rios & Kavuluru (2018) on seen ICD codes in Table 5.
Discussion of the modiﬁcation is detailed in Section 3.2.
With ZAGRNN, almost all metrics slightly increased from ZAGCNN except for micro precision.
With L LDAM loss, our ﬁnal feature extractor can improve more signiﬁcantly from
ZAGCNN especially for macro metrics and achieve better precision recall trade-off.
These modiﬁcations are not enough to get reasonable performance zero-shot codes as shown in Table 2, mainly due to the lack of positive example for zero-shot codes during training.