Share your work here ✅

Fastai Active Learning

tl;dr First attempt at active learning for fastai library. Includes random, softmax, and Monte Carlo Dropout std calculations to measure the uncertainty of an example for a machine learning model.

I recently came across a paper called BatchBALD: Efficient and Diverse Batch Acquisition for Deep Bayesian Active Learning and the following blog which was a segway to explore active learning.

I thought it would be cool to have active learning as a part of the fastai library. I am not an expert on active learning but thought it would be a great way to learn about the field and different algorithms. P2 of the fastai lessons has been very helpfuf in implementing the gist.

The implementation separates the uncertainty measurement from the active learning selection process. There are two options for selection:

  1. Select x most uncertain examples from the entire dataset
  2. Select x most uncertain across all batches in dataset.

I hope to continue working on the gist and fully implement different papers. If anyone wants to contribute or finds bugs feel free to pm me.

Shout out to @mrdbourke for implementing Monte Carlo Dropout in fastai.

7 Likes