Model-Agnostic Meta-Learning using Runge-Kutta Methods

Daniel Jiwoong Im, Yibo Jiang, Nakul VermaarXiv 2019

Abstract

Meta-learning has emerged as an important framework for learning new tasks from just a few examples. The success of any meta-learning model depends on (i) its fast adaptation to new tasks, as well as (ii) having a shared representation across similar tasks. Here we extend the model-agnostic meta-learning (MAML) framework introduced by Finn et al. (2017) to achieve improved performance by analyzing the temporal dynamics of the optimization procedure via the Runge-Kutta method. This method enables us to gain fine-grained control over the optimization and helps us achieve both the adaptation and representation goals across tasks. By leveraging this refined control, we demonstrate that there are multiple principled ways to update MAML and show that the classic MAML optimization is simply a special case of second-order Runge-Kutta method that mainly focuses on fast-adaptation. Experiments on benchmark classification, regression and reinforcement learning tasks show that this refined control helps attain improved results.

Introduction

Meta-learning, or "learning to learn," focuses on developing models that can generalize to new tasks with minimal data. A key challenge in this field is balancing fast adaptation—the ability to quickly adjust parameters for a specific task—with shared representation—the maintenance of features that are broadly useful across all tasks. Model-Agnostic Meta-Learning (MAML) has become a standard approach by finding a parameter initialization that is highly sensitive to task-specific gradients. However, the optimization path in MAML can often be suboptimal. This work reinterprets MAML through the lens of ordinary differential equation (ODE) solvers, specifically Runge-Kutta methods, to provide a more principled framework for balancing these competing objectives.

Methodology: MAML as an ODE Solver

The core insight of this research is viewing the meta-optimization process as following a continuous vector field. In this context, standard gradient descent is analogous to the Euler method, a first-order numerical approximation. To achieve a more accurate and stable optimization trajectory, the authors propose using higher-order Runge-Kutta (RK) integrators.

The authors mathematically demonstrate that the standard MAML update rule is a specific instance of a second-order Runge-Kutta method known as the midpoint method. By framing MAML in this way, they identify that the classic update primarily focuses on the "look-ahead" gradient, effectively setting the weight of the initial gradient to zero.

MAML-RK2

By generalizing to the family of second-order RK methods (MAML-RK2), the authors introduce alternative update rules such as Heun’s, Ralston’s, and ITB methods. These methods allow for explicit tuning of the balance between the initial gradient (shared representation) and the look-ahead gradient (fast adaptation) through coefficients $a_1$ and $a_2$. For instance, Ralston’s method ($a_1=1/3, a_2=2/3$) incorporates the starting point's gradient, leading to smoother and more robust optimization paths.

Diagram of MAML-RK illustrating parameter evolution and the geometric interpretation of Runge-Kutta steps.

Experimental Results

The proposed MAML-RK methods were evaluated against standard MAML on several benchmarks, including Omniglot and MiniImagenet for classification, 1D sinusoid waves for regression, and 2D navigation for reinforcement learning.

Few-Shot Classification

In classification tasks, the MAML-RK variants consistently outperformed the standard midpoint (MAML) approach. On the Omniglot 5-way, 1-shot task, Ralston’s method achieved an accuracy of 99.39%, a significant improvement over MAML's 98.26%. Similar gains were observed in the more challenging MiniImagenet dataset, where Heun's method provided the best performance.

Comparison of classification accuracy on Omniglot and MiniImagenet datasets across different RK methods.

Reinforcement Learning and Regression

In 2D navigation tasks, standard MAML exhibited jittery trajectories and slower convergence. MAML-RK methods like Ralston and ITB produced much smoother paths to the goal, reaching oracle-level performance more efficiently. In regression tasks, Ralston's method also showed a slight edge in Mean Squared Error (MSE) compared to the standard approach.

Discussion and Conclusion

This work provides a novel theoretical foundation for MAML by linking it to classical numerical analysis. By recognizing MAML as a midpoint RK method, the authors open a new avenue for meta-learning optimization. While higher-order methods (like RK4) remain computationally expensive due to the need for multiple Hessian-vector products, second-order RK methods offer a practical and effective way to improve meta-learning performance. Future work may explore more efficient ODE integrators or the application of these methods to specific network layers to further optimize the trade-off between adaptation and representation.

Summary updated

BibTeX
@misc{im2019model,
  author = {Daniel Jiwoong Im and Yibo Jiang and Nakul Verma},
  title = {{Model-Agnostic Meta-Learning using Runge-Kutta Methods}},
  year = {2019},
  eprint = {1910.07368},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.07368},
}
Figure