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

Yunguo Yu · 2025

Read Hybrid-Code: A Privacy-Preserving, Redundant Multi-Agent Framework for Reliable Local Clinical Coding by Yunguo Yu (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2512-23743.txt.

Introduction

Yunguo Yu tackles automated assignment of ICD-10 diagnosis codes to clinical notes, a job where an invented code is not a harmless error but a safety and billing risk. Neural coders are accurate yet hallucinate unsupported codes; rule-based coders never hallucinate but need hand-built knowledge bases that do not scale. Hybrid-Code v2, in this substantially extended second version, aims for both safety and coverage.

A neural stage proposes candidate codes, and a symbolic layer verifies them through checks on format, supporting evidence, negation, timing. Exclusion rules; an automated mechanism also grows the knowledge base from unlabeled clinical text. Yu reports that on five thousand cases the system reached high coverage and precision with zero Type-I hallucination by construction, and claims a formal guarantee for that property. The arXiv record's fuller title governs over the catalog entry.

Catalog record

CREATORYunguo Yu
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE45 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2512-23743

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Hybrid-Code: A Privacy-Preserving, Redundant Multi-Agent Framework for Reliable Local Clinical Coding Yunguo Yu Abstract The automation of clinical coding (ICD-9/10) holds immense potential to reduce administrative burden in healthcare systems, yet current state-of-the-art approaches typically rely on massive, cloud-based Large Language Models (LLMs) like GPT-4. These approaches pose significant privacy risks (PHI leakage) and latency bottlenecks, rendering them unsuitable for real-time, on-premise deployment. To bridge this gap, we introduce “Hybrid-Code,” a hybrid neuro-symbolic multi-agent framework designed for consumer-grade hardware that ensures production reliability through redundancy and verification. Our system comprises two specialized agents: a Proposer (Coder), employing a hybrid architecture that attempts language model-based semantic reasoning using BioMistral-7B, an open-source 7-billion parameter biomedical language model pre-trained on PubMed Central literature, but falls back to deterministic keyword matching when model output is unreliable, ensuring the system never fails; and an Auditor, a Symbolic rule-based verification agent that verifies codes against official guidelines to filter hallucinations and ensure evidence-based coding. Deploying this system locally and evaluating it on de-identified MIMIC-III data, we demonstrate 0% hallucination rate for codes within the 257-code knowledge base and 24.47% of proposed codes were verified as valid and evidence-supported on a cohort of 1,000 discharge summaries, with the Auditor successfully filtering invalid format codes and providing evidence-based quality control (75.53% rejection rate) while ensuring no patient data leaves the hospital firewall. The system achieved 34.11% coverage (95% CI: 31.2%–37.0%) with 86%+ language model utilization, demonstrating production reliability and scalability. 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. Keywords: Clinical coding, ICD-10, Multi-agent systems, Neuro-symbolic AI, Privacy-preserving AI, Artificial intelligence, AI, Local inference, On-premise deployment, Healthcare AI, Medical informatics, Hallucination detection, Knowledge-based verification, Structured output generation, Constrained decoding 1 Introduction 1.1 The Burden of Coding Clinical coding—the translation of clinical notes into standardized alphanumeric codes (e.g., ICD-9/10-CM)—is the financial backbone of modern healthcare. However, it is a labor-intensive process prone to human error and burnout. The promise of Artificial Intelligence (AI) to automate this task has been long-standing, but realization has been hampered by the complexity of clinical narratives and the rigidity of coding ontologies. 1.2 The “Cloud” Problem Recent advances in Generative AI have shown exceptional performance in text understanding [ 1 , 2 ] . However, dominant models (e.g., GPT-4 [ 1 ] , Claude) are “heavy” (requiring massive GPU clusters) and “leaky” (requiring data transmission to external APIs). For healthcare institutions bound by HIPAA [ 3 ] and GDPR, sending millions of sensitive patient records to third-party clouds is often non-negotiable. Furthermore, the operational cost of API-based coding at the scale of a hospital network is prohibitive. 1.3 The Hybrid Solution: Hybrid-Code We propose that clinical coding does not require General Intelligence ; it requires Specialized Vigilance and Production Reliability . Building on our previous work on trust frameworks for AI diagnostics [ 4 ] , which demonstrated the value of hybrid systems combining calibrated confidence, semantic similarity, and transparency assessment (and informs the Auditor’s confidence-aware rejection logic), and our research on using large language models to retrieve critical data from clinical processes [ 5 ] , which provides the foundation for structured knowledge base integration, we introduce a privacy-first architecture, “Hybrid-Code,” which runs entirely on-premise. Definition of “Local” Deployment: Throughout this paper, “local” refers to on-premise deployment within the hospital’s own infrastructure—processing occurs on hospital-owned servers, workstations, or edge devices physically located within the hospital firewall. This is distinct from cloud-based deployment (where data is transmitted to external servers) and from edge computing in the broader sense (which may include regional edge data centers). Our “local” deployment ensures zero data egress, complete control over the computing environment, and compliance with HIPAA [ 3 ] and GDPR requirements without requiring Business Associate Agreements with cloud providers. Our core innovation is a hybrid neuro-symbolic multi-agent framework that ensures reliability even when language models struggle with structured output generation: 1. The Coder: A hybrid system that attempts language model-based semantic reasoning using BioMistral-7B, an open-source 7-billion parameter biomedical language model built on the Mistral-7B architecture [ 6 ] and pre-trained on PubMed Central biomedical literature [ 7 ] , but employs deterministic keyword-based fallback when model output is unreliable, ensuring the system never fails even when the model fails. 2. The Auditor: A logical, deterministic agent that verifies hypotheses against a retrieved knowledge base of coding rules, providing multi-agent verification and evidence-based filtering. By integrating our trust framework principles [ 4 ] via the Auditor and ensuring production reliability through hybrid architecture, we demonstrate that local clinical coding is feasible with consumer-grade hardware while maintaining zero hallucination rates and ensuring no patient data leaves the hospital firewall. The knowledge base was expanded from 41 to 257 codes through data-driven analysis of production usage patterns, improving coverage from 27% to 34.11% (validated on 1,000 cases). The key insight is that reliability through redundancy (language model + fallback + verification) is more valuable than pure model performance in production healthcare systems, extending our previous findings on hybrid system reliability to the clinical coding domain. 2 Related Work 2.1 Clinical Coding Automation Automated clinical coding has been an active area of research, with approaches ranging from traditional machine learning methods to recent large language model-based systems. Early work focused on rule-based systems and statistical classifiers trained on structured features extracted from clinical notes [ 8 , 9 ] . More recently, transformer-based models [ 10 ] and large language models have shown promising results, with systems like GPT-4 [ 1 ] achieving high accuracy on coding tasks [ 11 , 12 ] . However, these approaches typically require cloud-based deployment, raising privacy and latency concerns for healthcare applications. 2.2 Multi-Agent Systems in Healthcare Multi-agent frameworks have been applied to various healthcare tasks, including diagnostic reasoning, treatment planning, and clinical decision support [ 13 , 14 ] . Recent work has demonstrated the value of specialized agents working in coordination [ 15 ] , such as in multi-agent reasoning systems for long video understanding [ 16 ] . Our work extends this multi-agent paradigm to clinical coding, where specialized agents (Coder and Auditor) collaborate to ensure both accuracy and reliability. 2.3 Neuro-Symbolic AI and Hybrid Architectures The combination of neural and symbolic approaches has shown promise in healthcare AI applications, addressing limitations of pure neural or pure symbolic systems [ 17 , 18 ] . Our previous work on trust frameworks for AI diagnostics [ 4 ] demonstrated that hybrid systems combining calibrated confidence, semantic similarity, and transparency assessment achieve superior reliability. Similarly, our work on using large language models to retrieve critical data from clinical processes [ 5 ] highlighted the importance of combining language model capabilities with structured knowledge bases. The current work extends these principles to clinical coding, demonstrating that hybrid neuro-symbolic architectures can achieve zero hallucination rates while maintaining privacy and local deployment feasibility. 2.4 Privacy-Preserving Healthcare AI Privacy-preserving AI in healthcare has been addressed through various approaches,

Read the complete text