Policy networks are a central feature of deep reinforcement learning (RL) algorithms for continuous control, enabling the estimation and sampling of high-value actions. However, standard "one-shot" policy networks can limit an agent's performance and exploration capabilities. This paper introduces Iterative Amortized Policy Optimization, a method that allows RL agents to refine their action distributions using gradient feedback during inference. By moving beyond simple direct mappings, this approach closes the "amortization gap," enables multi-modal exploration, and allows agents to generalize to new objectives without retraining.
The Problem with Direct Amortization
In deep RL for continuous control, a policy network typically maps a state directly to the parameters of an action distribution (e.g., the mean and variance of a Gaussian). From a variational inference perspective, this is known as direct amortization. While computationally efficient, it suffers from three major flaws:
- The Amortization Gap: The network often provides a suboptimal "guess" at the best action distribution because a single forward pass cannot perfectly represent the complex optimization landscape of the RL objective.
- Limited Exploration: Direct mapping is usually unimodal. If there are two equally good but distinct ways to solve a task, a standard network can typically only represent one, severely limiting the agent's ability to explore diverse strategies.
- Rigidity: Because the network is a fixed feedforward mapping, it cannot adapt to changes in the objective (such as a new reward function or a different value estimator) unless it is fully retrained.
Iterative Amortized Policy Optimization
To overcome these limitations, the authors propose a more flexible class of optimizers inspired by techniques in variational inference: Iterative Amortized Policy Optimization.
Instead of relying on a single forward pass, the policy network performs a short iterative loop:
- Input: The network takes the current state, the current action parameters ($\lambda$), and the gradient of the RL objective ($\nabla_\lambda \mathcal{J}$) with respect to those parameters.
- Refinement: It uses a learned "highway" gating mechanism to update the parameters: $\lambda \leftarrow \omega \odot \lambda + (1 - \omega) \odot \delta$, where $\omega$ and $\delta$ are outputs of the network.
- Feedback: By observing the gradient of the objective during the refinement process, the network effectively "learns to optimize."
To prevent this powerful optimizer from exploiting errors in the value function (a common issue known as value overestimation), the authors introduce a penalty parameter ($\beta$) that penalizes high-variance $Q$-value estimates, keeping the optimizer "honest."
Key Insights and Results
The researchers evaluated their approach on the standard MuJoCo suite of continuous control benchmarks (e.g., HalfCheetah, Walker2d, Ant, Humanoid) and uncovered several significant advantages:
- Closing the Gap: Iterative refinement allows the policy to get much closer to the true "optimal" distribution for a given state than a standard network can. Even just 5 iterations per time step significantly improve the objective value compared to the initial guess.
- Multi-stability and Exploration: Because the process is iterative and can be initialized differently or use stochastic gradients, the agent can find and sample from multiple modes (different high-value action regions). This significantly improves exploration in complex environments.
- Zero-Shot Generalization: Because the network uses the gradient of the objective as an input, it can adapt to a brand-new objective instantly. The paper demonstrates an agent trained on model-free estimates immediately recovering performance when switched to a model-based estimator without any retraining.
- Performance and Efficiency: Iterative amortization matched or outperformed the baseline (Soft Actor-Critic with direct amortization) across all tested MuJoCo tasks. It reached higher cumulative rewards faster in complex environments like Ant-v2 and showed lower variance across different random seeds, indicating a more robust optimization strategy. Furthermore, it proved to be an order of magnitude more efficient than "black-box" optimizers like Adam or CEM for online policy refinement.
Limitations and Future Work
While powerful, iterative refinement introduces computational overhead. The cost scales linearly with the number of iterations, making it more expensive than a single forward pass (though 1-5 iterations are often sufficient). Additionally, the aggressive nature of the optimizer makes it more sensitive to biased $Q$-function estimates, requiring careful tuning of the $\beta$ penalty.
Future work may explore applying this technique to offline RL, where staying close to a "behavior policy" is critical, or in hierarchical RL, where the iterative process could help coordinate different levels of control.
Summary updated