Adaptive Group Robust Ensemble Knowledge Distillation

Patrik Joslin Kenfack, Ulrich Aïvodji, Samira Ebrahimi Kahou · DOI

Abstract

Knowledge Distillation (KD) is a standard technique for model compression, but it often causes student models to inherit or amplify spurious biases from their teachers. We introduce Adaptive Group Robust Ensemble Knowledge Distillation (AGRE-KD), a novel framework designed to mitigate this bias amplification. By utilizing a biased reference model to identify and downweight teacher signals that rely on "shortcuts," AGRE-KD ensures the student learns more robust features. Our evaluation across vision and NLP benchmarks demonstrates that AGRE-KD significantly improves worst-group accuracy (WGA), frequently outperforming the original teacher ensemble.

Introduction

Machine learning models frequently exploit spurious correlations—non-causal "shortcuts" in training data—leading to high average accuracy but poor performance on underrepresented subgroups. For instance, a model might identify "waterbirds" based on a water background rather than the bird's features. While ensemble methods can improve robustness, distilling these ensembles into smaller students often leads the student to latch onto the easiest, most biased features shared by the teachers. AGRE-KD addresses this by dynamically filtering teacher knowledge during the distillation process.

Methods

The AGRE-KD framework employs a gradient-based weighting scheme to orchestrate the student's learning from an ensemble of teachers.

The AGRE-KD training pipeline, showing how gradients from a biased network and teacher networks are used for adaptive weighting of KL losses.

The process consists of four primary components:

  1. Biased Reference: A model trained using standard Empirical Risk Minimization (ERM) serves as a "what-not-to-do" reference, capturing common spurious correlations.
  2. Gradient Alignment: For each training sample, the algorithm computes the gradient of the student's loss with respect to each teacher and compares it to the gradient relative to the biased model.
  3. Adaptive Weighting: Teachers whose gradient directions align closely with the biased model (high cosine similarity) are downweighted, as they likely provide biased signals for that sample. Conversely, teachers deviating from the biased path are upweighted.
  4. Debiased Teachers: The teachers themselves are pre-processed using Deep Feature Reweighting (DFR) to ensure they possess robust knowledge to share.

Mechanism: Gradient Direction as a Bias Compass

A key insight of this work is that the direction of the gradient is a reliable indicator of the learning path (biased vs. robust).

Comparison of different distillation directions. The adaptive average direction (green) effectively steers the student (S) away from the biased direction (red) compared to a simple average (blue).

As shown in the figure above, a simple average of teacher directions (blue) can still be heavily influenced by a biased direction (red). AGRE-KD's adaptive weighting (green) successfully identifies and avoids these biased trajectories, guiding the student toward more robust feature representations.

Experimental Results

AGRE-KD was evaluated on four benchmarks: Colored MNIST, Waterbirds, CelebA, and CivilComments.

  • Waterbirds: AGRE-KD achieved 87.9% Worst-Group Accuracy (WGA), a significant improvement over standard averaging (46.4%) and a single student trained on labels (54.1%).
  • CelebA: The method reached 91.9% WGA, compared to just 28.8% for standard ensemble distillation.
  • Performance Gains: In several instances, the distilled student achieved higher WGA than the original teacher ensemble, demonstrating the effectiveness of the weighting scheme in filtering out noise and bias.

Conclusion

AGRE-KD provides a robust solution for distilling knowledge from ensembles without inheriting spurious biases. By treating the gradient direction of a biased model as a "compass" for what to avoid, the method achieves state-of-the-art results in group robustness. Future work will explore feature-level distillation and methods to reduce the computational overhead of per-teacher gradient calculations.

Summary updated

BibTeX
@article{kenfack2025adaptive,
  author = {Patrik Joslin Kenfack and Ulrich Aïvodji and Samira Ebrahimi Kahou},
  title = {{Adaptive Group Robust Ensemble Knowledge Distillation}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=G2BEBaKd8Y},
}
Figure