Post by Anran Li
Professor
š¬Memorization in LLMs for Medicine ā Prevalence, Characteristics, and Implications š§ How much medical content do Large Language Models actually memorize during domain adaptation ā and what does that mean for patient privacy and clinical reliability? In our new study we performed a systematic, large-scale analysis of memorization across three real-world adaptation settings: 1. continued pretraining on medical corpora, 2. fine-tuning on medical benchmarks, and 3. fine-tuning on real clinical data (case study: 13,000 unique inpatient records from Yale New Haven Health for LLM-assisted diagnosis). We evaluated both medical foundation models (PMC-LLaMA, Meditron, Me-LLaMA, Med-LLaMA3 variants) and general LLaMA variants across 10 datasets, hundreds of thousands of examples, and thousands of manually reviewed model outputs. š” Key findings ⢠During pretraining, models often regenerate consecutive spans ā„30 tokens ā memorization ratios exceed 40% on some datasets. ⢠Up to 87% of content memorized during continued pretraining remains after later fine-tuning. ⢠In the inpatient diagnosis case study, fine-tuned LLMs regenerated 13%ā50%+ of long consecutive spans (ā„30 tokens). We found thousands of instances where Protected Health Information or patient-specific details (symptoms, diagnoses, treatments) were memorized. š„ Why this matters Memorization can be helpful (recalling guidelines or factual references), uninformative (templated text), or harmful (leaking patient-identifiable content). Our results highlight important tradeoffs between preserving useful domain knowledge and protecting patient privacy and model generalizability. š Code and resources: https://lnkd.in/gDgAu4CX. š Read the full paper here: https://lnkd.in/guDVS-XH Huge thanks to our collaborators:Ā Lingfei Qian, Mengmeng Du, Yu Yin, Yan Hu, Zihao Sun, Yihang Fu, Erica Stutz, Xuguang Ai, Qianqian Xie, Rui Zhu, Jimin Huang, Yifan Yang, Siru Liu, PhD, FAMIA, Yih-Chung Tham, Lucila Ohno-Machado, Hyunghoon Cho, Zhiyong Lu, PhD FACMI, Hua Xu, Qingyu Chen.