How to Implement Biological Neuron Activations in Artificial Neural Networks


In artificial neural networks, activation functions are used for neurons, i.e. the sigmoid activation:

Sigmoid function

Which can be implemented in code as (in Python):

def sigmoid(x):
    return 1 / (1 + math.exp(-x))

How can we implement a biological activation function, such as the Hodgkin-Huxley model, whose mathematical form is:

enter image description here


  • Cm: Capacitance
  • Vm: Membrane potential

As mentioned on the Wikipedia page,

The typical Hodgkin–Huxley model treats each component of an excitable cell as an electrical element (as shown in the figure). The lipid bilayer is represented as a capacitance (Cm). Voltage-gated ion channels are represented by electrical conductances (gn, where n is the specific ion channel) that depend on both voltage and time. Leak channels are represented by linear conductances (gL). The electrochemical gradients driving the flow of ions are represented by voltage sources (En) whose voltages are determined by the ratio of the intra- and extracellular concentrations of the ionic species of interest. Finally, ion pumps are represented by current sources (Ip).[clarification needed] The membrane potential is denoted by Vm.


Posted 2018-02-22T23:16:25.023

Reputation: 190

2 – Emre – 2018-02-23T01:39:24.843

No answers