EMGLLM : Data-to-Text Alignment for Electromyogram Diagnosis Generation with Medical Numerical Data Encoding (2025)

Abstract: Electromyography (EMG) tables are crucial for diagnosing muscle and nerve disorders, and advancing the automation of EMG diagnostics is significant for improving medical efficiency. EMG tables contain extensive continuous numerical data, which current Large Language Models (LLMs) often struggle to interpret effectively. To address this issue, we propose EMGLLM, a data-to-text model specifically designed for medical examination tables. EMGLLM employs the EMG Alignment Encoder to simulate the process that doctors compare test values with reference values, aligning the data into word embeddings that reflect health degree. Additionally, we construct ETM, a dataset comprising 17,250 real cases and their corresponding diagnostic results, to support medical data-to-text tasks. Experimental results on ETM demonstrate that EMGLLM outperforms various baseline models in understanding EMG tables and generating high-quality diagnoses, which represents an effective paradigm for automatic diagnosis generation from medical examination table.

## introduction electromyography (emg) refers to the pattern of electrophysiological signal concomitant with musculations recorded with an electromyograph @xcite , which plays a significant role in evaluating human activities @xcite @xcite . in medicine, the emg is one of the major diagnostic tools for identifying and characterizing motor unit disorders @xcite , which is commonly used to examine nerve and muscle excitability and conduction functions, thereby determining the functional status of peripheral nerves, neurons, neuromuscular junctions, and the muscles themselves. after the emg examination, the physicians perform a two-step analysis based on the records of the electrical signals. they first analyze the waveforms, converting the complex electrical signals into easily interpretable data tables, which contain essential information for medical diagnosis, such as amplitude, conduction velocity, and latency. subsequently, by completing quantitative analysis, the doctors interpret the converted table data to render their final diagnosis and form a diagnostic report @xcite . in this paper, we focus on the data-to-text task of automatic diagnosis generation from emg tabular data. figure 1 shows an anonymized emg diagnosis including two parts, findings and impression. in the context of an emg examination, findings refer to observations of tables, aiming to objectively describe the phenomena reflected by the data, thus facilitating further analysis by the physician. to accurately identify various neuromuscular disorders within tabular data and translate them into findings, physicians must possess a deep understanding of the distinct patterns associated with neuromuscular junction disorders, radiculopathies, upper motor neuron lesions, and so on. in terms of impression, it consists of two aspects: a summary and interpretation of the test results, as well as an analysis of the clinical significance of the findings, which may include diagnostic suggestions or potential issues. therefore, impression requires a certain level of clinical experience from doctors. @xcite basically, emg diagnosis writing can be error-prone and tedious for underexperienced physicians, and onerous and timeconsuming for experienced physicians. therefore, considering the powerful reasoning and text generation capabilities of large language models (llms) in the medical field @xcite , we are motivated to explore methods for using llms to process examination tables and automatically generate medical emg diagnoses. the automatic generation of emg diagnoses involves two major challenges: for llms, directly handling numerical data may present certain difficulties @xcite since llms are not well-adept at comparing numerical values and quantitatively diagnosing the normality of these values, which may lead to errors. to address this, we proposes emgllm, a novel data-to-text framework for automatic diagnosis from medical examination tables, which introduces emg alignment encoder specialized in encoding continuous numerical data in emg examination tables. the emg alignment encoder can compare the test values with reference values, encoding them into virtual tokens that represent the degree of abnormality, and aligning numerical data to diagnostic text. this allows the llm to better understand emg tables, thereby generating more accurate and comprehensive diagnoses. our main contributions include: compared to all baseline methods, emg diagnoses generated by emgllm demonstrates higher quality in all evaluation metrics, fully proving the effectiveness and robustness of emgllm. this method can also be applied to other medical examination tables. ## conclusion in this paper, we propose emgllm, a medical data-to-text model, for the automatic diagnosis generation of electromyography (emg) tables. the model framework with the emg alignment encoder can enhance the encoding of continuous numerical data, enabling the model to simulate the process by which physicians compare test values to reference values during diagnosis. this approach facilitates a better model understanding of the degree of health and abnormality reflected by the data. in addition, we construct the etm dataset, which comprises 17,250 real case examination emg tables and diagnoses from authoritative doctors, to support the advancement of medical data-to-text research. finally, experimental results demonstrate that emgllm outperforms baseline methods in all automatic, model and human evaluations for emg diagnosis generation, confirming the effectiveness of the emgllm approach in handling medical examination data for automatic diagnosis.