Despite their improved capabilities in generation and reasoning, adapting large language models (LLMs) to the biomedical domain remains challenging due to their immense size and corporate privacy. In this work, we propose MedAdapter, a unified post-hoc adapter for test-time adaptation of LLMs towards biomedical applications. Instead of fine-tuning the entire LLM, MedAdapter effectively adapts the original model by fine-tuning only a small BERT-sized adapter to rank candidate solutions generated by LLMs. Experiments demonstrate that MedAdapter effectively adapts both white-box and black-box LLMs in biomedical reasoning, achieving average performance improvements of 25.48% and 11.31%, respectively, without requiring extensive computational resources or sharing data with third parties. MedAdapter also yields superior performance when combined with train-time adaptation, highlighting a flexible and complementary solution to existing adaptation methods. Faced with the challenges of balancing model performance, computational resources, and data privacy, MedAdapter provides an efficient, privacy-preserving, cost-effective, and transparent solution for adapting LLMs to the biomedical domain.
翻译:尽管大型语言模型在生成和推理能力上有所提升,但因其庞大的规模和企业隐私限制,将其适配至生物医学领域仍具挑战。本研究提出MedAdapter——一种面向生物医学应用的统一后验适配器,用于大语言模型的测试时适配。MedAdapter无需微调整个语言模型,仅通过微调一个BERT规模的轻量适配器,即可对原始模型生成的候选解决方案进行排序,实现高效适配。实验表明,MedAdapter能有效适配白盒与黑盒大语言模型在生物医学推理中的表现,分别实现平均25.48%和11.31%的性能提升,且无需大量计算资源或与第三方共享数据。当与训练时适配方法结合时,MedAdapter展现出更优性能,为现有适配方法提供了灵活互补的解决方案。面对模型性能、计算资源与数据隐私之间的平衡挑战,MedAdapter为将大语言模型适配至生物医学领域提供了一种高效、保护隐私、经济且透明的解决方案。