BatchBALD<T>

Models & Types · AiDotNet.ActiveLearning

Implements BatchBALD for joint batch selection in active learning.

Implements: IActiveLearningStrategy<T>

For Beginners

BatchBALD extends BALD to select batches of samples that are jointly informative. Unlike naive greedy selection that picks individual high-BALD samples, BatchBALD considers the joint mutual information to avoid redundant selections.

How It Works

Problem with naive BALD: Selecting top-k samples by individual BALD scores may result in redundant samples that provide similar information.

Solution: BatchBALD computes joint mutual information for candidate batches: I(y₁, y₂, …, yₖ; θ|x₁, x₂, …, xₖ, D)

Algorithm (Greedy Approximation):

Reference: Kirsch, A., van Amersfoort, J., & Gal, Y. (2019). “BatchBALD: Efficient and Diverse Batch Acquisition for Deep Bayesian Active Learning.”

Constructors

Constructor Summary
BatchBALD(int numMcSamples, double dropoutRate, int candidatePoolSize) Initializes a new instance of the BatchBALD class.

Properties

Property Summary
bool UseBatchDiversity { get; set; }
string Name { get; }

Methods

Method Summary
Dictionary<string, T> GetSelectionStatistics()
Vector<T> ComputeInformativenessScores(IFullModel<T, Tensor<T>, Tensor<T>> model, Tensor<T> unlabeledPool)
int[] SelectSamples(IFullModel<T, Tensor<T>, Tensor<T>> model, Tensor<T> unlabeledPool, int batchSize)