[Paper Review] A Universal Representation Transformer Layer for Few-Shot Image Classification
URT meta-learns to transform a universal, multi-domain backbone representation into task-adapted representations for few-shot classification, achieving state-of-the-art on Meta-Dataset with efficient inference.
Few-shot classification aims to recognize unseen classes when presented with only a small number of samples. We consider the problem of multi-domain few-shot image classification, where unseen classes and examples come from diverse data sources. This problem has seen growing interest and has inspired the development of benchmarks such as Meta-Dataset. A key challenge in this multi-domain setting is to effectively integrate the feature representations from the diverse set of training domains. Here, we propose a Universal Representation Transformer (URT) layer, that meta-learns to leverage universal features for few-shot classification by dynamically re-weighting and composing the most appropriate domain-specific representations. In experiments, we show that URT sets a new state-of-the-art result on Meta-Dataset. Specifically, it achieves top-performance on the highest number of data sources compared to competing methods. We analyze variants of URT and present a visualization of the attention score heatmaps that sheds light on how the model performs cross-domain generalization. Our code is available at https://github.com/liulu112601/URT.
Motivation & Objective
- Motivate and address multi-domain few-shot classification where unseen classes come from diverse data sources.
- Propose a learnable mechanism to adapt universal representations to individual tasks via attention over domain-specific backbones.
- Show that meta-learning the backbone-composition improves cross-domain generalization over hand-crafted feature selection.
- Demonstrate state-of-the-art performance on Meta-Dataset and analyze attention patterns to interpret cross-domain weighting.
Proposed method
- Introduce the Universal Representation Transformer (URT) layer that uses dot-product self-attention to weight and combine m pre-trained domain backbones.
- Represent each class in a task with class-wise attention using queries derived from the class support set and keys from backbone back representations.
- Support single-head and multi-head URT variants; multi-head outputs concatenated representations and include a regularizer to diversify attention heads.
- Train URT end-to-end with a Prototypical Networks loss, using class prototypes in the adapted representation space to classify queries.
- Normalize backbone outputs to account for differing vector norms prior to URT processing.
- Optionally compare FiLM-modulated backbones (pf backbones) to show URT benefits across backbone families.
Experimental results
Research questions
- RQ1Can a Transformer-style URT layer improve cross-domain few-shot classification by learning to weight and compose universal representations?
- RQ2Do attention heads in URT produce interpretable domain-specific weighting for seen and unseen domains?
- RQ3Do URT gains persist when using different backbone training paradigms (e.g., FiLM-modulated backbones)?
Key findings
- URT establishes a new state-of-the-art on Meta-Dataset, top-performing on the highest number of data sources among competing methods.
- URT reduces inference time by over 10x compared to SUR (0.04s vs 0.43s per task on a V100).
- Two-head URT learns complementary attention patterns: one head focuses on the same-domain backbone, the other blends related domains; unseen domains mix multiple backbones for robustness.
- URT achieves gains across several datasets compared to SUR without sacrificing performance on others; in Table 1, URT outperforms SUR on multiple sources.
- Using FiLM-modulated backbones (URT-pf) generally improves over SUR-pf on several datasets, indicating robustness across backbone families.
- Ablation studies show the importance of keys and support-set-derived queries, and the benefit of having multiple heads for performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.