On the Utility of Domain-Adjacent Fine-Tuned Model Ensembles for Few-shot Problems

Md Ibrahim Ibne Alam, Parikshit Ram, Soham Dan, Horst Samulowitz, Koushik Kar

TL;DR

Instead of risking poor performance by guessing which publicly available model fits your data-scarce task, or wasting compute on expensive fine-tuning, you can simply ensemble them. This paper demonstrates that zero-shot averaging of "Domain-Adjacent Fine-Tuned" (DAFT) models provides highly robust performance, while a lightweight, backpropagation-free few-shot weighted ensemble (DAFT-E) can actually outperform full model fine-tuning when target data is extremely limited.

What Problem Does This Paper Address?

Fine-tuning Large Language Models (LLMs) for specific downstream tasks yields excellent results but requires substantial domain-specific data and computational power. In data-scarce scenarios—where target data is minimal or non-existent—practitioners frequently turn to open repositories like Hugging Face to find existing models fine-tuned on similar tasks.

However, selecting the single best "Domain-Adjacent Fine-Tuned" (DAFT) model without enough validation data to test them is a guessing game. If you pick wrong, performance can be abysmal. The authors tackle a practical question: How can we effectively leverage this massive pool of community-fine-tuned models without incurring heavy computational costs or requiring large target datasets?

Methods

The authors systematically evaluate and compare five deployment strategies for data-scarce domains:

  1. FT (Fine-Tune): Standard fine-tuning of a base pre-trained LLM on the target domain data.
  2. $\text{DAFT}^\text{Z}$: Picking a single available DAFT model and using it directly for zero-shot inference.
  3. $\text{DA(FT)}^2$: Picking one DAFT model and further fine-tuning it on the target data (requiring expensive backpropagation).
  4. $\text{DAFT-E}^\text{Z}$: A zero-shot ensemble that takes a simple unweighted average of the output probabilities from multiple DAFT models.
  5. DAFT-E: A few-shot weighted ensemble where the ensemble weights are learned from a tiny target dataset using lightweight regression (Linear Regression or Random Forest).

Crucially, DAFT-E is backpropagation-free for the underlying LLMs. It only requires a single forward pass through the ensemble of models to extract predictions and optimize the lightweight combination layer, making it computationally trivial compared to standard fine-tuning.

Figure 1: Different options for few-shot tasks given LLMs and community created DAFT models: (1) Directly fine-tune the LLM (FT); (2) Select one DAFT model and use it zero- shot (DAFTZ); (3) Use a DAFT model but with task-specific fine-tuning (DA(FT)2); (4) Ensemble multiple DAFT models and use it zero-shot (DAFT-EZ); (5) Use ensemble of DAFT models with extremely lightweight few-shot adaptation of the ensemble weights (DAFT-E).

Datasets

The framework was validated across diverse NLP tasks using several open-source datasets:

  • Sentiment Analysis: Amazon polarity, Cornell Movie, IMDB, SST2, Tweet sentiment, and Yelp Polarity.
  • Textual Similarity: MRPC, QQP, and STS-B.
  • Medical Knowledge (MMLU): 9 specialized medical sub-datasets (e.g., Clinical Knowledge, Virology, Anatomy) evaluated using LoRA-tuned Llama 3.1 models sourced directly from public repositories.

Key Insights and Ideas

  • The Ensembling Arbitrage: In zero-shot settings, you don't need to find the perfect model. Averaging the outputs of multiple DAFT models ($\text{DAFT-E}^\text{Z}$) consistently approaches or matches the performance of the single best model—which you couldn't identify beforehand anyway.
  • Backprop-Free Wins in the Few-Shot Regime: When only a handful of target samples are available ($n \le 64$), training a simple linear regression layer over DAFT model predictions ($\text{DAFT-E}$) beats full backpropagation fine-tuning ($\text{DA(FT)}^2$). It naturally protects against overfitting on tiny datasets while saving massive amounts of compute.
  • LEEP as a Transferability Proxy: The authors found that Log Expected Empirical Prediction (LEEP) scores correlate strongly with actual zero-shot transfer performance, proving that analytical metrics can successfully predict how well an ensemble will perform on an unseen domain.

Key Results

  • Zero-Shot Robustness: In zero-shot sentiment analysis, $\text{DAFT-E}^\text{Z}$ outperformed individual individual DAFT models in 85 out of 90 evaluated cases and regularly beat much larger models (like OPT-1.3B) used with zero-shot prompting.
  • Few-Shot Superiority: For extremely small data sizes ($n = 2$ to $64$ samples), the weighted ensemble method ($\text{DAFT-E}$) consistently outperformed both standard fine-tuning ($\text{FT}$) and DAFT fine-tuning ($\text{DA(FT)}^2$) across sentiment and text similarity tasks.
  • Real-World MMLU Validation: On the MMLU medical tasks using community-contributed Llama 3.1 weights, $\text{DAFT-E}^\text{Z}$ outperformed the base Llama 3.1 model on all 9 datasets and surpassed individual DAFT models in 56 out of 72 test cases.

Limitations and Future Work

  • Inference Overhead: While training $\text{DAFT-E}$ is incredibly cheap, running inference requires executing forward passes through multiple LLMs. This increases computational and memory overhead during deployment unless the models can be run in parallel across multiple servers.
  • Dependency on Public Repositories: The success of this method relies entirely on the availability of domain-adjacent models. If you are working on a highly niche task with no community-contributed models, the ensemble's performance will degrade.
  • Data Quality and Bias: Relying on uncurated public models introduces risks regarding data quality, licensing, and inherited biases. The authors note that future work must explore how safety and bias alignments behave when models are ensembled in this manner.

Summary updated

BibTeX
@misc{alam2024utility,
  author = {Md Ibrahim Ibne Alam and Parikshit Ram and Soham Dan and Horst Samulowitz and Koushik Kar},
  title = {{On the Utility of Domain-Adjacent Fine-Tuned Model Ensembles for Few-shot Problems}},
  year = {2024},
  eprint = {2406.13720},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.13720},
}
Figure