  Spiking neural networks (SNNs) represent a promising approach to developing
artificial neural networks that are both energy-efficient and biologically
plausible. However, applying SNNs to sequential tasks, such as text
classification and time-series forecasting, has been hindered by the challenge
of creating an effective and hardware-friendly spike-form positional encoding
(PE) strategy. Drawing inspiration from the central pattern generators (CPGs)
in the human brain, which produce rhythmic patterned outputs without requiring
rhythmic inputs, we propose a novel PE technique for SNNs, termed CPG-PE. We
demonstrate that the commonly used sinusoidal PE is mathematically a specific
solution to the membrane potential dynamics of a particular CPG. Moreover,
extensive experiments across various domains, including time-series
forecasting, natural language processing, and image classification, show that
SNNs with CPG-PE outperform their conventional counterparts. Additionally, we
perform analysis experiments to elucidate the mechanism through which SNNs
encode positional information and to explore the function of CPGs in the human
brain. This investigation may offer valuable insights into the fundamental
principles of neural computation.
