Hybrid-Code: A Privacy-Preserving, Redundant Multi-Agent Framework for Reliable Local Clinical Coding
Yunguo Yu
TL;DR
Hybrid-Code tackles privacy and latency barriers of cloud-based AI for clinical coding by deploying an on-premise hybrid neuro-symbolic multi-agent system (Coder and Auditor). It uses BioMistral-7B for semantic reasoning with a deterministic fallback, and a 257-code CMS-derived knowledge base for symbolic verification, ensuring zero data egress. On 1,000 MIMIC-III discharge summaries it achieved 34.11% KB coverage, 0% hallucinations for codes within the KB, and strong efficiency (~123 cases/min) with CPU-only hardware; 75.53% of proposed codes were rejected due to insufficient evidence, demonstrating rigorous quality control. The work highlights production reliability through redundancy as a practical path to privacy-preserving AI in healthcare and provides a scalable framework for expanding knowledge base coverage while keeping patient data secure.
Abstract
Clinical coding automation using cloud-based Large Language Models (LLMs) poses privacy risks and latency bottlenecks, rendering them unsuitable for on-premise healthcare deployment. We introduce Hybrid-Code, a hybrid neuro-symbolic multi-agent framework for local clinical coding that ensures production reliability through redundancy and verification. Our system comprises two agents: a Coder that attempts language model-based semantic reasoning using BioMistral-7B but falls back to deterministic keyword matching when model output is unreliable, ensuring pipeline completion; and an Auditor that verifies codes against a 257-code knowledge base and clinical evidence. Evaluating on 1,000 MIMIC-III discharge summaries, we demonstrate no hallucinated codes among accepted outputs within the knowledge base, 24.47% verification rate, and 34.11% coverage (95% CI: 31.2%--37.0%) with 86%+ language model utilization. The Auditor filtered invalid format codes and provided evidence-based quality control (75.53% rejection rate) while ensuring no patient data leaves the hospital firewall. The hybrid architecture -- combining language model semantic understanding (when successful), deterministic fallback (when the model fails), and symbolic verification (always active) -- ensures both reliability and privacy preservation, addressing critical barriers to AI adoption in healthcare. Our key finding is that reliability through redundancy is more valuable than pure model performance in production healthcare systems, where system failures are unacceptable.
