A Low Latency Adaptive Coding Spiking Framework for Deep Reinforcement Learning

Lang Qin, Rui Yan, Huajin Tang · DOI

Abstract

Spiking Neural Networks (SNNs) are highly sought after for low-power edge computing due to their biological inspiration and asynchronous communication. However, Spiking Reinforcement Learning (SRL) has traditionally struggled with high inference latency, limited versatility across task types, and the difficulty of estimating continuous values with binary spikes. We introduce the Adaptive Coding Spike Framework (ACSF), a novel approach that replaces fixed spike encoding heuristics with learnable matrices. ACSF reduces inference latency by over 99% compared to conversion-based methods, achieving state-of-the-art performance on both discrete (Atari) and continuous (MuJoCo) benchmarks while maintaining up to 5x higher energy efficiency than standard Deep Neural Networks (DNNs).

Introduction

The promise of SNNs lies in their potential for ultra-low-power execution on neuromorphic hardware. Unlike standard Deep Neural Networks (DNNs), SNNs communicate via discrete "spikes," significantly reducing the energy footprint of inference. Despite this, SRL has faced significant barriers. Traditional "rate coding" requires hundreds of time steps to represent a single value, leading to high latency. Furthermore, most SRL models are specialized for either discrete or continuous action spaces, lacking a unified framework. Finally, the binary nature of spikes makes it difficult to approximate the continuous functions (like Q-values) required for RL.

The Adaptive Coding Spike Framework (ACSF)

The core innovation of ACSF is the transition from fixed biological heuristics to a learnable interface. Instead of using predefined rate or temporal coding, ACSF treats the spike encoding and decoding processes as learnable components of the network architecture.

Detailed architecture of the ACSF, highlighting the learnable spike encoder and value/action decoders.

As shown in the architecture above, the framework consists of three primary stages:

  1. Adaptive Spike Encoder: A learnable matrix $W_E$ expands the raw state vector $S$ into a temporal sequence of spikes $S^\tau$. This allows the network to optimize the temporal representation for a specific task, enabling effective communication in as few as 4 time steps.
  2. Deep SNN: The core processing unit utilizes Leaky Integrate-and-Fire (LIF) neurons. To overcome the non-differentiability of the spike function, ACSF employs an arctangent surrogate gradient, allowing for direct training via backpropagation.
  3. Adaptive Decoders: Learnable matrices ($W_{VD}$ and $W_{AD}$) compress output spikes back into continuous real-valued actions or Q-values, bridging the "estimation gap."

RL Paradigms and Training

ACSF is designed for versatility, supporting both online and offline RL paradigms. This flexibility allows it to be applied to a wide range of real-world scenarios, from real-time robotic control to learning from pre-collected datasets.

The ACSF workflow for both online (A) and offline (B) reinforcement learning scenarios.

The framework was evaluated across four major RL algorithms: DQN for discrete actions, DDPG for continuous control, and BCQ/BC for offline learning. This breadth of application demonstrates that ACSF is a general-purpose framework for SRL.

Experimental Results

The authors benchmarked ACSF on the Atari 2600 suite and MuJoCo robotic tasks. The results highlight three major advantages:

  • Ultra-Low Latency: ACSF achieves peak performance with only 4 to 10 time steps. Compared to traditional conversion methods requiring 500 steps, this is a reduction to approximately 0.8% of previous latency levels.
  • Competitive Performance: In Atari benchmarks, ACSF (at $T=4$) outperformed the standard DNN-based DQN in 10 out of 16 games. It similarly exceeded performance baselines in MuJoCo locomotion tasks.
  • Energy Efficiency: By measuring Synaptic Operations (SynOps), the study found ACSF to be 81.95% more efficient than DNNs in DQN tasks and 32.83% more efficient in BCQ tasks, translating to a roughly 5x improvement in inference energy efficiency.

Conclusion

ACSF represents a significant step forward for neuromorphic computing in RL. By moving to a learnable "adaptive coding" scheme, the framework overcomes the traditional trade-offs between latency, performance, and versatility. While the move toward "neuro-engineered" learnable matrices shifts the model away from strict biological realism, the resulting gains in efficiency and speed make it a highly practical solution for low-power edge intelligence.

Summary updated

BibTeX
@inproceedings{qin2023low,
  author = {Lang Qin and Rui Yan and Huajin Tang},
  title = {{A Low Latency Adaptive Coding Spiking Framework for Deep Reinforcement Learning}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.24963/ijcai.2023/340},
}
Figure