1 School of Information Management, Xinjiang University of Finance and Economics, Urumqi 830012, China
2 Xinjiang Technical Institute of Physics and Chemistry, Chinese Academy of Sciences, Urumqi 830012, China
Show less
文章历史+
Received
Published
Revised
2025-05-15
2026-04-28
2025-11-19
Online Date
2026-05-29
PDF (4772K)
摘要
国际疾病分类(International Classification of Diseases, ICD)编码任务将医学编码分配给电子健康记录(electronic health record, EHR),为医疗报销、临床决策等医疗服务提供支持。目前,ICD自动编码方法大多将注意力集中在学习临床文本表示和建模标签关联,忽略了现有相似实例中蕴含丰富的知识。针对该问题,提出一种基于去偏对比学习和最近邻机制的ICD自动编码方法。首先,利用编码同义词注意力提取编码特定文本表示,并通过去偏对比学习优化文本嵌入;在预测阶段,将训练样本作为参考,使用k近邻(k-nearest neighbors,KNN)检索邻近实例;最后对以上两部分预测结果进行加权求和得到最终编码预测得分。在MIMIC-Ⅲ数据集的两个子集上的实验结果表明,该模型相较于基准模型在Macro-F1和P@5指标上分别提升0.6%~1.1%和0.5%~0.7%,验证了模型的有效性。
Abstract
The International Classification of Diseases (ICD) coding task assigns medical codes to electronic health records (EHR), supporting healthcare services such as medical reimbursement and clinical decision-making. Current ICD automatic coding methods primarily focus on learning clinical text representations and modeling label correlations, while the rich knowledge contained in similar instances is often overlooked. To address this issue, a novel ICD automatic coding method based on debiased contrastive learning and a k-nearest neighbors (KNN) mechanism was proposed. Firstly, coding synonym attention was used to extract code-related text representations, which were then optimized through debiased contrastive learning. During the inference phase, training samples were used as references and KNN was employed to retrieve similar instances. Finally, the results from both components were combined using a weighted sum to generate the final coding prediction score. Experimental results on two subsets of the MIMIC-III dataset show that the proposed model improves the baseline in terms of Macro-F1 and P@5 metrics by 0.6%~1.1% and 0.5%~0.7%, respectively, validating the effectiveness of the method.
XU Chun, LI Ye-ting, SONG Luan-yu.
ICD Automatic Coding Based on Debiased Contrastive Learning and Nearest Neighbor Mechanism[J].
Science Technology and Engineering, 2026, 26(12): 5164-5171 DOI:10.12404/j.issn.1671-1815.2503609
国际疾病分类(International Classification of Diseases,ICD)是世界卫生组织制定的疾病分类标准,广泛应用于健康监测、医学数据分析和医疗报销等领域。ICD编码任务通过分析电子健康记录(electronic health record, EHR)中的临床信息,将患者的诊断和治疗过程转化为标准化编码,对流行病的研究、医疗报销以及临床决策等具有重要意义[1]。传统的ICD编码任务依赖专业编码人员从EHR中人工提取临床特征并完成编码转化。随着医疗数据规模的快速增长,传统方法在处理海量EHR文本、应对临床术语书写差异及复杂编码规则时显得耗时耗力且容易出错[2]。近年来,基于人工智能的ICD自动编码技术,凭借其在提高编码效率和准确率方面的显著优势,引起了学术界和医疗行业的广泛关注[3]。
由于同一ICD编码在EHR中可能对应多种表述,编码描述难以为编码表示提供全面的信息。统一医学语言系统(unified medical language system,UMLS)作为一个综合性生物医学词汇资料库,包含所有ICD编码的多种同义词。采用ULMS中的同义词对编码描述进行扩展,能有效弥补不同表述方式带来的语义偏差。
为了全面评估模型在ICD编码任务中的性能,使用ROC(receiver operating characteristic)曲下面积(area under the curve, AUC)、微平均F1(Micro-F1)、宏平均F1值(Macro-F1)以及精确度(P@k)作为评估指标,计算公式如式(17)~式(20)所示。微平均(micro-averaged)将所有类别的预测结果汇总到一个全局混淆矩阵,然后基于该矩阵计算整体指标。宏平均(macro-averaged)则将每个标签的指标分别计算出来后取平均值,能更好地反映稀有标签的表现。P@k表示前k个预测标签中正确标签所占的比例。
MerchantA M, ShenoyN, LankaS, et al. Ensemble neural models for ICD code prediction using unstructured and structured healthcare data[J]. Heliyon, 2024, 10(17): 36569.
[2]
YanC, FuX, LiuX, et al. A survey of automated international classification of diseases coding: development, challenges, and applications[J]. Intelligent Medicine, 2022, 2(3): 161-173.
[3]
DongH, FalisM, WhiteleyW, et al. Automated clinical coding: what, why, and where we are?[J]. NPJ Digital Medicine, 2022, 5(1): 159.
[4]
LuP, XueJ. Combining transformer-based model and GCN to predict ICD codes from clinical records[J]. Knowledge-Based Systems, 2023, 282: 111113.
[5]
BaiT, VuceticS. Improving medical code prediction from clinical text via incorporating online knowledge sources[C]// The WorldWide Web Conference. New York: ACM, 2019: 72-82.
[6]
JiS, LiX, SunW, et al. A unified review of deep learning for automated medical coding[J]. ACM Computing Surveys, 2024, 56(12): 1-41.
SongYuting, YuBengong. Multi-label classification with multi-granularity and label semantic co-occurrence features[J]. Science Technology and Engineering, 2023, 23(16): 6959-6966.
[9]
LiF, YuH. ICD coding from clinical text using multi-filter residual convolutional neural network[C]// Proceedings of the AAAI Conference on Artificial Intelligence. Philadelphia: AAAI, 2020: 8180-8187.
[10]
WangX, MercerR E, RudziczF. Auxiliary knowledge-induced learning for automatic multi-label medical document classification[J]. arXiv Preprint, arXiv:2405.19084, 2024.
[11]
LiuZ, LiuX, WenY, et al. TreeMAN: tree-enhanced multimodal attention network for ICD coding[J]. arXiv Preprint, arXiv:2305.18576, 2023.
[12]
ChenJ, LiX, XiJ, et al. Rare codes count: mining inter-code relations for long-tail clinical text classification[C]// Proceedings of the 5th Clinical Natural Language Processing Workshop. Toronto: ACL, 2023: 403-413.
XuChun, TuErmei, MaZhilong. Hierarchical automated ICD encoding method based on label attention[J]. Computer Engineering and Design, 2023, 44(7): 2207-2213.
[15]
DongH, Suárez-PaniaguaV, WhiteleyW, et al. Explainable automated coding of clinical notes using hierarchical label-wise attention networks and label embedding initialisation[J]. Journal of Biomedical Informatics, 2021, 116: 103728.
[16]
YuanZ, TanC, HuangS. Code synonyms do matter: multiple synonyms matching network for automatic ICD coding[J]. arXiv Preprint, arXiv:2203.01515, 2022.
[17]
Hou WWangX, WangY, et al. Modelling long medical documents and code associations for explainable automatic ICD coding[J]. Expert Systems with Applications, 2024, 249: 123519.
ZhangQuanmei, HuangRunping, TengFei, et al. Automatic international classification of disease coding method incorporating heterogeneous information[J]. Journal of Computer Applications, 2024, 44(8): 2476-2482.
[20]
WuY, ChenX, YaoX, et al. Hyperbolic graph convolutional neuralnetwork with contrastive learning for automated ICD coding[J]. Computers in Biology and Medicine, 2024, 168: 107797.
[21]
LuoJ, WangX, WangJ, et al. Corelation: Boosting automatic icd coding through contextualized code relation learning[J]. arXiv Preprint, arXiv: 2402.15700, 2024.
[22]
CaoP, ChenY, LiuK, et al. HyperCore: hyperbolic and co-graph representation for automatic ICD coding[C]// Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Toronto: ACL, 2020: 3105-3114.
[23]
VaswaniA, ShazeerN, ParmarN, et al. Attention is all you need[J]. Advances in Neural Information Processing Systems, 2017, 30: 3762.
ChenZexiong, WangPing, JiangSong, et al. Diagnosis of interstitial lung disease based on multi-feature fusion contrast learning retrieval[J]. Science Technology and Engineering, 2025, 25(11): 4476-4482.
[26]
ChengZ, JiangZ, YinY, et al. A debiased nearest neighbors framework for multi-label text classification[J]. arXiv Preprint, arXiv:2408.03202, 2024.
[27]
MullenbachJ, WiegreffeS, DukeJ, et al. Explainable prediction of medical codes from clinical text[J]. arXiv Preprint, arXiv: 1802.05695, 2018.
[28]
VuT, NguyenD Q, NguyenA. A label attention modelfor ICD coding from clinical text[J]. arXiv Preprint, arXiv: 2007.06351, 2020.
[29]
HuangC W, TsaiS C, ChenY N. PLM-ICD: automatic ICD coding with pretrained language models[C]// Proceedings of the 4th Clinical Natural Language Processing Workshop. Seattle, WA: Association for Computational Linguistics, 2022: 10-20.
[30]
LiY, WehbeR M, AhmadF S, et al. Clinical-longformer and clinical-bigbird: Transformers for long clinical sequences[J]. arXiv Preprint, arXiv: 2201.11838, 2022.
[31]
AlsentzerE, MurphyJ R, BoagW, et al. Publicly available clinical BERT embeddings[J]. arXiv Preprint, arXiv:1904.03323,2019.