Matching Networks: Attention-Weighted Few-Shot Classification
Interactive 2D lab: drag a query point around an embedding plane and watch attention weights over a labelled support set decide its class in real time, the core mechanic behind Matching Networks for few-shot learning.
Few-shot classifiers like Matching Networks never fine-tune on a new class — instead they attend over a small labelled support set and vote. This simulation lays that attention mechanism out as flat 2D geometry: support points from N classes sit in an embedding plane, a draggable query point casts a distance-weighted attention line to every one of them, and the predicted class is whichever label collects the most attention mass. A sharpness slider morphs the vote continuously between a soft, blurry consensus and a hard nearest-neighbour lookup, while live readouts track prediction confidence and attention entropy as you move the query across the plane. Pan and zoom the plane freely to inspect any cluster up close.
Interactive 2D lab: drag a query point around an embedding plane and watch attention weights over a labelled support set decide its class in real time, the core mechanic behind Matching Networks for few-shot learning.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install