[Paper Review] Gradient Agreement as an Optimization Objective for Meta-Learning
This paper proposes Gradient Agreement, a novel meta-learning optimization objective that dynamically weights tasks based on gradient alignment to improve generalization. By assigning higher weights to tasks with gradients aligned to the average gradient direction, the method enhances model performance over MAML and Reptile, achieving state-of-the-art results on mini-ImageNet and Omniglot benchmarks.
This paper presents a novel optimization method for maximizing generalization over tasks in meta-learning. The goal of meta-learning is to learn a model for an agent adapting rapidly when presented with previously unseen tasks. Tasks are sampled from a specific distribution which is assumed to be similar for both seen and unseen tasks. We focus on a family of meta-learning methods learning initial parameters of a base model which can be fine-tuned quickly on a new task, by few gradient steps (MAML). Our approach is based on pushing the parameters of the model to a direction in which tasks have more agreement upon. If the gradients of a task agree with the parameters update vector, then their inner product will be a large positive value. As a result, given a batch of tasks to be optimized for, we associate a positive (negative) weight to the loss function of a task, if the inner product between its gradients and the average of the gradients of all tasks in the batch is a positive (negative) value. Therefore, the degree of the contribution of a task to the parameter updates is controlled by introducing a set of weights on the loss function of the tasks. Our method can be easily integrated with the current meta-learning algorithms for neural networks. Our experiments demonstrate that it yields models with better generalization compared to MAML and Reptile.
Motivation & Objective
- To improve generalization in meta-learning by addressing the limitation of equal-weighted task contributions in MAML and Reptile.
- To develop an optimization objective that prioritizes tasks whose gradients align with the overall direction of parameter updates.
- To enable faster and more robust adaptation to unseen tasks by leveraging gradient agreement across a batch of tasks.
- To provide a theoretically grounded, geometric interpretation of meta-optimization via first-order Taylor approximation.
- To demonstrate superior performance on few-shot classification and regression benchmarks compared to existing methods.
Proposed method
- The method introduces task-specific weights $ w_i $ proportional to the inner product between each task's gradient and the average gradient of all tasks in a batch.
- The weight $ w_i $ is computed as $ w_i = \frac{\sum_{j \in \mathrm{T}} (g_i^T g_j)}{\sum_{k \in \mathrm{T}} |\sum_{j \in \mathrm{T}} (g_k^T g_j)|} $, where $ g_i $ is the gradient update vector for task $ i $.
- The outer-loop update rule becomes $ \theta \leftarrow \theta - \beta \nabla \sum_i w_i L_{\tau_i}(f_{\theta_i}) $, giving higher influence to tasks with more agreement in gradient direction.
- The method is derived via first-order Taylor approximation and quadratic optimization, leading to a closed-form solution for the weights.
- The approach is compatible with both MAML and Reptile, and can be easily integrated into existing meta-learning frameworks.
- The normalization constraint $ \|\mathbf{w}\|_1 = 1 $ ensures stable and interpretable weighting across tasks.
Experimental results
Research questions
- RQ1How can task contributions in meta-learning be dynamically adjusted to improve generalization across unseen tasks?
- RQ2Can gradient alignment across tasks serve as a reliable signal for determining the importance of individual tasks during meta-updates?
- RQ3Does a weighted meta-optimization strategy based on gradient agreement outperform uniform weighting in MAML and Reptile?
- RQ4What is the theoretical justification for using gradient agreement as an optimization objective in meta-learning?
- RQ5How does the proposed method perform on standard few-shot learning benchmarks like mini-ImageNet and Omniglot?
Key findings
- On mini-ImageNet, the Gradient Agreement method achieved 54.80% accuracy on the 5-way 1-shot benchmark, significantly outperforming Reptile (49.97%) and MAML (48.70%).
- On the more challenging 5-way 5-shot setting of mini-ImageNet, Gradient Agreement reached 73.27% accuracy, surpassing Reptile (65.99%) and MAML (63.11%).
- On Omniglot, the method achieved 98.60% accuracy on 5-way 1-shot and 99.80% on 5-way 5-shot, matching or exceeding MAML and Reptile across all settings.
- In a 1D sine wave regression task, the method reduced average L2 loss to 0.08, compared to 0.13 for Reptile, demonstrating improved generalization in a simple regression setup.
- Theoretical analysis shows that the optimal weights are proportional to the inner product of each task’s gradient with the average gradient, providing a geometric rationale for the method.
- The method effectively mitigates the negative impact of outlier tasks with conflicting gradients by down-weighting them during meta-updates.
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.