All On-Board: Fully On-Chip Neuromorphic Q-Learning with Embedded CartPole Simulation
Authors: Steven C. Nesbit, Giovanni T. Michel, Gerd J. Kunde, Edward Kim, Andrew T. Sornborger
Organizations: College of Computing and Informatics, Drexel University, Philadelphia, PA, USA · Information Sciences (CAI-3), Los Alamos National Laboratory, Los Alamos, NM, USA · Department of Electrical and Computer Engineering, Northwestern University, Evanston, IL, USA · Nuclear & Particle Physics & Applications (P-3), Los Alamos National Laboratory, Los Alamos, NM, USA
As AI models grow in size and usage, their energy demands increase dramatically, raising sustainability and economic concerns. Neuromorphic hardware, inspired by the energy efficiency of the brain, seeks to address this challenge by offering low-power, fast-processing alternatives to conventional computing. Such hardware is particularly well-suited to control systems deployed in resource-constrained environments, which are best trained via reinforcement learning (RL). This contribution presents the design and implementation of a fully on-chip, closed-loop Loihi 2 RL agent. Our neuromorphic circuit consists of a fully embedded Q-learning algorithm and an on-chip simulation of the CartPole-v0 environment on Loihi 2. Our Q-learning algorithm trained the same number of successful agents as the CPU implementation in only half the execution time and with two orders of magnitude less dynamic power. These findings demonstrate the viability of RL on neuromorphic hardware and highlight its promise for building energy-efficient, real-time, embedded AI systems.
Figures & tables
Fig. 1: Visualizations of CartPole environment. Corresponding 30-second videos are available at https://github.com/nesbitsc/all-on-board-figure-1 . a : OpenAI Gym environment inference using agent with ideal Q-table, b : Loihi 2 environment inference using agent with ideal Q-table, c : OpenAI Gym environment inference using on-chip trained agent, d : Loihi 2 environment inference using same agent as (c), e : OpenAI Gym environment inference using on-chip trained agent, unique from (c) and (d), f : Loihi 2 environment inference using same agent as (e), g : OpenAI Gym environment inference using CPU-trained agent, h : OpenAI Gym environment inference using CPU-trained agent, unique from (g), i : Loihi 2 environment inference using on-chip-trained agent trained for 0, j : 10 000, k : 20 000, l : 30 000, m : 40 000 weight updates, n : Loihi 2 environment training at 0, o : 10 000, p : 20 000, q : 30 000, r : 40 000 weight updates, s : Loihi 2 environment inference using exploration rate decay function beginning at 30% and t : 10% randomness.
Fig. 2: Overview of neuromorphic Q-learning circuit architecture. Angle and angular velocity measurements are sent from the CartPole neuron to the policy network, which sends these values through the Q-table. Q-table output from the policy network goes to the decision process module, which determines whether or not to take a left or right action. The CartPole neuron also sends reward information to the random decision module, which decides whether (exploration) or not (exploitation) to select an action randomly, and if so, makes a random decision and overrides the greedy decision made by the decision process module. The policy network also sends its Q-table output values to the weight update module, which in turn sends Q-value update information to the policy network. Finally, the action selected by the decision process module is sent to the CartPole neuron to calculate the next state of the CartPole environment.
Fig. 3: Functional connectivity of the neuromorphic Q-learning circuit. Layers are only shown when gated ‘on,’ and synapses are only shown when their target is gated on. The names of the neuron layers are given on the left margin so that the row corresponds to layer identity. The columns correspond to the time steps of the algorithm, which correlate to the time steps on Loihi 2. Arrow labels indicate information flow through the synapse. Variables ϵ and α refer to the exploration and learning rates, respectively (see Equation 11 ). arand , random action; y1 , constrained update term (see Sections II-B2 and II-B5 ).
Hyperparameter
Value
Q-value update function
Equation 1
α , ϵ decay function
Equation 11
reward rt+1
±8
discount factor γ
0.99
Q-table shape
2×72
Q-value initialization
−127
TABLE I: Hyperparameters used in neuromorphic Q-learning.
Fig. 4: Agent performance on CartPole-v0 after Q-learning on CPU and Loihi 2. a : percentage of CPU-trained agents scoring 195 or higher, b : percentage of Loihi 2-trained agents scoring 195 or higher, c : CPU-trained top-performing agent, d : Loihi 2-trained top-performing agent, e : CPU-trained top 50% of agents, f : Loihi 2-trained top 50% of agents, g : all CPU-trained agents, h : all Loihi 2-trained agents.
Task
Hardware
Power (W)
Latency
Static
Dynamic
Total
( µ s)
Loihi 2 training
x86 cores
1.56
0.00
1.56
neurocores (34)
0.22
0.02
0.25
whole board
1.78
0.02
1.80
58.42
CPU training
Intel Core i7-10870H
31.23
12.00
43.22
162.54
Loihi 2 inference
x86 cores
1.56
0.00
1.56
TABLE II: Breakdown of performance profiling for Q-learning training and inference on Loihi 2 and the CPU.
Dynamic environmental changes, confined workspaces, and stringent real-time constraints make pathfinding in Robotic Mobile Fulfillment Systems (RMFS) a challenging problem for conventional search- and rule-based methods, which typically suffer from high computational complexity and long decision latency. While reinforcement learning (RL) has emerged as a powerful alternative, deploying learned policies with extreme energy efficiency on resource-constrained hardware remains an open challenge. We present SDQN-RMFS, an end-to-end framework that achieves high-fidelity deployment of an RL-trained policy from a full-precision artificial neural network (ANN) through to a neuromorphic chip. By computing only when triggered by sparse events, this framework unlocks ultra-low-power RMFS pathfinding. Our full-stack pipeline operates as follows: an ANN policy is first efficiently trained via a collision-allowing strategy to densify informative trajectories, and then converted into a spiking neural network (SNN) via a hard-label knowledge distillation approach. This effectively addresses the output distribution mismatch, preserving policy capability across the ANN-to-SNN pipeline while substantially reducing inference latency. Hardware experiments demonstrate up to 11,281× energy savings and a nearly two-fold reduction in latency compared to a high-performance GPU baseline, while maintaining decision quality on par with the original trained policy. These results establish physical neuromorphic inference as a practical and energy-sustainable pathway for large-scale RMFS operations.
Junzhe Xu, Zecui Zeng, Lusong Li +2
The Hong Kong University of Science and Technology (Guangzhou), Guangzhou, China. · JD Explore Academy, Beijing, China.
Neuromorphic and edge computing research has focused on reducing the inference cost of neural network controllers, yet in physical closed-loop systems the actuator can rival or exceed an efficient controller in energy. An efficient controller is therefore necessary but not sufficient, because the actuator becomes the cost worth reducing once inference no longer dominates it. Here, we introduce energy-aware learning, an approach that incorporates actuator energy directly into the reinforcement learning reward, and demonstrate it in closed-loop deep brain stimulation (DBS) for Parkinson's disease. A deep spiking Q-network, trained in a biophysical cortico-basal ganglia-thalamic circuit model, learns to suppress pathological alpha-beta oscillations by 45.2% while reducing stimulation charge by 80.0% relative to continuous DBS. Sparsity-constrained knowledge distillation compresses the policy onto the SynSense XyloAudio 3 neuromorphic processor at 0.52 mW inference power, yielding 28.1x lower energy per inference than an equivalent artificial neural network on conventional edge hardware. By co-optimizing stimulation energy and inference efficiency, the framework addresses both major power demands in implantable neuromodulation.
Binh Nguyen, Colleen Josephson, Mircea Teodorescu +2
Dept. of Electrical and Computer Engineering, University of California, Santa Cruz, CA, USA · Dept. of Bioengineering, University of California, San Diego, La Jolla, CA, USA
Reinforcement learning (RL) algorithms have made strides over the past decade applying them to a wide range of problems and control tasks. However, the deployment of RL on neuromorphic hardware for continuous control tasks remains under-validated. Namely it is unclear whether replacing a conventional actor network with a spiking neural network (SNN) affects the performance of an agent before any hardware-specific benefits manifest. We provide a systematic validation of a minimal, neuromorphically viable spiking actor variant of Soft Actor-Critic (SAC) on conventional hardware, establishing a baseline for future neuromorphic RL research. In this paper, we propose the Spiking Actor Network Soft Actor Critic (SANSAC) to address the use of RL frameworks in continuous environments, designed as a framework that can be implemented on neuromorphic hardware. We compare a traditional Soft Actor Critic (SAC) network to SANSAC in a traditional computer. We demonstrate the near equivalent performance of SANSAC and SAC, while addressing the impact of hidden dimensions. Our results demonstrate the viability of SNN based algorithms in complex continuous environments, as well as competitive performance to traditional neural networks in traditional computers, providing a basis to continue exploring the use of SNNs in continuous RL frameworks.
Jessica Hunter, Md Maruf Hossain Shuvo, Krishna Roy
Department of Computer Science New Mexico Institute of Mining and Technology Socorro, NM 87801, USA · Department of Electrical and Computer Engineering The University of Texas at El Paso El Paso, TX 79968, USA · Department of Electrical Engineering New Mexico Institute of Mining and Technology Socorro, NM 87801, USA