Matching Networks for Few-Shot Classification
A matching network classifies a new row by comparing it with a small labelled support set. A learned embedding maps rows to vectors, the new row attends to each support row by cosine similarity, and the predicted class probabilities are the attention-weighted labels. Training repeats small classification tasks (episodes) so that the embedding works for classes with only a handful of examples, optionally letting each embedding depend on the whole support set through recurrent networks.
매칭 네트워크는 라벨이 붙은 적은 수의 지원 집합과 비교해 새 행을 분류합니다. 학습된 임베딩이 행을 벡터로 바꾸고, 새 행은 코사인 유사도로 각 지원 행에 주의를 주며, 주의 가중치로 라벨을 합한 값이 범주 확률이 됩니다. 작은 분류 과제(에피소드)를 반복해 학습하므로 예시가 몇 개뿐인 범주에도 쓸 수 있고, 순환 신경망으로 지원 집합 전체를 반영한 임베딩도 선택할 수 있습니다.
Can I classify rows into classes for which I have only a few labelled examples, including classes not seen during training?
라벨이 붙은 예시가 몇 개뿐인 범주, 학습 때 보지 못한 범주까지 포함해 행을 분류할 수 있습니까?
The method reports mean test-episode accuracy with a 95% interval, the accuracy of the same attention rule on raw features as a baseline, the difference with a t-test, and the split of classes or rows between training and testing.
When to use Matching Networks for Few-Shot Classification
- Many classes, each with only a few labelled rows.
- New classes appear over time and must be recognised from a few examples.
When to use something else
- Every class has plenty of labelled rows: use Multi Layer Perceptron (MLP)
- You prefer class-mean prototypes rather than attention over all support rows: use Prototypical Network Few-Shot Classification
Assumptions and requirements
- Numeric or dummy-coded features (standardised with training statistics)
- Each usable class has at least k_shot + n_query rows
- Test classes resemble the training classes in how features separate them
What the analysis reports
- Mean test-episode accuracy with 95% interval
- Raw-feature cosine-attention baseline and paired difference
- Classes and rows in the training and test parts
How to report it
A matching network trained on 1000 5-way 5-shot episodes reached a mean test-episode accuracy of [value] (95% CI [value] to [value]) against [value] for cosine attention on raw features.
Related methods
- Prototypical Network Few-Shot Classification
- Siamese Network Similarity Learning
- K-Nearest Neighbors (KNN)
- Triplet-Loss Metric Learning
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with NumPy at a stated tolerance of 1e-12.
독립 계산. NumPy 대조 참조 시험 1건 통과(허용오차 1e-12).
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Matching Networks for Few-Shot Classification on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- Price
- 900 credits for one analysis up to 10,000 rows (complexity level 5); larger or wider data costs more. Optional methodologist review: 3600 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.