Few-shot Transferable Robust Representation Learning via Bilevel Attacks

Minseon Kim, Hyeonjeong Ha, Sung Ju Hwang · OpenReview

Abstract

Existing adversarial learning methods for enhancing the robustness of deep neural networks assume the availability of a large amount of data from which we can generate adversarial examples. However, in an adversarial meta-learning setting, the model needs to train with only a few adversarial examples to learn a robust model for unseen tasks, which is a very difficult goal to achieve. Further, learning transferable robust representations for unseen domains is a difficult problem even with a large amount of data. To tackle such a challenge, we propose a novel adversarial self-supervised meta-learning framework with bilevel attacks which aims to learn robust representations that can generalize across tasks and domains. Specifically, in the inner loop, we update the parameters of the given encoder by taking inner gradient steps using two different sets of augmented samples, and generate adversarial examples for each view by maximizing the instance classification loss. Then, in the outer loop, we meta-learn the encoder parameter to maximize the agreement between the two adversarial examples, which enables it to learn robust representations. We experimentally validate the effectiveness of our approach on unseen domain adaptation tasks, on which it achieves impressive performance. Specifically, our method significantly outperforms the state-of-the-art meta-adversarial learning methods on few-shot learning tasks, as well as self-supervised learning baselines in standard learning settings with large-scale datasets.

Introduction

Meta-learning has revolutionized few-shot learning, enabling AI to adapt to new tasks with minimal data. However, these models remain notoriously fragile, suffering from two primary weaknesses: adversarial vulnerability and domain overfitting. While existing Adversarial Meta-Learning (AML) techniques can defend against attacks within a known training domain, they often fail when transitioned to entirely unseen domains. This failure stems from a reliance on "task-dependent" attacks that learn to defend specific decision boundaries rather than fundamental data representations. This paper introduces MAVRL (Meta-Adversarial Multi-view Representation Learning), a framework designed to learn robust, transferable features that remain stable across shifting environments.

Methodology: MAVRL

MAVRL shifts the focus from label-based defense to maintaining "multi-view consistency" through three core components:

  1. Bootstrapped Multi-view Encoders: The system temporarily splits a shared initialization into two specialized encoders ($ heta_1^\tau$ and $ heta_2^\tau$). Each is updated using distinct random augmentations of the same small support set, effectively enriching the representation space.
  2. Label-free Multi-view Adversarial Latent Attacks: Adversarial examples are generated by maximizing the disagreement between these specialized encoders in their latent representations. By avoiding class labels, MAVRL creates task-agnostic adversaries that are harder to overfit.
  3. Consistency-based Learning: The model is meta-trained to minimize the discrepancy between these two adversarial views, forcing it to learn representations invariant to both noise and domain shifts.
The MAVRL framework utilizes bootstrapped encoders and multi-view adversarial examples to learn robust representations that generalize to unseen domains.

Experimental Setup and Results

The framework was meta-trained on CIFAR-FS and Mini-ImageNet and evaluated on diverse unseen domains, including fine-grained datasets (CUB, Flower) and specialized non-RGB imagery (EuroSAT, ISIC).

MAVRL demonstrated a significant performance leap over state-of-the-art methods:

  • Robust Accuracy: On unseen domains, robust accuracy under attack improved from an average of 7.39% to 28.20%.
  • Clean Accuracy: Unlike traditional adversarial training, MAVRL improved standard accuracy on unseen domains from 32.49% to 50.32%.
  • Domain Generalization: On satellite imagery (EuroSAT), MAVRL maintained nearly 20% robust accuracy, while previous methods collapsed to near zero.

Key Insights: Smoothness and Stability

A critical finding is that MAVRL avoids "representational collapse"—a common failure in few-shot settings where models produce identical representations for different adversarial examples. By artificially enriching the representation space through bootstrapping, MAVRL ensures the model learns the nature of perturbations.

Visualization of the loss surface for MAVRL on an unseen domain, demonstrating the smoothness and stability achieved by the method.

Visualization of the loss surfaces confirms that MAVRL produces significantly smoother landscapes than previous methods. This smoothness is a direct indicator of a more stable and robust model, as small input perturbations do not lead to wild swings in error.

Conclusion

MAVRL represents a major step forward in transferable robustness for few-shot learning. While the dual-encoder setup introduces some computational overhead, the gains in both clean and robust accuracy across unseen domains are substantial. Future work may explore scaling these multi-view latent attacks to larger datasets and different architectures like Vision Transformers.

Summary updated

BibTeX
@inproceedings{kim2023few,
  author = {Minseon Kim and Hyeonjeong Ha and Sung Ju Hwang},
  title = {{Few-shot Transferable Robust Representation Learning via Bilevel Attacks}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=LLy2vm_p35C},
}
Figure