MetaLoRABankAlgorithm<T, TInput, TOutput>

Models & Types · AiDotNet.MetaLearning.Algorithms

Implementation of Meta-LoRA Bank (2024).

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

Implements: IGeneratedParameterRegistrar<T>

How It Works

Meta-LoRA Bank maintains a bank of K diverse LoRA modules, each representing a learned adaptation pattern. For a new task, a gating network computes task-conditioned scores and selects the top-K modules via sparse gating. The selected modules are combined with learned gating weights to produce the task-specific adaptation.

Algorithm:

Advantages: Each module specializes in a different type of task adaptation. The gating mechanism enables compositional generalization — novel tasks can be handled by new combinations of existing modules.

Constructors

Constructor Summary
MetaLoRABankAlgorithm(MetaLoRABankOptions<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)