DynamicTaskSamplingAlgorithm<T, TInput, TOutput>

Models & Types · AiDotNet.MetaLearning.Algorithms

Implementation of Dynamic Task Sampling: difficulty-aware gradient reweighting for meta-learning.

Inheritance: ModelBase<T, TInput, TOutput> → MetaLearnerBase<T, TInput, TOutput> → DynamicTaskSamplingAlgorithm<T, TInput, TOutput>

How It Works

Dynamic Task Sampling maintains running difficulty estimates for tasks in the meta-batch and uses difficulty-proportional weighting on meta-gradients. Tasks with higher post-adaptation query loss (= harder tasks) receive higher gradient weights, focusing meta-learning on areas where the model struggles most. An exploration bonus (UCB-style) ensures that tasks seen less frequently still receive gradient signal.

Algorithm:

Constructors

Constructor Summary
DynamicTaskSamplingAlgorithm(DynamicTaskSamplingOptions<T, TInput, TOutput> options)

Properties

Property Summary
MetaLearningAlgorithmType AlgorithmType { get; }

Methods

Method Summary
IModel<TInput, TOutput, ModelMetadata<T>> Adapt(IMetaLearningTask<T, TInput, TOutput> task)
T MetaTrain(TaskBatch<T, TInput, TOutput> taskBatch)