GNNMetaAlgorithm<T, TInput, TOutput>
Models & Types · AiDotNet.MetaLearning.Algorithms
Implementation of Graph Neural Network-based Meta-learning.
Inheritance: ModelBase<T, TInput, TOutput> → MetaLearnerBase<T, TInput, TOutput> → GNNMetaAlgorithm<T, TInput, TOutput>
Implements: IGeneratedParameterRegistrar<T>
For Beginners
GNN Meta-learning is like studying with a study group:
How It Works
GNN-based meta-learning models tasks and examples as nodes in a graph, with edges representing relationships between them. The graph neural network learns to propagate information across the task structure to improve learning.
Key Innovation: Instead of treating tasks independently, GNN Meta-learning:
- Builds a graph where nodes represent tasks or examples
- Edges connect similar or related tasks
- Message passing propagates useful information between tasks
- The aggregated graph information guides adaptation
- MAML: Each student learns alone but starts with good study habits
- GNN Meta: Students share notes and help each other learn faster
When learning a new subject (task), you can benefit from what others who studied similar subjects (similar tasks) have learned. The graph network learns which tasks are helpful for each other.
Architecture:
- Node Embeddings: Each task gets a vector representation
- Edge Weights: Learned weights showing task relationships
- Message Passing: Information flows between related tasks
- Graph Aggregation: Combines all node information for prediction
Algorithm:
Reference: Garcia, V., & Bruna, J. (2018). Few-shot learning with graph neural networks.
Constructors
| Constructor | Summary |
|---|---|
GNNMetaAlgorithm(GNNMetaOptions<T, TInput, TOutput> options) |
Initializes a new instance of the GNNMetaAlgorithm class. |
Properties
| Property | Summary |
|---|---|
MetaLearningAlgorithmType AlgorithmType { get; } |
Gets the algorithm type identifier for this meta-learner. |
Methods
| Method | Summary |
|---|---|
IModel<TInput, TOutput, ModelMetadata<T>> Adapt(IMetaLearningTask<T, TInput, TOutput> task) |
Adapts the meta-learned model to a new task using graph-informed adaptation. |
T MetaTrain(TaskBatch<T, TInput, TOutput> taskBatch) |
Performs one meta-training step using GNN-based task relationship modeling. |