OMLAlgorithm<T, TInput, TOutput>

Models & Types · AiDotNet.MetaLearning.Algorithms

Implementation of OML: Online-aware Meta-Learning (Javed & White, NeurIPS 2019).

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

How It Works

OML partitions model parameters into a Representation Learning Network (RLN, parameters theta) and a Prediction Learning Network (PLN, parameters W). The inner loop is ONLINE: it updates only W, one support example at a time, as a continual learner would see a trajectory. The meta-objective then asks the adapted network to fit both that trajectory and random samples from the task (the query set), so that sequential updates do not interfere with what was learned before. Sparse representations emerge from this objective; the paper adds no sparsity penalty.

Algorithm (paper Algorithm 1):

PLN indices are the last PlnFraction of the flat parameter vector. SparsityPenalty adds an optional L1 term on the RLN parameters (off by default, as in the paper).

Constructors

Constructor Summary
OMLAlgorithm(OMLOptions<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)