Indirect and direct training of spiking neural networks for end-to-end control of a lane-keeping vehicle

Zhenshan Bing, Claus Meschede, Guang Chen, Alois C. Knoll, Kai Huang

Abstract

Spiking Neural Networks (SNNs) offer a biologically inspired, energy-efficient alternative to traditional artificial neural networks for robotic control. This study evaluates two training methodologies—indirect transfer from a Deep Q-Network (DQN) and direct reinforcement learning via Reward-modulated Spike-Timing-Dependent Plasticity (R-STDP)—for a lane-keeping task using event-based vision. Experimental results demonstrate that direct R-STDP training significantly outperforms indirect methods in accuracy, learning efficiency, and robustness across varied road scenarios.

Introduction

Traditional Artificial Neural Networks (ANNs) are computationally intensive and energy-hungry, posing challenges for high-speed edge computing in robotics. SNNs, often called the "third generation" of neural networks, mimic the brain's use of discrete electrical impulses (spikes) to process information with high efficiency. However, their non-differentiable nature makes them difficult to train using standard backpropagation. This research addresses these challenges by implementing an end-to-end SNN controller for a lane-keeping vehicle, leveraging the low-latency benefits of neuromorphic hardware.

Hardware and Sensor Integration

A critical component of this architecture is the Dynamic Vision Sensor (DVS). Unlike standard cameras that capture frames at fixed intervals, a DVS transmits "events" only when a pixel's brightness changes. This asynchronous output is a natural fit for SNNs, enabling ultra-low-latency decision-making. The sensor is mounted on the robot at a specific angle to optimize the detection of lane markings on the road surface.

The Pioneer P3-DX robot equipped with a Dynamic Vision Sensor (DVS) tilted at -30 degrees to capture lane markings.

Training Methodologies

The researchers compared two distinct training philosophies to bridge the gap between traditional reinforcement learning and neuromorphic computing:

1. Indirect Training (DQN-SNN)

In this approach, a standard Deep Q-Network (DQN) is first trained in a reinforcement learning environment. State-action pairs are collected to train a non-spiking ANN, whose weights are then transferred to an SNN using Integrate-and-Fire (IF) neurons. A normalization algorithm ensures that the SNN's firing rates correspond to the original ANN's activations.

2. Direct Training (R-STDP)

This biologically plausible method utilizes Spike-Timing-Dependent Plasticity (STDP), where synaptic strength is adjusted based on the millisecond-level timing of spikes. To adapt this for reinforcement learning, a global reward signal (mimicking dopamine) is introduced. When the robot maintains its position near the lane center, high rewards "tag" recent synaptic changes for reinforcement through an eligibility trace.

Experimental Setup and Scenarios

The study utilized the V-REP simulation environment featuring a Pioneer P3-DX robot. To test the controllers' limits, three scenarios were designed, ranging from standard tracks to complex environments with reduced visual information.

Detailed layout of the standard closed-loop test track (Scenario 1) showing various turn radii and lane segments.
  • Scenario 1: A standard closed-loop road with two lanes and varying turn radii.
  • Scenario 2: A single-lane pattern with missing outer boundary lines to reduce visual cues.
  • Scenario 3: A complex environment requiring the robot to master two different road patterns simultaneously.

Results and Discussion

The direct R-STDP training method proved superior across all metrics:

  • Accuracy: In Scenario 1, the R-STDP controller achieved a mean lateral error of 0.006m, nearly seven times more accurate than the DQN's 0.041m.
  • Learning Efficiency: R-STDP reached a stable policy in approximately 15,000 steps, whereas the DQN required nearly 60,000 steps.
  • Robustness: While the DQN failed to learn a stable policy in the complex Scenario 3, the R-STDP controller successfully mastered the task.

The SNN's ability to process DVS spikes directly allowed for decisions every 50ms. In contrast, the DQN approach required buffering 500ms of data to create images, introducing significant latency. Furthermore, the transferred DQN-SNN model exhibited "wobbling" or oscillations, likely due to insufficient spike generation at critical moments, requiring an action trace that introduced instability.

Conclusion

This research demonstrates that direct training of SNNs via R-STDP is a highly effective method for robotic control tasks using neuromorphic sensors. While current R-STDP models lack advanced mechanisms like reward prediction error, they offer a clear path toward energy-efficient, high-performance autonomous systems. Future work will focus on scaling these methods to deeper networks for more complex urban driving environments.

Summary updated

BibTeX
@article{bing2020indirect,
  author = {Zhenshan Bing and Claus Meschede and Guang Chen and Alois C. Knoll and Kai Huang},
  title = {{Indirect and direct training of spiking neural networks for end-to-end control of a lane-keeping vehicle}},
  journal = {Neural Networks},
  year = {2020},
  doi = {10.1016/j.neunet.2019.05.019},
}
Figure