EPNetAlgorithm<T, TInput, TOutput>
Models & Types · AiDotNet.MetaLearning.Algorithms
Implementation of EPNet (Embedding Propagation Network) (Rodriguez et al., CVPR 2020).
Inheritance: ModelBase<T, TInput, TOutput> → MetaLearnerBase<T, TInput, TOutput> → EPNetAlgorithm<T, TInput, TOutput>
For Beginners
EPNet makes features better by sharing information:
The insight: Features extracted by a neural network are good but noisy. If two examples are similar, they should have similar features. EPNet enforces this by propagating features through a similarity graph.
How it works:
- Extract features for all examples (support + query)
- Build a k-nearest-neighbor graph based on feature similarity
- Propagate features through the graph (like heat diffusion)
- Each node averages its neighbors’ features (weighted by similarity)
- Repeat for several iterations
- The propagated features are smoother and more consistent
- Classify using the refined features
Why propagation helps:
- Noisy features get smoothed out (noise reduction)
- Cluster structure becomes clearer (better separation)
- Query examples near support clusters get pulled toward them
- Works transductively: ALL queries benefit from each other
How It Works
EPNet refines embeddings through label propagation on a nearest-neighbor graph. By propagating feature information between similar examples, embeddings become smoother and more discriminative for few-shot classification.
Algorithm - EPNet:
Reference: Rodriguez, P., Laradji, I., Drouin, A., & Lacoste, A. (2020). Embedding Propagation: Smoother Manifold for Few-Shot Classification. CVPR 2020.
Constructors
| Constructor | Summary |
|---|---|
EPNetAlgorithm(EPNetOptions<T, TInput, TOutput> options) |
Initializes a new EPNet meta-learner. |
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) |