CPG-ACTOR: Reinforcement Learning for Central Pattern Generators

Luigi Campanaro, Siddhant Gangapurwala, Daniele De Martini, Wolfgang Merkt, Ioannis Havoutis

Abstract

Central Pattern Generators (CPGs) have several properties desirable for locomotion: they generate smooth trajectories, are robust to perturbations and are simple to implement. Although conceptually promising, we argue that the full potential of CPGs has so far been limited by insufficient sensory-feedback information. This paper proposes a new methodology that allows tuning CPG controllers through gradient-based optimization in a Reinforcement Learning (RL) setting. To the best of our knowledge, this is the first time CPGs have been trained in conjunction with a MultilayerPerceptron (MLP) network in a Deep-RL context. In particular, we show how CPGs can directly be integrated as the Actor in an Actor-Critic formulation. Additionally, we demonstrate how this change permits us to integrate highly non-linear feedback directly from sensory perception to reshape the oscillators' dynamics. Our results on a locomotion task using a single-leg hopper demonstrate that explicitly using the CPG as the Actor rather than as part of the environment results in a significant increase in the reward gained over time (6x more) compared with previous approaches. Furthermore, we show that our method without feedback reproduces results similar to prior work with feedback. Finally, we demonstrate how our closed-loop CPG progressively improves the hopping behaviour for longer training epochs relying only on basic reward functions.

Introduction

Legged locomotion remains a significant challenge in robotics, typically requiring a trade-off between hand-crafted model-based control and flexible but often erratic Deep Reinforcement Learning (RL). While standard Multi-Layer Perceptrons (MLPs) in RL can learn complex behaviors, they lack an inherent rhythmic bias, often leading to "bang-bang" control signals that are jerky and potentially damaging to hardware.

Biologically inspired Central Pattern Generators (CPGs)—neural circuits that produce rhythmic patterns—offer a solution by providing smooth, stable oscillations. However, integrating CPGs with modern RL has been difficult. Previous hybrid approaches often treated the CPG as an external "black box" within the environment, which limits the RL agent's ability to optimize the CPG's internal parameters directly.

Overview of the CPG-ACTOR framework where sensory observations are processed by an MLP to modulate CPG dynamics for robot control.

Methodology: The CPG-ACTOR Framework

The core innovation of this work is the integration of the CPG directly into the Actor component of an Actor-Critic framework. This shift allows the CPG to be fully differentiable and jointly optimized with a feedback-processing MLP.

Differentiable Hopf Oscillators

The framework utilizes discretized Hopf oscillators. By ensuring every parameter is differentiable, the system can leverage standard gradient-based optimization techniques, specifically Proximal Policy Optimization (PPO).

Architecture Comparison

The researchers compared three distinct architectures to validate their approach:

  1. Standard RL: A pure MLP-based Actor-Critic.
  2. CPG in Environment: A hybrid approach where the CPG resides in the environment, acting as a fixed or semi-fixed rhythmic prior.
  3. CPG-ACTOR (Proposed): The CPG is embedded within the Actor, receiving non-linear feedback from an MLP that processes raw sensory observations.
Comparison of RL architectures: (a) standard Actor-Critic, (b) CPG as part of the environment, and (c) the proposed CPG-ACTOR where the CPG is integrated into the Actor.

To handle the recurrent nature of CPGs without the complexities of Backpropagation Through Time (BPTT), the authors treat the CPG as a "stateless" network by passing its previous state back as an observation. This preserves recurrent dynamics while maintaining compatibility with standard RL optimizers.

Experimental Results

The framework was evaluated using a PyBullet simulation of a single-leg hopper modeled after the ANYmal quadruped. The task involved vertical hopping, with rewards based on jump height, tracking accuracy, and energy efficiency.

Performance and Smoothness

CPG-ACTOR achieved a 6x increase in reward compared to previous hybrid methods that kept the CPG in the environment. Crucially, the trajectories produced were significantly smoother than those from pure MLP agents. The CPG-ACTOR naturally respects physical motor limits, producing sinusoidal-like joint positions and velocities that are better suited for real-world hardware deployment.

Learning Evolution

Over 60 million training steps, the system demonstrated progressive improvement. The hopper learned to double its jump height by refining the interplay between the MLP-generated feedback and the CPG oscillators, effectively developing "muscle memory" for efficient rhythmic movement.

Conclusion and Future Work

CPG-ACTOR demonstrates that embedding rhythmic priors directly into the RL Actor significantly improves both performance and control quality in legged locomotion. By making CPGs differentiable and responsive to non-linear sensory feedback, the framework bridges the gap between biological stability and computational optimization.

While currently demonstrated on a single-leg hopper, future research will focus on scaling this architecture to full quadrupedal and bipedal robots, evaluating performance on complex terrains, and validating the "sim-to-real" transfer on physical hardware.

Summary updated

Abstract

Central Pattern Generators (CPGs) have several properties desirable for locomotion: they generate smooth trajectories, are robust to perturbations and are simple to implement. Although conceptually promising, we argue that the full potential of CPGs has so far been limited by insufficient sensory-feedback information. This paper proposes a new methodology that allows tuning CPG controllers through gradient-based optimization in a Reinforcement Learning (RL) setting. To the best of our knowledge, this is the first time CPGs have been trained in conjunction with a MultilayerPerceptron (MLP) network in a Deep-RL context. In particular, we show how CPGs can directly be integrated as the Actor in an Actor-Critic formulation. Additionally, we demonstrate how this change permits us to integrate highly non-linear feedback directly from sensory perception to reshape the oscillators' dynamics. Our results on a locomotion task using a single-leg hopper demonstrate that explicitly using the CPG as the Actor rather than as part of the environment results in a significant increase in the reward gained over time (6x more) compared with previous approaches. Furthermore, we show that our method without feedback reproduces results similar to prior work with feedback. Finally, we demonstrate how our closed-loop CPG progressively improves the hopping behaviour for longer training epochs relying only on basic reward functions.
BibTeX
@inproceedings{campanaro2021cpg,
  author = {Luigi Campanaro and Siddhant Gangapurwala and Daniele De Martini and Wolfgang Merkt and Ioannis Havoutis},
  title = {{CPG-ACTOR: Reinforcement Learning for Central Pattern Generators}},
  booktitle = {TAROS},
  year = {2021},
  url = {https://openreview.net/forum?id=rtYhS662zOI},
}
Figure