Table of Contents
Fetching ...

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.

Hybrid-Code: A Privacy-Preserving, Redundant Multi-Agent Framework for Reliable Local Clinical Coding

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.
Paper Structure (32 sections, 1 figure, 3 tables)

This paper contains 32 sections, 1 figure, 3 tables.

Figures (1)

  • Figure 1: Hybrid-Code System Architecture and Data Flow. The flowchart illustrates the complete pipeline from clinical note input to verified ICD-10 code output. The system employs a three-layer hybrid architecture: (1) Primary Mode (Coder Agent): BioMistral-7B attempts semantic reasoning to generate structured JSON output with confidence scores (0.7--0.99); (2) Fallback Mode: When JSON parsing fails, deterministic keyword matching against common mappings activates with confidence 0.5, ensuring pipeline continuity; (3) Verification Layer (Auditor Agent): All candidate codes undergo format normalization (auto-correcting common formatting errors), knowledge base validation (checking against 257 ICD-10 codes), and evidence checking (keyword matching against clinical text). Codes are either accepted (added to final verified list) or rejected (logged with reasoning trail). The color-coded nodes represent different processing stages: input (blue), language model processing (green), fallback (yellow), verification (purple), acceptance (green), and rejection (red).