Towards Semi-Structured Automatic ICD Coding via Tree-based Contrastive Learning
Authors: Chang Lu
Chandan K. Reddy
Ping Wang
Yue Ning
Venue: NeurIPS 2023 poster (2023)
Keywords: ICD Coding
Contrastive Learning
NLP
Healthcare
Text Categorization
Pre-training
TL;DR: We propose an automatic segmentation algorithm to split clinical notes into sections and design contrastive learning and masked section training to enhance the performance of ICD coding models.

Abstract: Automatic coding of International Classification of Diseases (ICD) is a multi-label text categorization task that involves extracting disease or procedure codes from clinical notes. Despite the application of state-of-the-art natural language processing (NLP) techniques, there are still challenges including limited availability of data due to privacy constraints and the high variability of clinical notes caused by different writing habits of medical professionals and various pathological features of patients. In this work, we investigate the semi-structured nature of clinical notes and propose an automatic algorithm to segment them into sections. To address the variability issues in existing ICD coding models with limited data, we introduce a contrastive pre-training approach on sections using a soft multi-label similarity metric based on tree edit distance. Additionally, we design a masked section training strategy to enable ICD coding models to locate sections related to ICD codes. Extensive experimental results demonstrate that our proposed training strategies effectively enhance the performance of existing ICD coding methods.

Towards Semi-Structured Automatic ICD Coding via Tree-based Contrastive Learning
Chang Lu", Chandan K. Reddyt, Ping Wang', Yue Ning'
Department of Computer Science, Stevens Institute of Technology
1 Department of Computer Science, Virginia Tech {clu13, ping. wang, yue wue..ingg.eee ning) edu reddy@ca vt.edu
Abstract
Automatic coding of International Classification of Diseases (ICD) is multi- label text categorization task that involves extracting disease or procedure codes from clinical notes. Despite the application of late-of-the-ar natural language processing (NLP) techniques, there are still challenges including limited availability of data due to privacy constraints and the high variability of clinical notes caused by different writing habits of medical professionals and various pathological features of patients. In this work, investigate the semi-structured nature of clinical notes and propose an automatic algorithm to segment them into sections. To address the variability issues in existing ICD coding models with limited data, we introduce a contrastive pre-training approach on sections using a soft multi-label similarity metric based on tree edit distance. Additionally, we design masked section training strategy to enable ICD coding models to locate sections related to ICD codes. Extensive experimental results demonstrate that our proposed training strategies effectively enhance the performance of existing ICD coding methods.
Introduction
The adoption of electronic health records (EHR) data has become widespread in modern healthcare facilities as they provide a centralized platform to maintain comprehensive medical information of patients, including diagnoses, procedures, laboratory tests, and clinical notes [1]. To efficiently manage and categorize diseases and procedures, EHR data utilizes the International Classification of Diseases (ICD) system developed by the World Health Organization. The ICD system provides a hierarchical structure that maps discases/proceduues to digital codes. Clinical notes in EHR data generally stored as free text, while diagnosis and procedure codes are extracted from these notes and saved as structured data. The process of extracting ICD codes from clinical notes is referred as ICD coding and is a crucial task medical services such as medical records management, medical billing [23], and insurance reimbursement [19]. It also supports healthcare research endeavors such as diagnosis prediction [1, 15] and medication recommendation [22].
The traditional ICD coding task relies human effort, which is both time-consuming and prone to errors [27]. Incorrect code assignments can be costly. For instance, the error payout rate due to wrong code assignment reached 6.8% in 2000, as stated by the US Centers for Medicare and Medicaid's statistics [17]. Consequently, researchers are exploring automated ICD coding methods to assign ICD codes to medical documents with algorithms. Recent methods generally treat the ICD coding task as a multi-label classification problem [13, 32, 30], as one clinical note can contain multiple siagnosis//roceddui codes. To capture the relationship between text and codes, code representations have been studied by incorporating the semantic information of code names [18] with hierarchical structures, synonyms, and co-occurrence of codes to provide fine- reee-graied code representations and
37th Conference on Neural Information Processing Systems (NcurIPS 2023).

---

relationships [4. 30, 29]. However, due to the nature of clinical notes, automatic ICD coding tasks still present certain challenges when it comes to learning the representation of clinical notes:
1. Limited availability of data. Due to privacy constraints, EHR data can be challenging to access.
For example, publicly available EHR dataset, MIMIC-III [11], only contains around 50,000 clinical notes that can be used for ICD coding. Furthermore, the appearance of codes in an EHR dataset follows a long-tail distribution. Around 51.6% of codes occur less than 6 times, and 60.2% of codes occur less than 10 times, making it even more difficult to train data-driven deep learning models for these codes due to data paucity.
2. Ignoring structural information. Based on observation, most clinical notes have common sections such as "physical exam", "history of present illness", "discharge followups", and "bricf' hospital course", depicted in Figure (a). These sections reflect correlated health information in long clinical notes. However, most of the existing ICD coding models treat clinical notes as a single sequence, disregarding these semi-structures that represent essential elements of diagnoses.
3. Variability of clinical notes. Clinical notes are written by various medical professionals, who may have different writing habits. Different clinical notes may present different orders and combinations of sections, adding to the variability of the data. Additionally, different patients may also lead diverse content of clinical notes due to their unique diseases physical exams. This variability becomes more negative factor in training ICD coding model with limited data.
In this paper, our goal is utilize the cemi-structuued format and reduce the variability of clinical notes with limited data. As shown in Figure 1(b), existing methods typically treat clinical notes as long sequences of words [16. 30, 29] without consid- ering the semi-structured format of clinical notes. As a result, these models can easily be affected by the variability of clin- ical notes with limited data. To overcome this challenge, we propose to automatically segment clinical note into multiple sections to build an order-agnostic structure. Based on the ex- tracted sections, introduce contrastive learning framework to initially reduce the variability in clinical notes pre-training and allow the text encoder to better understand the relationship of sections with limited training data. This proposed contrastive learning method defines a soft multi-label similarity between section pairs from the same and different clinical notes. Finally, we design a masked section training method to further minimize the variability of clinical notes in the training of ICD coding models.
|Physical Exam]
|Family ristory)
(a) Sections in a (b) A clinical note as sequence
clinical note
An example of clinical note in the format of multiple sec- tions and one sequence of words.
Figure 1:
Main contributions summary, the main contributions of this paper are listed as follows:
We propose baaee algorithm that automatically segments clinical notes into sections. To the best of our knowledge, our work is one of the first to investigate automatic semi-structured segmentation for clinical notes in ICD coding.
We present a contrastive learning framework based on a soft multi- similarity with tree edit distance and masked section training strategy alleviate the variability of clinical notes with limited EHR data.
We conduct extensive experiments on real-world EHR datasets and demonstrate that our proposed section- learning can enhance the performance of existing ICD coding methods.
2
Related work
The task of ICD coding involves predicting ICD codes from discharge summaries and can be approached as a multi-label text categorization problem. In the past, natural language processing (NLP) techniques have been commonly used learn the representation of clinical notes. For instance, Perotte et al. [21] used the term eeequency-inverss document frequency (TF-IDF) features of clinical notes and employed support vector machine (SVM) classifiers for ICD coding. Mullenbach et al. [18] proposed CAML based on convolutional neural networks (CNN), while Baumel el al. [2] employed two-layer recurrent neural network (RNN) to encode clinical notes. Liu al. [14] applied squecze-and -nxiiiitttiiioin networks in CNN and used the focal loss to deal with rare codes.

---

In addition to the conventional RNN/CNN- based models, attention and graph neural networks have also been explored in the context of ICD coding. Li et al. [13] proposed multi-filee halti-filter residual CNN model incorporating label attention between codes and text. Xie et al. [28] utilized the hierarchical structure of ICD codes and developed a graph neural network to capture the relation between codes. Cao et al. [4] considered both the hierarchical structure and the co-occurrence of ICD codes, embedding the codes into a hyperbolic space. Yuan et al. [30] proposed to improve the matching of the ICD code names that occur in clinical notes using attention with code synonyms.
To alleviate the lack of training data and labels, weak supervision has also been studied for ICD coding. It aims to automatically generate weakly labeled training data using rules, heuristics, or medical domain knowledge. Dong et al. [7] adopted an existing named entity linking tool called SemEHR to identify rare diseases from clinical notes. Gao et al. [8] proposed labeling function called KeyClass by extracting n-grams as keywords and computing the cosine similarity of word embeddings between keywords and labels.
Although large language models (LLMs) are popular and effective in many NLP tasks such as machine translation and question-answering systems, it has been shown by Pascual et al. [20] and Ji et al. [10] that pre-trained LLMs such BERT [6] do not help to improve the performance of ICD coding due to the long text of clinical notes and the difference of training data between ICD coding and pre-training tasks of LLMs. To overcome these problems, Liu et al. [9] split the clinical notes into chunks to fit the pre-defined maximum input length of transformer-basee
models. However, splitting a document into chunks can break coherent information in clinical notes. Yang et al. [29] introduced KEPT, transformer- based model that uses Longformer [3] to encode the long text, pre-trained with a contrastive learning method for code synonyms. They also designed a prompt learning framework for the prediction. However, the Longformer and prompt learning used in KEPT require a huge number of model parameters and extremely long input, which is barely applicable in training.
As previously discussed, most current methods only treat clinical notes as long sequences without considering their semi-structured format, making it challenging to handle the variability of clinical notes. Additionally, while some models. like KEPT, incorporate pre-training, it is designed only for labels but not for clinical notes. Thus, these models are not effective in comprehending the relationship among different sections of clinical notes. In light of these limitations, our paper aims to investigate the semi-structured format of clinical notes and improve the model's is ability to learn the representations of long-text clinical notes with limited data.
3 Preliminaries
Problem formulation Consider the ICD codes as a set C= (4) where L = |C] is the number of codes. Specifically, 4 = { with m tokens the description of the i-th label, where wj E V, and V is the vocabulary of all tokens in the ICD code descriptions and clinical notes. Given clinical note S {wy aa with n tokens, the ICD Coding task to train a model M predict binary vector y E (0, 1, where y, means the code 4 exists in the clinical note S.
General ICD coding framework it as flat multi-label classification. A general ICD Coding framework M contains three modules:
To better demonstrate key parts of the ICD coding, we simplify
Clinical note encoder (Encnste): Given a clinical note S, the clinical encoder is a text encoder Encraxt that first encodes the words into embeddings and uses RNN, CNN, or Transformer encoder to compute hidden representations hote of words: h = Encrext(S) E Rx
ICD code encoder (Enccoda): This module can be regarded as domain knowledge encoder that incorporates the text description of all codes (i.e., code names) in the ICD system, which are agnostic to the training-data. It is also a text encoder that first calculates the hidden word representations of code name and then uses pooling layer (e.g., mean/max pooling) on words to get the code representation for one ICD code: bi = Pooling(Enc.., (4,) E Rd. Eventually, we have the hidden representations of all the ICD codes: hande E BR4dd.
Fusion between note and code (Fusion): This module aggregates the representations of clinical notes and ICD codes to generate predictions, denoted as = Fusion(h heode). To achieve this, first applies an attention mechanism between the codes and notes by calculating qoode = Attn booee h h E Ig Lxd where the query is the code representation hode and the key and
3

---

value are note representation hace. It then takes the dot product between the attention output and the code representation obtain the final output o quode hande function is applied to get the final prediction y.
F Finally, a sigmoid
Both EnCnste and EnCcode contain a text encoder En It common practice to share the parameters of these two text encoders including word embeddings and model weights.
4
Method
We first present an algorithm to automatically extract section titles and segment clinical notes into sections. Then, we introduce the proposed training strategies for existing ICD coding models: contrastive pre-training and masked section training based on the extracted sections to reduce the variability of clinical notes with limited training data.
4.1 Automatic section-based segmentation
As mentioned in Section 1, clinical notes typically contain sections with standard titles, but the order of these sections may vary depending on the writing style of medical professionals. To reduce the variability in clinical notes, it important to extract sections related to ICD codes. The initial step is to identify all possible section titles for further segmentation. However, since clinical notes written in plain text, there are no universal rules to extract these titles. Consequently, an automatic segmentation algorithm based the content of clinical notes is needed extract the section titles.
Inspired by TF-IDF which can retrieve keywords document, we propose an n-gram document frequency-inverse average phrase frequency (DF-IAPF) algorithm to extract section titles. TF-IDF captures the unique importance of a word for document. TF-ID, a word becomes keyword of a document when it has high term frequency in this document while few documents contain this word. However, extracting section titles is different from extracting keywords for the following reasons:
(1) Section titles usually phrases instead of single words (e.g.. "history of present illness"): (2) Unlike keywords that are common in document but less frequent in corpus, most clinical notes have similar section titles but they often appear only once within a clinical note.
Based these two properties of section titles, introduce DF-IAPF to automatically extract section titles based on the corpus-leve frequency and uniqueness of phrases in the document. We first define the DF-IAPF score for a phrase (wi, (2.....Wyy WN) that contains N words (n-gram).
Document frequency-inverse average phrase frequency We first let DF(t) be the relative fre- queney of documents containing and IAPF(t) be the inverse average phrase frequency of in all documents containing t:
DF(()=
IAPF(t) - EN St.
E
nd
where na is the total number of documents, ny is the number of documents containing t, and ft, the occurrence number of in the document i. The document frequency-inverse average phrase frequency (DF-IAPF) is defined as follows:
TH
Tte
n
DF-IAPF(t) = DF(t) X IAPF(t)
X
(2)
nd 1==1 fe.s
nid EM f(.
The DF-IAPF algorithm assigns higher score to phrases that appear frequently across all documents but occur less frequently within each document on average. For example, the formal section title, "brief hospital course", should have higher score than random phrase "this patient has". This is because most clinical notes contain unique section titled "brief hospital course", while the phrase "this patient has" is more commonly used and appears multiple times in a clinical note, which lowers its score the DF-IAPF algorithm. Then, we iterate through all n-grams with a maximum word count of A in clinical notes to select candidates for section titles. Since we use n-gram to extract phrases, finally, we filter out shorter titles that are subsequences of longer titles with high scores. The specific algorithm to extract candidates and complexity analysis presented in Appendix B.

---

Once the section title candidates with the highest DF-IAPF scores have been retrieved, we manually select phrases from this small candidate set to form a title subset {t,, f2........ } with T titles. This selection process is completed by medical experts to ensure the correctness of selected titles. Since section titles are mostly unique within a clinical note, we use the first occurrence position of the extracted section titles as anchors to segment each clinical note into multiple sections {sx ) k= and build an ander-agnostic structure. Given a clinical note S, the segmentation process from the plain text S' to sections 53 with ni words can be summarized as follows:
S
DF segmentation
{tx 8k )
(3)
where Fy denotes a section title and 8 (W1, ................................ Wn.) ) is the content under the section f.-
4.2 Supervised tree-based contrastive learning on sections
In general ICD coding framework, Fusion is an attention mechanism that enables the selection of significant words in clinical notes related to code descriptions. Ideally, a clinical note should contain sections called "discharge diagnoses" and "major procedures", which encompass all code descriptions corresponding to the labels. In this case, the model can accurately extract codes from these sections. However, many clinical notes lack these two sections. Even if they exist in some clinical notes, the descriptions may be incomplete. Typically, these sections contain only primary diagnosis or procedure codes, while the labels include all secondary codes. Under these circumstances, the model must locate related records from other sections such as "physical exam" or "discharge medications", given that these sections may imply the key expressions for the diagnoses or procedures. Thus, is necessary to improve the model's ability to comprehend the content of each section.
To accomplish this, we design contrastive learning framework based sections. It makes the clinical note encoder distinguish sections from the same clinical note or different clinical notes so that the model can be aware of similar clinical notes and recognize related sections.
Construction of contrastive samples Since we formulate ICD coding as a multi-label classification task, it is hard to find two clinical notes with the same labels as a positive pair, and it is too trivial to obtain negative pairs using two clinical notes with different labels. Therefore, we construct positive/neighbor section pairs for further training. Positive pairs: For each clinical note S, {tx s/ we randomly select an anchor section si. To increase the connectivity between sections in the same note, we then sample a different section si from the same clinical note S, to build a positive pair (s). syy), where te * tg. Furthermore, from different clinical note Sy. we sample two sections sy. and sy. that correspond to l and fgr in S. to build two neighbor pairs: (s), ().) and (sk., ).y). Note that, sy and si., are also positive pair. Finally, a new sample for contrastive learning a quadruple including the anchor, positive section, and two neighbor sections, i.e., (sh, six sye s.)).
Soft multi-label similarity To achieve the goal of contrasting section pairs in the same or different clinical notes, an intuitive idea is to calculate the Jaccard similarity between two label sets or the cosine similarity between label vectors. Unfortunately, these metrics cannot capture the underlying disease relationships in the ICD system. For example, the cosine Jaccard similarity for two sets of disease labels: (diabetes type /) and (diabetes type 1I), will be zero because they have no overlap. However, these two diseases both belong diabetes in the ICD system. Instead of assigning hard contrastive label 0 or to two label sets, we design a soft similarity of two label sets that considers disease relationships in the ICD hierarchical structure by utilizing the free edit distance [31] that measures the minimum number of node edit operations (add, delete, and replace) required to transform one tree into another.
Definition (Spanning super-tree). Given the ICD hicrarchical structure H as a tree, the label set C; of clinical notes S, the spanning super-tree Te of L; is defined as minimum tree that has the same root as H and contains all label node of L; and all ancestors of L; T, -Uiec, p(1) U L. C H. Here, p(I) denotes all the ancestors of one label node I.
Based on the spanning super-tree, the similarity oij between two label sets C; and Lj is defined as: x (T. TT), IT, -
0i
E [-1,1],
where dist denotes the tree edit distance [31] between Te and Ty.
5

---

In this similarity metric, we consider both the tree edit dis- tance and the cardinality of trees. In the denominator, we use [T; U Tj] - because every pair of Ti and Tj share the same root. Figure shows two super-tree examples. In the first tree, nodes and 7 are the labels of the clinical note S1, while nodes 1, 2, and are their ancestors. In the second tree, nodes 2 and are labels of another clinical note, and nodes and are their ancestors. The tree with all colored nodes forms the spanning super-tree. The distance between these two spanning super-trecs trees is because we can delete node 5 and replace node 7 with 6 in the first tree to transform into the second tree. Thus, the similarity of these two trees
(a) Ci [5.7]
(b) L2 (2,6)
Figure 2: Examples of two spanning super-trees. Nodes with orange and green colors denote label nodes and their ancestor nodes.
is 8-1 0.2, since [T: U Tyl 2,,, 5, 6, 7} 6. Although L1 and L2 do not have the same label nodes, they still share some similarities given their topological categories in the ICD hierarchical structure: the label node 2 in C2 the parent of 5 L1, while the label node 6 in L2 is sibling of 7 in L1.
Contrastive pre-training In the pre-training of the clinical note encoder EnCnotes given quadruple (s), st,, si sk.), we first calculate the note representation hae and apply max pooling layer to obtain section representations for all these sections:
Neighbor
aij
Positive
Positive
1
(is) (R.K") = MaxPool ing(Enn (s (s())) E Rd.
(5)
Ad
(k.K')
Neighbor
Then, we aim to utilize the soft similarity between the labels two clinical notes to guide the similarity of these four section representa- tions. Note that the similarity between sections a positive pair is I while the similarity of negative pairs is a. Thus, we design a contrastive loss I using the mean absolute error (MAB) as follows:
Figure 3: Contrastive loss.
(1, J Jm (1, ((5) sk)) + Im (ang, (asg, s()) + J. (1, ((, s())) + Im(aa 3(s st
(6)
Here, Im denotes the MAE loss, Oig denotes the aforementioned two label sets, and ((, is the cosine similarity function between two vectors. Figure 3 intuitively shows the proposed contrastive loss for the quadruple with soft similarity.
edit distance similarity between
In summary, there are two main benefits of using contrastive learning on sections:
(1) The model gains a better understanding of the relationships between sections within a clinical note. This is partieularly beneficial when clinical note lacks explicit indicators of ICD codes, such as the "discharge diagnoses" section. With contrastive pre-training, the model can infer ICD codes by the content of related sections.
(2) It helps the model adapt to different writing styles of medical professionals and various demo- graphic features of patients so that the model can focus on the text related ICD codes.
4.3 Masked section training
As discussed carlier, existing methods mostly consider clinical notes as long sequences. Inspired by the denoising techniques for text [12], we develop a simple yet effective training strategy with permutation and masking on sections. It further mitigates the variability caused by the section order.
Given a clinical note that has been segmented into sections, denoted by S = {tx : 8 Y we first shuffle the order of the sections to create order-agnostic structure. Then, similar to the dropout technique [24] used to avoid overfitting in training deep learning models, we randomly mask a subset The remaining sections are concatenated
of the sections, subject to threshold 7 where 0 S > back into a long sequence S' that is suitable for the input of existing ICD coding models. It is important note that do not aim modify the original model architecture, but rather generate samples that can help to reduce the variability of clinical notes in training. In summary, this section masking process can be described as follows:
S'
+
8/2 where s/
Sk empty string
if |s 0 and 0 ~ U 1112 2
(7)
otherwise.
kEporn(T)

---

Table 1: Data statistics for the MIMIC-50, MIMIC-rare-SO and MIMIC-full tasks.
Task
Item
Train
Dev
Test
Does.
8,066
1,573
1,729
Avg. # words per Doc.
1,478
1,739
1,763
MIMIC-50
Avg. # codes per Doc.
5.7
5.9
6.0
Total # codes
50
50
50
Docs.
249
20
142
Avg. # words per Doc.
1,770
1,930
2,071
MIMIC-rare-50
Avg. # codes per Doc.
1.0
1.0
1.0
Total # codes
50
50
Docs.
47,723
1,631
3,372
Avg. # words per Doc.
1,434
1,724
1,731
MIMIC-ful
Avg. # codes Doc.
15.7
18.0
17.4
Total # codes
8,692
3,012
4,085
Here, @ denotes the concatenation operation, and [0, 1] means the uniform distribution from 0 to 1. By using perm, we can generate a random permutation of (I.2....,7) of section indices, which is random shuffle of all sections in clinical note.
With shuffling and masking in training, the ICD coding model is no longer limited by the order of the clinical notes. Additionally, certain sections, such as "discharge diagnoses", may not always play a deterministic role in the prediction. This allows the model focus also relevant to the predicted ICD codes. Note that, in the inference step, we do not perform shuffling and masking, but use the original sequence as input for ICD coding model.
other sections that
Experiments
5.1 Dataset, tasks, and evaluation metrics
The MIMIC-III [1I] dataset a popular publicly available EHR dataset that contains the discharge summaries and corresponding ground-trutt ICD codes. We follow the ICD coding tasks in prior work [29, 30] and conduct three prediction tasks:
MIMIC-50 prediction:
Predicting the top 50 frequent ICD codes in the MIMIC-III dataset.
MIMIC-rare-50 prediction: Predicting the rare 50 ICD codes that occur less than 10 times.
MIMIC-full prediction: Predicting the entire (8,692) ICD codes in the MIMIC-II dataset.
The detailed training/dev/test dataset statisties for each task are listed Table Our experiments are conducted with cross- cooss-valiattion on the dev set to adjust hyper-parameter
We the following evaluation metrics which have been used in prior ICD coding studies [29, 30]. The metrics for MIMIC-full prediction are Macro/Micro Fi and precision at 8/15 (P@8, P@ 15). For MIMIC-50 prediction, we use Macro/Micro F1 and precision ().5). For MIMIC-rare-50 prediction, we use Macro/Micro Fi.
5.2 Backbone models
To verify the effectiveness of our proposed section-based contrastive pre-training and masked section training (CM), we choose the following cfae-oof-the-n art ICD coding models backbones
MultiResCNN [13]: It encodes clinical notes with multi-filter residual CNN and label attention.
HyperCore [4]: It also uses convolutional encoder for text. Moreover, it applies hyperbolic embedding for ICD codes and uses GCN to model code co-occurrence.
'We do not include KEPT [29] here because our devices do not support the training of KEPT due to its high complexity. We list the result of KEPT in Appendix C.I for reference.
7

---

Table 2: Results (%) of MIMIC-50 when trained with and without the proposed contrastive pre- training and masked training (CM) strategies. Cells with the green color denote an improvement of w/ CM compared to w/o CM.
w/o CM
w/ CM
Model
Macro Fi
Micro F1
P@5
Macro
Micro Fi
P@5
MNNNiResCNN
60.8 (0.3)
67.1 (0.1)
64.3 (0.3)
62.2 (0.3)
68.1 (0.1)
65.1 (0.2)
HyperCore
61.1 (0.2)
66.2 (0.2)
63.5 (0.3)
(0.0)
67.4 (0.2)
64.5 (0.3)
JAin
(0.4(
71.6 (0.2)
67.3 (0.4)
67.2 (0.2)
72.0
67.9 (0.1)
EffectiveCAN
66.7 (0.1)
71.5
66.4 (0.2)
67.5 (0.5)
71.8 (0.1)
67.8 (0.1)
PLM-ICD
64.5 (0.3)
(0.2)
64.5 (0.4)
65.2 (0.1)
(0.2)
65.6 (0.2)
Hicrarchical
65.3 (0.1)
70.6 (0.3)
66.5 (0.1)
66.1 (0.2)
71.8 (0.4)
67.2 (0.3)
MSMN
(0.2)
(0.1)
67.5 (0.1)
69.1 (0.1)
72.5
68.3 (0.2)
JointLAAT [25]: It uses a bidirectional LSTM to encode clinical notes and proposes joint
learning method to predict ICD codes and their parent codes in the ICD hierarchical structure.
EffectiveCAN [14]: Similar to MultiResCNN, it also applies convolutional encoder with multiple residual squeeze-and andeeeettannnexiittiionno networks.
PLM-ICD [9]: It is transformer model (Roberta-base) that splits clinical notes into chunks to satisfy the maximum length of pre-trained large language models.
Hierarchical [5]: It hierarchical transformer model (Roberta-large) by splitting clinical notes into paragraphs.
MSMN [30]: It is an LSTM text encoder and incorporates the synonym of code descriptions to make the model better understand the variety of code names.
5.3 Implementation details
For DF-IAPF, we set the maximum word number (N) in n n-gram We in top- K candidates to 50 for the review of medical professionals. For contrastive pre-training, the batch size is 16, the learning rate is 5 x 10 14-4, the optimizer is AdamW, and the epoch number 20. The contrastive pre-training only uses the training dataset of each task to avoid data leakage. For the masked section training, we set y 0.2 for MIMIC-full prediction and 0.3 for MIMIC-50MIIMIC--N
prediction.
The backbone models except HyperCore [4] and EffectiveCAN [14] are implemented using their publicly released code and the optimal parameters reported in their papers. For HyperCore and EffectiveCAN, the authors do not release the code. Therefore, we implemented version that has close performance to the original paper. For the MIMIC-50 and MIMIC-rare-50 tasks, we run every baseline times and report their average and standard deviations (std).
All programs executed using machine with Python 3.9.3, CUDA 11.7, Intel 19-0K CPU, 64GB memory, and an NVIDIA RTX 3090 GPU. The code of the proposed DF-IAPF method and training strategies can be found at:
5.4 Experimental results
Extracted section titles To demonstrate the effectiveness of our proposed DF-IAPF algorithm to extract section titles, we compare it with a rule- based extraction algorithm [26]. It designs special
rules for every observed section title based on colons and occurrence frequencies to segment clinical notes into sections. We list the extracted section titles and analyze the effectiveness and advantages of the proposed DF-IAPP algorithm in Appendix C.2.
We report the results of MIMIC-50 in Table 2. Here, we run each backbone model 5 times and report their mean value and std. Among all backbone models, MSMN achieves the best result on all metrics without the proposed CM. Additionally, with the proposed CM strategies, performance of all backbone models is improved, and Macro F, improved by 1.5% on average. Additionally, we also run paired t-test on the Macro F1 score between the backbone models w/ CM and w/o CM. The p-values for all backbone models are less than 5 10-2, 2 indicating that the improvement brought by the CM strategies is statistically significant over the original models.
MIMIC-50-prediction

---

60.1
69.0
08.7
Macro-F1
08.2
07.6673
68.0
67.0
67.0
66.
0844
66.0
66.0
JointLAAT
EffectiveCAN
MSMN
JointLAAT
EffectiveCAN
MSMN
w/o
w/
w/ w/
w/ CM
Figure 4: Abalation studies of the MIMIC-50 task when trained without with the proposed contrastive pre-training (C) and masked section training (M). We also report a variant by replacing the tree edit distance with the simple Jaccard similarity (J).
MIMIC-rare-55--preeee
We report the results of MIMIC- rare-50 in Table 3. We observe that, with limited training sam- ples in this task, the performance of backbone models is not as good the MIMIC-50 predic- tion. However, the proposed CM strategies significantly improve the prediction results. On average, the Macro Fi score is improved by 55.8%. Note that, the contrastive pre-training is conducted on every task instead of the entire clinical notes. Therefore, we can conclude that the proposed CM strategies can learn a good initialization of the ICD coding models in pre-training and serve as effective data augmentation method in training with limited data.
Table Results (%) of MIMIC-rare-50 when trained with and without the proposed CM strategies. Cells with the green color
denote improvement of w/ CM compared w/o CM.
w/o CM
w/ CM
Model
Macro
Micro
Macro Fi
Micro Fi
MultieeSCNN
(2.1)
13.1 (1.8)
22.8 (1.3)
23.3 (1.9)
HyperCore
12.5 (1.3)
15.6 (2.2)
23.4 (1.9)
25.2 (1.2)
JointLAAT
20.2 (1.9)
21.6
(1.11
27.8 (1.4)
EffectiveCAN
22.5
27.1 (2.4)
(1.5
PLM-ICD
22.6 (2.5)
24.3
30.3 (1.5)
29.5
Hierarchical MSMN
23.1 (1.7)
24.6
32.2)
31.3 (2.2)
23.7 (1.0)
24.1
(1.3
30.6 (1.7)
Due to space constraints, we show the results of MIMIC-full in Appendix C.3. In summary, these experiments prove the capability of the DF-IAPF algorithm in extracting section titles and demonstrate the effectiveness of the proposed CM strategies in enhancing existing ICD coding models.
5.5 Ablation studies
To validate the effectiveness of the contrastive pre-training and masked section training, we conduct an ablation study by only applying one strategy in the MIMIC-50 prediction task and replacing the tree edit distance with Jaccard similarity. Here, we choose MIMIC-50 prediction and use JointLAAT, EffectiveCAN, and MSMN as the backbones. Figure 4 demonstrates the prediction results when training without CM (w/o CM), with only contrastive pre-training using Jaceard similarity (w/ J), with only contrastive pre-train pre-training (w/ C) using tree edit distance, with only masked section training (w/ M), and with both two strategies (w/ CM). In this figure, pre-training with simple Jaccard similarity decreases the performance. It shows that this similarity cannot appropriately guide contrastive learning because many clinical notes have disjoint labels. We notice that both contrastive pre-training and masked section training contribute to improving the performance of the original ICD coding models. Specifically, the masked section training is slightly better than the contrastive pre-training. We think is because the masked section training is directly applied to training ICD coding models, while the contrastive pre-training learns good initialization before training.
5.6
Case studies
To intuitively demonstrate the effectiveness of the proposed contrastive pre-training and masked training, in Figure 5, we give an example of clinical note snippet and the predictions w/o CM and w/ CM using MSMN on the MIMIC-50 prediction task. Here, the ground truth contains 4 ICD

---

Iaput
Label
Discharge Diagnosis: Esophageal
45.13: Other endoscupy small intestine
Major Surgical or Invasive Procedure: esophageetomy
$30.81: Prophageal reflux
45.13 $30.81
530.81
96.04
Social History: forner smoker-40- ppy
96.04; Insertion of endotracheal tuhe
V15.82
Physical Exam:: imaging:
V15 82: Pensocal history of tobacoo
Endorracheal tube, tip projects noughly
carina.
Figure 5: An example of prediction without and with the proposed CM strategies using MSMN.
codes, 45.13 (procedure), 530.81 (disease), 96.04 (procedure), and V15.82 (disease). The MSMN model w/o CM predicts two codes correctly while failing to predict 96.04 and V15.82 because they do not occur in the discharge diagnosis and procedure sections. However, with CM, the MSMN model successfully predicts all four ICD codes by locating them in related sections, including "CXR Endotracheal tube" in physical exam and "former smoker" in social history.
6 Conclusion
In this work, we aim to minimize the variability of clinical notes in the ICD coding task by studying the semi-structured format clinical notes. To reduce human effort, we propose an automatic algorithm to extract section titles and segment clinical notes into sections. We also design contrastive pre-training and masked section training to the ICD coding model better locate sections related to predictions. Additionally, tree-edit distance is designed in the loss function to measure the similarity of positive/negative pairs. Extensive experiments demonstrate the effectiveness of the proposed section title extraction algorithm and training strategies. It is worth emphasizing that proposed methodology is versatile, as it can not only be applied to clinical notes but also employed in general multi-label classification tasks that involve semi-structures such sections. In the future, committed to exploring the broader applicability of our approach across various domains.
Although the proposed training strategies are able to enhance existing ICD coding models, they are dependent on the design these models. If the model is well-designed and has many parameters, it is generally overfitting with limited training data. In this case, our proposed training strategies are a good enhancement, Additionally, we only focus on the variability caused by the order of sections in this work, but there other formats of variability such typos and synonyms. In the future, we plan to design new ICD coding models based on sections and consider more types of variability to further improve the robustness of the training process.
Limitations:
Acknowledgments and Disclosure of Funding
This work is supported in part by the US National Science Foundation under grants 1948432, 2047843, and 2245907. Any opinions, findings. and conclusions or recommendations expressed in this material are those of the authors and not necessarily reflect the views of the National Science Foundation.
References
[1] Tian Bai, Shanshan Zhang. Brian L Egleston, and Slobodan Vucetic. Interpretable representation learning for healthcare via capturing disease progression through time. In Proceedings of the 24th ACM SIGKDD international conference knowledge discovery & data mining, pages 43-51, 2018
[2] Tal Baumel, Jumana Nassour-Kassis Raphael Cohen, Michael Elhadad, and Noemie Elhadad. Multi-label classification of patient notes; Case study ICD code assignment. In 2018 AAAI Joint Workshop on Health Intelligence (W3PHIAI 2018), pages 409-416. AAAI press, 2018.
[3] Iz Beltagy, Matthew E Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05110, 2020.
10

---

[4] Pengfei Cao, Yubo Chen, Kang Liu, Jun Zhao, Shengping Liu, and Weifeng Chong. HyperCore: Hyperbolic and co-graph representation for automatic ICD coding. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 3105-3114, 2020.
[5] Xiang Dai, Ilias Chalkidis, Sune Darkner, and Desmond Elliott. Revisiting transformer based models for long document classification. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 7212-7230, 2022.
[6] Jacob Devlin, Ming- Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume I (Long and Short Papers), pages 4171-4188 2019.
[7] Hang Dong, Victor Suárez-Paniagua, Huayu Zhang, Minhong Wang, Emma Whitfield, and Honghan Wu, Rare disease identification from clinical notes with ontologies and weak supervi- sion. In 2021 43rd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), pages
IEEE, 2021.
[8] Chufan Gao, Mononito Goswami, Jieshi Chen, and Artur Dubrawski. Classifying unstructured clinical notes via automatic weak supervision. In Machine Learning for Healthcare Conference, pages 673-690. PMLR, 2022.
[9] Chao-Wei Huang, Shang- Chi Tsai, and Yun-Nung Chen. PLM-ICD: Automatic ICD coding with pretrained language models. In Proceedings of the 4th Clinical Natural Language Processing Workshop, pages 10-20, 2022.
[10] Shaoxiong Ji, Matti Hölttä, and Pekka Marttinen. Does the magic of BERT apply to medical code assignment? a quantitative study. Computers in biology and medicine, 139:104998 2021.
[11] Alistair EW Johnson, Tom J Pollard, Lu Shen, H Lehman Li-wei, Mengling Feng, Mohammad Ghassemi, Benjamin Moody, Peter Szolovits, Leo Anthony Celi, and Roger G Mark. Mimic-iii, a freely accessible critical care database. Scientific data, 3:160035, 2016.
[12] Mike Lewis. Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. Bart: Denoising training for natural language generation, translation, and comprehension. In Proceedings the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871-7880 2020.
pre-
[13] Fei Li and Hong Yu. ICD coding from clinical text using multi-filte residual convolutional neural network. In Proceedings of the AAAI conference artificial intelligence, volume 34, pages 8180 8180-8188 8187, 2020.
[14] Yang Liu, Hua Cheng, Russell Klopfer, Matthew R Gormley, and Thomas Schaaf. Effective convolutional attention network for multi-label clinical document classification. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 5941- 5953, 2021.
[15] Chang Lu, Tian Han, and Yue Ning. Context-aware health event prediction via transition functions on dynamic disease graphs. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 4567-4574 2022.
[16) Chang Lu, Chandan K Reddy, Prithwish Chakraborty, Samantha Kleinberg, and Yue Ning. Collaborative graph learning with auxiliary text for temporal event prediction in healthcare, In Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI-21, pages 3529-3535, International Joint Conferences on Artificial Intelligence Organization, 2021. Main Track.
[17] Laxmaiah Manchikanti. Implications of fraud and abuse in interventional pain management. Pain Physician, 5(3):320, 2002.
[18] James Mullenbach, Sarah Wiegreffe, Jon Duke, Jimeng Sun, and Jacob Eisenstein. Explainable prediction of medical codes from clinical text. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguisties: Human Language Technologies, Volume I (Long Papers), pages 1101-1111, 2018.
11

---

[19] Jong-Ku Ku Park, Ki-Soon Kim, Tae- Yong Lee, Kang-Sook Lee, Duk-Hee Lee, Sun-Hee Lee, Kwang-Wook
Sun-Hu Jee, Il Suh, Kwang- Wook Koh, So-Yeor Ryu, et The accuracy of ICD codes for cerebrovascular diseases in medical insurance claims. Journal of Preventive Medicine and Public Health, 33(1):76-82 82, 2000.
[20] Damian Pascual, Sandro Luck, and Roger Wattenhofer. Towards BERT- automatic ICD coding:
Limitations and opportunities. In Proceedings of the 20th Workshop on Biomedical Language Processing, pages 54-63. Association for Computational Linguistics, 2021.
[21] Adler Perotte, Rimma Pivovarov, Karthik Natarajan, Nicole Weiskopf, Frank Wood, and Noémie Elhadad. Diagnosis code assignment: models and evaluation metrics. Journal of the American Medical Informatics Association, 21(2):231 2014.
[22] Junyuan Shang, Tengfei Ma, Cao Xiao, and Jimeng Sun. Pre-training of graph augmented transformers for medication recommendation. In Proceedings of Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, pages 5953-5959. International Joint Conferences on Artificial Intelligence Organization, 7 2019.
[23] Aaron Sonabend, Winston Cai, Yuri Ahuja, Ashwin Ananthakrishnan. Zongqi Xia, Sheng Yu, and Chuan Hong. Automated ICD coding via unsupervised knowledge integration (unite). International journal of medical informatics, 139:104135, 2020.
[24] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1):1929-1958 2014.
[25] Thanh Vu, Dat Quoe Nguyen, and Anthony Nguyen. A label attention model for ICD coding from clinical text. In Proceedings of the Twenty-Ninth International Conference on International Joint Conferences on Artificial Intelligence, pages 1335-3341 2021.
[26] Ping Wang, Tian Shi, Khushbu Agarwal, Sutanay Choudhury, and Chandan K Reddy. Attention- based aspect reasoning for knowledge base question answering on clinical notes. In Proceedings of the 13th ACM International Conference on Bioinformatics, Computational Biology and Health Informatics, pages 1-6, 2022.
[27] Pengtao Xie and Eric Xing. neural architecture for automated ICD coding. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1066-1076, 2018
[28] Xiancheng Xie, Yun Xiong, Philip S Yu, and Yangyong Zhu. Ehr coding with multi-scale feature attention and structured knowledge graph propagation. In Proceedings of the 28th ACM international conference on information and knowledge management, pages 649-658, 2019.
[29] Zhichao Yang, Shufan Wang, Bhanu Pratap Singh Rawat, Avijit Mitra, and Hong Yu. Knowl- edge injected prompt based fine-tuning for multi-label few-shot ICD coding. arXiv preprint arXiv:22 10,00000000 10.03344, 2022.
[30] Zheng Yuan, Chuanqi Tan, and Songfang Huang. Code synonyms do matter: Multiple synonyms matching network for automatic ICD coding. In Proceedings of the 60th Anmual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 808-814, 2022.
[31] Kaizhong Zhang and Dennis Shasha. Simple fast algorithms for the editing distance between trees and related problems. SIAM journal on computing, 18(6):
1989.
[32] Tong Zhou, Pengfei Cao, Yubo Chen, Kang Liu, Jun Zhao, Kun Niu, Weifeng Chong, and Shengping Liu. Automatic ICD coding via interactive shared representation networks with self-distillation mechanism. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguisties and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Pupers), pages 5948-5957, 2021.
12

---

Appendix
Broader Impacts
While EHR data contains private information of patients, the MIMIC-II dataset used in this work as well as all backbone models is publicly available dataset. It de-identified the sensitive information of patients and doctors with masks, including admission/discaage date, name, and hospital name ge.g.. [**first name3**J) to protect privacy. Therefore, the data we use will leak such information even if publish our code and model parameters.
Ethical considerations
Societal Impacts Incorrect ICD coding can lead medical billing emrors which affect patients and healthcare costs. However, as an enhancement of existing ICD coding models, our work aims to improve the prediction accuracy of ICD coding. We believe our method does not bring additional negative societal impacts to ICD coding.
B Pseudo code of the DF-IAPF algorithm
We present the proposed DF-IAPF in Algorithm 1. In lines 7-9, this algorithm uses a span in clinical notes obtain n-gram phrase and updates its occurrence in the local clinical note. Lines 10-12 update the global document frequency and phrase frequency. Finally, lines 15-16 calculate the DF-IAPF score for every phrase. In line 17 sort all phrases descendingly by the DF-IAPF score and select the top phrases with the highest scores. Finally, we filter out shorter titles that are subsequences of longer titles with high scores lines 18-20.
Note that this algorithm is an offline extraction of phrases before training. The computation procedures of DF-IAPF are similar to the TF-IDF, except that add for-loop of n-gram in line 3. Therefore, the time complexity of the DF-IAPF algorithm is x (DF-IDD). In our experiments, the running time of the DF-IAPF algorithm about 2 minutes.
Algorithm 1: Section Title Extraction
Input A set S of clinical notes S = (S):
An integer ' to control the maximum word count in n-grams; An integer K to select top-K phrases
Output:A candidate C of section titles
NT < an empty mapping from phrases to counts with default value of 0
2 APF < an empty mapping from phrases frequency list with default value of an empty list
for N <- 1 to do do
for
<- the number of words in S
PF + an empty mapping from phrases to frequencies with a default value of
for i <- to N + do
t (w,, Wi+1, w+-N-1) // N-gram
PF(t) +- PF(t) + // Update the frequency of in this document
10
for t E PF do
11
NT(t) < NT(t) + 1 // Update the frequency documents containing /
12
Append PF(() to APF(() // Update the frequency list of t
13
na + |S]
C an empty mapping from phrases to scores
15 for t NT do
16
C(I) - nax x APP()),
2
// DF-IAPF, Equation (2)
17
C C descendingly by the score and select K phrases with the highest scores
for (t1, xx do do
19
ih C l2 then
20
C-C1 C\ (tr} // Remove shorter titles that are subsequences longer titles with high scores.
21 return C
13

---

Table 4: Top 20 section titles extracted by our proposed DF-IAPF algorithm and sale-based method using colons and occurrence frequencies.
Rank
DF-IAPF
Frequency
Rank
Rule-based
Frequency
history of present illness
0.95
1
admission date
1.00
2
date of birth
0.87
service
0.95
3
sex
0.87
date birth
0.87
4
+ discharge date
1.00
4
history of present illness
0.95
5
admission date
1.00
5
allergies
0.87
6
social history
0.82
6
past medical history
0.90
past medical history discharge medications
0,90
social history
0.82
8
0.83
discharge disposition
0.75
9
medications on admission
0.77
9
discharge medications
0.83
10
discharge diagnosis
0.94
10
discharge diagnosis
0.94
11
discharge condition
0.85
11
medications admission
0.77
discharge instructions major surgical or invasive procedure brief hospital course pertinent results followup instructions
0.71
12
attending
0.71
13
0.78
13
family history
0.74
14
0.98
14
discharge condition discharge instructions major surgical or invasive procedure physical exam brief hospital course
0.85
0.68
0.71
0.89
16
0.78
17
family history
0.74
17
0.94
18
chief complaint
0.77
18
0.98
attending physical exam
0.71
19
pertinent results
0.68
20
0.94
20
followup instructions
0.89
23
service
0.95
chicf complaint
0.77
28
discharge disposition
0.75
664
discharge date
1.00
29
allergies
0.87
1726
sex
1.00
Additional experiments
C.1 Results of KEPT
We do not include KEPT [29] in the backbone models because our devices do not support the training of KEPT due its high complexity. We list the result KEPT (w/o CM) here for reference. is worth noting our proposed contrastive pre-training and masked section training are also applicable to KEPT.
MIMIC-full prediction:
MIMIC-50 prediction:
MIMIC-rare-50 prediction:
Macro Fi: 11.8
Macro Fi: 68.9
Macro Fi: 30.4
Micro Fj 59.9
Micro F1: 72.9
Miero Fi: 32.6
P@8: 77.1
P@5; 67.3
P@ 15: 61.5
C.2 Extracted section titles
To demonstrate the effectiveness of our proposed DF-IAPF algorithm to extract section titles, we compare with rule-based extraction algorithm [26]. designs special rules for every observed section title based on colons and occurrence frequencies to segment clinical notes into sections. We list the top extracted section titles Table
Qualitative analysis Here, the rank is obtained using DF-IAPF scores (left) occurrence frequen- cies (right). The symbol "4" indicates the title extracted by our DF-IAPF algorithm but by the rule-based algorithm, while the symbol not the DF-IAPF algorithm the top 20 section titles. this Table, we observe that titles are commonly extracted by both algorithms, indicating that our automatic section title algorithm comparable to the hand-crafted rule-based method in terms of effectiveness. We further analyze the rank of missing section titles from both algorithms in the top 20 titles. All the titles that not
means the title extracted by the rule-based algorithm
14

---

Table 5: Top 20 section titles extracted by the original DF-IAPF algorithm (Raw) and titles selected by medical experts based on Raw (Selected).
Rank
Raw
Rank
Selected
history of present illness
1
history of present illness date of birth
date of birth
2
sex
sex
sex m
4 discharge date
4
discharge date
admission date
5
admission date
social history
social history
past medical history
7
past medical history
8
discharge medications
8
discharge medications
medications admission
9
medications admission
10
discharge diagnosis
10
discharge diagnosis
discharge condition
discharge condition
12
discharge instructions
12
discharge instructions
13
major surgical or invasive procedure
13
major surgical or invasive procedure
14
brief hospital course
14
brief hospital course
pertinent results
15
pertinent results
followup instructions
16
followup instructions
17
family history
17
family history
18
chief complaint
18
chief complaint
19
attending
19
attending
physical exam
20
physical exam
extracted by DF-IAPF in the top 20 section titles appear in the top 30 titles. However, the titles that missing in the rule-based method have very low ranks. It shows that even though the rules carefully designed by humans, they may not be applicable to all clinical notes or titles. Therefore, we conclude that our DF-IAPF algorithm is more universal than the rule-based method since it can effectively locate section titles and require less human effort.
Quantitative analysis To numerically demonstrate the effectiveness of our proposed DF-IAPF algorithm, we randomly select 50 clinical notes and manually extract the section title set Ω2 for each clinical note by medical experts. To evaluate the coverage of the top-20 extracted section titles Q by DF-IAPF and the rule-based method, we use an average intersection rate between 22 and Ω: 1 De= [R.]n] The rate of DF-IAPF is 0.87, while the rate of the The rates less than due the absence the bottom titles in Table Additionally, some clinical notes contain less frequent titles including "facilities", "addendum", etc. However, the rate of DF-IAPF is still higher than the rule-based method because "chief complaint", "discharge date". and "sex" are all top frequent section titles, while "discharge disposition" is relatively less frequent title. Moreover, we report the frequency of section titles after segmentation using the 23 section titles in Table 4. We can see that all section titles have high frequencies. Together with the intersection rate, it further proves the coverage and accuracy of the extraction algorithm. Note that the rank of the section titles extracted by the rule-based method is different from the order of frequencies. This because the rank determined by the number of extracted section titles based on colons before segmentation. However, not all section titles are followed with colon. Therefore, after segmentation, the frequencies may be different from title extraction.
method is 0.83.
It is worth noting that the top 20-30 titles mainly contain some special tokens, such as "[**first **"" which are masked tokens in the original dataset for privacy concerns. the contrastive learning part, we do not use sections that have little relation to ICD codes, including "date of birth", "sex", "admission date". "discharge date", "attending" and "service", and use the remaining titles to pre-train the clinical note encoder. In the training of ICD coding models, we use all 23 section titles (top 20, 23, 28, and 29) so that we make the least change to the completeness of clinical notes. For some less frequent section titles such as "addendum" mentioned before, we do not segment sections by applying them as separators, but merge them with adjacent sections. In this way, the content of these sections is reserved for training.
15

---

Table 6: Results (%) of MIMIC-full when trained with/without the proposed contrastive pre-training and masked training (CM) strategies. Cells with the green color denote an improvement of w/ CM compared to w/o CM. Here, we do not provide p-value since we run backbone models one time.
w/o CM
w/ CM
Model
Macro
Micro
P@8
P@
Macro
Micro
P@8
P@
MultiResCNNN
73.4
58.4
74.0
58.8
HyperCore
9.0
55.1
72.2
57.9
9.6
55.6
73.0
58.5
JoiT
10.7
37.5
73.5
59.0
11.5
58.3
73.9
59.4
EffectiveCAN
10.6
58.9
75.8
60.6
11.3
59.4
76.2
61.1
PLM-ICD
10.4
59.8
77.1
61.3
10.6
60.0
77.2
61.5
MSMN
10.3
58.4
75.2
59.9
11.4
58.8
75.6
60.2
Role of medical experts discussion In Section 4.1, we mentioned that the selection of the extracted section title performed by medical experts. To eliminate selection bias, we list the originally extracted titles by our algorithm and the selected titles by medical experts in Table 5. We can see medical experts only need correct "sex m" and "sex f* Since the extracted titles are mostly correct, there is actually little effort required by medical experts. Therefore, the role of medical experts in this process is to validate the extracted titles by the proposed DF-IAPF method, which further evaluates the effectiveness and accuracy of the DF-IAPF method.
C.3 Results MIMIC-full prediction
We report the results of MIMIC-full in Table 6. Here, w/o CM and w/ CM mean the results without and with the proposed CM strategies, respectively. In this task, we directly use the w/o CM results from the MSMN paper [30]. For the w/ CM results, we report the result of one run since this experiment requires a lot of time. For the results of w/o CM, all the backbone models have relatively low Macro F1 score due to the large size of the label set and long tail distribution while PLM-ICD is the best in terms of Micro Fi, P@8, and P@ 15. As for the result w/ CM, the cells with green color indicate an improvement. From the comparison, we notice the proposed contrastive pre-training and masked training improve the performance of the backbone models, among which the Macro Fj score increased by 7.1% on average. However, the PLM-ICD model does not improve as much other backbone models. We infer it is because the PLM-ICD model already split clinical notes into chunks with fixed length. Even with our training strategies, somewhat breaks the information between sections that the variability cannot be largely reduced by our proposed training strategies.
ICD codes,
16


Reviews:
[{"review_id": "UdGcEEpdf2", "reviewer": "Reviewer_ijoF", "summary": "The paper tackles automatic ICD coding. It lists challenges and proposes solutions to them:\n1. For ignoring structural information, it proposes a content-based algorithm that automatically segments clinical notes into sections.\n2. For limited availability of data and variability of clinical notes, it proposes a contrastive learning framework based on a soft multi-label similarity with tree edit distance and a masked section training strategy.\n\nThe authors conduct extensive experiments on MIMIC-III and demonstrate that their proposed methods can enhance the performance of existing ICD coding models.", "questions": "- Line 238: Is h_section more accurate than h_note?\n- Typo in line 12 of Algorithm 1 in Appendix A: TF(t) -> PF(t)?", "limitations": "This paper includes a section in Appendix, discussing broader impacts. The conclusion section also briefly states the limitations of this work. It would be better to have a separate section to discuss these limitations.", "rating": 7, "confidence": 4, "soundness": 4, "presentation": 4, "contribution": 3, "strengths": "- The paper is well-written and easy to follow. The introduction, related work and preliminaries gives a clear background and motivation to the problem.\n- Code is provided in the supplementary material.\n- DF-IAPF is neat, easy to implement, and fast to run.\n- DF-IAPF has two assumptions: 1) section titles have high document frequency; 2) section titles have low average phrase frequency. While there are corner uses where a section title only appears in some notes, or it appears multiple times in a note, the paper provides both qualitative and quantitive analysis that compare DF-IAPT with a rule-based algorithm and demonstrates the effectiveness of DF-IAPT.\n- Soft multi-label similarity based on tree edit distance captures the hierarchy difference between two ICD label sets.\n- The choices of tasks cover frequent, rare, and the entire ICD codes in MIMIC-III.\n- Experiments verify the effectiveness of proposed methods on a diverse set of backbones.\n- Ablation studies clearly show the improvement of each method proposed in this paper.", "weaknesses": "An expert selection process is needed after DF-IAPF proposes a candidate set. How important is the expert selection process? There should be a comparison between DF-IAPF fully automatic and DF-IAPF followed by an expert selection.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "### Summary\n\nWe are delighted to know that you think our work has multiple strengths. We understand that your primary concern is the role of medical experts in the title selection. To address this, we have added the comparison between the titles extracted by our algorithm and those selected by medical experts. The results demonstrate that the titles derived from our algorithm align closely with the titles chosen by experts. This evidence confirms that the selection process demands minimal effort from experts. We sincerely hope these results can adequately address your concerns.\n\n---\n\n### Weaknesses: An expert selection process is needed after DF-IAPF proposes a candidate set. How important is the expert selection process? There should be a comparison between DF-IAPF fully automatic and DF-IAPF followed by an expert selection.\n\n**A:** We agree it is important to discuss the role of medical experts in candidate selection. Thank you for your suggestion. We list the originally extracted titles by our algorithm and the selected titles by medical experts as follows: \n\n| Rank | Original Title                       | Rank | Selected Title By Medical Experts    |\n|------|------------------------------------- |------|--------------------------------------|\n|  1   | history of present illness           |  1   | history of present illness           |\n|  **2**   | **sex f**                        |  2   | sex                                  |\n|  **3**   | **sex m**                        |  -   |                                      |\n|  4   | date of birth                        |  3   | date of birth                        |\n|  5   | discharge date                       |  4   | discharge date                       |\n|  6   | admission date                       |  5   | admission date                       |\n|  7   | social history                       |  6   | social history                       |\n|  8   | past medical history                 |  7   | past medical history                 |\n|  9   | discharge medications                |  8   | discharge medications                |\n|  10  | medications on admission             |  9   | medications on admission             |\n|  11  | discharge diagnosis                  |  10  | discharge diagnosis                  |\n|  12  | discharge condition                  |  11  | discharge condition                  |\n|  13  | discharge instructions               |  12  | discharge instructions               |\n|  14  | major surgical or invasive procedure |  13  | major surgical or invasive procedure |\n|  15  | brief hospital course                |  14  | brief hospital course                |\n|  16  | pertinent results                    |  15  | pertinent results                    |\n|  17  | followup instructions                |  16  | followup instructions                |\n|  18  | family history                       |  17  | family history                       |\n|  19  | chief complaint                      |  18  | chief complaint                      |\n|  20  | attending                            |  19  | attending                            |\n|  21  | physical exam                        |  20  | physical exam                        |\n\nWe can see medical experts only need to correct  `sex m`  and `sex f`. Since the extracted titles are mostly correct, there is actually little effort required by medical experts. Therefore, the role of medical experts in this process is to validate the extracted titles by the proposed DF-IAPF method, which further evaluates the effectiveness and accuracy of the DF-IAPF method.\n\nTo clarify, we will also add this table to Appendix in the future version.\n\n---\n\n### Question 1: Line 238: Is h_section more accurate than h_note?\n\n**A:** Thank you for this suggestion! We used $h_{note}$  as a general symbol for output of $Enc_{note}$ . But here, we agree that $h_{sec}$  is more accurate. We will update this notation in the future version.\n\n---\n\n### Question 2: Typo in line 12 of Algorithm 1 in Appendix A: TF(t) -> PF(t)?\n\n**A:** Thank you for this correction. We will fix this in the future version.\n\n---\n\n### Limitations: This paper includes a section in Appendix, discussing broader impacts. The conclusion section also briefly states the limitations of this work. It would be better to have a separate section to discuss these limitations.\n\n**A:** Thank you for this suggestion! We agree that it will be better to add an independent section about limitations. We will add it in the future version, and it will look like this:\n> ### Limitations\n> \n> Although the proposed training strategies are able to enhance existing ICD coding models, they are dependent on the design of these models. If the model is well-designed and has many parameters, it is generally over-fitting with limited training data. In this case, our proposed training strategies are a good enhancement. Additionally, we only focus on the variability caused by the order of sections in this work, but there are other formats of variability such as typos and synonyms. In the future, we plan to design new ICD coding models based on sections and consider more types of variability to further improve the robustness of the training process."}, {"review_id": "ra0pnMZzjW", "reviewer": "Reviewer_VQpM", "summary": "The paper proposed a semi-structured automatic ICD coding algorithm with a contrastive pre-training and masked section training and evaluate the algorithm using MIMIC-III dataset. ", "questions": "1. Are the results cross validated? It is not specified in the main text or supplement. Pls justify the significance and generalizability of the proposed model.", "limitations": "Yes. Limitations are addressed in the paper.", "rating": 3, "confidence": 4, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "The paper is well structured with clear explanation in research motivation, related work, experiment configuration and results. \nEmpirical results were obtained with multiple baseline models on benchmark dataset MIMIC-III. \nCode and data are also provided. ", "weaknesses": "1. In the related work part, the paper misses the weak supervision approach applied on ICD coding. \n2. Result tables (Table 1 and Table 2) and result plots (Figure 4) miss confidence intervals (CIs). Standard deviations are not intuitive to illustrate the variance for model comparison, especially only 5 repetitions are performed. Pls compute the CIs for each results, which should be straight forward. \n3. The comparison of w/C and w/M in Figure 4 is interesting to illustrate the utility and necessity of section identification in your proposed framework. Better to provide a table with results and confidence intervals in main text or supplement. Otherwise, the performance difference looks very trivial. \nIn general, the model evaluation is weak in the current representation, which might eliminate the technical soundness. \n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "### Summary\n\nWe truly appreciate your suggestions and understand your concerns mainly come from the result presentation. We have added the confidence intervals for Table 1 and Table 2. We have also added one representative table with confidence intervals of Figure 4. We sincerely hope these updates can adequately address your concerns. \n\n---\n\n### Weakness 1: In the related work part, the paper misses the weak supervision approach applied on ICD coding.\n\n**A:** Thank you for this suggestion. We will add the following papers and corresponding discussions to the related work part:\n- Dong, Hang, et al. \"Rare disease identification from clinical notes with ontologies and weak supervision.\" 2021 43rd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC). IEEE, 2021.\n- Cusick, Marika, et al. \"Using weak supervision and deep learning to classify clinical notes for identification of current suicidal ideation.\" Journal of psychiatric research 136 (2021): 95-102.\n- Gao, Chufan, et al. \"Classifying unstructured clinical notes via automatic weak supervision.\" Machine Learning for Healthcare Conference. PMLR, 2022.\n\n---\n\n### Weakness 2: Result tables (Table 1 and Table 2) and result plots (Figure 4) miss confidence intervals (CIs). Standard deviations are not intuitive to illustrate the variance for model comparison, especially only 5 repetitions are performed. Pls compute the CIs for each results, which should be straight forward.\n\n**A:** We appreciate this suggestion. In the following tables, we have added the confidence interval (95%) of the paired *t*-test for Table 1 and Table 2. Here, the confidence interval for the paired *t*-test denotes we have 95% confidence that the difference of the average Macro-$F_1$  score is in this interval. We believe that, together with $p$-value, the value of confidence intervals can be evidence that our method is a significant improvement over the backbone models. \n\nConfidence Interval for Table 1 (MIMIC-50):\n\n| Model | Macro-$F_1$ w/o CM | Macro-$F_1$ w/ CM | $p$-value | Confidence Interval |\n|--------------|--------------------|-------------------|--------------------|---------------------|\n| MultiResCNN | 60.8 (0.3) | 62.2 (0.3) | $1 \\times 10^{-4}$ | [1.2, 2.3] |\n| HyperCore | 61.1 (0.2) | 62.0 (0.2) | $5 \\times 10^{-3}$ | [0.4, 1.4] |\n| JointLAAT | 66.4 (0.1) | 67.2 (0.2) | $7 \\times 10^{-3}$ | [0.4, 1.3] |\n| EffectiveCAN | 66.7 (0.1) | 67.5 (0.2) | $3 \\times 10^{-3}$ | [0.4, 0.9] |\n| PLM-ICD | 64.5 (0.3) | 65.2 (0.1) | $2 \\times 10^{-4}$ | [0.4, 0.7] |\n| MSMN | 68.1 (0.2) | 69.1 (0.1) | $8 \\times 10^{-4}$ | [0.7, 1.3] |\n\nConfidence Interval for Table 2 (MIMIC-rare-50):\n\n| Model | Macro-$F_1$ w/o CM | Macro-$F_1$ w/ CM | $p$-value | Confidence Interval |\n|--------------|--------------------|-------------------|--------------------|---------------------|\n| MultiResCNN | 11.2 (2.1) | 22.8 (1.3) | $5 \\times 10^{-4}$ | [9.4, 16.0] |\n| HyperCore | 12.5 (1.3) | 23.4 (1.9) | $3 \\times 10^{-5}$ | [10.6, 13.7] |\n| JointLAAT | 20.2 (1.9) | 28.6 (1.1) | $2 \\times 10^{-4}$ | [8.3, 13.3] |\n| EffectiveCAN | 19.8 (1.4) | 27.1 (2.4) | $1 \\times 10^{-4}$ | [6.9, 10.7] |\n| PLM-ICD | 22.6 (2.5) | 30.3 (1.5) | $6 \\times 10^{-4}$ | [6.3, 11.0] |\n| MSMN | 23.7 (1.0) | 31.2 (1.3) | $2 \\times 10^{-5}$ | [8.7, 10.8] |\n\n---\n\n### Weakness 3: The comparison of w/C and w/M in Figure 4 is interesting to illustrate the utility and necessity of section identification in your proposed framework. Better to provide a table with results and confidence intervals in main text or supplement. Otherwise, the performance difference looks very trivial. In general, the model evaluation is weak in the current representation, which might eliminate the technical soundness.\n\n**A:** We completely understand the importance of confidence intervals. Here, we have added confidence interval for the variants of MSMN in terms of Macro-$F_1$  score. Please understand it will be a large table if we list all variants of all models. Therefore, due to the space limit, we choose the confidence interval of MSMN variants as a representative. We will add the full table to the main paper and supplementary in the future version. \n\n| Variant | Macro-$F_1$ of Variant | Confidence Interval for Macro-$F_1$ w/CM: 69.1 (0.1) |\n|---------|------------------------|------------------------------|\n| w/o CM | 68.1 (0.2) | [0.7, 1.3] |\n| w/ J | 68.3 (0.1) | [0.6, 1.0] |\n| w/ C | 68.7 (0.2) | [0.3, 0.8] |\n| w/ M | 68.9 (0.1) | [0.2, 0.4] |\n\n---\n\n### Question: Are the results cross validated? It is not specified in the main text or supplement. Pls justify the significance and generalizability of the proposed model.\n\n**A:** In the Appendix, Dataset Statistics (Table 3), we demonstrated that the dataset is split into training, dev (validation), and test data. We follow the dataset split settings in CAML [1] and KEPT [2], which are random split. Our experiments are conducted with cross-validation on the dev set to adjust hyper-parameters. We will clarify this in the main paper. \n\nIt is worth noting that we strictly follow the basic rules for training deep learning models in experiments. These rules include but are not limited to random dataset split, cross-validation, multiple runs with different random seeds, and comparing with strong baselines. We believe together with the suggested confidence intervals, these rules can ensure the significance and generalizability of the proposed model. \n\n> [1] Mullenbach, James, et al. \"Explainable Prediction of Medical Codes from Clinical Text.\" Proceedings of NAACL 2018. \n>\n> [2] Yang, Zhichao, et al. \"Knowledge Injected Prompt Based Fine-tuning for Multi-label Few-shot ICD Coding.\" arXiv preprint arXiv:2210.03304 (2022)."}, {"review_id": "jA45mqP1r7", "reviewer": "Reviewer_cSeG", "summary": "This paper describes a novel method of ICD coding that explicitly model clinical note sections. Instead of treating a clinical note as a long sequence of tokens, the authors propose to segment a clinical note into sections and then use contrasive learning to pre-train the model.\nExperiment results on MIMIC-III show that the proposed components can be used to improve the effectiveness of several existing CNN, RNN, Transformer-based models, especially when the training data is limited.", "questions": "* Suggest swapping equations (1) and (2)\n* Section 4.3: can you explain what is the role of perm operation (or saying, why it is necessary)?\n* Suggest to consider stronger transformer-based baselines [1]\n\n[1]     Xiang Dai, Ilias Chalkidis, Sune Darkner, Desmond Elliott, \"Revisiting Transformer-based Models for Long Document Classification\", in Findings of EMNLP, 2022.", "limitations": "N/A", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "* A simple yet effective contrastive learning variant based on label tree\n* The proposed (section segmentation and contrastive learning) components are used with several existing models and are shown to be effective, especially with limited training data.", "weaknesses": "* The used baselines are mainly CNN, RNN based. The only used transformer-based baseline PLM-ICD seems not to be a strong one. See suggestion 3", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "### Summary\n\nWe are glad to know you think our work is effective. We truly appreciate your suggestions. We believe your concerns are mainly due to the baseline selection, especially for Transformer-based models. We carefully read your suggested paper and add the result of a stronger Transformer-based model. We sincerely hope it can adequately address your concerns.\n\n---\n\n### Weakness + Question 3: The used baselines are mainly CNN, RNN based. The only used transformer-based baseline PLM-ICD seems not to be a strong one. See suggestion 3 + Suggest to consider stronger transformer-based baselines:\n[1] Xiang Dai, Ilias Chalkidis, Sune Darkner, Desmond Elliott, \"Revisiting Transformer-based Models for Long Document Classification\", in Findings of EMNLP, 2022.\n\n**A:** Thank you for these suggestions. We first list Table 2 in that paper for your reference (C: CNN, T: Transformer, R: RNN, L: Roberta-large). It is worth noting that the RNN-based MSMN model (one of the baselines used in our paper) has the best performance even compared to various Transformer-based models. This indicates that we already use strong baselines.\n\n| Model          | Model Type  | Macro AUC | Micro AUC | Macro F1 | Micro F1 | P@5  |\n|----------------|-------------|-----------|-----------|----------|----------|------|\n| CAML           |  C          | 88.4      | 91.6      | 57.6     | 63.3     | 61.8 |\n| PubMedBERT     |  T          | 88.6      | 90.8      | 63.3     | 68.1     | 64.4 |\n| GatedCNN-NCI   |  C          | 91.5      | 93.8      | 62.9     | 68.6     | 65.3 |\n| LAAT           |  R          | 92.5      | 94.6      | 66.6     | 71.5     | 67.5 |\n| **MSMN**           |  R          | **92.8**      | **94.7**      | **68.3**     | **72.5**     | **68.0** |\n| Baselines processing up to 512 tokens    |           |          |          |      |\n| First          |  T          | 83.0      | 86.0      | 47.0     | 56.1     | 55.4 |\n| Random         |  T          | 82.5      | 85.4      | 42.7     | 51.1     | 52.3 |\n| Informative    |  T          | 82.7      | 85.8      | 46.4     | 55.2     | 54.8 |\n| Long document models         |           |           |          |          |      |\n| Longformer (4096 + LWAN)     |  T          | 90.0      | 92.6      | 60.7     | 68.2     | 64.8 |\n| Hierarchical (4096 + LWAN)    |  T          | 91.1      | 93.6      | 62.9     | 69.5     | 65.7 |\n| Hierarchical (4096 + LWAN + L)   |  T          | 91.7      | 94.1      | 65.2     | 71.0     | 66.2 |\n| Hierarchical (4096 + LWAN)   |  T          | 91.4      | 93.7      | 63.8     | 70.1     | 65.9 |\n| Hierarchical (4096 + LWAN + L)   |  T          | 91.9      | 94.1      | 65.5     | 71.1     | 66.4 |\n\nWe choose PLM-ICD because it is a recently published Transformer-based model (2022), which shows strong performance in the MIMIC-full setting. PLM-ICD splits the clinical notes into chunks. It can also be considered as a type of Hierarchical Transformer. However, since it uses Roberta-base instead of Roberta-large (L), the performance is similar to Hierarchical (4096 + LWAN) in this table.\n\nTo make a stronger comparison, besides PLM-ICD, we have added Hierarchical (4096 + LWAN + L) as another backbone model. Here, LWAN refers to “label-wise attention network”. We list the results as follows: \n\nFor MIMIC-50:\n\n| Model        | w/o CM      |             |            | w/ CM      |             |            |           |\n|--------------|-------------|-------------|------------|-------------|-------------|------------|-----------|\n|              | Macro-$F_1$ | Macro-$F_1$ | P@5        | Macro-$F_1$ | Macro-$F_1$ | P@5        | $p$-value |\n| PLM-ICD      | 64.5 (0.3)  | 69.3 (0.2)  | 64.5 (0.4) | 65.2 (0.1) | 70.3 (0.2) | 65.6 (0.2) | $2 \\times 10^{-4}$  |\n| Hierarchical  | 65.3 (0.1)  | 70.6 (0.3)  | 66.5 (0.1) | 66.1 (0.2) | 71.8 (0.4) | 67.2 (0.3) | $4 \\times 10^{-4}$ |\n\nFor MIMIC-rare-50:\n\n| Model        | w/o CM      |             | w/ CM      |             |           |\n|--------------|-------------|-------------|-------------|-------------|-----------|\n|              | Macro-$F_1$ | Macro-$F_1$ | Macro-$F_1$ | Macro-$F_1$ | $p$-value |\n| PLM-ICD      | 22.6 (2.5)  | 24.3 (1.9)  | 30.3 (1.5)  | 29.5 (1.3)  | $6 \\times 10^{-4}$  |\n| Hierarchical  | 23.1 (1.7)  | 24.6 (1.4)  | 32.0 (1.2)  | 31.3 (2.2)  | $8 \\times 10^{-5}$  |\n\nIn the table for MIMIC-50, the hierarchical results are slightly different from Table 2 above. We think it is because of different random initialization of different runs. Nevertheless, for the hierarchical transformer, we can still observe significant improvement with small $p$-values.\n\n---\n\n### Question 1: Suggest swapping equations (1) and (2)\n\n**A:** Thank you for this suggestion. We will swap equations (1) and (2) and update expressions for better clarity.\n\n---\n\n### Question 2: Section 4.3: can you explain what is the role of perm operation (or saying, why it is necessary)?\n\n**A:** We apologize for any confusion here. By using `perm` to get a random permutation of section indices, we want to generate a random shuffle of all sections in a clinical note. This shuffling is used as a denoising technique in the BART paper. We will clarify this in the future version."}, {"review_id": "CrCchrOc1e", "reviewer": "Reviewer_BZWL", "summary": "This paper addresses automating diagnosis coding via tree-based contrastive learning. It uses an established benchmarking dataset for this task, and achieves insightful results from its comparative performance evaluations and ablation studies.", "questions": "See above", "limitations": "See my broader impact and ethical consideration comments above for minor comments", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "This paper addresses automating diagnosis coding via tree-based contrastive learning. It uses an established benchmarking dataset for this task, and achieves insightful results from its comparative performance evaluations and ablation studies. It has a well chosen range of machine learning methods to compare in the coding task, and its methods are very clearly and thoroughly described.", "weaknesses": "The paper is somewhat lacking in its qualitative analysis. It would be helpful to extend Section 5 with a mixed method approach to analyse and evaluate the experimental methods also using qualitative approaches.\n\nThe paper is also calling for a discussion section to deepen the lessons learnt part of the study. For example, what are the limitations of the study? What are the envisioned pros and cons of the studied methods in their broader context in health and medicine? What are the ethical considerations related to using the MIMIC -III dataset?\n\nIt would have been helpful to connect this natural language processing paper to prior shared tasks and their shared datasets to allow seeing trends in methods. E.g., Computational Medicine Center's 2007 Medical NLP Challenge, followed by those by I2B2, N2C2, and CLEF eHealth would be worth of briefly surveying to assure that methods are compared to more traditional ones as well.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "### Summary\n\nWe truly appreciate your suggestions. We understand your concerns are from multiple perspectives, and we try our best to answer them in this discussion. We sincerely hope our answers can address your concerns.\n\n---\n\n### Weakness 1: The paper is somewhat lacking in its qualitative analysis. It would be helpful to extend Section 5 with a mixed method approach to analyse and evaluate the experimental methods also using qualitative approaches.\n\n**A:** Thank you for this suggestion. We agree that a qualitative analysis is helpful to intuitively show the effectiveness of the proposed method. In Section 5 (Experiments), we have a case study (Section 5.6) about how the proposed method can better connect labels and clinical text. Also, in Appendix B.3, Extracted section titles, we have a qualitative analysis of the extracted section titles.\n\nWe hope these can be parts of the qualitative analysis. If not, we would appreciate it if the reviewer could provide more details on the specific approaches for qualitative analysis.\n\n---\n\n### Weakness 2 + Limitation: The paper is also calling for a discussion section to deepen the lessons learnt part of the study. For example, what are the limitations of the study? What are the envisioned pros and cons of the studied methods in their broader context in health and medicine? What are the ethical considerations related to using the MIMIC-III dataset? + See my broader impact and ethical consideration comments above for minor comments\n\n**A:** For limitations, currently we discuss them in the last paragraph of Section 6, Conclusion. But as the Reviewer ijoF suggested, we will provide a separate section to discuss more details as follows:\n> ### Limitations\n> \n> Although the proposed training strategies are able to enhance existing ICD coding models, they are dependent on the design of these models. If the model is well-designed and has many parameters, it is generally over-fitting with limited training data. In this case, our proposed training strategies are a good enhancement. Additionally, we only focus on the variability caused by the order of sections in this work, but there are other formats of variability such as typos and synonyms. In the future, we plan to design new ICD coding models based on sections and consider more types of variability to further improve the robustness of the training process.\n\nFor broader impact and ethical considerations, we currently have an independent section in Appendix C, Broader Impacts. In that section, we discuss the ethical considerations of using MIMIC-III. We will consider moving them into the main paper in the future version. \n> ### Broader Impacts\n> **Ethical considerations** While EHR data contains private information of patients, the MIMIC-III dataset used in this work as well as all backbone models is a publicly available dataset. It de-identified the sensitive information of patients and doctors with masks, including admission/discharge date, name, and hospital name (e.g., [\\*\\*first name3\\*\\*]) to protect privacy. Therefore, the data we used will not leak such information even if we publish our code and model parameters.\n> \n> **Societal Impacts** Incorrect ICD coding can lead to medical billing errors which can affect patients and healthcare costs. However, as an enhancement of existing ICD coding models, our work aims to improve the prediction accuracy of ICD coding. We believe our method does not bring additional negative societal impacts to ICD coding.\n\n---\n\n### Weakness 3: It would have been helpful to connect this natural language processing paper to prior shared tasks and their shared datasets to allow seeing trends in methods. E.g., Computational Medicine Center's 2007 Medical NLP Challenge, followed by those by I2B2, N2C2, and CLEF eHealth would be worth of briefly surveying to assure that methods are compared to more traditional ones as well.\n\n**A:** Thank you for this suggestion. We understand it will be good to incorporate traditional datasets and models. Currently, we focus on following the routine of the recently published backbone models used in this paper. Since they mainly use the MIMIC dataset, we think it is fair to compare the performance on the MIMIC dataset in this work. But we will definitely explore the I2B2, N2C2, and CLEF eHealth datasets in future work."}]

Author rebuttal:

Meta-review: Thank you for your submission.

Reviewers noted a number of strengths including clarity of writing (ijoF, VQpM), simplicity of the approach (ijoF, cSeG), appropriate evaluation (ijoF), and useful ablations (ijoF). Reviewers raised a concern around a weak transformer baseline (cSeG), which was addressed well in the rebuttal. Concerns were raised regarding omitting certain areas such as learning with noisy labels (VQpM) and qualitative analysis (BZWL). A lack of discussion around potential limitations and impact of the approach was also highlighted (ijoF, BZWL), also well addressed by the authors. Statistical quantification was discussed as well (VQpM).

Overall this was a well received paper where reviewer concerns were well addressed, and I recommend acceptance.

P.S. There was a lengthy discussion around statistically comparing classifiers (VQpM). I would actually caution both the reviewer and the authors around blindly applying statistical tests, and to think deeply about appropriate statistical comparisons of machine learning models. 
Recommended reading: https://www.jmlr.org/papers/volume7/demsar06a/demsar06a.pdf
Decision: Accept (poster)