In traditional deep learning, we treat feature extraction as a static process. A pre-trained model takes an image and produces a fixed vector—a "fingerprint" that is supposed to represent the object's identity regardless of the context. However, research in few-shot and meta-learning suggests that this "one-size-fits-all" approach is fundamentally limited.
If you are asked to distinguish a Siberian Husky from a Gray Wolf, you focus on the shape of the eyes and the curl of the tail. If you are asked to distinguish that same Husky from a Malamute, you might ignore the tail and focus instead on the size of the ears and the texture of the coat. The features that are "discriminative" change depending on what you are comparing against.
The core insight of this research direction is that embeddings should be dynamic, not static. By making the representation of an image dependent on the specific task at hand, models can "focus" on the features that matter most for the current set of classes.
The Problem with Task-Agnostic Embeddings
Most metric-based learners, such as the original Matching Networks by Oriol Vinyals and colleagues, rely on a shared embedding space. While effective, Hongyang Li and David Eigen argue in Finding Task-Relevant Features for Few-Shot Learning by Category Traversal that treating categories as isolated islands prevents the model from identifying which features are most relevant to the specific classification problem.
When a model is forced to use the same feature vector for every possible task, it suffers from "channel bias." As Xu Luo and Zenglin Xu demonstrate in Channel Importance Matters in Few-Shot Image Classification, models often remain "stubbornly" focused on patterns that were important during training but are irrelevant to the new, unseen classes encountered at test time.
Adapting Embeddings via Set-to-Set Functions
One of the most influential ways to solve this is to allow the examples in a task to "talk" to each other before they are classified. Instead of embedding each image in isolation, we use a set-to-set function—often a Transformer—to contextualize the representations.
In Few-Shot Learning via Embedding Adaptation With Set-to-Set Functions, Han-Jia Ye introduced FEAT, which uses self-attention to adapt image embeddings based on the other images in the support set. This ensures that the resulting vectors are specifically tuned to be discriminative for the current task's classes. Similarly, Philip Chikontwe and Sang Hyun Park proposed CAD (Co-Adapting Discriminative Features), which uses cross-attention to allow the query image and the support set to mutually inform each other’s representations.
Task-Specific Projections and Subspaces
Another approach is to keep the initial features the same but project them into a specialized, task-dependent subspace. The intuition here is that the "global" feature space contains a lot of noise; by finding a "local" projection, we can filter out everything except the dimensions that distinguish the current classes.
- TapNet: Sung Whan Yoon and Jaekyun Moon developed TapNet, which uses a task-adaptive linear projection to map features into a space where they align with learnable reference vectors.
- TAFSSL: Moshe Lichtenstein and Leonid Karlinsky showed in TAFSSL that even classical methods like PCA or ICA can be used to identify task-specific subspaces, effectively filtering out features that were only relevant to the base training classes.
- TEAM: Limeng Qiao and Jia Li took this further with TEAM, which computes a unique distance metric for every individual episode on the fly.
Generating Models on the Fly
The most radical form of adaptation involves hypernetworks: using one network to generate the weights of another based on the task description.
In TAFE-Net, Fisher Yu and Xin Wang use a meta-learner to dynamically adjust a CNN's weights for each task. This moves the burden of adaptation from the final classifier layer into the feature extractor itself. Andrey Zhmoginov and Mark Sandler extended this concept with the HyperTransformer, which uses a Transformer to generate the weights of a task-specific CNN directly from a few labeled examples.
This trend has recently moved into the zero-shot and multimodal domains. Ohad Amosy and Roi Reichart introduced Text2Model, which induces a custom classifier on the fly based on text descriptions. Similarly, Cheng-Yu Hsieh and colleagues developed FocalLens, enabling models to "focus" on specific visual attributes—like a person's clothing versus the flowers they are holding—based on natural language instructions.
Summary of Intuition
The shift from static to task-adaptive representations reflects a move toward more human-like perception. We do not look at the world through a fixed lens; we change our focus based on our goals. By allowing models to reshape their feature space, project into task-specific subspaces, or generate custom weights for every new problem, researchers are enabling AI to handle the vast diversity of the real world with far fewer examples.