Investigating the Impact of Action Representations in Policy Gradient Algorithms

Jan Schneider, Pierre Schumacher, Daniel F. B. Häufle, Bernhard Schölkopf, Dieter BüchlerarXiv 2023

Abstract

Reinforcement learning (RL) is a versatile framework for learning to solve complex real-world tasks. However, influences on the learning performance of RL algorithms are often poorly understood in practice. We discuss different analysis techniques and assess their effectiveness for investigating the impact of action representations in RL. Our experiments demonstrate that the action representation can significantly influence the learning performance on popular RL benchmark tasks. The analysis results indicate that some of the performance differences can be attributed to changes in the complexity of the optimization landscape. Finally, we discuss open challenges of analysis techniques for RL algorithms.

Introduction

In reinforcement learning (RL) for robotics, the "action space" is frequently treated as a fixed environmental constraint. However, practitioners often have the choice to control motors via raw torque or through low-level controllers that accept position or velocity targets. While these choices are known to affect performance, the underlying reasons remain largely opaque. This paper investigates how different action representations—Torque, Velocity, and Position control—reshape the optimization problem and influence the learning trajectories of agents.

Methodology

We evaluate three distinct action representations using the Proximal Policy Optimization (PPO) algorithm:

  1. Torque Control (TC): The agent outputs raw force values directly.
  2. Velocity Control (VC): The agent outputs target velocities, which are processed by a linear controller.
  3. Position Control (PC): The agent outputs target positions, processed by a Proportional-Derivative (PD) controller.

To analyze the impact of these choices, we employ two primary techniques:

  • Optimization Landscape Visualization: High-dimensional neural network parameter spaces are projected into 2D surfaces to visualize the smoothness or ruggedness of reward and loss functions.
  • Gradient Quality Analysis: Gradients calculated during standard training (batch size 64) are compared against a "ground truth" gradient derived from a massive batch of $10^7$ samples to measure update accuracy.

Experiments were conducted across standard benchmarks including OpenAI Gym (Pendulum, Reacher) and the DeepMind Control Suite (Cheetah-run, Finger-spin, Reacher-easy, Walker-walk).

Results and Insights

Task-Dependent Performance

Our results show that there is no universally superior action representation. As seen in Figure 1, performance varies significantly across tasks. For instance, Position Control dominates the Reacher task, whereas Torque Control is significantly more effective for Walker-walk.

Cumulative reward performance across various RL benchmarks for Torque, Position, and Velocity control.

Optimization Landscape Ruggedness

The performance gap in tasks like Reacher can be explained by the complexity of the optimization landscape. Visualization reveals that Torque Control results in an incredibly rugged loss landscape filled with local optima, whereas Position and Velocity control create much smoother surfaces that facilitate finding the global optimum.

Visualization of cumulative reward and negative loss landscapes for Reacher and Walker-walk tasks.

The Gradient Paradox and Intuition

Surprisingly, higher gradient accuracy does not always correlate with better performance. In the Reacher task, configurations that learned more effectively actually exhibited lower gradient accuracy than the poorly performing torque configuration. This suggests that gradient noise is not always the primary bottleneck for learning.

Furthermore, we tested the common intuition that matching the coordinate systems of states and actions (e.g., joint angles for both) simplifies the task. In a modified "Joint Space" Reacher task, Torque Control still outperformed Position Control, indicating that human intuition about task simplicity often fails to predict what an RL optimizer will find easy.

Discussion and Limitations

While landscape visualization and gradient analysis provide valuable insights, several challenges remain:

  • Dynamic Landscapes: Optimization landscapes are static snapshots. As a policy evolves and the agent explores new state spaces, the landscape itself shifts, making longitudinal analysis difficult.
  • Entangled Effects: Action representations simultaneously influence exploration, gradient quality, and landscape smoothness. Disentangling these factors to identify the primary driver of performance remains an open research question.
  • Hyperparameter Sensitivity: The relative success of a representation may be tied to specific hyperparameter settings (like learning rates), which were kept at defaults for this comparative study.

In conclusion, while we have developed tools to observe the effects of action representations, a unified theory to predict the optimal representation for a given task remains elusive.

Summary updated

BibTeX
@misc{schneider2023investigating,
  author = {Jan Schneider and Pierre Schumacher and Daniel F. B. Häufle and Bernhard Schölkopf and Dieter Büchler},
  title = {{Investigating the Impact of Action Representations in Policy Gradient Algorithms}},
  year = {2023},
  eprint = {2309.06921},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.06921},
}
Figure