A Chaotic Neuron: Hodgkin-Huxley and the Logistic Map


Mathematical models of neurons have completely changed the scientific community's ability to recreate what we see in biology, in our brains - on a desktop computer. These models are also just really pretty. Don't believe me? Here's the first of many gifs you'll see in this post: (sorry, I'm trying to get better at visualization, so it's gonna get a little gimmicky)

This is an animation I created of a Python interpretation of Hodgkin and Huxley's neuron action potential model. At each time step, I multiplied each input by ten in order to simulate the decline in the rate of action potential generation over time. This is also a way to simulate the habituation of a neuron to a stimulus over time. The reason I titled the graph 'Linear Evenly Spaced' is the same reason that I created this whole post/project, so let's dive right into that. 

I was reading a great book on neuron 'spiking' models (Spikes: Exploring the Neural Code, by Rieke et. al --- I highly recommend it to any budding neuroscientist) and came across a really interesting point that the authors made - that is that the current state of computational neuron models rely on a iterations of an operation over a fixed, linear time interval; That operation being the solution of an ODE (ordinary differential equation), over this time interval. In most models, the time inputs look like a vector of integers representing time, such as [.1, .2, .3, .4, .5] in terms of seconds. In Python, this is usually made with a Numpy arange() call, setting a specific start, end, and interval value. While this allows for a great-looking and simple output, there's a problem. In real life, stimuli (these time points) don't come in regular intervals. 

Your brain's neurons are constantly being bombarded with stimuli, at time points that are not regular. For example, while you are staring at a laptop screen, some specific Visual Cortex neurons that respond to specific colors (and orientations of shapes) are getting input only when you see those things on a screen. Say you come across a word in red. Visual Cortex neurons that are more activated by red objects in the orientation of the word will fire. But, you don't come across the red objects at regular intervals in time - you come across them whenever you see them. Thus, to your brain they happen at seemingly random times. 

So I thought to myself: what would happen if I created a vector of randomized (or pseudo-randomized) time inputs, then sorted them from least to greatest to simulate forward motion in time? Would this not simulate realistic neuron firing? So I set out to do so. I compared three types of random inputs in this exploration:
  • Vector inputs from a Gaussian Distribution, by numpy's random gaussian module
  • Vector inputs from a Poisson Distribution, by numpy's random poisson module
  • Vector inputs from a Logistic Map, by the Pynamical nonlinear dynamics module
Gaussian Random Inputs
First I used randomized inputs from a Gaussian distribution as input to the neuron. I then sorted the vector in order to represent forward motion in time. As a reminder, this is what a Gaussian distribution looks like:

And, this was the result:
As you can see, a somewhat rougher response. Because the intervals between time inputs were somewhat random, the curve is definitely not as smooth. However, the core pattern remains.

Poisson Distribution

Let's see if we get any different from a Poisson distribution, which, as a reminder, looks like this:
 The Hodgkin-Huxley neuron model response looked like:
Wow. A lot rougher. After the first time step, it becomes a completely linear function. This is interesting because, as we will discuss in a bit, Hodgkin-Huxley models have some built-in chaotic tendencies. 

Built-in Chaos in H.H. models
(resource: http://www.scholarpedia.org/article/Chaos_in_neurons)
Our very own Hodgkin-Huxley model's deterministic chaos dynamics have been extensively studied before. 

Classification of attractors in dissipative dynamical systems. Trajectories and Poincaré sections are obtained with the Hodgkin-Huxley equations

 Chaos and Poincaré sections in the forced Hodgkin-Huxley equations.

Chaotic Input: The Logistic Map
(reference: http://geoffboeing.com/2015/03/chaos-theory-logistic-map/)
The logistic map is a nonlinear function that is known to create chaotic dynamics. Not to be confused with the logistic function, which generates the familiar S-shape curve. It is a recurrence relation, shown by:


In this project, I used the vector output given by the logistic map, which would usually be used to model something like population growth over time, as sorted input into the Hodgkin-Huxley neuron model. At a basic level, this figure by Goeff Boeing shows the growth rate outputted by a logistic map over time, for the first 20 generations of logistic mapping. 

As we see in the figure, as we move up in growth rate, the more chaotic the path. 
Let's see what the HH model came up with, for the 1st and 20th generations:



Well, a more logistic-looking version of the gaussian random input, which makes some sense. 
The 20th has a much higher maximum membrane potential, with the same minimum as the 1st, implying more variability (some chaos? We shall see...). However, the 20th generation doesn't look too different from the 1st, so let's up the ante, as Boeing did in his population example - 1000 generations. To visualize this kind of chaotic dynamic, we need a bifurcation diagram. This is what that looks like for 1000 generations, in Goeff's population model:
So let's get crazy - the 100th, 500th, and 1000th generation input into the Hodgkin Huxley neuron - just for completeness: (this took a bit to run, by the way)


Aaand, well - even 1000 generations in, this looks pretty similar to the first generation. 
It seems like the Hodgkin-Huxley model is well equipped to handle even the most random of time intervals, and seems to be consistent across iterations. While there is nothing groundbreaking to be found here, I certainly learned a lot about the logistic map and matplotlib animations!
For all the code that went into creating this little project, see: https://github.com/ferdavid1/Chaoticneuron 

Thanks for reading!
- Fernando

Comments

  1. Good day to all am Valeria Miguel Ángel From USA..Texas am so happy sharing this great testimony on here, I was diagnose of Stage IV colon cancer.i was checking for solution in the internet then miraculously i came Across Dr Itua the powerful herbalist that Cure Numerous Diseases such as-Thyroid Cancer,Uterine cancer,Fibroid,Angiopathy, Ataxia,Arthritis,Amyotrophic Lateral Scoliosis,Brain Tumor,Fibromyalgia,Fluoroquinolone ToxicityBladder cancer,Brain cancer,Hiv,Herpes,Esophageal cancer,Gallbladder cancer,Gestational trophoblastic disease,Head and neck cancer,Hodgkin lymphoma
    Intestinal cancer,Kidney cancer,Hpv,Lung cancer,Melanoma,Mesothelioma,Multiple myeloma,Neuroendocrine tumors
    Non-Hodgkin lymphoma,Oral cancer,Ovarian cancer,Sinus cancer,Hepatitis A,B/C,Skin cancer,Soft tissue sarcoma,Pancreative Cancer,Spinal cancer,Stomach cancer,Vaginal cancer,Vulvar cancer,
    Testicular cancer,Tach Diseases,Leukemia,Liver cancer,Throat cancer,
    Syndrome Fibrodysplasia Ossificans ProgresSclerosis,Alzheimer's disease,Chronic Diarrhea,Copd,Parkinson,Als,Adrenocortical carcinoma  Infectious mononucleosis. ,so I contacted him base on the testimonies I?m seeing about him on the internet, I was cured too by him, kindly contact him today through his email he can help you..drituaherbalcenter@gmail.com and his herbal medicines will set you free from any human diseases,all thank to you Dr Itua for your kindly help in my life his Mobile number Whatsapp.+2348149277967

    ReplyDelete

Post a Comment

Popular posts from this blog

ShoegazeBot: Quantifying Melancholy

MuNet: Listening to a Neural Network (and jamming out)