cs.CLNov 16, 2026

Safety-Preserving Medical LLM Fine-Tuning via Bilevel Data Selection

Authors: Ruoxuan Shi, Sheng Yang, Zhengxing Su, Xiaoyang Hou, Yating Liu

Organizations: School of Mathematics and Statistics, Lanzhou University · Department of Statistics, University of California, Riverside · Department of Oncology, Lanzhou University Second Hospital

Abstract

As general large language models (LLMs) are increasingly adapted for patient-facing medical applications, improving medical capability while controlling patient-facing risks remains a critical challenge. Large-scale medical instruction data are essential for acquiring domain knowledge through supervised fine-tuning (SFT), but unsafe responses can undermine existing safety alignment. To address this problem, we propose Scalable Bilevel Data Selection (S-BDS) for safety-preserving medical SFT. By controlling selection-weight concentration, S-BDS enables reliable sample ranking over large candidate pools and identifies training examples that improve medical capability while controlling patient-facing risks. We combine clinician-validated safe data and selected data with unscreened medical instruction data for SFT, and jointly evaluate medical capability and patient-facing safety on HealthBench and PatientSafetyBench, respectively. Experiments across Llama and Qwen models show that S-BDS achieves the highest safe rates among all compared methods, outperforming the strongest baselines by 4.64 and 3.00 percentage points, respectively, while maintaining competitive medical capability. Further experiments show that varying the safety-oriented weight during SFT controls the trade-off between medical capability and patient-facing safety.

Figures & tables

Appendix figures & tables5 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. When Medical Safety Alignment Fails: A Benchmark for Evaluating LLMs on High-Risk Medical Queries

    May 26, 2026Yige Li, Jun Sun, Wei Zhao +5LLM Safety BenchmarksHealthcare

  2. SafeMed-R1: Clinician-Audited Safety and Ethics Alignment for Medical Large Language Models

    May 27, 2026Chao Ding, Mouxiao Bian, Tianbin Li +12HealthcareLLM Auditing