ContextMetaRLOptions<T, TInput, TOutput>
Options & Configuration · AiDotNet.MetaLearning.Options
Configuration options for Context Meta-RL: context-conditioned meta-reinforcement learning with attention-based aggregation.
Inheritance: ModelOptions → ContextMetaRLOptions<T, TInput, TOutput>
Implements: IMetaLearnerOptions<T>
How It Works
Context Meta-RL aggregates task context from support interactions using an attention mechanism and uses the resulting context vector to modulate the policy network parameters. Unlike PEARL’s Gaussian posterior, this approach uses deterministic attention-based aggregation with a learned query vector.
Constructors
| Constructor | Summary |
|---|---|
ContextMetaRLOptions(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 multi-class classification loss. |
bool EnableCheckpointing { get; set; } |
|
bool UseFirstOrder { get; set; } |
Whether to use the first-order approximation of the meta-gradient. |
double AttentionTemperature { get; set; } |
Attention temperature for softmax. |
double InnerLearningRate { get; set; } |
|
double ModulationStrength { get; set; } |
Modulation strength for context-conditioned parameter adjustment. |
double OuterLearningRate { get; set; } |
|
double? GradientClipThreshold { get; set; } |
|
int AdaptationSteps { get; set; } |
|
int CheckpointFrequency { get; set; } |
|
int ContextDim { get; set; } |
Dimensionality of the context embedding. |
int EvaluationFrequency { get; set; } |
|
int EvaluationTasks { get; set; } |
|
int MetaBatchSize { get; set; } |
|
int NumAttentionHeads { get; set; } |
Number of attention heads for context aggregation. |
int NumMetaIterations { get; set; } |
|
int? RandomSeed { get; set; } |
Methods
| Method | Summary |
|---|---|
IMetaLearnerOptions<T> Clone() |
|
bool IsValid() |