How Should We Meta-Learn Reinforcement Learning Algorithms?

Alexander David Goldie, Zilin Wang, Jaron Cohen, Jakob Nicolaus Foerster, Shimon Whiteson

TL;DR

While meta-learning new reinforcement learning (RL) algorithms is gaining traction, researchers rarely compare the methods used to discover them. This paper presents a systematic empirical evaluation comparing black-box evolution, neural network distillation, symbolic distillation, and LLM-based code proposal across multiple RL components. The authors synthesize their findings into concrete design recommendations, highlighting that LLMs excel at discovering generalizable, low-dimensional algorithms, while black-box neural approaches remain essential for complex, feature-heavy algorithms.

What Problem Does This Paper Address?

Designing RL algorithms by hand is difficult and often relies on heuristics adapted from supervised learning. While automated algorithm discovery—meta-learning—can discover novel loss functions, update rules, and optimizers, researchers have almost exclusively compared their learned algorithms against human-designed baselines rather than comparing different meta-learning techniques against each other.

Because meta-learning experiments are computationally punishing (often costing thousands of TPU- or GPU-months), practitioners lack clear guidance on critical trade-offs:

  • When should one use large language models (LLMs) versus evolutionary black-box search?
  • Does distilling algorithms into symbolic equations actually improve generalization and safety?
  • How do sample efficiency, wall-clock time, and interpretability trade off across methods?

Methods

The paper evaluates the interaction between different meta-learning methods (how the algorithm is found) and meta-learned algorithms (the RL component being replaced):

Meta-Learning Discovery Methods:

  • Black-Box Meta-Learning: Optimizing neural network update rules directly via Evolution Strategies (ES) or meta-gradients (backpropagation through time).
  • Black-Box Distillation: Distilling a trained black-box network into a student model via $L_2$ regression on synthetic data, tested at Same-Size (acts as a regularizer) and Smaller (halved layer widths).
  • Symbolic Distillation: Fitting mathematical equations to a trained black-box model using genetic programming via PySR.
  • LLM Proposal: Prompting a reasoning language model (GPT o3-mini) within an automated discovery loop (DiscoPOP), warm-started from a handcrafted baseline (e.g., PPO, SGD, or Adam) with textual feature descriptions.

Target RL Components:

  • Learned Policy Optimization (LPO): Replaces the mirror drift penalty in PPO (low-dimensional, 8 transformed inputs).
  • Learned Policy Gradient (LPG): Replaces the actor-critic update rule using a backward-LSTM over short rollouts (20 steps).
  • OPEN & "No Features" Optimizers: Meta-learned optimizers conditioned on complex features (dormancy, training horizon, parameter depth) or raw momentum features, evaluated in feed-forward and recurrent settings.

Datasets

Experiments evaluated in-distribution (i.d.) and out-of-distribution (o.o.d.) performance across standard RL benchmark suites implemented in JAX:

  • Meta-Training Environments: Ant (Brax), the MinAtar suite, and randomly generated Gridworlds.
  • Meta-Testing Benchmark Suite (10 environments):
  • MinAtar: Freeway, Space Invaders, Asterix, Breakout.
  • Brax: Humanoid, Hopper, Walker, Ant.
  • Gymnax / OpenAI Gym: Cartpole.
  • Craftax: Craftax-Classic.

Key Insights and Ideas

  • LLMs shine on simple, intuitive inputs—but break on exotic features: GPT o3-mini produced highly competitive, generalizable loss functions and optimizers when inputs matched standard machine learning concepts (e.g., gradients, policy ratios, advantage). However, on OPEN's 20-dimensional engineered feature space (e.g., neuron dormancy, layer depth), the LLM struggled to incorporate the features and frequently generated invalid code.
  • Symbolic distillation fails to deliver on generalization: Prior literature hypothesized that symbolic expressions improve out-of-distribution transfer due to simplicity. Instead, PySR struggled severely on higher-dimensional inputs (often collapsing to trivial constants or outputting NaNs) and did not outperform neural representations.
  • Same-size black-box distillation is an effective "free lunch": Distilling a black-box model into another network of identical capacity using synthetic data requires zero additional environment interactions, yet regularly boosted out-of-distribution generalization due to implicit regularization.
  • Black-box learning remains the scalability king: For algorithms requiring recurrent state tracking over long horizons (e.g., thousands of steps across RL training) or high-dimensional input spaces, evolutionary black-box search was the only method capable of reliable optimization.

Key Results

  • Learned Policy Optimization (LPO): LLM proposal delivered the strongest out-of-distribution generalization across Brax and MinAtar, while same-size distillation provided the best balance of in-distribution return and transfer.
  • Learned Optimizers:
  • For feed-forward optimizers without extra features, LLM proposals outperformed black-box and symbolic baselines both in-distribution and out-of-distribution.
  • For OPEN (recurrent, long-horizon, 20 inputs), distillation over truncated unrolls failed, while black-box learning achieved the highest in-distribution return (though LLMs retained higher o.o.d. performance by remaining close to Adam).
  • Sample Efficiency and Compute: LLM proposals required testing only tens of candidate functions (low sample cost, fast), whereas black-box learning demanded high online environment interaction. Symbolic distillation was often the slowest to run due to the exponential growth of abstract syntax trees.
Approach Environment Samples Meta-Train Time Interpretability Scalability
Black-Box Learning High Slow Bad Best
Same-Size Distillation None (Synthetic) Slow Bad Good
Smaller Distillation None (Synthetic) Medium Bad Good
Symbolic Distillation None (Synthetic) Medium–Slow Medium Bad
LLM Proposal Low Fast Good Medium

Limitations and Future Work

  • Hyperparameter Sensitivity: LLM-generated optimizers relied on learning rates tuned on the warm-start baseline (e.g., Adam/SGD) for each evaluation environment, essentially granting them few-shot adaptation advantages.
  • Warm-Start Constraints: LLM proposal requires an established, functional baseline in code; it cannot easily discover fundamentally alien architectures (such as LPG's categorical bootstrap distribution).
  • Fixed Distillation Architectures: The authors only explored changing layer widths during black-box distillation, leaving modern alternatives (such as distilling recurrent rollouts into causal transformers) unexplored.
  • Future Hybrid Approaches: Blending paradigms—such as using black-box autoencoders to compress inputs before symbolic search, or warm-starting LLMs from symbolically distilled checkpoints—remains a promising frontier.

Summary updated

BibTeX
@inproceedings{goldie2025how,
  author = {Alexander David Goldie and Zilin Wang and Jaron Cohen and Jakob Nicolaus Foerster and Shimon Whiteson},
  title = {{How Should We Meta-Learn Reinforcement Learning Algorithms?}},
  booktitle = {RLC},
  year = {2025},
  url = {https://openreview.net/forum?id=jKzQ6af2DU},
}
Figure