The coding of diagnoses using the ICD system is a fundamental pillar in billing, clinical research, and epidemiological surveillance. However, traditional automated systems struggle when integrating disparate signals from clinical narratives and structured variables in the electronic health record. An emerging approach proposes the use of frozen representations from large language models (LLMs) as a shared embedding space to predict primary diagnostic categories in a multimodal way. This work, based on MIMIC-IV data, demonstrates that by extracting hidden states from a pre-trained backbone (MedFound-Llama3-8B) and combining them with linear probes, a strict accuracy of 87.69% is achieved in classifying ICD-10 categories, surpassing unimodal methods and established models such as XGBoost or PLM-ICD. What is relevant is not only the performance, but also the ability to reuse clinical representations across different datasets with a small bottleneck adapter of only 2 million parameters, achieving transfer from MIMIC-IV to MIMIC-III using only 5% of the target labels.
From a technical perspective, the study shows that diagnostic information becomes increasingly linearly separable as one goes deeper into the LLM layers, which validates the hypothesis that these models can unify narrative and structured data without the need for full fine-tuning. For companies in the healthcare and technology sectors, this approach opens the door to lighter and more efficient implementations. A company like Q2BSTUDIO, specialized in the development of custom applications, can leverage these findings to build artificial intelligence solutions that integrate diagnostic prediction modules directly into electronic health record systems without requiring large computing investments. Furthermore, the adaptability between datasets allows these models to be deployed in environments with limited data, which is crucial in hospitals migrating their platforms to AWS and Azure cloud services or that need to ensure the cybersecurity of sensitive information flows.
The architecture based on linear probes and lightweight adapters fits perfectly with AI strategies for companies seeking to scale without retraining massive models every time the data source changes. AI agents can even be integrated to act as clinical coding assistants, interacting with Power BI dashboards or business intelligence services to monitor prediction quality. In this context, Q2BSTUDIO offers custom software that orchestrates the entire pipeline: from the secure extraction of embeddings to the visualization of results, including the automation of code validation processes. The added value lies in transforming an academic advancement into an operational tool that reduces billing errors and accelerates clinical research, all with a modular approach that can be hosted on AI infrastructure for companies.

.jpg)

