MetaDiffOptions<T, TInput, TOutput>
Options & Configuration · AiDotNet.MetaLearning.Options
Configuration options for MetaDiff: Meta-Learning with Conditional Diffusion for Few-Shot Learning (Zhang et al., AAAI 2024).
Inheritance: ModelOptions → MetaDiffOptions<T, TInput, TOutput>
Implements: IMetaLearnerOptions<T>
How It Works
MetaDiff reframes the inner-loop gradient descent of meta-learning as a reverse diffusion process over model weights. A task-conditional denoising network iteratively removes noise to produce task-specific weights, conditioned on support-set features.
Constructors
| Constructor | Summary |
|---|---|
MetaDiffOptions(IFullModel<T, TInput, TOutput> metaModel) |
Creates options for meta-learning metaModel, with the default settings. |
Properties
| Property | Summary |
|---|---|
IEpisodicDataLoader<T, TInput, TOutput> DataLoader { get; set; } |
Episodic data loader that supplies the meta-training tasks; null when tasks are passed to training directly. |
IFullModel<T, TInput, TOutput> MetaModel { get; set; } |
The model whose parameters the meta-learner trains to adapt quickly to new tasks. |
IGradientBasedOptimizer<T, TInput, TOutput> InnerOptimizer { get; set; } |
Optimizer for task adaptation. |
IGradientBasedOptimizer<T, TInput, TOutput> MetaOptimizer { get; set; } |
Optimizer for the meta-update. |
ILossFunction<T> LossFunction { get; set; } |
Loss function for meta-training; null uses the default multi-class classification loss. |
bool EnableCheckpointing { get; set; } |
|
bool UseFirstOrder { get; set; } |
Whether to use the first-order approximation of the meta-gradient. |
double BetaEnd { get; set; } |
Ending value of the linear noise schedule β_T. |
double BetaStart { get; set; } |
Starting value of the linear noise schedule β_1. |
double InnerLearningRate { get; set; } |
|
double OuterLearningRate { get; set; } |
Learning rate of the outer (meta) update. |
double? GradientClipThreshold { get; set; } |
|
int AdaptationSteps { get; set; } |
|
int CheckpointFrequency { get; set; } |
|
int DiffusionSteps { get; set; } |
Number of diffusion timesteps for the full forward/reverse process. |
int EvaluationFrequency { get; set; } |
|
int EvaluationTasks { get; set; } |
|
int MetaBatchSize { get; set; } |
|
int NumMetaIterations { get; set; } |
|
int SamplingSteps { get; set; } |
Number of denoising steps used during inference (≤ DiffusionSteps). |
int TaskConditionDim { get; set; } |
Dimensionality of the task conditioning vector computed from support features. |
int? RandomSeed { get; set; } |
Methods
| Method | Summary |
|---|---|
IMetaLearnerOptions<T> Clone() |
|
bool IsValid() |