Previously submitted to: JMIR AI (no longer under consideration since Aug 04, 2026)
Date Submitted: Jul 18, 2026
Open Peer Review Period: Aug 4, 2026 - Aug 4, 2026
(closed for review but you can still tweet)
NOTE: This is an unreviewed Preprint
Warning: This is a unreviewed preprint (What is a preprint?). Readers are warned that the document has not been peer-reviewed by expert/patient reviewers or an academic editor, may contain misleading claims, and is likely to undergo changes before final publication, if accepted, or may have been rejected/withdrawn (a note "no longer under consideration" will appear above).
Peer review me: Readers with interest and expertise are encouraged to sign up as peer-reviewer, if the paper is within an open peer-review period (in this case, a "Peer Review Me" button to sign up as reviewer is displayed above). All preprints currently open for review are listed here. Outside of the formal open peer-review period we encourage you to tweet about the preprint.
Citation: Please cite this preprint only for review purposes or for grant applications and CVs (if you are the author).
Final version: If our system detects a final peer-reviewed "version of record" (VoR) published in any journal, a link to that VoR will appear below. Readers are then encourage to cite the VoR instead of this preprint.
Settings: If you are the author, you can login and change the preprint display settings, but the preprint URL/DOI is supposed to be stable and citable, so it should not be removed once posted.
Submit: To post your own preprint, simply submit to any JMIR journal, and choose the appropriate settings to expose your submitted version as preprint.
Warning: This is an author submission that is not peer-reviewed or edited. Preprints - unless they show as "accepted" - should not be relied on to guide clinical practice or health-related behavior and should not be reported in news media as established information.
Fusing Dense and Lexical Retrieval for High-Fidelity Automated Clinical Coding
ABSTRACT
Background:
Automated ICD-10-CM coding is increasingly delegated to AI systems, including ambient documentation (scribe) tools, yet common evaluation practice obscures a basic limitation: an exact billable code is only recoverable if the free-text description carries the code’s distinguishing details, such as laterality, encounter episode, severity, and specificity. Flat exact-match scoring blames the model for clinical details the input never contained, creating a false sense of failure that undermines physician trust. Current evaluation is also typically gated behind proprietary, protected data, obscuring true clinical utility.
Objective:
This study aimed to develop a fully reproducible, protected health information (PHI)-free benchmark and evaluation protocol for ICD-10-CM code linking, and to determine whether exact billable-code accuracy is bounded by model capacity or by the specificity of the input description.
Methods:
We built a deterministic, PHI-free benchmark from public ICD-10-CM descriptions and the US National Library of Medicine SPECIALIST Lexicon, comprising 11,485,826 rule-generated description variants over 74,879 billable codes. On it we evaluated a retrieval-then-rerank linker that fuses a dense clinical embedding model (SapBERT) with lexical keyword search (Okapi BM25) by reciprocal rank fusion, then reranks candidates with a fine-tuned PubMedBERT cross-encoder and an exact-match guard. We assessed a within-code split and a held-out-code split with disjoint codes, compared the linker against dense-similarity baselines, stratified accuracy by code specificity and qualifier status, probed robustness with 7 deterministic input perturbations scored at 3 levels of the ICD-10 hierarchy, and evaluated calibration and a margin-based review gate.
Results:
The linker returned the correct code first 99.0% of the time, and 98.8% of the time on held-out codes never seen during reranker training, exceeding dense-similarity baselines (0.990 vs 0.932 stem-match for the pipeline’s own clinical encoder and 0.849 for a strong generalist encoder). Accuracy was preserved under meaning-preserving edits (0.990 exact-leaf under lowercasing and punctuation removal; 0.974 under word reordering) but collapsed when leaf-determining information was removed: dropping qualifiers reduced exact-leaf accuracy to 0.457 while 3-character category accuracy held at 0.988. Top-1 confidence was well calibrated (expected calibration error 0.012), and a margin-based review gate flagged 5.2% of queries while catching 95.0% of all errors.
Conclusions:
Exact billable-code accuracy is bounded by the information the input carries rather than by model capacity; evaluation reporting flat exact-match without a hierarchy-aware companion metric misattributes an unrecoverable-axis penalty to the model. A calibrated margin gate turns this limit into a safety mechanism by routing under-specified inputs to human review. Because the benchmark is deterministic, uses only public inputs, requires no external API calls, and contains no protected health information, it is fully reproducible.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.