{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/plm-icd-automatic-icd-coding-with-pretrained-1","title":"PLM-ICD: Automatic ICD Coding with Pretrained Language Models","arxiv_id":"2207.05289","date":"2022-07-12","proceeding":"NAACL (ClinicalNLP) 2022 7","authors":["Chao-Wei Huang","Shang-Chi Tsai","Yun-Nung Chen"],"abstract":"Automatically classifying electronic health records (EHRs) into diagnostic codes has been challenging to the NLP community. State-of-the-art methods treated this problem as a multilabel classification problem and proposed various architectures to model this problem. However, these systems did not leverage the superb performance of pretrained language models, which achieved superb performance on natural language understanding tasks. Prior work has shown that pretrained language models underperformed on this task with the regular finetuning scheme. Therefore, this paper aims at analyzing the causes of the underperformance and developing a framework for automatic ICD coding with pretrained language models. We spotted three main issues through the experiments: 1) large label space, 2) long input sequences, and 3) domain mismatch between pretraining and fine-tuning. We propose PLMICD, a framework that tackles the challenges with various strategies. The experimental results show that our proposed framework can overcome the challenges and achieves state-of-the-art performance in terms of multiple metrics on the benchmark MIMIC data. The source code is available at https://github.com/MiuLab/PLM-ICD","url_abs":"https://arxiv.org/abs/2207.05289v1","url_pdf":"https://arxiv.org/pdf/2207.05289v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"plm-icd-automatic-icd-coding-with-pretrained-1","repo_url":"https://github.com/miulab/plm-icd","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"plm-icd-automatic-icd-coding-with-pretrained-1","repo_url":"https://github.com/innerNULL/PLM-ICD-multi-label-classifier","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"diagnostic","task_name":"Diagnostic"},{"task_slug":"natural-language-understanding","task_name":"Natural Language Understanding"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2207.05289","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.05289"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/miulab/plm-icd","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/innerNULL/PLM-ICD-multi-label-classifier","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":11},"by_repo_kind":{"official":{"samples":3,"ran":0,"repositories":1},"listed":{"samples":8,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"31705066a68f09b9","entry":"all_macro","repo":"miulab/plm-icd","repo_kind":"official","path":"src/evaluation.py","file_url":"https://github.com/miulab/plm-icd/blob/HEAD/src/evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"31705066a68f09b9"}},{"code_sha256_prefix":"8395cbccd644787f","entry":"all_metrics","repo":"miulab/plm-icd","repo_kind":"official","path":"src/evaluation.py","file_url":"https://github.com/miulab/plm-icd/blob/HEAD/src/evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8395cbccd644787f"}},{"code_sha256_prefix":"6270d9b8cb7698a3","entry":"all_micro","repo":"miulab/plm-icd","repo_kind":"official","path":"src/evaluation.py","file_url":"https://github.com/miulab/plm-icd/blob/HEAD/src/evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6270d9b8cb7698a3"}},{"code_sha256_prefix":"508a7ef7c9efe649","entry":"bce_with_logits","repo":"innerNULL/PLM-ICD-multi-label-classifier","repo_kind":"listed","path":"src/plm_icd_multi_label_classifier/loss.py","file_url":"https://github.com/innerNULL/PLM-ICD-multi-label-classifier/blob/HEAD/src/plm_icd_multi_label_classifier/loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"508a7ef7c9efe649"}},{"code_sha256_prefix":"8498513641388fa5","entry":"focal_loss_with_logits","repo":"innerNULL/PLM-ICD-multi-label-classifier","repo_kind":"listed","path":"src/plm_icd_multi_label_classifier/loss.py","file_url":"https://github.com/innerNULL/PLM-ICD-multi-label-classifier/blob/HEAD/src/plm_icd_multi_label_classifier/loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8498513641388fa5"}},{"code_sha256_prefix":"6c608b8b4c90f237","entry":"json2limited_json","repo":"innerNULL/PLM-ICD-multi-label-classifier","repo_kind":"listed","path":"bin/etl/etl_jsonl2limited_jsonl.py","file_url":"https://github.com/innerNULL/PLM-ICD-multi-label-classifier/blob/HEAD/bin/etl/etl_jsonl2limited_jsonl.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c608b8b4c90f237"}},{"code_sha256_prefix":"cf4a0ac446573d79","entry":"loss_factory","repo":"innerNULL/PLM-ICD-multi-label-classifier","repo_kind":"listed","path":"src/plm_icd_multi_label_classifier/loss.py","file_url":"https://github.com/innerNULL/PLM-ICD-multi-label-classifier/blob/HEAD/src/plm_icd_multi_label_classifier/loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf4a0ac446573d79"}},{"code_sha256_prefix":"6ed591738a7f905e","entry":"metrics_func","repo":"innerNULL/PLM-ICD-multi-label-classifier","repo_kind":"listed","path":"src/plm_icd_multi_label_classifier/metrics.py","file_url":"https://github.com/innerNULL/PLM-ICD-multi-label-classifier/blob/HEAD/src/plm_icd_multi_label_classifier/metrics.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ed591738a7f905e"}},{"code_sha256_prefix":"defb98c128a84614","entry":"token_ids_chunking","repo":"innerNULL/PLM-ICD-multi-label-classifier","repo_kind":"listed","path":"src/plm_icd_multi_label_classifier/text.py","file_url":"https://github.com/innerNULL/PLM-ICD-multi-label-classifier/blob/HEAD/src/plm_icd_multi_label_classifier/text.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"defb98c128a84614"}},{"code_sha256_prefix":"c0e60fa6f11e5f1f","entry":"tokenize_to_chunks","repo":"innerNULL/PLM-ICD-multi-label-classifier","repo_kind":"listed","path":"src/plm_icd_multi_label_classifier/text.py","file_url":"https://github.com/innerNULL/PLM-ICD-multi-label-classifier/blob/HEAD/src/plm_icd_multi_label_classifier/text.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c0e60fa6f11e5f1f"}},{"code_sha256_prefix":"4198b53dcff76317","entry":"topk_metrics_func","repo":"innerNULL/PLM-ICD-multi-label-classifier","repo_kind":"listed","path":"src/plm_icd_multi_label_classifier/metrics.py","file_url":"https://github.com/innerNULL/PLM-ICD-multi-label-classifier/blob/HEAD/src/plm_icd_multi_label_classifier/metrics.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4198b53dcff76317"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}