Next Article in Journal
Operationalising CTT and IRT in Spreadsheets: A Methodological Demonstration for Classroom Assessment
Previous Article in Journal
Site Selection for Solar Photovoltaic Power Plant Using MCDM Method with New De-i-Fuzzification Technique
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Integrating Deep Learning Nodes into an Augmented Decision Tree for Automated Medical Coding

Computer and Information Science Department, University of Massachusetts Dartmouth, Dartmouth, MA 02747, USA
*
Author to whom correspondence should be addressed.
Analytics 2026, 5(1), 11; https://doi.org/10.3390/analytics5010011
Submission received: 7 December 2025 / Revised: 30 December 2025 / Accepted: 11 February 2026 / Published: 12 February 2026

Abstract

Accurate assignment of International Classification of Diseases (ICD) codes is essential for healthcare analytics, billing, and clinical research. However, manual coding remains time-consuming and error-prone due to the scale and complexity of the ICD taxonomy. While hierarchical deep learning approaches have improved automated coding, their deployment across large taxonomies raises scalability and efficiency concerns. To address these limitations, we introduce the Augmented Decision Tree (ADT) framework, which integrates deep learning with symbolic rule-based logic for automated medical coding. ADT employs an automated lexical screening mechanism to dynamically select the most appropriate modeling strategy for each decision node, thereby minimizing manual configuration. Nodes with high keyword distinctiveness are handled by symbolic rules, while semantically ambiguous nodes are assigned to deep contextual models fine-tuned from PubMedBERT. This selective design eliminates the need to train a deep learning model at every node, significantly reducing computational cost. A case study demonstrates that this hybrid and adaptive ADT approach supports scalable and efficient ICD coding. Experimental results show that ADT outperforms a pure decision tree baseline and achieves accuracy comparable to that of a full deep learning-based decision tree, while requiring substantially less training time and computational resources.

1. Introduction

With the rapid expansion of electronic health records (EHRs) in modern healthcare, clinical documentation has become increasingly complex. Modern EHRs contain both structured and unstructured data that together capture a patient’s complete medical history [1,2]. Structured data, such as laboratory results, diagnostic codes, and procedural entries, are systematically organized and analyzed to support billing, auditing, and epidemiological research. In contrast, unstructured narratives, including discharge summaries, physician notes, and imaging reports, contain rich contextual information. However, their wide variation in writing style, abbreviations, and phrasing makes automated processing difficult. The International Classification of Diseases (ICD), maintained by the World Health Organization (WHO), provides a standardized hierarchical framework for encoding diagnoses and procedures [3]. This framework supports consistency in medical reporting, insurance processing, and clinical analytics. Despite this standardization, accurately mapping free-text clinical narratives to ICD codes remains challenging as clinical notes often contain shorthand expressions, negations, and implicit context that are difficult to interpret automatically.
ICD coding has traditionally been performed manually by professional medical coders who read and interpret a doctor’s notes to assign appropriate diagnostic or procedural codes. This process is labor-intensive, error-prone, and costly, as clinical notes are often unstructured and may include spelling mistakes, abbreviations, or inconsistent wording. To address these inefficiencies, researchers have developed automated ICD coding systems. Early approaches relied on rule-based and statistical methods that used lexical patterns and frequency-based heuristics to map clinical text to ICD codes [4]. Although such systems were interpretable and computationally efficient, they were highly sensitive to domain-specific language and lacked robustness to synonymy and contextual variation. With the increasing availability of large-scale clinical datasets such as MIMIC-IV [5], research has shifted toward deep learning methods capable of capturing contextual semantics from unstructured medical text. Deep learning-based approaches have demonstrated substantial improvements in predictive performance by modeling long-range dependencies and semantic relationships across clinical narratives [6]. Furthermore, hierarchical classification models aligned with the ICD taxonomy have been developed to emulate how clinicians reason about diagnostic decisions [7]. Despite these advancements, deep neural architectures are computationally intensive, requiring extensive GPU resources, large labeled datasets, and significant training time. Moreover, their “black-box” nature limits interpretability, which is an essential property in clinical decision-making where transparency and traceability are critical.
In this study, we introduce the Augmented Decision Tree (ADT), a novel learning framework that integrates deep learning models with rule-based logic for automated medical coding. This work significantly extends our previous research on medical coding using a hybrid decision tree that combined Long Short-Term Memory (LSTM) models with symbolic reasoning [8]. In the earlier approach, decisions on whether to apply rule-based logic or deep learning at each node of the hierarchy were made manually. In contrast, ADT introduces a keyword-based node screening mechanism that automatically determines whether a decision node should be handled by rule-based logic or deep learning, eliminating the need for manual configuration. Furthermore, the proposed ADT employs PubMedBERT [9], a transformer-based model pretrained on large biomedical corpora, and fine-tunes it to capture nuanced semantic relationships and improve coding accuracy. By combining automatic node screening with domain-specific language modeling, ADT achieves a balanced trade-off between interpretability and accuracy. It retains the transparency and efficiency of rule-based reasoning for straightforward cases while leveraging deep contextual embeddings for complex or ambiguous diagnoses. We evaluated the ADT framework using the MIMIC-IV dataset, a large-scale, real-world collection of intensive care unit (ICU) clinical records. Experimental results show that ADT achieves higher predictive accuracy than a pure decision tree (PDT) baseline and matches the performance of a full deep learning (FDL) model, while substantially reducing training time and computational cost. This efficiency, combined with improved interpretability, highlights ADT’s suitability for real-world deployment in clinical environments where both transparency and scalability are essential. The main contributions and novelties of this paper are summarized as follows:
  • Introduced an ADT framework that adaptively integrates rule-based and deep learning methods in a hybrid decision tree, improving classification accuracy and interpretability for ICD code prediction.
  • Developed a two-phase keyword-based node screening method that automatically assigns nodes as rule-based classifiers or deep learning models, reducing manual intervention and enhancing scalability across ICD hierarchies.
  • Utilized the PubMedBERT pretrained model at deep learning nodes and fine-tuned it to enable richer semantic representations and improve accuracy in diagnostically overlapping or ambiguous cases.
  • Presented a case study demonstrating that this hybrid and adaptive ADT approach enables scalable and efficient ICD coding while advancing automation in healthcare information management.
The rest of the paper is organized as follows. Section 2 discusses related work. Section 3 describes the ADT framework and details the keyword-based node screening method. Section 4 presents the design of rule-based nodes, while Section 5 introduces deep learning nodes with the integration of fine-tuned PubMedBERT models. Section 6 provides a case study and comparative analysis, and Section 7 concludes with future directions.

2. Related Work

Automated ICD coding has long been a critical but challenging task in clinical informatics. Early efforts struggled with the unstructured and ambiguous nature of clinical text, as physicians often used abbreviations, negations, and inconsistent phrasing to describe similar conditions. Manual coding was time-consuming, expensive, and prone to inconsistency, motivating the development of rule-based and classical machine learning (ML) approaches to automate the process.

2.1. Rule-Based and Classical Machine Learning Approaches

Early ICD coding research relied heavily on rule-based and lightweight statistical models that learned from data to improve flexibility and scalability. Goldstein et al. [4] laid the foundation with one of the first rule-based ICD-9-CM systems, comparing word-based, statistical, and rule-based approaches for medical coding. Their results showed that the rule-based system with handcrafted templates performed best because it explicitly incorporated clinical semantics, including negation and synonymy. Building on this, Farkas and Szarvas [10] developed a hybrid rule-based system in which rules were automatically constructed using decision trees and maximum entropy classifiers. This approach preserved interpretability while improving coverage through learned patterns. As research progressed, lightweight statistical and machine learning models emerged as alternatives to purely rule-based systems. Medori and Fairon [11] used a Naïve Bayes classifier with feature-engineering techniques such as stemming and clinical concept extraction. Similarly, Singto and Wongwirat [12] employed decision trees trained on laboratory results and medication data to classify ICD-10 codes. Both approaches achieved higher accuracy and transparency when structured data were available. Overall, rule-based systems offered clear decision logic and strong precision for well-defined linguistic patterns, while statistical models improved flexibility by learning probabilistic associations from data. However, these methods struggled with unstructured, ambiguous, or context-rich narratives where explicit rule patterns were insufficient. In contrast, our ADT approach addresses these challenges through a hybrid design. Rule-based methods are applied at decision nodes where ICD codes are clearly separable using distinct keywords or contextual patterns. PubMedBERT models are employed only at nodes involving complex, overlapping, or context-dependent diagnoses. This hybrid design preserves the clarity and explainability of earlier rule-based systems while enabling deeper semantic understanding and contextual reasoning in cases that cannot be handled through explicit rules alone.

2.2. Deep Learning-Based ICD Coding Models

With the release of large-scale clinical datasets such as MIMIC-III and MIMIC-IV, research has shifted from rule-based systems to deep learning models integrated with natural language processing (NLP) techniques to better capture contextual patterns in unstructured clinical text. Albokae et al. [13] proposed an ICD coding framework combining NLP preprocessing with contextual embeddings to classify ICD chapters and identify the most relevant codes from diagnosis text. Their approach effectively captured semantic similarities between clinical descriptions and ICD definitions, leading to higher precision. Harerimana et al. [14] introduced a hybrid LSTM-CNN model with self-guided attention to predict diagnoses from discharge summaries. The system combined CNN-based feature extraction with LSTM-based sequence modeling and guided attention, enabling the model to focus on medically relevant patterns in the text, thereby improving prediction accuracy. Falis et al. [15] presented an ontological attention model that aligns PubMedBERT embeddings of clinical text with ICD definitions. The model uses shared and label-specific attention vectors, improving both interpretability and efficiency in multi-label coding. Merchant et al. [16] designed a structured self-attention CNN model to enhance both accuracy and robustness. The model integrates label-specific attention with ICD code description embeddings and an ensemble of structured-data classifiers for automatic diagnostic coding. These deep learning and attention-based models have achieved major improvements over rule-based systems by capturing the meaning and context within clinical notes. However, most of these models process entire clinical notes in a single pass without explicitly representing the ICD hierarchy. As a result, they are computationally expensive, difficult to interpret, and challenging to scale across large code sets. Unlike these methods, our ADT approach restructures the medical coding task into a fine-grained, hierarchical decision process that decomposes coding into smaller, sequential steps rather than processing the entire note at once. This design significantly reduces computational overhead, as deep learning is used only where necessary, and enhances interpretability by allowing each decision to be traced through the ADT hierarchy. As a result, our ADT approach provides a more transparent and efficient alternative to conventional deep learning-based medical coding methods.

2.3. Hierarchy-Aware Deep Learning Methods

Building on advances in deep learning and attention-based systems, recent research has begun to explicitly incorporate the hierarchical structure of ICD codes into model design. Rather than treating ICD prediction as a flat multi-label task, these approaches leverage the tree-like ICD taxonomy. This design allows related codes to share contextual information and improves consistency across diagnostic levels. Mayya et al. [17] introduced the Label Attention Transformer Architecture (LATA), which applies label-specific attention within a transformer framework to link relevant portions of clinical text to ICD-10 codes, particularly in multilingual settings. Liu et al. [18] extended this concept with HiLAT, a hierarchical label-wise attention transformer that fine-tunes a pretrained model to predict ICD-9 codes from hospital discharge summaries. Their attention mechanism generates label-specific document embeddings that are then used by a neural network for ICD code prediction. Chen and Ren [19] proposed a deep learning framework combining machine comprehension with a tree-LSTM architecture to automatically assign ICD codes by using both diagnostic text and the hierarchical structure of the code system. By modeling parent-child relationships and semantic dependencies in code descriptions, their approach improved prediction accuracy while maintaining alignment with the ICD hierarchy. Wang et al. [20] further advanced this direction with HieNet, a bidirectional hierarchical framework designed to model both structural and relational dependencies among ICD codes. HieNet integrates multi-channel CNNs for document encoding, a hierarchical encoder for code relationships, and personalized PageRank for modeling code co-occurrence, effectively reducing label confusion and improving prediction accuracy. More recently, Xi et al. [21] introduced LGG-NRGrasp, a robust graph-based model that treats ICD classification as a labeled graph generation task. By combining hierarchical feature learning with adversarial reinforcement and domain adaptation, the model captures complex relationships among diagnostic codes and generalizes well across clinical datasets. These hierarchy-aware models achieve higher accuracy and structural consistency than flat deep-learning systems by using the ICD hierarchy as an inductive guide. However, these models operate as large, monolithic pipelines trained across thousands of labels. Consequently, they demand substantial computational resources, are difficult to update when new codes are added, and remain hard to interpret. They also offer limited insight into which text segments influence predictions. In contrast, our ADT framework preserves the hierarchical reasoning of these models but adopts a simpler, step-wise design. Instead of training a single large network, ADT decomposes ICD prediction into smaller, sequential decisions at each node of the hierarchy. This design improves efficiency, maintainability, and transparency compared with previous hierarchy-aware deep learning models, while preserving the structural advantages of the ICD code hierarchy.

2.4. Decomposed and Hybrid ICD Coding Frameworks

Other researchers have addressed scalability and interpretability by decomposing the ICD classification task into smaller stages. Perotte et al. [22] pioneered this direction with hierarchical SVMs, where separate classifiers were trained for each branch of the ICD tree, ensuring that local decisions remained consistent with the overall taxonomy. They also compared flat and hierarchy-based classifiers, demonstrating that incorporating the ICD hierarchy improved parent-child relationship modeling and produced more accurate, clinically meaningful predictions. Wu et al. [23] proposed a hybrid approach that integrates semantic representations of clinical text with knowledge-based attention mechanisms for ICD code assignment. Their ablation study demonstrates that incorporating an ICD knowledge base through an attention-based Bi-GRU significantly enhances feature representation and improves prediction performance. Sen et al. [24] introduced a hierarchical ICD coding framework that reformulates the extreme multi-label problem as a multi-class task. Their model uses a sentence tagger to identify key medical phrases and applies supervised phrase-level attention to assign ICD-10 codes in an interpretable and accurate manner. These approaches, which use decomposed tasks, improved interpretability and reduced computation compared with monolithic deep learning pipelines. However, they still required manual configuration at each hierarchy level and lacked automation in selecting which method to apply at each node. In contrast, our ADT framework extends these ideas with a keyword-based node screening mechanism that automatically determines whether each decision node should employ rule-based logic or a PubMedBERT model. This automation removes manual tuning and ensures that deep learning is used only for complex, context-rich cases. As a result, ADT preserves the clarity and efficiency of decomposed hierarchies while adding the semantic depth and adaptability of modern language models, offering a scalable, interpretable, and resource-efficient solution for automated ICD coding.
Despite substantial progress in automated ICD coding, existing approaches continue to involve trade-offs among interpretability, scalability, and computational efficiency. Rule-based and classical machine learning methods offer transparent decision logic but struggle with context-rich clinical narratives, whereas deep learning and hierarchy-aware models improve predictive performance at the cost of increased computational complexity and reduced interpretability. Decomposed and hybrid frameworks address some of these limitations but typically require manual configuration. To clarify these differences, Table 1 presents a comparative summary of representative ICD coding approaches using consistent evaluation criteria. The table highlights ADT’s distinctive contribution in effectively balancing interpretability, scalability, and efficiency through automated, node-level model selection.

3. A Framework for Augmented Decision Tree

The ADT framework integrates deep learning nodes into a hierarchical decision tree for ICD code prediction. At each decision node, a keyword-based screening step determines whether classification can be handled with rule-based logic or requires deeper semantic modeling. Cases with clear keyword separation follow the rule-based path, while ambiguous or context-dependent cases are routed to the deep learning branch.

3.1. Generation of Fine-Grained Data Points

Clinical documentation is inherently complex and often written in unstructured free-text form, making direct ICD coding challenging. To address this challenge, the proposed ADT framework builds on our prior work [25] by converting a doctor’s notes into fine-grained data points (FGDPs) that capture both explicit diagnostic information and the surrounding clinical context. Figure 1, adapted from [25], illustrates the procedure for generating FGDPs from a doctor’s notes as extended in this study. These FGDPs serve as the fundamental inputs to the downstream decision nodes in the ADT, enabling more precise and context-aware ICD code assignment.
As shown in Figure 1, diagnoses are first identified from the “Diagnoses” section of the clinical record. For each diagnosis, GPT-5 is accessed via its Chat Completions API (Application Programming Interface) to expand the concept into related terms, including diagnostic descriptors, symptoms, procedures, and medications. For example, given the diagnosis “Asthma,” the API generates semantically related terms such as “airway disease,” “wheezing,” “shortness of breath,” “allergy testing,” and “bronchodilators.” Table 2 presents representative prompts for “Asthma” and the corresponding GPT-5 outputs.
It is important to note that GPT-5 is used solely for lexical expansion and does not participate in node classification or decision-making. All generated terms are treated as candidate keywords and are processed by a deterministic screening procedure that computes keyword coverage statistics over the training data. The decision to assign a node to rule-based or deep learning processing is based on predefined coverage thresholds, ensuring that the screening mechanism is transparent and reproducible.
Once the semantically related terms are obtained, a sentence extraction module scans the full text of the doctor’s notes to retrieve sentences containing these terms. This ensures that the extracted sentences are directly relevant to the diagnosis and preserve meaningful clinical details. The resulting FGDP is a structured representation that pairs the primary diagnosis with its contextually linked evidence from the clinical record. These FGDPs serve as inputs to the ADT framework, supporting both the rule-based and deep learning pathways and providing a structured, contextually rich representation of features for ICD code prediction.

3.2. Augmented Decision Tree-Based Classification

Automated ICD coding is a complex and high-stakes challenge in clinical informatics for several reasons. First, the ICD-10 coding scheme includes thousands of diagnosis codes, creating a large and hierarchical label space. Second, clinical documentation is often unstructured, written in free-text form with ambiguous symptom descriptions, implicit context, and inconsistent terminology. Finally, automated systems must meet strict standards for interpretability and reliability required by healthcare providers and regulatory bodies. Although recent deep learning models can handle large output spaces, they have notable limitations. They require extensive labeled data and high computational resources and operate as black boxes, making individual predictions difficult to interpret or audit, which is unacceptable in clinical practice. To address these challenges, the proposed ADT framework balances performance, scalability, and interpretability by integrating rule-based methods with deep learning models in a hierarchical classification structure adapted from [7].
At the core of the ADT is a hierarchical tree structure, where each node acts as a sub-classifier responsible for making fine-grained routing decisions. Figure 2 illustrates a conceptual example of an ADT with three decision nodes, including node A as a deep learning node, as well as the root node and node B as rule-based nodes. Classification begins at the root node, which receives a FGDP, a semantically coherent unit derived from preprocessing the clinical notes, and routes it to subsequent nodes based on either rule-based heuristics or deep learning predictions. This process continues recursively until a leaf node is reached, where a specific ICD code is assigned. The hierarchical design decomposes the prediction task into smaller, more manageable subtasks, improving computational efficiency and modularity. Moreover, the tree can be expanded to support new ICD categories by adding branches without retraining the entire system, enhancing maintainability and adaptability to updated coding guidelines or emerging medical conditions.
When developing an ADT, the system performs a preliminary check at each decision node using keyword-based node screening to determine whether statistical feature matching is sufficient for classification. If clear discriminative terms are identified, the node is treated as rule-based, and classification proceeds using weighted n-gram matching against class-specific term dictionaries. Otherwise, the node is delegated to a deep learning model, specifically PubMedBERT, a transformer pretrained on biomedical corpora and fine-tuned using labeled FGDPs. Once constructed, the ADT can process new FGDPs to automatically map them to ICD codes. The classification procedure for automated ICD coding using an ADT is summarized in Algorithm 1.
Algorithm 1: Automated ICD Coding Using an Augmented Decision Tree
Input: Doctor’s notes Ξ and ADT Γ
Output: A list of predicted ICD codes ω
1.  Split the free-text notes in Ξ into a list of sentences Σ
2.  Initialize the FGDPs list σ as empty
3.  Initialize the predicted ICD codes list ω as empty
4.  for each diagnosis ρ in Ξ do
5.     Extract semantically related sentences ξ from Σ
6.     Create a FGDP using ρ and ξ, and add it to σ
7.  for each FGDP d in σ do
8.     Set current decision node η to the root node of Γ
9.     while η is not a leaf node of Γ do
10.      if the current node η is a rule-based node then
11.      Compute feature scores using weighted n-grams
12.      Set the next node η* based on term-matching
13.      else if η is a deep learning node then
14.      Encode d into a contextual representation using PubMedBERT
15.      Pass encoded input to the deep learning model at η
16.      Set the next node η* based on the model’s prediction
17.      Set η = η*
18.    Add the ICD code associated with η to ω
19. return ω
As shown in Algorithm 1, the input consists of structured and unstructured doctor’s notes Ξ, which are preprocessed to extract explicit diagnoses and generate a list of FGDPs σ through the sentence extraction module. For each FGDP d, the classification process begins at the root node and continues as the data point moves down the ADT until it reaches a leaf node, where the corresponding ICD code is assigned and added to the prediction list ω. If the current node is a rule-based node, feature scores are computed from weighted n-grams, and the next node η* is selected by comparing scores across candidate ICD categories. If the current node is a deep learning node, the data point is encoded into a contextual representation using PubMedBERT, and η* is chosen based on the model’s prediction. After all FGDPs in σ have been classified, the final list of predicted ICD codes ω is returned.

3.3. Two-Phase Keyword-Based Node Screening Method

A major challenge in the ADT framework is determining, for each decision node, whether classification can be reliably performed using symbolic rules or requires deep semantic modeling. This decision is crucial, as inappropriate model selection can either reduce interpretability or incur unnecessary computational cost. To address this challenge, we propose a two-phase, keyword-based node screening method that automatically assigns each node to either a rule-based classifier or a deep learning model based on the lexical characteristics of its associated training data. For a given decision node η, a Class-specific Keyword Set (CKS) is constructed for each child class C S C η , where S C η is the set of child nodes of η. Each CKS consists of unigrams and bigrams extracted from training FGDPs and organized into four clinically meaningful categories: diagnoses, symptoms, procedures, and medications. Table 3 illustrates an example of the CKS subsets for the node “Essential Hypertension (I10)” across these categories. The keywords are generated using GPT-5 and refined through expert manual review to ensure clinical accuracy and domain relevance. This process enables the model to capture both domain-specific terminology and the linguistic variability commonly found in clinical narratives.
Once the CKS is defined for each node, the appropriate classification method can be determined. Let D denote the complete set of FGDPs across the ADT, and DηD the subset associated with decision node η. Let K represent all CKSs in the ADT, and KCK the CKS corresponding to child node C. An FGDP is classifiable at node η if exactly one child class has a strictly higher keyword count than all others, indicating clear textual evidence for that diagnosis. As defined in Equation (1), the classifiableRate at node η is computed as the proportion of FGDPs in Dη that are classifiable, providing a quantitative measure of lexical separability among child classes.
c l a s s i f i a b l e R a t e η = N u m b e r   o f   c l a s s i f i a b l e   F G D P s   i n   D η |   D η | × 100
where |Dη| is the total number of FGDPs in Dη. A higher classifiableRate indicates stronger lexical distinction among child classes. Nodes with a classifiableRate above a threshold (e.g., 70%) are initially marked as rule-based, while the remaining nodes are designated for deep learning. These preliminary assignments are then verified in a second phase, where all provisionally rule-based nodes are evaluated using the symbolic classifier introduced in Section 4. Nodes that do not reach the required accuracy (e.g., 95%) are reassigned to deep learning. Algorithm 2 summarizes this two-phase screening process, which determines the final classification method for every decision node.
Algorithm 2: Two-Phase Keyword-Based Node Screening
Input: A dataset D of FGDPs; ADT Γ; A set of CKSs K, where KC is a CKS for node C in Γ
Output: Map of node classification type nodeType (rule-based or deep-learning)
1.  Initialize nodeType for all nodes in Γ to rule-based
2.  Set thresholds τ1 and τ2 for Phase 1 and Phase 2 (e.g., τ1 = 70%, τ2 = 95%)
3.  for each node η in Γ   // Phase 1: Keyword-based node screening
4.   Set classifiableCount = 0
5.   for each data point d in Dη do
6.    for each child class C of node η do
7.     Initialize count[C] = 0
8.     for each keyword k in KC do
9.      if k occurs in d then count[C]++
10.     Identify the child class Cmax with the highest count[C]
11.     if Cmax has a strictly higher count than all other child classes then
12.     classifiableCount++   // d is considered classifiable
13.     else continue   // d is not classifiable
14.    Compute classifiableRate[η] as in Equation (1)
15.    if classifiableRate[η] < τ1 then nodeType[η] = deep-learning
16. for each node η in Γ do   // Phase 2: Validation of provisional rule-based nodes
17.    if nodeType[η] = deep-learning then continue   // skip deep-learning nodes
18.    Run node η using the rule-based classification method described in Section 4
19.    if accuracy < τ2 then nodeType[η] = deep-learning
20. return updated map of node classification type nodeType
As described in Algorithm 2, the node screening process operates in two phases, with thresholds set for both Phase 1 and Phase 2 (e.g., τ1 = 70%, τ2 = 95%). In Phase 1, for each node η in the ADT, the classifiability of FGDPs in Dη is evaluated using the CKS of each child class C of η. Each FGDP d is compared against the corresponding KC of every child class C, and the total number of matched keywords is counted for each class. Each keyword k is counted at most once per data point to prevent longer notes or repeated terms from disproportionately influencing the results. The class Cmax with the strictly highest total count (i.e., no ties) is identified as the tentative label, and the FGDP is considered classifiable. Once all FGDPs in Dη have been processed, the classifiableRate is computed as the proportion of classifiable FGDPs within the node, as defined in Equation (1). Nodes with a classifiableRate below τ1 are designated for the deep-learning category, while the others remain provisionally assigned to the rule-based category.
In Phase 2, all provisionally rule-based nodes are validated using a lightweight rule-based classifier, as described in Section 4. Nodes achieving an accuracy of at least τ2 retain their rule-based designation; otherwise, they are reclassified as deep-learning nodes. This two-phase screening ensures that rule-based logic is applied only when it achieves high reliability, maintaining efficiency and interpretability across the hierarchy. In rare cases where symbolic accuracy is limited due to overlapping or ambiguous terms, the node designation is switched from rule-based logic to deep learning. This adaptive mechanism enables the ADT framework to selectively apply deep learning while preserving transparency, scalability, and adaptability to new ICD codes and datasets.

4. Designing Rule-Based Decision Nodes

4.1. Example Demonstrating Rule-Based Classification

In the ADT framework, rule-based decision nodes are designed to handle straightforward classification cases in which statistical feature scoring is sufficient and deep learning is unnecessary. These nodes either assign an ICD code directly or route the input into a broader diagnostic category for further refinement. They perform well when the clinical text contains explicit diagnostic references or includes distinctive lexical cues that clearly separate one class from another. By using such patterns, rule-based nodes reduce computational overhead while preserving interpretability, since their decisions follow transparent frequency-based rules rather than black-box model parameters.
A representative example is a decision node that separates circulatory diseases from respiratory diseases. Clinical documentation for circulatory conditions frequently contains terms such as “cardiac,” “coronary,” and “vascular,” along with bigrams like “heart failure,” “aortic stenosis,” and “coronary artery,” which reflect structural and functional aspects of the cardiovascular system. In contrast, respiratory conditions are associated with terms such as “pulmonary,” “airway,” and “bronchial,” and with bigrams like “shortness of breath,” “respiratory failure,” and “chronic cough.” These lexical patterns provide clear linguistic signals of pulmonary pathology. Because the vocabulary used in circulatory and respiratory disorders is highly distinct, a rule-based classifier can reliably separate these categories without requiring contextual or semantic modeling. This example illustrates how rule-based nodes excel when discriminative keywords align closely with diagnostic categories, enabling the ADT framework to remain efficient and interpretable while reserving deep learning models for cases where ambiguity or subtle clinical context makes pattern-based separation inadequate.

4.2. Text Normalization and Class-Specific Term Weighting

Clinical narratives exhibit substantial linguistic variability, including abbreviations, synonymous expressions, and negated statements. If these irregularities are not addressed systematically, they can distort the statistical representation of features and consequently impair the performance of classification models. To mitigate these effects, a preprocessing stage is introduced to harmonize terminology and remove misleading textual patterns. Domain-specific medical dictionaries are used to expand abbreviations and standardize non-canonical terminology (e.g., “CAD” to “coronary artery disease,” “HTN” to “hypertension”), ensuring terminological consistency across documents. Synonymous expressions are likewise normalized to their canonical clinical forms to reduce lexical variability. In addition, a negation-detection module identifies linguistic cues such as “no evidence of,” “denies,” or “without,” and excludes terms within their scope from downstream feature extraction. For example, in the phrase “no signs of pneumonia,” the term “pneumonia” is removed to preserve the intended clinical semantics. This preprocessing step is essential for maintaining the fidelity of diagnostic signals, as the presence of a condition fundamentally affects clinical interpretation. For simplicity, explicit statements indicating the absence of a condition are not further considered in this stage.
Following text normalization, the statistical contribution of each extracted n-gram to its respective ICD class is quantified through class-specific term weighting. For an n-gram, denoted as term t within class C, the weight W C t is computed as defined in Equation (2).
W C t = f C t v V C f C v
where f C t is the frequency of t in class C, and VC is the vocabulary of class C. This relative-frequency formulation emphasizes discriminative terms that occur more frequently within a given class compared with others, thereby strengthening their influence during subsequent classification.
A key complication arises from terms that are shared across multiple diagnostic categories. Expressions such as “shortness of breath” or “chest pain” can appear in both circulatory and respiratory disorder contexts, potentially blurring inter-class distinctions if weighted uniformly across categories. To address this, a maximum-weight assignment strategy is adopted: each n-gram is associated exclusively with the class in which it has the highest relative weight. Formally, for any term t occurring in multiple classes, we identify the most representative class C*(t) as defined in Equation (3).
C * ( t ) = a r g   max C W C ( t )
This procedure enforces disjoint vocabularies among classes, ensuring that ambiguous terms reinforce only their most relevant category and thereby reducing boundary confusion. Once class assignments are finalized, weights are normalized within each class to enhance comparability and balance the contributions of both frequent and infrequent terms. Specifically, the maximum weight in each class is scaled to one, and the remaining weights are adjusted proportionally. The normalized weight W ~ C t for a term t in class C is computed as in Equation (4).
W ~ C t = W C ( t ) m a x { W C v :   v     V C }
This normalization produces a coherent class-specific term-weight distribution for each ICD category, facilitating more interpretable decision-making within classification models. Terms with normalized weights close to one represent the most distinctive features of an ICD class and therefore act as strong discriminative indicators. In contrast, terms with lower normalized values contribute proportionally less to classification decisions. This scaling improves interpretability by making feature importance easier to understand and enhances model stability by preventing any single term from dominating across classes.
The complete preprocessing and weighting procedure is outlined in Algorithm 3, which operates on a labeled dataset Φ containing m ICD classes to generate a structured term-weight array for the extracted n-grams.
Algorithm 3: Text Normalization and Class-Specific Term Weighting
Input: A labeled dataset Φ with m ICD classes
Output: Normalized term-weight array W ~ for n-grams in each ICD class
1.  Initialize W C t to 0 for each n-gram t and each ICD class C
2.  for each FGDP d in Φ do
3.     Standardize medical terminology using domain dictionaries
4.     Remove negated expressions and their associated terms
5.     Extract n-grams from d and filter out irrelevant ones
6.  for each class C in the set of m ICD classes do
7.     Identify the set of n-grams I C associated with class C
8.     for each n-gram t in I C  do
9.     Compute W C t as in Equation (2)
10.   for each n-gram t appearing in multiple classes do
11.    Determine C * ( t ) as in Equation (3)
12.    Retain W C * t and set W C t = 0 for all C   C *
13.  Normalize all W ~ C t as in Equation (4)
14. return the normalized term-weight array W ~
As shown in Algorithm 3, the term-weight array W for all n-grams across all ICD classes is first initialized to zero. Each FGDP d in Φ is then preprocessed by standardizing medical terminology, removing negated expressions and their scoped terms, and filtering out irrelevant terms. After preprocessing, the algorithm identifies the n-grams associated with each ICD class and computes their class-specific weights using Equation (2). Next, the maximum-weight assignment rule in Equation (3) is applied so that each shared n-gram is retained only for the class in which it has the highest relative weight, ensuring that ambiguous terms reinforce their most representative category rather than weakening class boundaries. Finally, the term weights for each class are normalized according to Equation (4), scaling the most representative term in each class to one and adjusting all remaining terms proportionally. This produces a stable and comparable term-weight distribution across classes. The algorithm returns the fully normalized term-weight array W ~ , which serves as an interpretable basis for subsequent rule-based classification within the ADT framework.

4.3. Classification in Rule-Based Decision Nodes

Once the term-weight array W ~ has been established during preprocessing, it serves as the foundation for classifying a new FGDP d within rule-based decision nodes. Consider a decision node η, which branches into k subclasses corresponding either to intermediate groupings or to terminal ICD categories. The goal at this stage is to measure the degree of alignment between the incoming data point d and each subclass by using the weighted occurrence of informative n-grams. In this paper, we focus on unigrams and bigrams for illustrative purposes.
For each subclass C , a feature score F S ( C   |   d ) is computed based on the weighted occurrences of unigrams and bigrams present in d . Let I C denote the set of n-grams associated with subclass C . For each unigram u I C and bigram b I C , their observed frequencies in d , denoted by n u and n b , are multiplied by their corresponding class-specific term-weights W ~ C ( u ) and W ~ C ( b ) . Because bigrams capture richer contextual information than individual unigrams, their contribution is amplified by a factor of two. Given FGDP d, the scoring function F S ( C   |   d ) for class C is defined in Equation (5).
F S ( C   |   d ) = u     I C n u · W ~ C u + 2 · b     I C n b · W ~ C ( b )
Once feature scores are computed for all subclasses of node η, the data point d is routed to the subclass η* with the highest feature score, as defined in Equation (6).
η * = a r g   max C F S C   |   d i f   t h e   m a x i m i z e r   i s   u n i q u e , n u l l o t h e r w i s e .
where C is one of the k subclasses of node η. If the maximizer is not unique, the classification decision is ambiguous, and d cannot be reliably assigned to any single subclass.
This scoring process ensures that classification decisions are grounded in the most discriminative lexical features for each subclass, balancing frequent terms with the contextual specificity provided by n-grams. Because weights were normalized during preprocessing, the scores are directly comparable across subclasses, enabling efficient selection of the most likely category. If the selected node is intermediate, the process continues recursively until a leaf node is reached and an ICD code is assigned. By utilizing these weighted term-matching rules, rule-based nodes operate transparently and efficiently, particularly when the vocabulary offers strong separation among classes. This design minimizes computational overhead while fully exploiting explicit lexical cues in clinical text for accurate classification. The complete procedure for classification within a rule-based decision node η using the term-weight array is outlined in Algorithm 4.
Algorithm 4: Classification in a Rule-Based Decision Node
Input: FGDP d, term-weight array W ~ , and rule-based decision node η in an ADT with k subclasses
Output: Predicted ICD code category η *
1. Initialize predicted ICD code category η * = null
2. for each subclass C of node η do
3.  Initialize feature score FS(C|d) = 0
4.  for each unigram u in d do
5.     if  W ~ C u > 0 then
6.     Compute unigram frequency n u
7.  for each bigram b in d do
8.     if  W ~ C b > 0 then
9.     Compute bigram frequency n b
10.    Compute feature score FS(C|d) using Equation (5)
11. Identify subclass η * with the highest feature score using Equation (6)
12. return  η * as the predicted ICD category
As illustrated in Algorithm 4, the classification procedure at a rule-based decision node η evaluates how well the input FGDP d aligns with each of the k subclasses associated with that node. For each subclass C, the algorithm considers only those unigrams and bigrams whose class-specific weights are nonzero, ensuring that the computation focuses exclusively on terms relevant to that subclass. The frequencies of the matching unigrams and bigrams in d are extracted and used to compute the feature score FS(C|d) according to Equation (5), which integrates both the occurrence of each n-gram and its discriminative importance for subclass C. After all feature scores are computed, the algorithm determines the subclass η* with the highest score using Equation (6). This subclass represents the category whose lexical profile best matches the content of the input note. By relying solely on weighted and structurally meaningful n-grams, this method ensures that classification decisions remain interpretable, transparent, and computationally efficient during traversal of the ADT.

5. Constructing Deep Learning Nodes for Complex Decisions

5.1. Illustrative Case for Deep-Learning-Based Classification

Rule-based decision nodes are well-suited for cases where diagnostic categories can be separated by explicit class-specific lexical patterns. However, they become less effective when categories share overlapping terminology and can only be distinguished by subtle or implicit clinical evidence. An illustrative example is the task of differentiating within “Chronic Lower Respiratory Disease” between J44 (Other Chronic Obstructive Pulmonary Disease, COPD) and J45 (Asthma), where J44 and J45 are the ICD-10 codes for Other COPD and Asthma, respectively. Both conditions frequently reference overlapping symptoms such as “wheezing,” “shortness of breath,” and “chronic cough.” J44 is typically associated with smoking history or prolonged exposure to environmental irritants such as air pollution, leading to persistent airflow obstruction, whereas J45 is characterized by episodic airway narrowing that improves with treatment. Because the symptomatic vocabulary is largely shared, rule-based classification often lacks the discriminative power needed to separate these categories when key contextual indicators are not captured. Consider the following case, where “shortness of breath” and “wheezing” are clearly documented, but no references to smoking or environmental exposure are provided:
Patient presents with recurrent episodes of wheezing and shortness of breath, particularly at night. Symptoms improve noticeably after inhaler use.
A rule-based classifier would correctly assign this note to J45, as the episodic pattern and bronchodilator response are strongly indicative of asthma. Now consider a slightly different case:
Patient reports chronic cough and persistent wheezing, with long-term tobacco exposure. Spirometry shows consistently reduced airflow with no improvement after bronchodilator administration …
Here, a rule-based classifier may still focus on frequent terms such as “wheezing” and “cough” and misclassify the note as J45. In doing so, it fails to capture contextual cues, such as long-term tobacco exposure and irreversible airflow limitation, which point toward J44. Although tobacco exposure and spirometry results are key indicators of COPD, if they are absent from the set of n-grams associated with J44, they may have little or no influence on the classification outcome. This limitation arises from the inherent variability of clinical documentation. Some physicians describe COPD indirectly using phrases such as “chronic airflow obstruction” or “long-term exposure to irritants,” while others emphasize overlapping symptoms. Constructing an exhaustive dictionary of all possible synonyms, abbreviations, and contextual patterns for subtle cases is not feasible, particularly when documentation practices vary across institutions.
Deep learning models address this limitation by capturing semantic relationships and contextual dependencies rather than relying exclusively on exact keyword matches. Instead of requiring a predefined list of every COPD-related term, models such as PubMedBERT learn that expressions like “persistent wheezing,” “long smoking history,” or “irreversible obstruction” occurring alongside respiratory complaints strongly suggest J44. They generalize beyond surface-level patterns to identify latent associations between chronic exposure and disease progression, even when explicit mentions of COPD do not appear in the text. By integrating deep learning nodes at points in the ADT where keyword-based classifiability is low, the framework ensures that complex diagnostic relationships are captured accurately. This selective use of deep learning enhances prediction accuracy without requiring computationally intensive models at every node, thereby achieving a balance between interpretability, scalability, and semantic depth.

5.2. Fine-Tuning PubMedBERT for ICD Classification

In automated medical coding, a major challenge lies in interpreting the nuanced language of clinical notes, where diagnostic meaning often depends on context rather than isolated terms. Traditional embedding methods, such as bag-of-words or static word vectors, fall short because they assign the same representation to a word across different contexts, thereby failing to capture contextual variation. This limitation motivates the use of attention-based models that dynamically adapt word meaning based on surrounding text.
BERT (Bidirectional Encoder Representations from Transformers) introduced this paradigm by using multi-head self-attention mechanisms to capture contextual dependencies across entire sequences [26]. Building on BERT, PubMedBERT was developed as a domain-specific model pre-trained entirely on biomedical corpora, including millions of PubMed abstracts and full-text articles. This specialization enables PubMedBERT to learn domain-relevant terminology, abbreviations, and semantic relationships more effectively than general-purpose models. Importantly, pretrained language models have been shown to outperform traditional deep learning approaches such as LSTMs in a wide range of clinical text classification tasks [26,27]. Their ability to model bidirectional context, interpret latent associations, and generalize across diverse documentation styles makes them particularly well-suited for identifying subtle implicit diagnostic patterns in complex medical narratives and records.
During fine-tuning, PubMedBERT’s pre-trained parameters are adapted to capture the diagnostic distinctions required for ICD classification. This process allows the model to specialize in distinguishing ICD-10 categories that may appear linguistically similar but differ clinically in meaning and context. Unlike rule-based nodes that rely on explicit lexical patterns, PubMedBERT encodes the entire context of an FGDP, allowing it to recognize subtle and implicit diagnostic indicators. Each input sentence undergoes preprocessing, including normalization to canonical medical expressions, removal of negation markers with their scoped terms, and general text normalization to reduce variability. The preprocessed sentences are then concatenated into a single sequence to preserve contextual dependencies across the clinical notes. Through fine-tuning, the model’s biomedical knowledge is aligned with the phrasing and distribution of ICD-related FGDPs, further improving its ability to discriminate between closely related diagnostic categories.
To handle class imbalance in node-specific training data, we apply a simple resampling strategy before fine-tuning. Samples from the majority classes are randomly reduced, while samples from the minority classes are increased by randomly duplicating existing instances until the classes are balanced. This process is carried out at the FGDP level so that each child ICD category has a similar number of training examples. By balancing the data prior to training, all classes contribute equally to the loss, allowing standard cross-entropy loss to be used and enabling the model to learn meaningful semantic patterns rather than relying on class frequency.
The training process follows standard Transformer fine-tuning practices. The models are trained for five epochs and optimized with the AdamW optimizer, employing a base learning rate of 2 × 10−5, a batch size of 8, and a weight decay of 0.01. A learning-rate scheduler is used to dynamically modulate the base learning rate during training, improving optimization stability. To mitigate overfitting, the dropout regularization inherent to PubMedBERT’s Transformer layers is retained, and early stopping is applied by selecting the model checkpoint that achieves the highest validation F1-score during epoch-wise evaluation. Model performance is evaluated using accuracy, precision, recall, and F1-score, and both the trained model and tokenizer are stored for reproducibility. Through this fine-tuning process, PubMedBERT learns to capture clinical context and subtle diagnostic evidence, thereby supporting deep-learning nodes in the ADT to handle cases where rule-based reasoning is insufficient.

5.3. PubMedBERT-Based Classification for Complex Decisions

Once fine-tuned, the PubMedBERT model is deployed at deep-learning nodes within the ADT to perform inference on FGDPs. The model employs WordPiece tokenization with truncation and padding to a maximum sequence length of 512 tokens. Given a labeled FGDP d, it is preprocessed and tokenized into a sequence x = (x1, x2, …, xm), where m ≤ 512. Here, m denotes the number of non-padding tokens in the sequence; sequences shorter than 512 tokens are padded for batching, while longer sequences are truncated.
The tokenized sequence is mapped to embeddings through PubMedBERT’s embedding layer and subsequently processed by multiple Transformer encoder layers, where multi-head self-attention captures contextual semantics across the entire sequence. WordPiece tokenization helps handle rare clinical terminology and abbreviations by splitting unfamiliar or complex medical terms into subword units, ensuring reliable representation for sparse vocabulary items. Importantly, self-attention allows the model to capture long-range dependencies and subtle semantic relationships that are critical for distinguishing clinically similar ICD categories. This capability is particularly valuable for FGDPs containing implicit or context-dependent diagnostic information. Figure 3 illustrates this workflow, showing how an FGDP is tokenized, encoded through multiple transformer layers, and classified into an ICD category using the final [CLS] embedding.
Let h CLS denote the hidden-state vector associated with the [CLS] token at the output of the final Transformer encoder layer. This vector, referred to as the final [CLS] embedding, provides a compact sequence-level representation by aggregating contextual information from all input tokens through self-attention for an FGDP d. It is subsequently passed to a fully connected classification head, followed by a softmax activation function, to produce a probability distribution P C d over the k subclasses associated with the current deep-learning node η, where C { C 1 , C 2 ,   , C k } . The predicted ICD subclass η* is defined by Equation (7).
η * = a r g   max C P C   |   d i f   t h e   m a x i m i z e r   i s   u n i q u e , n u l l o t h e r w i s e .
where C is one of the k subclasses of node η. Algorithm 5 outlines the inference process for an FGDP d in deep learning node η with k subclasses using a PubMedBERT model Λ.
Algorithm 5: Classification in a Deep Learning Node Using PubMedBERT
Input: FGDP d, fine-tuned PubMedBERT model Λ, node η with k subclasses
Output: Predicted ICD code category η*
1.  Preprocess all sentences in d by normalizing terms and removing negations
2.  Concatenate the preprocessed sentences into a single sequence
3.  Tokenize the sequence x into WordPiece tokens, applying padding and truncation
4.  Generate embeddings E(x) using PubMedBERT’s embedding layer
5.  Pass (x) through PubMedBERT’s Transformer encoder to obtain hidden states h
6.  Extract the [CLS] token vector h CLS from the final encoder layer
7.  Feed h CLS into a fully connected classification head
8.  Apply softmax activation function to compute class probabilities P(Cd)
9.  Identify the predicted ICD code category η* as in Equation (7)
10.  return η*
As described in Algorithm 5, the input data point d is preprocessed, tokenized, and encoded using PubMedBERT. The [CLS] representation is then mapped to a probability distribution over the k subclasses, and the final prediction η* corresponds to the subclass with the highest probability. Because self-attention integrates information from the entire sequence, the model can detect implicit diagnostic indicators that may be spread across multiple sentences. This makes the inference process particularly effective when classification depends on long-range contextual relationships rather than isolated keywords. By embedding this inference mechanism within the ADT framework, complex cases are routed through deep-learning nodes only when necessary, ensuring both accuracy and computational efficiency. This enables deep learning nodes in the ADT to capture complex semantic cues beyond the scope of rule-based reasoning, thereby improving classification performance in challenging diagnostic scenarios.

6. Case Study

In this section, we present a detailed case study demonstrating the construction and effectiveness of the ADT framework for ICD-10 code prediction. The study was conducted using de-identified clinical notes from the MIMIC-IV database, restricted to 19 clinically relevant ICD-10 codes spanning the circulatory and respiratory categories. The primary objective of this case study is to illustrate the framework’s capacity to handle both straightforward and complex medical narratives for accurate and efficient medical coding. To operationalize this objective, the framework incorporates a preliminary keyword-based node screening step that guides node-type selection, assigning straightforward cases to rule-based logic while directing context-heavy cases to deep learning models. The dataset consists of 129,270 FGDPs and is partitioned into 80% for training and 20% for testing. Each deep-learning node is trained using only the FGDPs routed to that node during ADT construction, resulting in node-specific training sets ranging from approximately 3000 to 55,000 FGDPs, depending on the hierarchy level within the ADT and the prevalence of the associated diagnostic categories. All experiments were executed on a high-performance computing environment equipped with 1.0 TiB of RAM, an AMD EPYC 7543 32-core CPU, and two NVIDIA A100 80 GB PCIe GPUs.

6.1. Construction of an ADT Based on the ICD-10 Hierarchy

In this case study, we construct an ADT based on the ICD-10 hierarchy. The tree organizes clinical notes into 19 ICD-10 codes spanning circulatory and respiratory diseases, which naturally results in 16 clinically meaningful decision nodes when the relevant hierarchy levels are decomposed. This design balances clinical granularity with sufficient data availability at each node for reliable training and evaluation. The selected codes are drawn from the ICD-10-CM version used in the MIMIC-IV dataset and cover conditions such as hypertensive disease, ischemic heart disease, chronic lower respiratory disease, asthma, COPD, and respiratory failure. Figure 4 illustrates the constructed ADT, which routes each fine-grained clinical note from the root decision node through successive intermediate nodes to a leaf-level ICD code representing the final prediction. It is worth noting that the ADT framework is not restricted to a fixed number of nodes and can readily scale to larger hierarchies depending on the application.
Once the ADT is constructed, each decision node is assigned a classification method through a two-phase screening process. In Phase 1, the method evaluates the classifiability of FGDPs at each node using CKSs associated with its child nodes. Nodes with a classifiableRate exceeding 70% are provisionally designated as rule-based, while nodes below this threshold are assigned directly to deep learning models. The classifiableRate, computed as defined in Equation (1), measures the proportion of samples at a given node for which one child ICD category can be unambiguously identified based on dominant keyword evidence. This metric provides a quick estimate of how well lexical patterns align with the diagnostic labels. In Phase 2, nodes initially marked as rule-based undergo validation with a rule-based classifier. If accuracy exceeds 95%, the designation is retained; otherwise, the node is reassigned to deep learning. This second phase prevents over-reliance on keyword heuristics by ensuring that lexical cues are not only present but also consistently predictive. Nodes that fail this test typically involve overlapping terminology or nuanced phrasing, for which rule-based logic alone is inadequate. This adaptive mechanism ensures that each decision node is paired with the most reliable approach for its context.
Table 4 reports the Phase 1 outcomes, showing how classifiableRate determines whether nodes are routed to deep learning or advanced to Phase 2. Table 5 then presents the Phase 2 validation results, highlighting which provisionally rule-based nodes retain their designation and which are reassigned to deep learning when symbolic accuracy proves insufficient.
These two stages provide a systematic yet flexible means of matching each decision node with an appropriate level of model complexity. This design avoids unnecessary deep-learning computation for cases that are lexically clear, while maintaining high accuracy for medically complex scenarios that require deeper semantic understanding. As shown in Table 4 and Table 5, the screening process enables a principled, adaptive allocation of classification strategies: straightforward, lexically distinct splits (e.g., circulatory versus respiratory) are handled using symbolic rules, whereas context-dependent or overlapping categories are assigned to PubMedBERT-based models.
Building on these screening outcomes, the circulatory branch illustrates how rule-based nodes can effectively resolve distinctions such as I50.9 (Heart Failure, Unspecified) versus I35 (Nonrheumatic Aortic Valve Disorders) at the “Other Forms of Heart Disease” decision node, where terminology is precise and clearly separable. In contrast, more challenging cases arise at the “Hypertensive Disease” node, where differentiating I10 (Essential Hypertension) from I12 (Hypertensive Kidney Disease) requires a deeper semantic understanding of context. Both categories prominently feature the term “hypertension,” but only I12 involves renal impairment. In such situations, deep learning models are required to capture subtle contextual indicators related to comorbidities or renal-function markers that extend beyond simple keyword matching.
A similar structure is observed in the respiratory branch. Rule-based nodes are sufficient for conditions such as J96.01 (Acute respiratory failure with hypoxia) and J96.02 (Acute respiratory failure with hypercapnia) at the “Acute Respiratory Failure” decision node, where discriminative terms like “hypoxia” and “hypercapnia” provide clear lexical separation. However, other nodes demand more advanced modelling. At the “Chronic Lower Respiratory Disease” node, distinguishing J45 (Asthma) from J44 (Other COPD) is initially designated as rule-based, but Phase 2 reveals that the rule-based accuracy is only 91%, falling below the required threshold. As mentioned in Section 5.1, the overlap in symptoms, such as “wheezing,” “cough,” and “shortness of breath,” makes this classification substantially more complex. In this case, deep learning models are necessary to capture contextual evidence (e.g., smoking history, irreversible obstruction) that rule-based logic cannot adequately resolve.
This hierarchical design highlights the strengths of the ADT framework. Straightforward, high-confidence cases are delegated to rule-based nodes, improving computational efficiency while maintaining interpretability. In contrast, deep-learning models are applied selectively at nodes where subtle, context-dependent distinctions must be resolved, ensuring that accuracy is preserved where semantic complexity is high. By decomposing the classification task into successive layers, the ADT enhances scalability, as each node operates on a reduced subset of ICD codes and faces lower learning complexity. Through this balanced integration of efficiency and contextual modeling, the ADT framework offers a robust, scalable, and transparent solution for automated ICD-10 coding that accommodates varying levels of diagnostic complexity.

6.2. Analysis of Decision Nodes in the Constructed ADT

To further illustrate this adaptive behavior, we examine three representative decision nodes within the hierarchy: “Other Diseases of Respiratory System,” “Chronic Ischemic Heart Disease,” and “Chronic Lower Respiratory Disease.” These cases demonstrate how the framework responds to different diagnostic scenarios, including cases where rule-based classification is sufficient, cases that require deep learning, and a less common situation in which a node initially assigned to rule-based logic is later reassigned to deep learning due to insufficient performance.
When diagnostic terminology is clear and non-overlapping, rule-based logic is highly effective. For example, within the respiratory branch, the “Other Diseases of the Respiratory System” node distinguishes J96 (Acute respiratory failure) from J90 (Pleural effusion, not elsewhere classified) using distinct clinical terms such as “respiratory failure” and “pleural effusion.” The preliminary screening indicated that approximately 83% of FGDPs at this node were classifiable (Table 4), supporting the use of a rule-based approach. Subsequent evaluation showed that the rule-based classifier achieved accuracy comparable to the deep-learning model while requiring significantly fewer computational resources. Table 6 presents the performance comparison for this decision node.
As shown in Table 6, the rule-based model achieved an accuracy of 0.955 and an F1-score of 0.926, compared with an accuracy of 0.967 and an F1-score of 0.968 for the deep-learning model. This strong performance of the rule-based approach reflects the presence of explicit, non-overlapping clinical terminology, which enables reliable resolution of this decision node without requiring more complex semantic modeling.
In contrast, some decision nodes exhibit substantial overlap in clinical terminology and therefore require deep-learning models for accurate classification. A representative example occurs within the circulatory branch at the “Chronic Ischemic Heart Disease” node, which distinguishes among I25.10 (Atherosclerotic heart disease of native coronary artery without angina pectoris), I25.2 (Old myocardial infarction), and I25.5 (Ischemic cardiomyopathy). The clinical descriptions of these conditions frequently share terms such as “ischemia,” “infarction,” and “cardiomyopathy,” making them difficult to separate using rule-based logic alone. Preliminary screening indicated that only 45% of FGDPs at this node were classifiable (Table 4), suggesting that symbolic rules would be insufficient. Consequently, this node was assigned to a deep-learning model. Table 7 presents the corresponding performance comparison for this decision node.
As shown in Table 7, the rule-based approach achieved an accuracy of 0.830 and an F1-score of 0.699, whereas the deep-learning model substantially improved performance, reaching 0.975 accuracy and a 0.946 F1-score. This gain reflects the model’s ability to capture contextual clinical information, such as distinguishing a prior myocardial infarction (I25.2) from the progressive structural impairment characteristic of ischemic cardiomyopathy (I25.5). These results highlight that when substantial keyword overlap limits classifiability, deep learning becomes essential for achieving reliable classification performance.
Finally, there are less common cases in which the preliminary screening favors a rule-based approach, but subsequent evaluation reveals insufficient accuracy, necessitating a transition to deep learning. One such example arises in the respiratory branch at the “Chronic Lower Respiratory Disease” decision node, which distinguishes between J44 (Other COPD) and J45 (Asthma). The initial keyword-based screening indicated that approximately 70% of FGDPs at this node were classifiable (Table 4), suggesting that rule-based classification might be appropriate. However, further evaluation showed that rule-based performance was inadequate due to substantial overlap in symptom descriptions. Table 8 presents the performance comparison for this decision node.
As shown in Table 8, the rule-based classifier achieved an accuracy of 0.913 and an F1-score of 0.910; however, this performance was insufficient for reliable classification at this decision node. In contrast, the deep-learning model improved performance to 0.950 accuracy and a 0.949 F1-score, providing a better balance between precision and recall. This improvement reflects the model’s ability to capture contextual distinctions, such as progressive airflow limitation indicative of COPD versus episodic and reversible obstruction characteristic of asthma. Although such cases are relatively uncommon, they underscore the robustness of the ADT framework in adaptively deploying deep learning when rule-based logic is insufficient.

6.3. Comparative Analysis with a Pure Decision Tree Approach

To evaluate the effectiveness of the proposed ADT approach, we compare it with a PDT, which serves as a standard and interpretable baseline in text classification. PDT refers to a pure decision tree that relies solely on deterministic, feature-based decision rules using weighted n-gram features, without incorporating any deep learning components or contextual representation learning. This comparison allows us to clearly assess the additional benefits provided by ADT while avoiding unnecessary complexity. While the PDT design offers computational efficiency and interpretability, it is particularly vulnerable when diagnostic categories share overlapping terminology or when accurate classification requires inference from implicit contextual information.
Both approaches are evaluated using standard performance metrics, including accuracy, precision, recall, and F1-score. Unlike the earlier node-level evaluations, these results reflect the overall end-to-end performance of the complete framework across all decision nodes in the ICD code hierarchy, as illustrated in Figure 4. Table 9 summarizes the comparative performance of PDT and ADT.
As shown in Table 9, the PDT approach achieves an accuracy of 0.812, reflecting its ability to handle straightforward cases where explicit diagnostic terms are present. However, its reliance on predefined term weights limits its ability to interpret subtle clinical patterns, resulting in lower precision (0.794) and recall (0.810). These shortcomings are most evident in cases with ambiguous symptom descriptions or overlapping features. In contrast, the ADT framework substantially improves performance by selectively integrating deep-learning models at decision nodes where contextual understanding is critical. As shown in the table, ADT achieves an accuracy of 0.951 and an F1-score of 0.935, demonstrating a substantial improvement in both precision and recall. These results highlight ADT’s ability to balance computational efficiency with deeper semantic modeling.
Beyond improved predictive performance, the ADT framework offers greater flexibility in managing the trade-off between model complexity and adaptability. Unlike the static PDT, ADT applies rule-based classification for transparent, high-confidence decisions while reserving deep learning for diagnostically complex cases where richer semantic interpretation is required. This targeted use of deep learning allows the framework to address clinical ambiguity effectively without incurring unnecessary computational cost. In addition, the modular structure of ADT naturally supports incremental extension as ICD hierarchies evolve over time. New diagnostic classes can be incorporated through localized updates at relevant nodes, without requiring retraining of the entire model. This design improves scalability and simplifies long-term maintenance, making the ADT framework well suited for deployment in real-world clinical settings with evolving code systems and dynamic datasets.

6.4. Comparative Analysis with a Full Deep Learning-Based Decision Tree Approach

We further evaluate the efficiency of the ADT by comparing it with an FDL-based decision tree, in which every decision node is modeled using PubMedBERT. In this setting, all classification steps, regardless of complexity, rely on contextual embeddings derived from clinical text. While this approach is effective in capturing semantic nuances, applying deep learning uniformly across the decision tree incurs substantial computational cost and limits scalability for large ICD code hierarchies.
In contrast, ADT applies deep learning selectively, reserving it for semantically challenging nodes while using rule-based classification for high-confidence cases where discriminative keywords are sufficient. The FDL framework, by treating all nodes as requiring contextual inference, introduces unnecessary computation when simpler lexical rules would suffice. To quantify the scalability implications of these design choices, we simulated the incremental addition of between 1 and 150 new decision nodes. In each simulation, the proportion of nodes assigned to deep learning was randomly sampled between 30% and 40%, consistent with the 37% utilization observed in our case study (6 deep-learning nodes out of 16 total).
Training time for PubMedBERT-based nodes was sampled from 80–120 min, whereas rule-based nodes required only 10–15 min. The keyword-based node screening procedure introduced an additional overhead of 2–5 min per node. The total time required to integrate new nodes into the decision tree is estimated using Equation (8).
T t r a i n = n   ·   T D L + m   ·   T R B + ( n + m ) T s c r e e n
where n and m denote the numbers of new deep-learning and rule-based nodes, respectively, TDL is the training time per deep-learning node, TRB is the training time per rule-based node, and Tscreen is the screening overhead per node. The parameters T DL , T RB , and T screen are empirically estimated from observed training times in our experiments and are used to support scalability analysis rather than to report exact wall-clock performance for a specific hardware configuration. Using these empirically derived ranges, Equation (8) aggregates the expected training cost associated with adding both deep-learning and rule-based nodes, enabling a controlled comparison of how training time scales under the ADT and FDL frameworks.
Figure 5 presents the resulting training time comparison for the FDL and ADT approaches. As shown in the figure, the training cost of the FDL framework increases rapidly with the number of added nodes, since each requires expensive PubMedBERT fine-tuning. In contrast, ADT exhibits substantially better scalability: by retaining many nodes as rule-based classifiers, overall training time grows much more slowly. For example, when adding 100 new decision nodes, ADT requires approximately 4500 min of training time, whereas the FDL approach requires nearly 10,000 min. This difference represents a reduction of about 5500 min (approximately four days), corresponding to a 55% decrease in training time. Beyond these computational savings, ADT’s selective use of deep learning also reduces the demand for large annotated datasets, as only a subset of nodes require deep contextual training.
Overall, this comparative analysis demonstrates that the proposed ADT framework achieves a more favorable balance between modeling power and computational efficiency than an FDL-based decision tree. By selectively applying deep contextual models only where they are most beneficial, ADT significantly reduces training time and scalability constraints while preserving strong classification performance. These results highlight the practical advantages of ADT for large-scale ICD coding scenarios, where efficiency, interpretability, and incremental extensibility are critical considerations.

7. Conclusions and Future Work

In this study, we introduce an ADT framework for automated ICD coding that integrates deep learning-based classification with statistical, rule-based decision making in an Augmented Decision Tree. The proposed framework is designed to address several persistent challenges in medical text classification, particularly the need to balance predictive accuracy, computational efficiency, and scalability. Purely rule-based approaches often struggle when diagnostic categories share overlapping terminology or depend on implicit clinical context, whereas fully deep learning-based decision trees incur substantial computational costs and require large volumes of annotated data. In contrast, the ADT strategically applies deep learning models only at nodes where contextual inference is essential, while employing lightweight feature-scoring rules for diagnostically straightforward cases. This hybrid design not only achieves high predictive accuracy but also significantly reduces computational overhead. Importantly, it shifts the computational burden away from the majority of nodes, concentrating expensive contextual modeling only where it provides measurable benefit. Moreover, the hierarchical and modular structure of ADT supports seamless and incremental expansion. New ICD categories can be incorporated through localized updates with minimal retraining, allowing the framework to scale naturally as clinical datasets and coding hierarchies evolve. This modularity is particularly valuable in healthcare settings, where diagnostic taxonomies are frequently updated and models must adapt without requiring complete retraining. Although this study evaluates the framework using ICD-10 codes, enabled by the availability of large-scale public datasets such as MIMIC-IV, the ADT approach is not specific to any single coding system. Instead, it is designed to operate broadly on hierarchical coding structures, making it applicable to a wide range of clinical classification tasks.
Future research may further refine the ADT framework by analyzing training data to automatically identify relationships that extend beyond the predefined ICD-10 hierarchy, thereby producing tree structures that are more effective in terms of both classification accuracy and computational efficiency. We also plan to validate the ADT framework using large ICD-11-based datasets and to investigate how the richer semantic structure of ICD-11 may further enhance automated coding performance. Another promising direction is the systematic expansion of diagnosis-related terminology using standardized medical ontologies [25,28], followed by expert clinical validation. This process could strengthen the rule-based components of ADT and reduce reliance on deep-learning models. In addition, the manually selected thresholds used in the two-phase screening mechanism could be replaced with adaptive threshold learning strategies [29], allowing each decision node to dynamically adjust its classifiable rate and accuracy thresholds based on performance feedback. Further improvements may be achieved by enhancing FGDP quality through a lightweight sentence-level retrieval step that filters out irrelevant narrative content prior to deep learning. This approach is conceptually aligned with the clinically informed retrieval-augmented generation (CLI-RAG) framework [30], which retrieve task-relevant clinical evidence prior to model inference to improve robustness, efficiency, and interpretability. Finally, incorporating attention-based visualization techniques [31] could further enhance interpretability by highlighting the linguistic features most influential in each ICD code assignment, complementing both the explicit decision pathways of ADT and the transparent behavior of its rule-based nodes.

Author Contributions

Conceptualization, S.B., V.S.B., H.X. and J.C.; Methodology, S.B., V.S.B., H.X. and J.C.; Software, S.B., V.S.B. and H.X.; Validation, S.B., V.S.B. and H.X.; Formal analysis, S.B., V.S.B., H.X. and J.C.; Investigation, S.B., V.S.B., H.X. and J.C.; Resources, S.B., V.S.B. and H.X.; Data curation, S.B., V.S.B. and H.X.; Writing—original draft, S.B., V.S.B., H.X. and J.C.; Writing—review & editing, S.B., V.S.B., H.X. and J.C.; Supervision, H.X.; Project administration, H.X. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are openly available in [PgysioNet] at https://physionet.org/content/mimiciv/3.1/ (access on 20 May 2025) [MIMIC-IV].

Acknowledgments

We thank the editors and the anonymous referees for their careful review of this paper and the many valuable suggestions they provided.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ADTAugmented Decision Tree
APIApplication Programming Interface
BERTBidirectional Encoder Representations from Transformers
CKSClass-specific Keyword Set
CLI-RAGClinically Informed Retrieval-Augmented Generation
CNNConvolutional Neural Network
COPDChronic Lower Respiratory Disease
EHRElectronic Health Record
FDLFull Deep Learning
FGDPFine-Grained Data Point
GPTGenerative Pre-Trained Transformer
ICDInternational Classification of Diseases
ICUIntensive Care Unit
LATALabel Attention Transformer Architecture
LSTMLong Short-Term Memory
MIMICMedical Information Mart for Intensive Care
MLMachine Learning
NLPNatural Language Processing
PDTPure Decision Tree
WHOWorld Health Organization

References

  1. Seinen, T.M.; Kors, J.A.; van Mulligen, E.M.; Rijnbeek, P.R. Using structured codes and free-text notes to measure information complementarity in electronic health records: Feasibility and validation study. J. Med. Internet Res. 2025, 27, e66910. [Google Scholar] [CrossRef] [PubMed]
  2. Pan, J.; Lee, S.; Cheligeer, C.; Martin, E.A.; Rizazi, K.; Quan, H.; Li, N. Enhancing large language models with human expertise for disease detection in electronic health records. In Proceedings of the 2024 IEEE International Conference on Digital Health (ICDH), Shenzhen, China, 2024; IEEE: New York, NY, USA, 2024; pp. 129–131. [Google Scholar] [CrossRef]
  3. WHO. International Statistical Classification of Diseases and Related Health Problems (ICD); World Health Organization: Geneva, Switzerland, 2025. Available online: https://www.who.int/standards/classifications/classification-of-diseases (accessed on 12 October 2025).
  4. Goldstein, I.; Arzumtsyan, A.; Uzuner, Ö. Three approaches to automatic assignment of ICD-9-CM codes to radiology reports. In Proceedings of the American Medical Informatics Association Annual Symposium, 2007, Chicago, IL, USA, 10–14 November 2007; American Medical Informatics Association (AMIA): Washington, DC, USA, 2007; pp. 279–283. [Google Scholar]
  5. Johnson, A.E.W.; Bulgarelli, L.; Shen, L.; Gayles, A.; Shammout, A.; Horng, S.; Pollard, T.J.; Hao, S.; Moody, B.; Gow, B.; et al. MIMIC-IV, a freely accessible electronic health record dataset. Sci. Data 2023, 10, 1. [Google Scholar] [CrossRef] [PubMed]
  6. Baumel, T.; Nassour-Kassis, J.; Cohen, R.; Elhadad, M. Multi-label classification of patient notes: Case study on ICD code assignment. In Proceedings of the AAAI Conference on Artificial Intelligence, New Orleans, LA, USA, 2–7 February 2018; AAAI Workshops: Singapore, 2018; pp. 409–416. [Google Scholar]
  7. Carberry, J.; Xu, H. A hierarchical fine-grained deep learning model for automated medical coding. In Proceedings of the 2024 IEEE 3rd International Conference on Computing and Machine Intelligence (ICMI), Mt Pleasant, MI, USA, 13–14 April 2024; IEEE: New York, NY, USA, 2024; pp. 1–6. [Google Scholar] [CrossRef]
  8. Bhat, S.; Xu, H.; Carberry, J. Automated medical coding using a hybrid decision tree with deep learning nodes. In Proceedings of the 2025 IEEE 11th International Conference on Big Data Computing Service and Machine Learning Applications (BigDataService), Tucson, AZ, USA, 21–24 July 2025; IEEE: New York, NY, USA, 2025; pp. 81–88. [Google Scholar] [CrossRef]
  9. Gu, Y.; Tinn, R.; Cheng, H.; Lucas, M.; Usuyama, N.; Liu, X.; Naumann, T.; Gao, J.; Poon, H. Domain-specific language model pretraining for biomedical natural language processing. ACM Trans. Comput. Healthc. 2022, 3, 1–23. [Google Scholar] [CrossRef]
  10. Farkas, R.; Szarvas, G. Automatic construction of rule-based ICD-9-CM coding systems. BMC Bioinform. 2008, 9, S10. [Google Scholar] [CrossRef] [PubMed]
  11. Medori, J.; Fairon, C. Machine learning and features selection for semi-automatic ICD-9-CM encoding. In Proceedings of the NAACL HLT 2010 Second Louhi Workshop on Text and Data Mining of Health Documents, Association for Computational Linguistics, Los Angeles, CA, USA, June 2010; Association for Computational Linguistics: Stroudsburg, PA, USA, 2010; pp. 84–89. [Google Scholar]
  12. Singto, C.; Wongwirat, O. An automated ICD-10 code assigning system using a classification method. In Proceedings of the 2021 13th Biomedical Engineering International Conference (BMEiCON), Ayutthaya, Thailand, 19–21 November 2021; IEEE: New York, NY, USA, 2021; pp. 1–5. [Google Scholar] [CrossRef]
  13. Albokae, N.; AlKhtib, B.; Omar, K. Hybrid method for ICD prediction using word embedding and natural language processing. In Proceedings of the 2023 24th International Arab Conference on Information Technology (ACIT), Ajman, United Arab Emirates, 6–8 December 2023; IEEE: New York, NY, USA, 2023; pp. 1–5. [Google Scholar] [CrossRef]
  14. Harerimana, G.; Kim, G.I.; Kim, J.W.; Jang, B. HSGA: A hybrid LSTM-CNN self-guided attention to predict the future diagnosis from discharge narratives. IEEE Access 2023, 11, 106334–106346. [Google Scholar] [CrossRef]
  15. Falis, M.; Pajak, M.; Lisowska, A.; Schrempf, P.; Deckers, L.; Mikhael, S.; Tsaftaris, S.; O’Neil, A. Ontological attention ensembles for capturing semantic concepts in ICD code prediction from clinical text. In Proceedings of the Tenth International Workshop on Health Text Mining and Information Analysis (LOUHI 2019), Association for Computational Linguistics, Hong Kong, November 2019; Association for Computational Linguistics: Stroudsburg, PA, USA, 2019; pp. 168–177. [Google Scholar] [CrossRef]
  16. Merchant, A.M.; Shenoy, N.; Lanka, S.; Kamath, S. Ensemble neural models for ICD code prediction using unstructured and structured healthcare data. Heliyon 2024, 10, e36569. [Google Scholar] [CrossRef] [PubMed]
  17. Mayya, V.; Kamath, S.S.; Sugumaran, V. LATA-label attention transformer architectures for ICD-10 coding of unstructured clinical notes. In Proceedings of the 2021 IEEE Conference on Computational Intelligence in Bioinformatics and Computational Biology (CIBCB), Melbourne, Australia, 13–15 October 2021; IEEE: New York, NY, USA, 2021; pp. 1–7. [Google Scholar] [CrossRef]
  18. Liu, L.; Perez-Concha, O.; Nguyen, A.; Bennett, V.; Jorm, L. Hierarchical label-wise attention transformer model for explainable ICD coding. J. Biomed. Inform. 2022, 133, 104161. [Google Scholar] [CrossRef] [PubMed]
  19. Chen, Y.; Ren, J. Automatic ICD code assignment utilizing textual descriptions and hierarchical structure of ICD code. In Proceedings of the 2019 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), San Diego, CA, USA, 18–21 November 2019; IEEE: New York, NY, USA, 2019; pp. 348–353. [Google Scholar] [CrossRef]
  20. Wang, S.; Tang, D.; Zhang, L.; Li, H.; Han, D. HieNet: Bidirectional hierarchy framework for automated ICD coding. In Database Systems for Advanced Applications. DASFAA 2022. Lecture Notes in Computer Science; Bhattacharya, A., Li, J., Agrawal, D., Reddy, P.K., Mohania, M., Mondal, A., Goyal, V., Kiran, R.U., Eds.; Springer: Cham, Switzerland, 2022; Volume 13246, pp. 523–539. [Google Scholar] [CrossRef]
  21. Xi, S.; Shi, J.; Yan, J.; Lin, M.; Zhou, X.; Cheng, Y.; Ding, H.; Kang, C.C. Breaking barriers in ICD classification with a robust graph neural network for hierarchical coding. Sci. Rep. 2025, 15, 25676. [Google Scholar] [CrossRef] [PubMed]
  22. Perotte, A.; Pivovarov, R.; Natarajan, K.; Weiskopf, N.; Wood, F.; Elhadad, N. Diagnosis code assignment: Models and evaluation metrics. J. Am. Med. Inform. Assoc. 2014, 21, 231–237. [Google Scholar] [CrossRef] [PubMed]
  23. Wu, Y.; Zeng, M.; Fei, Z.; Yu, Y.; Wu, F.-X.; Li, M. KAICD: A knowledge attention-based deep learning framework for automatic ICD coding. Neurocomput 2022, 469, 376–383. [Google Scholar] [CrossRef]
  24. Sen, C.; Ye, B.; Aslam, J.; Tahmasebi, A. From extreme multi-label to multi-class: A hierarchical approach for automated ICD-10 coding using phrase-level attention. arXiv 2022. [Google Scholar] [CrossRef]
  25. Carberry, J.; Xu, H. Fine-grained ICD code assignment using ontology-based classification. In Proceedings of the 2022 IEEE 23rd International Conference on Information Reuse and Integration for Data Science (IRI), 9–11 August 2022; IEEE: New York, NY, USA, 2022; pp. 228–233. [Google Scholar] [CrossRef]
  26. Devlin, J.; Chang, M.; Lee, L.; Toutanova, K. BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv 2019. [Google Scholar] [CrossRef]
  27. Zhuang, Y.; Zhang, J.; Li, X.; Liu, C.; Yu, Y.; Dong, W.; He, K. Autonomous international classification of diseases coding using pretrained language models and advanced prompt learning techniques: Evaluation of an automated analysis system using medical text. JMIR Med. Inform. 2025, 13, e63020. [Google Scholar] [CrossRef] [PubMed]
  28. Jovic, A.; Prcela, M.; Gamberger, D. Ontologies in medical knowledge representation. In Proceedings of the 29th International Conference on Information Technology Interfaces, Cavtat, Croatia, 2007; IEEE: New York, NY, USA, 2007; pp. 535–540. [Google Scholar] [CrossRef]
  29. Shamatrin, D. Adaptive thresholding for multi-label classification via global-local signal fusion. arXiv 2025. [Google Scholar] [CrossRef]
  30. Keerthana, G.; Gupta, M. CLI-RAG: A retrieval-augmented framework for clinically structured and context aware text generation with LLMs. arXiv 2025. [Google Scholar] [CrossRef]
  31. Chefer, H.; Gur, S.; Wolf, L. Transformer interpretability beyond attention visualization. In Proceedings of the 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 2021; IEEE: New York, NY, USA, 2021; pp. 782–791. [Google Scholar] [CrossRef]
Figure 1. Generating FGDPs from a doctor’s notes (adapted from [25]).
Figure 1. Generating FGDPs from a doctor’s notes (adapted from [25]).
Analytics 05 00011 g001
Figure 2. A conceptual example of an ADT for automated ICD coding.
Figure 2. A conceptual example of an ADT for automated ICD coding.
Analytics 05 00011 g002
Figure 3. ICD code prediction on a FGDP using PubMedBERT.
Figure 3. ICD code prediction on a FGDP using PubMedBERT.
Analytics 05 00011 g003
Figure 4. A constructed ADT with 16 decision nodes.
Figure 4. A constructed ADT with 16 decision nodes.
Analytics 05 00011 g004
Figure 5. Training time comparison for the FDL and ADT approaches.
Figure 5. Training time comparison for the FDL and ADT approaches.
Analytics 05 00011 g005
Table 1. Comparison of representative ICD coding approaches across related-work categories.
Table 1. Comparison of representative ICD coding approaches across related-work categories.
CategoryCore MethodologyICD Hierarchy UtilizationInterpretabilityScalabilityComputational Cost
Rule-Based & Classical ML [4,10,11,12]Handcrafted rules, decision trees, Naïve Bayes, statistical featuresNoHighLimitedLow
Deep Learning-Based Models [13,14,15,16]CNN, LSTM, attention, contextual embeddingsNoLowLowHigh
Hierarchy-Aware Deep Learning [17,18,19,20,21]Transformers, Tree-LSTM, hierarchical attention, graph modelsYesLowLowVery High
Decomposed & Hybrid Frameworks [22,23,24]Hierarchical classifiers, phrase-level attention, staged pipelinesPartialModerateLimitedModerate
Proposed ADTHybrid rule-based + PubMedBERT with automated node screeningYesHighHighModerate
Table 2. Prompts for deriving semantically related terms to “Asthma.”.
Table 2. Prompts for deriving semantically related terms to “Asthma.”.
User Message (Prompt)Related Terms (GPT-5 Output)
List diagnostic terms or related medical conditions for “Asthma.”Asthma, bronchial asthma, allergic asthma, airway disease, chronic airway inflammation
List common symptoms and signs associated with “Asthma.”Wheezing, shortness of breath, chest tightness, coughing, difficulty breathing
List common diagnostic or monitoring procedures associated with “Asthma.”Spirometry, peak flow measurement, bronchodilator test, allergy testing
List medications or treatment options typically prescribed for “Asthma.”Inhalers, bronchodilators, corticosteroids, leukotriene modifiers, nebulizers
Table 3. The class-specific keyword set for node “Essential Hypertension (I10).”.
Table 3. The class-specific keyword set for node “Essential Hypertension (I10).”.
CategoriesRepresentative Keywords (GPT-5 Output)
Diagnoseshypertension, high blood pressure, vasoconstriction, left ventricular hypertrophy, vascular resistance
Symptomsheadache, dizziness, blurred vision, ringing in ears, chest pressure, fatigue
Proceduresblood pressure screening, sphygmomanometry, clinical check-up, telemonitoring, triage assessment
Medicationscandesartan, labetalol, amlodipine, lisinopril, hydrochlorothiazide
Table 4. Results of keyword-based node screening—Phase 1.
Table 4. Results of keyword-based node screening—Phase 1.
Decision NodeClassifiable RatePhase 1 Result
Root Decision Node83%Rule-based
Circulatory Disease79%Rule-based
Hypertensive Disease45%Deep Learning
Hypertensive-chronic Kidney Disease81%Rule-based
Chronic Ischemic Heart Disease45%Deep Learning
Other Forms of Heart Diseases82%Rule-based
Nonrheumatic Aortic Valve Disorder45%Deep Learning
Respiratory Disease86%Rule-based
Chronic Lower Respiratory Disease70%Rule-based
Other COPD81%Rule-based
Asthma82%Rule-based
Mild Intermittent Asthma86%Rule-based
Unspecified Asthma49%Deep Learning
Other Diseases of Respiratory System83%Rule-based
Respiratory Failure42%Deep Learning
Acute Respiratory Failure81%Rule-based
Table 5. Results of keyword-based node screening—Phase 2.
Table 5. Results of keyword-based node screening—Phase 2.
Decision NodeRule-Based AccuracyPhase 2 Result
Root Decision Node98%Rule-based
Circulatory Disease98%Rule-based
Hypertensive-chronic Kidney Disease96%Rule-based
Other Forms of Heart Diseases97%Rule-based
Respiratory Disease99%Rule-based
Chronic Lower Respiratory Disease91%Reassigned to Deep Learning
Other COPD95%Rule-based
Asthma97%Rule-based
Mild Intermittent Asthma95%Rule-based
Other Diseases of Respiratory System96%Rule-based
Acute Respiratory Failure95%Rule-based
Table 6. Performance comparison at the “Other Diseases of Respiratory System” decision node.
Table 6. Performance comparison at the “Other Diseases of Respiratory System” decision node.
Decision NodeAccuracyPrecisionRecallF1-Score
Rule-Based0.9550.9310.9250.926
Deep Learning0.9670.9580.9780.968
Table 7. Performance comparison at the “Chronic Ischemic Heart Disease” decision node.
Table 7. Performance comparison at the “Chronic Ischemic Heart Disease” decision node.
Decision NodeAccuracyPrecisionRecallF1-Score
Rule-Based0.8300.7630.6780.699
Deep Learning0.9750.9720.9240.946
Table 8. Performance comparison at the “Chronic Lower Respiratory Disease” decision node.
Table 8. Performance comparison at the “Chronic Lower Respiratory Disease” decision node.
Decision NodeAccuracyPrecisionRecallF1-Score
Rule-Based0.9130.9070.9230.910
Deep Learning0.9500.9480.9500.949
Table 9. Performance comparison: PDT vs. ADT.
Table 9. Performance comparison: PDT vs. ADT.
ApproachAccuracyPrecisionRecallF1-Score
PDT0.8120.7940.8100.779
ADT0.9510.9390.9470.935
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Bhat, S.; Bandi, V.S.; Xu, H.; Carberry, J. Integrating Deep Learning Nodes into an Augmented Decision Tree for Automated Medical Coding. Analytics 2026, 5, 11. https://doi.org/10.3390/analytics5010011

AMA Style

Bhat S, Bandi VS, Xu H, Carberry J. Integrating Deep Learning Nodes into an Augmented Decision Tree for Automated Medical Coding. Analytics. 2026; 5(1):11. https://doi.org/10.3390/analytics5010011

Chicago/Turabian Style

Bhat, Spoorthi, Veda Sahaja Bandi, Haiping Xu, and Joshua Carberry. 2026. "Integrating Deep Learning Nodes into an Augmented Decision Tree for Automated Medical Coding" Analytics 5, no. 1: 11. https://doi.org/10.3390/analytics5010011

APA Style

Bhat, S., Bandi, V. S., Xu, H., & Carberry, J. (2026). Integrating Deep Learning Nodes into an Augmented Decision Tree for Automated Medical Coding. Analytics, 5(1), 11. https://doi.org/10.3390/analytics5010011

Article Metrics

Back to TopTop