Introduction
Reinforcement learning (RL) typically focuses on learning a mapping from states to actions. However, in goal-conditioned RL (GCRL), the objective is more complex: agents must learn to follow specific commands, such as "achieve a return of 100." While approaches like Upside-Down RL (UDRL) have attempted to solve this via supervised learning, they often struggle with multimodality and high-dimensional continuous control.
Presented at AAAI-23, GoGePo (Goal-Conditioned Generators of Deep Policies) introduces a paradigm shift. Instead of learning what action to take, GoGePo learns how to generate an entire policy. By utilizing HyperNetworks to produce policy weights directly from a performance command, the framework bypasses traditional action-space pitfalls and enables end-to-end differentiable policy optimization.
The Challenge of Multimodality in GCRL
A significant hurdle in GCRL is multimodality. In many complex environments, there are numerous distinct action sequences that can achieve the same total reward. Standard supervised learning methods, which attempt to predict actions given a target return, often fail by "averaging" these diverse behaviors. This leads to sub-optimal, jittery policies that fail to achieve the target. Furthermore, scaling these methods to continuous control tasks has historically proven difficult due to the vastness of the action space.
The GoGePo Framework
GoGePo addresses these issues by operating in parameter space. The core idea is to train a Generator—a HyperNetwork—that outputs the weights ($\theta$) of a separate policy network $\pi_\theta$ based on a desired return command $c$.
1. The Generator ($G_\rho$)
The Generator is a HyperNetwork that maps a scalar command $c$ to policy weights. To manage the large number of parameters in deep policies, GoGePo employs a weight-sharing scheme. A shared MLP generates "slices" of the weight matrices using learned embeddings, ensuring the architecture remains scalable.
2. Policy Fingerprinting
A key challenge in generating weights is that neural networks are invariant to certain transformations, such as swapping neurons in a hidden layer (weight symmetry). To evaluate a policy's behavior consistently, the authors introduce "fingerprints." By feeding a fixed set of "probing states" into the generated policy and collecting the "probing actions," the system creates a compact, behavior-based representation of the policy.
3. The Evaluator ($V_w$)
The Evaluator is a differentiable function trained to map these policy fingerprints to a predicted return. This component is crucial because it allows the entire system to be optimized via gradient descent.
Training and Optimization
The training process is an elegant loop of interaction and optimization:
- Data Collection: The agent interacts with the environment using generated policies to collect trajectories and actual returns.
- Evaluator Training: The Evaluator is updated to minimize the mean squared error (MSE) between its predictions and the observed returns.
- Generator Training: The Generator is updated via gradient descent to produce weights that the Evaluator predicts will match the requested command $c$.
Because the Evaluator is a neural network, the path from the command to the predicted return is fully differentiable, turning the RL problem into a standard supervised optimization task.
Experimental Results
The authors evaluated GoGePo on standard continuous control benchmarks from the MuJoCo suite, including Swimmer-v3, Hopper-v3, InvertedPendulum-v2, and MountainCarContinuous-v0.
Performance and Exploration
GoGePo demonstrated competitive or superior performance compared to strong baselines like Augmented Random Search (ARS), DDPG, and SAC. Notably, in MountainCarContinuous—a task where standard action-based methods often struggle with exploration—GoGePo's parameter-space approach allowed it to quickly discover optimal policies.
Zero-Shot Spectrum Generation
A unique advantage of GoGePo is its ability to generate a spectrum of policies. Once trained, a single generator can produce agents for any return level within the range seen during training. The authors found that the achieved returns closely tracked the requested commands, demonstrating the model's precision.
Key Insights
- Bypassing Multimodality: By generating a single set of parameters for a given return, the generator avoids the need to model the entire distribution of possible actions.
- Extrapolation: Requesting a return slightly higher than the best seen so far (e.g., "best + 20") encourages the generator to generalize and discover even higher-performing policies.
- Visualizing Learning: PCA analysis of policy fingerprints shows that the generator "carves a path" through policy space as training progresses, moving from low-return to high-return regions.
Conclusion and Future Directions
GoGePo represents a promising step toward more controllable and robust RL agents. While the current model relies on episodic return signals, future work could incorporate state-dependent commands to improve sample efficiency. Additionally, introducing latent diversity could allow the generator to produce multiple distinct policies for the same return, further enhancing the system's robustness.
Summary updated