spikingjelly.activation_based.neuron package#

备注

API稳定性说明

SpikingJelly 0.0.0.1.0neuron 模块的内部实现进行了重构:原来的 neuron.py 文件已被拆分并重组为 neuron/ 包,以提升代码的模块化程度和可维护性。

该改动不会影响对外公开的 API。 我们强烈建议用户仍然通过 neuron 这一顶层命名空间来访问相关功能,而不是从具体的内部子模块中进行导入。 neuron 层级下的导入路径被视为稳定的公共接口;更深层的子模块仅作为内部实现细节,未来可能发生变化。

from spikingjelly.activation_based.neuron import LIFNode # 推荐 ✅
from spikingjelly.activation_based.neuron.lif import LIFNode # 不推荐 ❌

API Stability Notice

We have refactored the internal implementation of the neuron module. The original neuron.py file has been reorganized into a package ( neuron/ ) for better modularity and maintainability.

This change does not affect the public API. Users are strongly encouraged to continue accessing layers directly from the neuron namespace, rather than importing from specific internal submodules. Import paths under neuron are considered part of the stable public API, while deeper submodule paths are treated as implementation details and may change in future releases.

from spikingjelly.activation_based.neuron import LIFNode # recommended ✅
from spikingjelly.activation_based.neuron.lif import LIFNode # not recommended ❌

Core Neuron Modules#

SpikingJelly 的 核心神经元模块 提供了规范神经元抽象。 这些神经元是 SNN 领域中被广泛接受和使用的模型,旨在作为研究与实际应用中的基础构建单元。


SpikingJelly's core neuron modules provide canonical and stable neuron abstractions. These neurons represent widely accepted models in SNN (SNN) literature and are designed to serve as fundamental building blocks for both research and practical applications.

Base Classes#

SimpleBaseNode

Simplified base class for neurons.

BaseNode

Base class for neurons.

NonSpikingBaseNode

Base class for neurons that do not emit spikes.

Integrate-and-fire (IF) Neurons#

SimpleIFNode

Simplified IF neuron.

IFNode

IF neuron.

NonSpikingIFNode

IF variant that does not emit spikes.

Leaky Integrate-and-fire (LIF) Neurons#

SimpleLIFNode

Simplified LIF neuon.

LIFNode

LIF neuron.

NonSpikingLIFNode

LIF variant that does not emit spikes.

Parametric Leaky Integrate-and-fire (PLIF) Neurons#

ParametricLIFNode

Parametric LIF neuron.

Parallel Spiking Neuron Family#

PSN

Parallel Spiking Neuron (PSN).

MaskedPSN

Masked PSN.

SlidingPSN

Sliding PSN.

FlexSN#

FlexSN

High-level FlexSN neuron module for automatic Triton kernel generation.

FlexSNKernel

Low-level callable interface for the generated Triton neuron kernel.

Research-specific Neuron Modules#

特定研究的神经元 模块包含为特定研究目的或实验场景提出的神经元模型。 这些神经元通常源自具体论文,其适用范围和使用频率相比 核心神经元 而言更加有限。


Research-specific neuron modules contain neuron models that are proposed for particular research purposes or experimental settings. These neurons often originate from specific papers and are not so widely used as Core Neuron Modules.

Adaptive Neurons#

AdaptBaseNode

Base class for neurons with adaptation.

IzhikevichNode

Izhikevich neuron model.

Nonlinear Integrate-and-fire Neurons#

QIFNode

Quadratic Integrate-and-Fire (QIF) neuron.

EIFNode

Exponential Integrate-and-Fire (EIF) neuron.

LIF Variants#

GatedLIFNode

Gated LIF (GLIF) neuron.

KLIFNode

KLIF neuron.

CUBALIFNode

CUrrent-BAsed LIF neuron.

LIAFNode

Leaky integrate and analog fire neuron.

Neurons with Membrane Potential Batch Normalization#

MPBNBaseNode

Base class for neurons with membrane potential batch normalization (MPBN).

MPBNLIFNode

LIF neuron with MPBN

Differentiation on Spike Representation (DSR)#

DSRIFNode

IF neuron with DSR.

DSRLIFNode

LIF neuron with DSR.

Neurons for Online Learning#

OTTTLIFNode

LIF neuron for online training through time (OTTT).

SLTTLIFNode

LIF neuron for spatial learning through time (SLTT).

Neurons with Inter-layer Connection#

ILCBaseNode

Base class for neurons with inter-layer connection.

ILCIFNode

IF neuron layer with inter-layer connection.

ILCLIFNode

LIF neuron layer with inter-layer connection.

ILCCUBALIFNode

CUrrent-BAsed LIF neuron layer with inter-layer connection.

Neurons with Input or Output Noise#

powerlaw_psd_gaussian

Generate Gaussian noise with a power spectrum.

NoisyBaseNode

Base class for neurons with noisy input / output.

NoisyCUBALIFNode

CUrrent-BAsed LIF neuron with noisy input / output.

NoisyILCBaseNode

Base class for neurons with noisy input / output and inter-layer connection.

NoisyILCCUBALIFNode

CUrrent-BAsed LIF neuron layer with noisy input / output and inter-layer connection.

NoisyNonSpikingBaseNode

Base class for neurons with noisy input that does not emit spikes.

NoisyNonSpikingIFNode

IF neuron with noisy input that does not emit spikes.