Knowledge-Enhanced Generative Framework for Low-Resource Clinical Coding
# KE-Coder
## Data-driven Comorbidity Network as Symbolic Constraints: A Knowledge-Enhanced Generative Framework for Low-Resource Clinical Coding
## Overview
This repository contains the official implementation of KE-Coder, a knowledge-enhanced generative framework for automated ICD coding. The framework integrates medical definition constraints ($$K_{def}$$), retrieval-augmented case knowledge ($$K_{rag}$$), and cross-modal structural consistency validation to improve the accuracy and reliability of clinical coding under low-resource conditions.
The model explicitly targets the multi-label classification of 8 core thoracic diseases and leverages the predicted structural comorbidity matrices to align with real-world clinical concurrent patterns.
## Project Structure
├── data/ # Raw and intermediate processed data (Not tracked by Git)
├── dataset_build/ # Data cleaning, entity matching, and quintuple generation
├── knowledge_base/ # Medical dictionary and definition building modules
├── prompts/ # Prompt templates (System, Baseline, KE-Coder, Few-shot)
├── train/ # Fine-tuning scripts for LLMs (Vanilla & KE-Coder)
├── inference/ # Inference engine for multi-label disease prediction
├── evaluation/ # Metrics calculation (AUC, F1, PCC, MSE) and comorbidity analysis
├── scripts/ # Bash scripts for automating the pipeline
├── results/ # Output directory for predictions and evaluation reports
├── README.md # Project documentation
└── requirements.txt # Python environment dependencies
### Dataset Preparation
Public Datasets Required :All datasets used in this work are publicly available but require official credentialed access and approval via PhysioNet. The underlying datasets include: MIMIC-III, MIMIC-IV, MIMIC-CXR
Due to data privacy and compliance, raw data cannot be directly provided in this repository. You …