Interpretable Dynamic Rule Attention for Medical Coding

Rimon Paul, Blessing Ogbuokiri
Proceedings of the The 39th Canadian Conference on Artificial Intelligence, PMLR 318:1068-1075, 2026.

Abstract

Automatic medical coding maps clinical text to International Classification of Diseases (ICD) codes. While highly accurate, recent neural models operate as black boxes, limiting clinical trust and accountability. We address this by proposing an interpretable, rule-guided attention method for a BioClinicalBERT model fine-tuned on Medical Information Mart for Intensive Care III (MIMIC-III) discharge summaries. Our lightweight approach incorporates domain knowledge via keyword mappings, softly biasing attention toward clinical evidence without restricting the model’s learning capacity. Evaluated on the full ICD-9 task, the model improves micro-F1 (0.330 to 0.384), micro-precision (0.391 to 0.420), and micro-recall (0.285 to 0.353). A McNemar test confirms a statistically significant shift in prediction behaviour (p < 10^-10), while quantitative analysis proves significantly increased attention mass on diagnostic keywords (p < 10^-15). This transparency incurs minimal computational overhead, utilizing linear-time matching without altering the core transformer architecture. Qualitative visualizations further demonstrate that this rule guidance yields clearer, evidence-aligned decision patterns without sacrificing predictive accuracy.

Cite this Paper


BibTeX
@InProceedings{pmlr-v318-paul26a, title = {Interpretable Dynamic Rule Attention for Medical Coding}, author = {Paul, Rimon and Ogbuokiri, Blessing}, booktitle = {Proceedings of the The 39th Canadian Conference on Artificial Intelligence}, pages = {1068--1075}, year = {2026}, editor = {Bouzar-Benlabiod, Lydia and Leung, Carson}, volume = {318}, series = {Proceedings of Machine Learning Research}, month = {25--29 May}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v318/main/assets/paul26a/paul26a.pdf}, url = {https://proceedings.mlr.press/v318/paul26a.html}, abstract = {Automatic medical coding maps clinical text to International Classification of Diseases (ICD) codes. While highly accurate, recent neural models operate as black boxes, limiting clinical trust and accountability. We address this by proposing an interpretable, rule-guided attention method for a BioClinicalBERT model fine-tuned on Medical Information Mart for Intensive Care III (MIMIC-III) discharge summaries. Our lightweight approach incorporates domain knowledge via keyword mappings, softly biasing attention toward clinical evidence without restricting the model’s learning capacity. Evaluated on the full ICD-9 task, the model improves micro-F1 (0.330 to 0.384), micro-precision (0.391 to 0.420), and micro-recall (0.285 to 0.353). A McNemar test confirms a statistically significant shift in prediction behaviour (p < 10^-10), while quantitative analysis proves significantly increased attention mass on diagnostic keywords (p < 10^-15). This transparency incurs minimal computational overhead, utilizing linear-time matching without altering the core transformer architecture. Qualitative visualizations further demonstrate that this rule guidance yields clearer, evidence-aligned decision patterns without sacrificing predictive accuracy.} }
Endnote
%0 Conference Paper %T Interpretable Dynamic Rule Attention for Medical Coding %A Rimon Paul %A Blessing Ogbuokiri %B Proceedings of the The 39th Canadian Conference on Artificial Intelligence %C Proceedings of Machine Learning Research %D 2026 %E Lydia Bouzar-Benlabiod %E Carson Leung %F pmlr-v318-paul26a %I PMLR %P 1068--1075 %U https://proceedings.mlr.press/v318/paul26a.html %V 318 %X Automatic medical coding maps clinical text to International Classification of Diseases (ICD) codes. While highly accurate, recent neural models operate as black boxes, limiting clinical trust and accountability. We address this by proposing an interpretable, rule-guided attention method for a BioClinicalBERT model fine-tuned on Medical Information Mart for Intensive Care III (MIMIC-III) discharge summaries. Our lightweight approach incorporates domain knowledge via keyword mappings, softly biasing attention toward clinical evidence without restricting the model’s learning capacity. Evaluated on the full ICD-9 task, the model improves micro-F1 (0.330 to 0.384), micro-precision (0.391 to 0.420), and micro-recall (0.285 to 0.353). A McNemar test confirms a statistically significant shift in prediction behaviour (p < 10^-10), while quantitative analysis proves significantly increased attention mass on diagnostic keywords (p < 10^-15). This transparency incurs minimal computational overhead, utilizing linear-time matching without altering the core transformer architecture. Qualitative visualizations further demonstrate that this rule guidance yields clearer, evidence-aligned decision patterns without sacrificing predictive accuracy.
APA
Paul, R. & Ogbuokiri, B.. (2026). Interpretable Dynamic Rule Attention for Medical Coding. Proceedings of the The 39th Canadian Conference on Artificial Intelligence, in Proceedings of Machine Learning Research 318:1068-1075 Available from https://proceedings.mlr.press/v318/paul26a.html.

Related Material