DREAMOptions<T, TInput, TOutput>

Options & Configuration · AiDotNet.MetaLearning.Options

Configuration options for DREAM: Directed REward Augmented Meta-learning.

Inheritance: ModelOptions → DREAMOptions<T, TInput, TOutput>

Implements: IMetaLearnerOptions<T>

How It Works

DREAM augments MAML-style meta-learning with a learned reward/loss shaping function that transforms the raw task loss into a more informative gradient signal. The reward shaper maps (loss, gradient_norm, step) → shaped_loss, enabling the inner loop to receive curriculum-like guidance that accelerates adaptation.

Constructors

Constructor Summary
DREAMOptions(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; } Must stay null: this algorithm takes no plain gradient inner step (it adapts without one, or by its own update rule), so a supplied optimizer is rejected when the learner is built.
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 regression loss.
bool EnableCheckpointing { get; set; }
bool UseFirstOrder { get; set; } Whether to use the first-order approximation of the meta-gradient.
double InnerLearningRate { get; set; }
double OuterLearningRate { get; set; }
double RewardShapingWeight { get; set; } Weight for the reward shaping term in the total loss.
double ShapingDiscount { get; set; } Discount factor for shaped reward across adaptation steps.
double? GradientClipThreshold { get; set; }
int AdaptationSteps { get; set; }
int CheckpointFrequency { get; set; }
int EvaluationFrequency { get; set; }
int EvaluationTasks { get; set; }
int MetaBatchSize { get; set; }
int NumMetaIterations { get; set; }
int RewardShaperHiddenDim { get; set; } Hidden dimension for the reward shaper MLP.
int? RandomSeed { get; set; }

Methods

Method Summary
IMetaLearnerOptions<T> Clone()
bool IsValid()