Jump to content

Matching Networks

From Emergent Wiki

Matching networks are a metric-based approach to few-shot learning introduced by Vinyals et al. in 2016. Unlike prototypical networks, which compress each class into a single prototype, matching networks attend over the entire support set, weighting each support example by its similarity to the query under a learned attention kernel. The prediction is a weighted combination of the support labels, where the weights are determined by a cosine-similarity-based attention mechanism. This architecture preserves more information from the support set and can handle non-uniform class distributions better than prototype-based methods. Matching networks also introduced the episodic training paradigm — training on tasks sampled from a task distribution, rather than on individual examples — which has become standard in meta-learning. The attention mechanism connects matching networks to broader developments in neural attention and transformer architectures.