Memory-Reduced Meta-Learning with Guaranteed Convergence

Honglin Yang, Ji Ma, Xiao Yu · DOI

Abstract

Meta-learning, particularly in the few-shot learning regime, often faces significant memory bottlenecks due to the requirement of backpropagating through multiple inner-loop adaptation steps. This paper presents a memory-efficient meta-learning algorithm that leverages approximate-implicit differentiation to estimate hypergradients without storing historical parameters or gradients. By utilizing a Conjugate Gradient (CG) subroutine to approximate the Hessian-inverse-vector product, the proposed method achieves a memory footprint that is invariant to the number of inner-loop iterations. Empirical results on standard benchmarks demonstrate a significant reduction in memory overhead compared to state-of-the-art methods like ANIL, while maintaining superior accuracy and faster convergence.

Introduction

Meta-learning, or "learning to learn," is typically formulated as a bilevel optimization problem. The inner loop adapts task-specific parameters to a given dataset, while the outer loop updates global meta-parameters to facilitate rapid adaptation across a distribution of tasks. Traditional gradient-based meta-learning frameworks, such as Model-Agnostic Meta-Learning (MAML) and its variants like Almost No Inner Loop (ANIL), rely on iterative differentiation. This approach requires storing the entire trajectory of the inner-loop optimization to compute the hypergradient for the outer-loop update.

As the complexity of tasks increases, requiring deeper inner-loop optimization (more iterations $K$), the memory consumption of iterative differentiation grows linearly. This creates a substantial bottleneck, often leading to "out of memory" errors on standard hardware or forcing the use of shallow, suboptimal inner loops. This paper addresses this challenge by proposing a memory-reduced algorithm with rigorous theoretical convergence guarantees.

Methodology

The core of the proposed approach is the transition from iterative differentiation to approximate-implicit differentiation. Instead of tracking every intermediate step of the inner loop, the algorithm focuses solely on the final state of the task-specific parameters.

Implicit Hypergradient Estimation

The hypergradient is calculated using the implicit function theorem, which relates the Hessian of the lower-level objective to the gradient of the upper-level objective. This eliminates the need for storing the optimization path. To handle the computational complexity of the Hessian matrix, the authors employ a Conjugate Gradient (CG) subroutine. This subroutine estimates the Hessian-inverse-vector product efficiently, reducing the complexity from $O(q^2)$ to $O(\max\{p, q\})$, where $p$ and $q$ represent the dimensions of the meta and task-specific parameters, respectively.

Optimization Enhancements

To further improve efficiency, the algorithm incorporates warm-starting, where the solution from the previous meta-iteration is used to initialize the CG subroutine. This significantly accelerates the convergence of the hypergradient estimation. Theoretically, the authors provide a formal proof that this stochastic bilevel optimization approach achieves a sublinear convergence rate of $O(1/T)$ in stochastic settings and reaches an exact solution in deterministic settings.

Experimental Evaluation

The algorithm was evaluated on four standard few-shot image classification benchmarks: CIFAR-FS, FC100, miniImageNet, and tieredImageNet. These datasets provide a range of complexity, from the smaller CIFAR-based sets to the larger, hierarchically structured tieredImageNet.

Memory Efficiency

A key finding is the memory invariance of the proposed method. Unlike MAML and ANIL, where memory costs scale with the number of inner-loop iterations $K$, the memory overhead of the proposed algorithm remains nearly constant.

Memory cost comparison across datasets and inner-loop iterations.

As shown in Figure 3, while ANIL's memory usage increases significantly with $K$, the proposed method (Algorithm 1) maintains a low and stable memory footprint, achieving over 50% reduction in memory costs on miniImageNet compared to ANIL even at low $K$ values, with the gap widening as $K$ increases.

Results and Discussion

The proposed method consistently outperforms baseline algorithms in terms of both efficiency and predictive performance.

Accuracy and Convergence

The algorithm achieved state-of-the-art accuracy across all tested benchmarks. By avoiding long-distance backpropagation through time, the method is less susceptible to the vanishing gradient problem, leading to a cleaner signal for meta-parameter updates.

Final accuracy results on benchmark datasets.

As detailed in Figure 5, the proposed algorithm reached an accuracy of 59.58% on miniImageNet and 61.97% on tieredImageNet, outperforming ANIL and ITD-BiO.

Computational Speed

In addition to memory savings, the method demonstrated superior training speeds. For instance, on the FC100 dataset, the proposed method reached target accuracy in 621 seconds, whereas ANIL required 879 seconds and ITD-BiO took 1607 seconds. This speedup is attributed to the efficient CG-based hypergradient estimation and the warm-starting strategy.

Conclusion

This paper introduces a robust, memory-efficient framework for meta-learning that overcomes the scaling limitations of iterative differentiation. By combining implicit differentiation with conjugate gradient methods, the authors provide an algorithm that is both memory-invariant to inner-loop depth and theoretically sound. Future work may involve exploring variance reduction techniques to further improve convergence in highly stochastic environments and extending the application of this method to reinforcement learning and complex hyperparameter optimization tasks.

Summary updated

BibTeX
@inproceedings{yang2025memory,
  author = {Honglin Yang and Ji Ma and Xiao Yu},
  title = {{Memory-Reduced Meta-Learning with Guaranteed Convergence}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i20.35501},
}
Figure