Fine-Tuning Language Models via Epistemic Neural Networks

Ian Osband, Seyed Mohammad Asghari, Benjamin Van Roy, Nat McAleese, John Aslanides, Geoffrey IrvingarXiv 2022 · DOI

Abstract

Researchers from DeepMind have demonstrated that augmenting Large Language Models (LLMs) with a small, specialized component called an epinet allows for significantly more efficient fine-tuning. By identifying and prioritizing data points where the model exhibits high epistemic uncertainty, the researchers achieved benchmark performance using 50% less labeled data compared to traditional random-sampling methods. This approach provides a computationally lightweight alternative to traditional uncertainty estimation techniques like ensembles or dropout.

The Challenge of Active Learning in LLMs

Fine-tuning typically involves specializing a massive, pre-trained model for a specific task by exposing it to labeled examples. Standard practice involves showing the model every available example in a random order. However, not all data points are equally informative; some are redundant, while others are highly informative for the model's current state of knowledge.

The core challenge lies in Active Learning: how does a model decide which data points it needs to see most? Standard neural networks struggle to distinguish between two types of uncertainty:

  1. Aleatoric Uncertainty: Randomness inherent in the data, such as noisy labels or ambiguous sentences.
  2. Epistemic Uncertainty: Uncertainty due to a lack of knowledge, such as a type of sentence structure the model hasn't encountered sufficiently.

To learn efficiently, a model must target epistemic uncertainty—it needs to "know what it doesn't know."

Methodology: Epistemic Neural Networks (ENNs)

The authors introduce Epistemic Neural Networks (ENNs), specifically utilizing a lightweight architecture called an epinet.

  • The Architecture: Instead of modifying the entire LLM, a small "sidecar" network (the epinet) is attached to the final layers of the base model (e.g., BERT).
  • The Mechanism: The epinet processes features produced by the LLM alongside an "epistemic index" (a random seed) to generate multiple varying outputs. High variance across these outputs for a specific input signals high epistemic uncertainty.
  • Priority Functions: The system uses the epinet to score unlabeled data using metrics like BALD (Bayesian Active Learning by Disagreement) or Variance. It then prioritizes labeling examples where the epinet shows the most disagreement.
  • Efficiency: Unlike "Ensembles," which require running multiple full models, or "Dropout," which requires multiple passes through the entire network, the epinet is computationally tiny and adds negligible overhead.

Experimental Results

The researchers evaluated the epinet approach on the GLUE (General Language Understanding Evaluation) benchmark, focusing on classification tasks such as MNLI, SST-2, and QNLI.

Data Efficiency and Performance

The primary finding was a 2x increase in data efficiency. On the MNLI dataset, the epinet-boosted BERT reached the same performance level as the baseline while using only half the training labels. Simply adding the epinet architecture without the prioritization (uniform sampling) did not provide these benefits, confirming that the gain stems from the intelligent selection of data.

Comparison of test error between the baseline and epinet-augmented model as a function of training labels.

Comparison with Alternative Methods

The epinet consistently outperformed traditional Deep Ensembles and Dropout methods. While ensembles are often considered the gold standard for uncertainty estimation, they are prohibitively expensive for large-scale LLMs. The epinet achieved superior results while being significantly faster and cheaper to run.

Performance comparison of epinet against dropout and ensemble baselines shows epinet reaching lower error rates faster.

Key Insights

  • Heuristics vs. Epistemic Knowledge: Common active learning tricks, like picking examples with high entropy, often fail because they are distracted by noisy data (aleatoric uncertainty). The epinet successfully filters for new information.
  • The "Stop Gradient" Trick: Training the epinet while keeping base LLM features fixed prevents the sidecar from interfering with core model representations while still providing an accurate uncertainty wrapper.
  • Scalability: Because the epinet only interacts with final hidden layers, it can be applied to massive models without retraining billions of parameters.

Limitations and Future Work

While promising, the current research focused primarily on classification tasks. Extending this to regression or open-ended generation (like dialogue) would require different loss functions. Additionally, while the theory suggests scalability to frontier models with hundreds of billions of parameters, the primary testing was conducted on BERT-sized models (110M parameters). Future work will likely explore the dynamics of human-in-the-loop labeling latency in real-world active learning cycles.

Summary updated

BibTeX
@misc{osband2022fine,
  author = {Ian Osband and Seyed Mohammad Asghari and Benjamin Van Roy and Nat McAleese and John Aslanides and Geoffrey Irving},
  title = {{Fine-Tuning Language Models via Epistemic Neural Networks}},
  year = {2022},
  eprint = {2211.01568},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.01568},
}
Figure