NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Code Synonyms Do Matter: Multiple Synonyms Matching Network for Automatic ICD Coding

Zheng Yuan, Chuanqi Tan, Songfang Huang

Abstract

Automatic ICD coding is essential for clinical documentation and billing but faces a significant semantic gap between official code descriptions and the varied language used by clinicians. This paper presents the Multiple Synonyms Matching Network (MSMN), which utilizes medical synonyms from the UMLS Metathesaurus to bridge this gap. By treating synonyms as multiple queries in an attention-based framework and employing a biaffine similarity mechanism, MSMN achieves state-of-the-art performance on the MIMIC-III benchmark, particularly improving accuracy for rare codes.

Introduction

Assigning International Classification of Diseases (ICD) codes to clinical notes is a complex task due to the "semantic gap." Official descriptions are often formal (e.g., "Unspecified hypothyroidism"), while discharge summaries use colloquial or technical variations (e.g., "low t4"). Existing models that rely solely on official descriptions often fail to capture these nuances. The authors of this paper argue that "Code Synonyms Do Matter" and propose a novel architecture to incorporate diverse medical terminology into the coding process.

Methods

The Multiple Synonyms Matching Network (MSMN) introduces three core components to address the limitations of standard ICD coding models:

  1. Synonym Collection: The model aligns ICD codes with the UMLS Metathesaurus, extracting a diverse set of synonyms for each code.
  2. Multi-synonyms Attention: Inspired by multi-head attention, this mechanism uses each synonym as a unique query. It allows the model to scan clinical text through multiple semantic lenses simultaneously, identifying relevant evidence for various disease name variations.
  3. Biaffine Similarity for Classification: To better handle the "long tail" of rare diseases, MSMN replaces simple linear layers with a biaffine transformation. This approach measures similarity between text and code representations using code-independent parameters, enhancing generalization to infrequent codes.
Overview of the MSMN architecture showing synonym-based attention and biaffine matching.

The architecture utilizes a Bi-LSTM encoder, which the authors found to be more effective than large-scale pre-trained models like BERT for the highly technical and domain-specific language of clinical notes.

Datasets and Experimental Setup

The model was evaluated on the MIMIC-III dataset, the standard benchmark for clinical NLP. Two specific settings were tested:

  • MIMIC-III Full: Includes the complete set of over 8,000 codes, emphasizing the model's performance on rare diseases.
  • MIMIC-III 50: Focuses on the 50 most frequent codes to compare against established baselines.

Results

MSMN demonstrated superior performance across multiple metrics compared to previous state-of-the-art models. On the MIMIC-III Full dataset, it achieved a Macro-AUC of 95.0, a significant 2.0-point improvement over previous benchmarks. On the MIMIC-III 50 subset, the model reached a Macro-F1 of 68.3.

Performance comparison of MSMN against baseline models on the MIMIC-III 50 dataset.

Ablation studies confirmed that increasing the number of synonyms ($M$) directly correlates with improved performance, validating the core hypothesis that broader vocabulary coverage is essential for accurate coding.

Discussion and Key Insights

The success of MSMN highlights that coverage is king in medical AI. By expanding search terms through synonyms, the model uncovers evidence that single-description models miss. Furthermore, the biaffine transformation proves robust for the "long tail" problem, as it learns a general matching function rather than specific weights for every individual code. Visualization via t-SNE also revealed that the model implicitly learns medical hierarchies, clustering related clinical conditions naturally even without explicit hierarchical supervision.

Conclusion

While MSMN significantly advances the state-of-the-art, challenges remain in stabilizing performance for extremely rare codes. Future research may explore more targeted synonym selection strategies or the integration of deeper medical knowledge graphs to further enhance the model's diagnostic reasoning capabilities.

Summary updated

BibTeX
@inproceedings{yuan2022code,
  author = {Zheng Yuan and Chuanqi Tan and Songfang Huang},
  title = {{Code Synonyms Do Matter: Multiple Synonyms Matching Network for Automatic ICD Coding}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.acl-short.91},
}
Figure