[论文解读] JMedLoRA:Medical Domain Adaptation on Japanese Large Language Models using Instruction-tuning
本文提出 JMedLoRA,一种基于 LoRA 的指令微调方法,用于将大语言模型适配至日语医学领域。实验表明,使用指令微调对 Llama2-70B 等以英语为中心的大规模模型进行微调,可显著提升其在日语医学问答任务上的性能,而额外预训练或多轮微调反而导致性能下降,凸显了在临床部署中采用高效、单轮微调策略的重要性。
In the ongoing wave of impact driven by large language models (LLMs) like ChatGPT, the adaptation of LLMs to medical domain has emerged as a crucial research frontier. Since mainstream LLMs tend to be designed for general-purpose applications, constructing a medical LLM through domain adaptation is a huge challenge. While instruction-tuning is used to fine-tune some LLMs, its precise roles in domain adaptation remain unknown. Here we show the contribution of LoRA-based instruction-tuning to performance in Japanese medical question-answering tasks. In doing so, we employ a multifaceted evaluation for multiple-choice questions, including scoring based on "Exact match" and "Gestalt distance" in addition to the conventional accuracy. Our findings suggest that LoRA-based instruction-tuning can partially incorporate domain-specific knowledge into LLMs, with larger models demonstrating more pronounced effects. Furthermore, our results underscore the potential of adapting English-centric models for Japanese applications in domain adaptation, while also highlighting the persisting limitations of Japanese-centric models. This initiative represents a pioneering effort in enabling medical institutions to fine-tune and operate models without relying on external services.
研究动机与目标
- 探究基于 LoRA 的指令微调是否能有效将领域特定的医学知识融入日语大语言模型中。
- 比较更大规模的英语中心模型(如 Llama2-70B)与更小规模的日语中心模型(如 OpenCALM-7B)在医学领域适配任务中的性能表现。
- 评估在低数据环境下,额外预训练以及微调轮次数量对模型性能的影响。
- 为医疗机构开发一种实用且保护隐私的微调与部署 LLM 的方法,避免依赖外部服务。
提出的方法
- 采用低秩适配(LoRA)及其量化变体(QLoRA)对 OpenCALM-7B 和 Llama2-70B-chat-hf 进行参数高效微调。
- 构建了一个自定义的日语医学指令微调数据集,包含 2,420 个训练样本和 50 个评估样本,格式为多项选择医学问答题。
- 采用单轮次(1,000 步)指令微调,以避免多轮训练中观察到的过拟合与性能下降。
- 使用多种评估指标进行模型评估:精确匹配、准确率以及语义一致性距离(Gestalt distance),以衡量超出字面匹配的语义正确性。
- 通过消融实验比较在医学文本上进行额外预训练与不预训练的模型表现,并评估零样本与单样本推理性能。
- 使用 Hugging Face 托管的模型,并在 NVIDIA A100 GPU 上进行训练,以确保临床机构的可复现性与可访问性。
实验结果
研究问题
- RQ1基于 LoRA 的指令微调在多大程度上能有效将领域特定的医学知识融入日语大语言模型?
- RQ2在医学领域适配任务中,更大规模的英语中心大语言模型是否优于更小规模的日语中心大语言模型?
- RQ3增加微调轮次数量或增加额外预训练是否能提升医学问答任务的性能?
- RQ4指令微调如何影响模型的单样本泛化能力,尤其是在与零样本性能对比时?
主要发现
- 基于 LoRA 的指令微调显著提升了日语医学问答任务的性能,其中 Llama2-70B 等大模型的性能提升幅度明显高于小模型。
- 单轮次指令微调(1,000 步)的性能优于多轮训练,后者因过拟合导致性能下降。
- 在医学文本上进行额外预训练并未提升性能,甚至可能在数据有限的情况下导致性能恶化。
- 原始的 OpenCALM-7B 模型在指令微调后失去了其单样本推理能力,而 Llama2-70B 则保持了该能力,表明两者在泛化行为上存在关键差异。
- 精确匹配与语义一致性距离(Gestalt distance)指标表明,模型可在无字面匹配的情况下生成语义正确的答案,凸显了严格匹配评估方法的局限性。
- 使用以英语为中心的大模型作为基座模型进行日语医学领域适配,比单纯依赖日语中心模型更为有效,表明跨语言迁移具有潜在价值。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。