D ict LLM : Harnessing Key-Value Data Structures with Large Language Models for Enhanced Medical Diagnostics (2024)

Abstract: Structured data offers an efficient means of organizing information. Exsisting text-serialization based methods for processing structured data using large language models (LLMs) are not designed to explicitly capture the heterogeneity of structured data. Such methods are suboptimal for LLMs to process structured data, and may lead to large input token size and poor robustness to input perturbation. In this paper, we propose a novel framework called DictLLM, which is an efficient and effective framework for the modeling of medical lab report to deal with the report-assisted diagnosis generation task. DictLLM introduce 1) group positional encoding to maintain the permutation invariance, 2) hierarchical attention bias to capture the inductive bias of structured data, and 3) a optimal transport alignment layer to align the embeddings generated by the dict encoder with the LLM, producing a list of fixed-length virtual tokens. We conduct experiments with multiple LLM models on a large-scale real-world medical lab report dataset for automatic diagnosis generation. The results show that our proposed framework outperforms the baseline methods and few-shot GPT-4 in terms of both Rouge-L and Knowledge F1 score. We also conduct multiple experiments and analyze the scalability and robustness of our proposed framework, demonstrating the superiority of our method in modeling the heterogeneous structure of medical dictionaries data.

## introduction the integration of large language models (llms) into natural language processing (nlp) has marked a paradigm shift, enabling unprecedented advancements across diverse applications. recent explorations into applying llms to structured data processing, such as graphs, dictionaries, and tables, : corresponding author. patient self-report gender: male, age: 65 years. admitted due to "maintenance hemodialysis for over 3 years, fatigue for 5 days". examination: patient is alert, breathing evenly, in good spirits. blood pressure 140/80 mmhg. no petechiae, purpura, or jaundice observed on skin and mucous membranes. …… ## conclusion in this paper, we propose a novel framework called dictllm, which is an efficient and effective framework for modeling the heterogeneous structure of structured data, to deal with the report-assisted diagnosis generation task. our comprehensive empirical studies on real-world datasets reveal that a carefully designed encoder, which individually en-codes structured data, significantly enhances model performance on downstream tasks, demonstrating advantages in scalability and robustness. limitation the dictllm framework is specifically designed for processing dictionary-structured data and requires some effort to further extend it to more complex tabular data. additionally, although dictllm has reduced training and inference overhead compared to text-serialization methods, it still demands significant computational resources. input: gender: male age: 91 years old main symptoms and signs on admission: recurrent cough and sputum for more than 6 years, worsening for 3 days, clear mind, flat air, finger pulse oxygen saturation 95% (nasal cannula oxygen inhalation 4l/min), double the lung breath sounds were low, and obvious crackles could be heard in both lungs. the heart rate was 80 bpm, with a regular rhythm and no obvious murmur. the abdomen is soft, without tenderness or rebound tenderness. there is a 4*5cm round mass in the right groin, which is soft and non-tender. there was no edema in both lower limbs, the dorsalis pedis artery was palpable, the nasogastric tube and urinary catheter were in place and unobstructed. dictllm's output: hyperplastic prostate, anemia unspecified, liver cyst ground truth: hyperplastic prostate, anemia unspecified, liver cyst input: gender: male age: 69 years old main symptoms and signs on admission: chest pain, pending investigation for 1 week, refreshed and calm. the heart rhythm is regular and there is no murmur. the breath sounds in both lungs were clear, with less obvious dry and wet rales. the abdomen was flat and soft, with no tenderness or rebound tenderness in the entire abdomen, the liver and spleen were not reachable under the ribs, shifting dullness (-), and low bowel sounds. dictllm's output: 40 colorectal polyps, myocardial bridge ground truth: chronic cholecystitis with gallstones