Three labelled support groups are separated from held-out query tiles by an explicit boundary.
Original conceptual diagram using synthetic examples. It illustrates the article’s question, not experimental results.

State the transfer claim

Five labelled pixels per class sounds like a complete experimental setting. It leaves several questions unanswered: whether those classes were seen during pretraining, whether their surrounding patches were visible, whether the five pixels came from one object, and whether the queries occupy a different region. A few-shot result becomes interpretable only when these details are explicit.

This guide proposes a practical evaluation design for hyperspectral classification. Its numerical examples are constructed planning examples, not measured performance. The distinction is between learning a new class from a small support set, adapting familiar classes to a new scene, and fitting a classifier with few labels in one scene. All are useful problems, but they test different forms of generalisation.

Separate base learning from novel-class adaptation

Prototypical Networks learn an embedding in which a class is represented by a prototype formed from its support examples. A query is classified through distances to these prototypes. The original few-shot formulation concerns classes absent from the training set, given a small labelled support set for each new class. [1]

For an HSI application, write down the base classes used to train the representation, development classes used to choose the method, and final classes used to evaluate adaptation. Publish the mapping from the original ontology to these partitions. If every final class was already used to learn the encoder, describe the experiment as label-efficient adaptation rather than evidence of novel-class learning.

Also record semantic overlap. Two datasets can use different class names for effectively the same material. Conversely, identically named vegetation classes can differ substantially across sites. A class-name split alone does not establish either semantic novelty or sensor transfer.

Make the episode arithmetic visible

Consider a constructed five-way, five-shot episode with 20 queries per class. The support set contains 25 labelled examples; the query set contains 100 evaluation examples. The episode therefore uses 125 distinct centre locations. Augmenting each support example ten times still leaves 25 acquired labels, not 250 independent observations.

If inputs are 9 × 9 patches, 25 support centres correspond to at most 2,025 patch positions before overlap, and often far fewer unique scene pixels. The model receives much more input context than the labelled centres suggest. Save the support-centre list and the union of its patch footprints alongside the label count.

For a class represented by one small physical object, five nearby support pixels may reveal almost the entire object. Evaluate on other instances when the intended use is recognition of a new object. If the dataset cannot support that separation, state that it measures within-instance interpolation.

Lock geography before sampling episodes

Choose admissible support and query regions before drawing episodes. Liang and colleagues document how overlapping spatial processing can bias evaluation when train and test samples are selected from the same image. [2] The practical implication here is to define separation for the actual model input, not only for the labelled centres.

Two axis-aligned square patches with radius r overlap when their centre displacement is at most 2r in both axes. A 9 × 9 patch has r = 4; excluding query centres within Chebyshev distance 8 of a support centre prevents shared raw patch pixels. This geometric exclusion does not remove wider scene dependence or leakage from an earlier global transformation.

Fit scaling, dimensionality reduction and learned preprocessing only with the information permitted by the protocol. If the encoder sees the full unlabelled query region during adaptation, declare that access explicitly. Keep an inductive comparison in which final queries do not influence any fitted transformation.

Sample supports without hidden selection

A reproducible support policy starts from a public list of eligible locations. Specify whether sampling is uniform over pixels, connected objects, polygons or scenes. These distributions differ: uniform pixel sampling gives a large homogeneous field many more opportunities to supply support examples than a tiny object.

A practical pair of evaluations uses a pixel-uniform policy and an instance-aware policy where reliable object identities exist. Treat them as different protocols and retain their separate results. Do not use class confidence from a model trained on the final labels to select unusually easy supports.

Keep ambiguous, shadowed or mixed examples visible in the record. Exclusion can be justified by a predefined annotation-quality rule, but choosing pure centres only for a proposed method creates an unreported advantage. The same admissible support pool, label budget and quality rule should apply to every comparator.

Give baselines the same information

A Closer Look at Few-shot Classification shows that backbone choice and standard fine-tuning can substantially change comparisons between few-shot methods. Its experiments are not HSI evidence, but they motivate testing a carefully matched simple baseline before attributing gains to episodic learning. [3]

Compare a spectral nearest-centroid rule, a frozen-encoder classifier and a fine-tuned encoder when those choices fit the task. Match the pretraining data, spectral inputs, spatial context, optimisation budget and support examples. If a linear head cannot be fitted reliably with the smallest budget, report that limitation and the regularisation search rather than quietly providing extra labels.

Include both one-shot and several larger budgets. A method that helps at one support per class but loses the advantage at five supports has a different practical role from a consistently efficient method. Account separately for base-training labels, adaptation labels and labels used to tune hyperparameters.

Keep validation disjoint from final queries

Hyperparameters need a development setting that resembles the final task without reusing its labels. Scikit-learn documents group-based splitters that keep members of a specified group together. [4] Such machinery can help implement scene or specimen separation, but the analyst must define the group correctly and inspect class coverage.

Choose learning rates, early stopping, prototype normalisation and distance functions using development episodes. Then freeze the configuration before final query evaluation. A five-shot paper that selects its checkpoint on a large labelled final-query set has spent more supervision than its headline suggests.

When a final class has too few independent instances for the requested episode, reduce the episode size or mark it unsupported. Repeatedly drawing the same location with replacement does not create new evidence. Save the exact episode manifest so another implementation can reproduce the comparison.

Report support variation honestly

Repeat support selection because an individual support set can be unusually easy or difficult. Reuse identical episode manifests across models, then report paired differences as well as each model’s scores. Show class-specific results and the lower-performing support selections, not only the best run.

If 200 episodes draw queries from the same scene, those episodes quantify sensitivity to support selection within that scene. They are not 200 independently sampled landscapes. Separate uncertainty due to support choice, optimisation seed and held-out scene. When several scenes exist, aggregate at the scene level as well as across episodes.

A compact results table can retain the conditions needed to interpret a number. The template below is a proposed reporting format; it contains no benchmark claims.

A minimal record for each few-shot comparison.
RecordWhat to disclose
TaskNovel classes, new scene, or few labels within one scene
EpisodeWays, shots, queries, replacement policy and manifest
Spatial accessPatch footprint, exclusion rule and unlabelled regions
Learning budgetBase labels, support labels, validation labels and compute
VariabilitySupport draws, training seeds and independent scenes
OutcomePer-class scores, paired differences and failure cases

Audit before training

Before a long run, visualise two complete episodes over the reference map. Mark support centres, full support footprints, queries and excluded regions. Confirm that changing the random seed changes only the intended selection, and check that all models consume the same manifest.

The strongest first experiment is often a modest one: a clear transfer claim, a frozen encoder, a simple head and a split that can be inspected. Build complexity only after that baseline establishes what the small labelled support set actually teaches. For the underlying split mechanics, continue with spatial splits and leakage.

Frequently asked questions

Does five-shot mean five independent objects?

Only if the sampling unit is an object. Five pixels can belong to one object, so report both the label count and the number of independent instances or groups.

Can unlabelled query pixels be used?

Yes, within an explicitly transductive protocol. Keep that result separate from an inductive setting in which final queries do not influence fitting.

Are repeated episodes independent test datasets?

Usually not when they reuse one scene or the same query pool. They measure variation under the episode sampler, not generalisation across independently acquired scenes.

References and further reading

  1. Snell, Swersky and Zemel: Prototypical Networks for Few-shot Learning
  2. Liang et al.: On the Sampling Strategy for Evaluation of Spectral-Spatial Methods in Hyperspectral Image Classification
  3. Chen et al.: A Closer Look at Few-shot Classification
  4. scikit-learn: Cross-validation iterators for grouped data

Reader feedback

— reads— comments

Reads since 1 October 2026: at least 15 seconds with the article visible, counted once per browser per day. Reactions are anonymous and can be changed.

Discuss this article

Ask a technical question, challenge an assumption or share evidence from your own work.

Your name and comment will be public after approval. New comments wait for approval. No email required. Keep it respectful and relevant; no personal information or spam. Plain text, up to 2,000 characters.

Owner: manage comments