RotoGBML: Towards Out-of-distribution Generalization for Gradient-based Meta-learning
Min Zhang, Zifeng Zhuang, Zhitao Wang, Donglin Wang · 2024
Gradient-based meta-learning (GBML) algorithms can quickly adapt to new tasks by transferring the learned meta-knowledge while assuming that all tasks come from the same distribution (in-distribution, ID). However, in the real world, they often grapple with an out-of-distribution (OOD) generalization challenge, where tasks stem from diverse distributions. OOD exacerbates discrepancies in task gradient magnitudes and directions, posing a formidable challenge for GBML in optimizing meta-knowledge by minimizing the sum of task gradients in each minibatch. To address this problem, we propose RotoGBML, a novel approach designed to homogenize OOD task gradients. RotoGBML employs reweighted vectors to dynamically balance diverse magnitudes to a standardized scale and uses rotation matrices to align conflicting directions. To reduce overhead, we homogenize gradients with the features rather than network parameters. Additionally, to circumvent the impact of non-causal features (e.g., backgrounds), we propose an Invariant Self-Information (ISI) module to extract invariant causal features (e.g., the outlines of objects). Finally, task gradients are homogenized based on these invariant causal features. Experiments demonstrate that RotoGBML outperforms state-of-the-art methods across various few-shot benchmarks.