Aloe: A Family of Fine-tuned Open Healthcare LLMs

Ashwin Kumar Gururajan, Enrique Lopez-Cuena, Jordi Bayarri-Planas, Adrián Tormos, Daniel Hinjos, Pablo Bernabeu-Perez, Anna Arias-Duart, Pablo Agustin Martin-Torres, Lucia Urcelay-Ganzabal, Marta Gonzalez-Mallo, Sergio Álvarez-Napagao, Eduard Ayguadé Parra, Ulises Cortés Dario Garcia-GasullaarXiv 2024

Abstract

As the capabilities of Large Language Models (LLMs) in healthcare and medicine continue to advance, there is a growing need for competitive open-source models that can safeguard public interest. With the increasing availability of highly competitive open base models, the impact of continued pre-training is increasingly uncertain. In this work, we explore the role of instruct tuning, model merging, alignment, red teaming and advanced inference schemes, as means to improve current open models. To that end, we introduce the Aloe family, a set of open medical LLMs highly competitive within its scale range. Aloe models are trained on the current best base models (Mistral, LLaMA 3), using a new custom dataset which combines public data sources improved with synthetic Chain of Thought (CoT). Aloe models undergo an alignment phase, becoming one of the first few policy-aligned open healthcare LLM using Direct Preference Optimization, setting a new standard for ethical performance in healthcare LLMs. Model evaluation expands to include various bias and toxicity datasets, a dedicated red teaming effort, and a much-needed risk assessment for healthcare LLMs. Finally, to explore the limits of current LLMs in inference, we study several advanced prompt engineering strategies to boost performance across benchmarks, yielding state-of-the-art results for open healthcare 7B LLMs, unprecedented at this scale.

Introduction

While Large Language Models (LLMs) show immense promise in medicine, the field is currently dominated by massive, closed-source models like GPT-4 and Med-PaLM 2. Open-source alternatives often lag behind, particularly at smaller scales (around 7B-8B parameters) which are more accessible for researchers and smaller institutions. The Aloe family represents a new state-of-the-art for open-source healthcare LLMs in this range, addressing both the "performance gap" and the "safety gap" found in existing open models.

Methodology and Data Engineering

The development of Aloe involved a multi-stage pipeline designed to maximize the potential of Llama 3 and Mistral architectures. The process moved beyond simple fine-tuning to include sophisticated data curation and model alignment strategies.

Training Pipeline

  1. Supervised Fine-Tuning (SFT): The models were trained on a mix of curated medical QA pairs and high-quality general instruction data (8:1 ratio) to prevent "catastrophic forgetting" of general reasoning abilities.
  2. Synthetic Data Generation: To improve reasoning, Mixtral-8x7B was utilized to generate Chain-of-Thought (CoT) explanations for existing medical datasets, teaching the model the underlying logic of medical diagnoses.
  3. Model Merging: Using the DARE-TIES technique, several high-performing variants were merged. This "ensemble-in-a-single-model" approach provided the single largest boost in performance.
  4. Alignment via DPO: A dedicated red teaming effort identified harmful responses, which were then used for Direct Preference Optimization (DPO) to align the model with human safety preferences.
Aloe training pipeline overview, illustrating the SFT and DPO data sources.

Advanced Inference (Medprompt)

During evaluation, the researchers employed "Medprompting"—a combination of few-shot learning, CoT, and self-consistency (majority voting across multiple model runs). This strategy proved to be a significant force multiplier, yielding a 7% increase in accuracy over zero-shot prompting.

Key Results and Safety Evaluation

Aloe-8B-Alpha manages to outperform significantly larger models, such as the 70B-parameter Meditron, on several benchmarks. This demonstrates that high-quality data and rigorous alignment allow smaller models to "punch" well above their weight class.

  • Performance: Llama3-Aloe-8B-Alpha achieved an average score of 76.88% across major medical benchmarks (MultiMedQA) when using Medprompting.
  • Safety Alignment: Through DPO, the model's Attack Success Rate (ASR)—a measure of vulnerability to adversarial "jailbreaking"—dropped from 0.56 to 0.52.
  • Ethics: Aloe scored higher than the base Llama-3-Instruct on ethics and factuality benchmarks, though it exhibited slightly higher bias in specific tests.
Heatmaps showing the Attack Success Rate (ASR) across various topics and styles before (a) and after (b) DPO alignment.

Discussion and Limitations

While Aloe sets a new standard for open healthcare LLMs, it is intended strictly for research and should not be used for clinical diagnosis or direct patient advice. The model inherits the underlying biases and hallucination tendencies of its base architectures. Future work will explore scaling these techniques to larger models (e.g., 70B) and developing even more robust safety guardrails against complex adversarial attacks.

Summary updated

BibTeX
@misc{gururajan2024aloe,
  author = {Ashwin Kumar Gururajan and Enrique Lopez-Cuena and Jordi Bayarri-Planas and Adrián Tormos and Daniel Hinjos and Pablo Bernabeu-Perez and Anna Arias-Duart and Pablo Agustin Martin-Torres and Lucia Urcelay-Ganzabal and Marta Gonzalez-Mallo and Sergio Álvarez-Napagao and Eduard Ayguadé Parra and Ulises Cortés Dario Garcia-Gasulla},
  title = {{Aloe: A Family of Fine-tuned Open Healthcare LLMs}},
  year = {2024},
  eprint = {2405.01886},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.01886},
}
Figure