HyperTransformer: Model Generation for Supervised and Semi-Supervised Few-Shot Learning

11 Jan 2022  ·  Andrey Zhmoginov, Mark Sandler, Max Vladymyrov ·

In this work we propose a HyperTransformer, a Transformer-based model for supervised and semi-supervised few-shot learning that generates weights of a convolutional neural network (CNN) directly from support samples. Since the dependence of a small generated CNN model on a specific task is encoded by a high-capacity Transformer model, we effectively decouple the complexity of the large task space from the complexity of individual tasks. Our method is particularly effective for small target CNN architectures where learning a fixed universal task-independent embedding is not optimal and better performance is attained when the information about the task can modulate all model parameters. For larger models we discover that generating the last layer alone allows us to produce competitive or better results than those obtained with state-of-the-art methods while being end-to-end differentiable.

PDF Abstract
Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Few-Shot Image Classification OMNIGLOT - 1-Shot, 20-way MAML++ Accuracy 97.7 # 5
Few-Shot Image Classification OMNIGLOT - 5-Shot, 20-way MAML++ Accuracy 99.3% # 7
Few-Shot Image Classification Tiered ImageNet 5-way (5-shot) RFS Accuracy 73.2% # 47
Few-Shot Image Classification Tiered ImageNet 5-way (5-shot) HyperTransformer Accuracy 73.9% # 46