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:
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:
Where:
- 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.
Topic activation-function implementation bioinformatics neural-network python
Category Data Science