Adding a new neuron type

Currently, the Kaspersky Neuromorphic Platform supports the property sets and population typification based on the neuron models AltAILIF, BLIFATNeuron, and SynapticResourceSTDPBLIFATNeuron. If required, you can add a new neuron type.

You can use this instruction when working with the platform source code.

To add a new neuron type:

  1. Go from the working directory where the platform source code archive was unpacked to neuron-trait-library/include/knp/neuron-traits/, and create a header file for the new neuron type there.
  2. In the created header file, define the neuron type structure and its template properties (for example, default_values, neuron_parameters).

    An example of a BLIFAT neuron definition:

    neuron-trait-library/include/knp/neuron-traits/blifat.h

    #include "type_traits.h"

    namespace knp::neuron_traits

    {

    struct BLIFATNeuron;

    template <>

    struct default_values<BLIFATNeuron>

    {

    // Specifies the number of steps in the neural network since the last spike step by default.

    constexpr static std::size_t n_time_steps_since_last_firing_ = std::numeric_limits<std::size_t>::infinity();

    // Specifies the default value to which the membrane potential tends for

    // conduction-based inhibitory synapses.

    constexpr static double reverse_inhibitory_potential = -0.3;

    // Specifies the default value to which the membrane potential tends for

    // current-based inhibitory synapses.

    constexpr static double min_potential = -1.0e9;

    // ...

    };

    template <>

    struct neuron_parameters<BLIFATNeuron>

    {

    // Specifies the number of steps in the neural network since the last spike step.

    std::size_t n_time_steps_since_last_firing_ = default_values<BLIFATNeuron>::n_time_steps_since_last_firing_;

    // Specifies the threshold value of the membrane potential of the neuron.

    double activation_threshold_ = default_values<BLIFATNeuron>::activation_threshold_;

    // Specifies a dynamic threshold value of the membrane potential for the neuron to reach

    // before it generates a spike.

    double dynamic_threshold_ = default_values<BLIFATNeuron>::dynamic_threshold_;

    // ...

    };

    } // namespace knp::neuron_traits

  3. Add the created neuron type to the list of neurons defined in the neuron-trait-library/include/knp/neuron-traits/all_traits.h header file.

    An example of adding a BLIFAT neuron to the list of neurons:

    neuron-trait-library/include/knp/neuron-traits/all_traits.h

    #include "blifat.h"

    namespace knp::neuron_traits

    {

    // A comma-separated list of neuron types.

    #define ALL_NEURONS BLIFATNeuron

    // ...

    } // namespace knp::neuron_traits

  4. Implement the overloading startup method in the desired backends.

    For example, for the CPU backend, implement the overloading method for starting the calculation of populations.

Page top