Generalisable Agents for Neural Network Optimisation

Kale-ab Tessera, Callum Rhys Tilbury, Sasha Abramowitz, Ruan de Kock, Omayma Mahjoub, Benjamin Rosman, Sara Hooker, Arnu Pretorius

TL;DR

GANNO (Generalisable Agents for Neural Network Optimisation) uses multi-agent reinforcement learning to dynamically manage layerwise learning rates during training. By assigning an RL agent to each layer, the framework learns responsive schedules that generalize to deeper architectures and harder datasets than those seen during training, all while being significantly more computationally efficient than existing meta-learned optimizers.

What Problem Does This Paper Address?

Training deep neural networks is notoriously difficult due to non-convex optimization landscapes and high computational costs. A major bottleneck is hyperparameter tuning—specifically the learning rate. While practitioners often use handcrafted schedules (like cosine decay), these are usually "static" heuristics that don't respond to the actual dynamics of the network during training.

Existing automated methods fall into two camps:

  1. Expensive Meta-Learners: Tools like Google's VeLO are powerful but require massive compute (thousands of TPU-months) to train, making them inaccessible to most researchers.
  2. Global RL Schedulers: Previous reinforcement learning approaches typically use a single agent to set a global learning rate, ignoring the fact that different layers in a network often benefit from different optimization dynamics.

GANNO aims to bridge this gap by providing a layer-aware, responsive, and compute-friendly alternative.

Methods

The authors propose a Multi-Agent Reinforcement Learning (MARL) framework. Instead of one controller for the whole network, GANNO assigns one agent to every layer.

  • The Loop: As shown in Figure 1, agents observe the state of the environment (the training process), take actions to modify the learning rate, and receive a reward based on the model's performance. GANNO’s training process diagram showing the interaction between agents, actions, and the environment.

  • Observations: Agents receive global information (e.g., total training loss, accuracy) and local information specific to their layer (e.g., mean/variance of weights, gradient norms, and the "trust ratio").

  • Actions: Agents operate in a discrete action space, choosing to increase, decrease, or maintain the current learning rate (e.g., multiplying by 1.1 or adding 0.001).
  • Algorithm: They use Independent Proximal Policy Optimisation (IPPO) with weight sharing. Sharing parameters allows the system to handle networks with different numbers of layers at test time—a property called "depth generalisation."
  • Reward Shaping: To ensure the agents' actions are actually helping, the authors use difference rewards. This compares the reward of a chosen action against a "no-op" (doing nothing), isolating the agent's specific contribution to the training progress.
Figure 1: GANNO’s training process. There is an agent per layer of a neural network. Each agent receives a set of global and layer-specific observations about the environment and uses this information to select an action, which is applied to a corresponding layer. Then, training in the environment progresses for some time, after which a reward signal is returned and this loop continues.

Datasets

The study focuses on image classification tasks to demonstrate generalisation:

  • Training Environment: A simple 2-layer CNN or a ResNet-9 trained on Fashion-MNIST.
  • Evaluation (Generalisation) Environment: A more complex 5-layer CNN or a ResNet-18 evaluated on CIFAR-10.

This setup tests whether agents trained on "easy" problems can successfully optimize "harder" ones without further training.

Key Insights and Ideas

  • Emergent Layerwise Coordination: One of the most striking findings is that agents learn to "spike" the learning rate at specific moments to escape local optima. In Figure 3 (labeled as Figure 5 in the provided artifacts), you can see agents coordinating these spikes across different layers to boost test accuracy. Layerwise learning rate schedules showing coordinated spikes that help the network escape local optima.

  • Robustness to Initial Conditions: Unlike fixed schedules that might fail if the initial learning rate is poorly chosen, GANNO is highly adaptive. It can take a "bad" starting learning rate and quickly steer it toward a productive range.

  • Efficiency is a Feature: While meta-learned optimizers like VeLO require thousands of TPU-months, GANNO was trained in under six hours on a single NVIDIA A100 GPU. This lower barrier to entry makes it a viable research tool for the broader community.
  • Learned vs. Handcrafted: The agents often rediscover patterns similar to expert heuristics, such as exponential decay or cyclical patterns (similar to SGDR), but they apply them dynamically based on real-time feedback.
Layerwise learning rate schedules showing coordinated spikes that help the network escape local optima.

Key Results

  • Generalisation: GANNO successfully optimized a 5-layer CNN on CIFAR-10 after being trained only on a 2-layer CNN on Fashion-MNIST, achieving a test accuracy of ~72.2%. This was competitive with popular handcrafted schedules like SGDR (~72.7%).
  • Robustness: In tests on ResNet-18 (Figure 4), GANNO proved much more robust to different weight decay values than VeLO, which struggled when weight decay deviated from its training distribution. Test accuracy across epochs for GANNO vs. competitors on ResNet-18, demonstrating robustness to weight decay.

  • Ablation Success: The authors showed that a single-agent version (global LR) significantly underperformed the multi-agent (layerwise) version, validating the core hypothesis that layer-specific control is essential.

Test accuracy across epochs for GANNO vs. competitors on ResNet-18, demonstrating robustness to weight decay.

Limitations and Future Work

  • The "Foresight" Problem: The agents currently struggle with long-term planning, such as implementing a "warm-up" phase (starting low and increasing). They tend to be conservative to avoid instability. The authors suggest using "offline RL" with demonstrations from successful manual schedules to teach this behavior.
  • Reward Complexity: Defining a perfect reward signal for optimization is still an open challenge. The current "difference reward" helps, but more sophisticated credit assignment might be needed.
  • Scope: This work focused primarily on the learning rate. Future iterations could expand GANNO to control other hyperparameters like weight decay, momentum, or even architectural parameters simultaneously.

Summary updated

Abstract

Optimising deep neural networks is a challenging task due to complex training dynamics, high computational requirements, and long training times. To address this difficulty, we propose the framework of Generalisable Agents for Neural Network Optimisation (GANNO) -- a multi-agent reinforcement learning (MARL) approach that learns to improve neural network optimisation by dynamically and responsively scheduling hyperparameters during training. GANNO utilises an agent per layer that observes localised network dynamics and accordingly takes actions to adjust these dynamics at a layerwise level to collectively improve global performance. In this paper, we use GANNO to control the layerwise learning rate and show that the framework can yield useful and responsive schedules that are competitive with handcrafted heuristics. Furthermore, GANNO is shown to perform robustly across a wide variety of unseen initial conditions, and can successfully generalise to harder problems than it was trained on. Our work presents an overview of the opportunities that this paradigm offers for training neural networks, along with key challenges that remain to be overcome.
BibTeX
@misc{tessera2023generalisable,
  author = {Kale-ab Tessera and Callum Rhys Tilbury and Sasha Abramowitz and Ruan de Kock and Omayma Mahjoub and Benjamin Rosman and Sara Hooker and Arnu Pretorius},
  title = {{Generalisable Agents for Neural Network Optimisation}},
  year = {2023},
  eprint = {2311.18598},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.18598},
}
Figure