Skip to main content
QUICK REVIEW

[Paper Review] MedSafetyBench: Evaluating and Improving the Medical Safety of Large Language Models

Tessa Han, Aounon Kumar|arXiv (Cornell University)|Mar 6, 2024
Machine Learning in HealthcareComputer Science5 citations
TL;DR

This paper defines medical safety and alignment, builds a harmful medical prompts dataset (med-harm), evaluates general and medical LLMs on safety, and demonstrates that fine-tuning can improve safety; it discusses broader mitigation strategies for safe medical LLMs.

ABSTRACT

As large language models (LLMs) develop increasingly sophisticated capabilities and find applications in medical settings, it becomes important to assess their medical safety due to their far-reaching implications for personal and public health, patient safety, and human rights. However, there is little to no understanding of the notion of medical safety in the context of LLMs, let alone how to evaluate and improve it. To address this gap, we first define the notion of medical safety in LLMs based on the Principles of Medical Ethics set forth by the American Medical Association. We then leverage this understanding to introduce MedSafetyBench, the first benchmark dataset designed to measure the medical safety of LLMs. We demonstrate the utility of MedSafetyBench by using it to evaluate and improve the medical safety of LLMs. Our results show that publicly-available medical LLMs do not meet standards of medical safety and that fine-tuning them using MedSafetyBench improves their medical safety while preserving their medical performance. By introducing this new benchmark dataset, our work enables a systematic study of the state of medical safety in LLMs and motivates future work in this area, paving the way to mitigate the safety risks of LLMs in medicine. The benchmark dataset and code are available at https://github.com/AI4LIFE-GROUP/med-safety-bench.

Motivation & Objective

  • Define medical safety and alignment for medical AI based on AMA Principles of Medical Ethics.
  • Create med-harm dataset of harmful medical prompts categorized by AMA principles.
  • Evaluate safety and alignment of general-knowledge and medical LLMs using harmful-prompt benchmarks.
  • Demonstrate a mitigation strategy via fine-tuning to improve safety.
  • Discuss broader approaches for developing safe and aligned medical LLMs.

Proposed method

  • Define safety and alignment in medicine using AMA Principles of Medical Ethics as the guiding standard.
  • Construct med-harm, a dataset of 1,742 harmful medical prompts across nine AMA principles, using GPT-4 and jailbroken Llama-2-7b-chat to generate prompts.
  • Evaluate general-knowledge and medical LLMs on three datasets (hex-phi for general harm, med-harm-llama2 and med-harm-gpt4 for medical harm).
  • Use GPT-4 to score LLM responses to harmful prompts on a 1–5 willingness scale guided by usage policies (Meta policy for general safety, AMA principles for medical safety).
  • Compare aligned vs non-aligned general LLMs and various medical LLMs to assess safety gaps and potential improvements.
  • Explore fine-tuning on safety demonstrations as a mitigation strategy (results forthcoming).

Experimental results

Research questions

  • RQ1How do general-knowledge and medical LLMs perform in safety and alignment when prompted with harmful medical and general prompts?
  • RQ2Do current aligned general-knowledge LLMs achieve safer behavior in medicine, and how do medical LLMs compare?
  • RQ3Can fine-tuning on safety demonstrations improve general and medical safety of medical LLMs?
  • RQ4What are practical mitigation strategies and broader approaches for developing safe and aligned medical LLMs?

Key findings

  • Aligned general-knowledge LLMs (e.g., Llama-2-chat, GPT-4, GPT-3.5) show lower harmfulness scores than non-aligned models across datasets, but still sometimes output harmful prompts.
  • Among medical LLMs, Meditron-70b shows consistently low harmfulness, while other medical LLMs tend to have higher scores, indicating greater risk of harmful outputs.
  • Medical LLMs generally exhibit higher harmfulness on medical prompts than general-knowledge LLMs when compared to aligned general-knowledge baselines.
  • General vs medical: non-aligned models perform worse on general harm (hex-phi) and medical harm, while aligned general-knowledge LLMs maintain safer behavior across datasets.
  • Medical prompts with jargon can elicit different harm perceptions, with some prompts being more harmful when jargon is present.
  • Fine-tuning on safety demonstrations is shown as a promising mitigation strategy (results are forthcoming).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.