1. Home
  2. Explore
  3. Biology
  4. Computational Neuroscience Modeling

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Computational Neuroscience Modeling

Transcript

I'm Conor Houghton and this is a half of one of two lectures given on computational neuroscience as part of the unit PHPH2007 the notes are on the github shown in the slide. Here I'm going to talk a bit about modelling. Modelling in one of the basic tools of computational neuroscience it's a way of taking what it is we can measure relating it to what it is we want to know. So in science experiments are often very difficult and what we can actually measure is often different from what we need to know to answer the questions we have. Modelling provides a translation one to the other so for example I have a student who works on synapses she's interested in the dynamics of vesicles in the synapse but what she can measure are the postsynaptic potentials and so she uses a model of the synaptic dynamics to relate the measurements the amplitudes of the PSP's to ideas about how the vesicles release their neurotransmitter into the into the

cleft. More generally with modeling we hope it helps us relate what we measure to how or why questions about the brain we want to start off with the electrodynamics of neurons or the molecular dynamics inside the cell and we want to relay that to ideas about what it is a neuronal circuits doing what for example computational function it might serve in the brain here we're going to talk about the leaky integration fire model the heat the key entry and for our model is a model of neurons it is a simple model terrorism or not there are more complicated models of yours that can capture more of the behaviors in Iran but the hodgkin-huxley model the the static model for neuronal dynamics includes a part that looks a lot like the integration fire model and in fact they think integrating fire model yeah it captures a an important part of the behavior of neurons and so we're going to talk about that equation here gain

some intuition for what it is that the neurons do to their input based on the leaky integration fire model they make you in front of course it is still used in network model where you've got those two neurons interacting if what you're interested in is the behaviour emerges from the network the link integrating fire models might well be an accurate enough model of the actual neuronal dynamics coupled with properly some model of the synapses so it's still an important part of the models used by computational neuroscientists and also a model which provides insight into what neurons do in fact in this part is that you're not going to talk about Leakey integrate firewall model we're going to talk about the dynamics of the height of water in the leaky bucket the reason for that is well it's easier to talk about pockets and in cells instead of charges you to have in a

neuron we talk about the volume of water instead of voltage or potential we talk about the height of the water but it turns out that the equation is the same in fact the equation that were good to see here describes the dynamics of a leaky bucket is found again and again across biology yeah we're interest of course not directly in buckets but in the equations and so we're going to take a kind of idealized view of this leaky bucket for example the size of this book guitar perfectly perfectly vertical which would be behind for snacking buckets but is useful to make the equations simpler and indeed more like the equations that describe in Europe so in this leaky bucket with water flowing in from the top like so the idea might be that you can control the flow I turn in the top just as for example in a neuron if you had a stimulating electrode in the neuron you could adjust the current into the neuron by changing

the current into the electrode we also have the water itself gathering in the bucket and then we have water coming out idly to the bottom so it's about a bucket with a hole at the bottom obviously the speed the water comes out the bottom depends on the pressure of the water at the bottom and that depends on the height of the water in the bucket so for example if we increase the flow of water into the bucket like so the they'll be more water flowing into the book is then is flowing out as a consequence it's the height of the bottom of the book it will rise until the pressure at the bottom is enough for the water to come out the leak fast enough so the outflow at the bottom balances the inflow at the top conversely if we now turn down the tap at the outflow at the bottom is greater than the inflow top that means that the levels of water will drop until they flow out through

the leak is small enough to balance the flow in from the tap that's the dynamics that we want to capture in the model of of how the height of the water in the pocket changes with time so some notation H of T in red there is the height of the water I have T is the rate of flow into the Bukit and we note in passing that it's a rate of flow it will be measured in volume per time like liters per second or whatever similarly the leak at the bottom L of T is to flow out of the Bukit and that's also a volume per time let's talk a bit more about the leak so the speed the water flows at the bottom is proportional to the height so the bigger the height the faster the flow at the bottom to some reasonable approximation in physics that would be a linear relationship it'll be complicated slightly by the viscosity of the water and the turbulence but we're not interested in the physics here and so

we'll imagine as is you know almost true that there's a direct proportionality if you double the height of the water you will double the size the leak if you have those the water you have this I said the in other words there's a linear dependence between them and so we write this as L of T is equal to some constant which we'll call big G at times H of T and G of course could be calculated from the physics but here we'll just leave it as s G so in summary now we've water flowing in and water flowing outs the net flow into the bucket is the in minus the house high of t minus L of T or as we've just written it I of T minus G H of T and again we remember that this is a flow so it's merged in volume per time another thing that is changed by the flow if there's if I of T isn't equal to L of T the thing that changes is the volume the volume will change with time so we need to work out the volume we're interested in their dynamics the height

is the height that affects the leak but the leak and even the net inflow affects the volume and so the volume is going to be proportional linearly proportion to a GT in fact you know there's a formula for the volume of a cylinder it's PI R squared H and so the volume is equal to C H of T where C is equal to PI R squared H but again we're just going to call it C because we to do this in a way that makes it easier to apply to the neuron quesadilla so we shouldn't get too hung up on the shape at the pocket so the idea now is that the volume is going to change in time because the net flow into the pocket is not zero I is not the same as G of H gh in general and so if something changes the time well the mathematical machinery for describing how something changes in time if the derivative DV DT is the change in the volume per time and so we have to change the volume per time is equal to

the net flow into the bucket ma'am just as a side note you'll notice that do you know originally when we were writing about H inhale and I we put a bracket ste out to them to emphasize that there were functions of time often when were writing differential equations routine just generally we sometimes drop those brackets t-nut for any meaningful reason not because we mean to change your mind about whether v depends on T but rather just to stuff the equation getting too cluttered so in this equation here DV DT equals I minus gh because we've already seen them we know that VI into H depend on time and could be written in the brackets T where's the G is a constant now V we already saw is equal to C times H and so we can substitute that in so where we have DV DT we now have d CH DT and D DT is the rate of change of time C is a constant and so commonly brought outside of the derivative the rate of change of CH with time is the same as C

times the rate of change of H with time and so we get the bottom equation at the bottom C times T HT t is equal to I minus G times H that's almost the end of them has got to the equation we want to consider just for convenience and because it makes some of the later equations slightly easier to write down we divide across by the G so we divide everything by the G so in we used to have a c d HT t now we have seen over G th T and we call that tau and again on the right hand side we now if L 1 over G in front of the I now why do we call it tau well how is the Greek letter equivalent to T that we get in the made a T sound who makes the T sound and so we often use tau for things to do with time and we call this tower T at time scale and the reason for that is it does have the units of time if you look at the right hand side the equation you have for example the H there the units of H the measurement for H

would be distance on the left hand side you of the DHD T that's distance per time the unit's da14 HT t you might be you know meters per second or centimeters per now or whatever but DHT T is measured in distance per time on the equation the units after balance on both sides in the way that can happen would be if this tau thing had the units of time in fact you know if you go through it and check and check what units SI have what units G has that's actually you know directly demonstrably tau has the units of time so tau is measured in time and so it's appropriate to call it tau so we want to solve this equation in fact you can write that equation in terms of neutral so you can take take the equation tau dxdt is equal to 1 over G I minus H any right so H is equal to some integral and often you can do that integral however we're not especially interested in finding analytic solutions this equation because

in the case that were to interest in the case of neurons we we won't be won't be useful to write down the solution analytically rather we're going to solve it Americus will discuss in due course but it is useful I think to see what happens if the input is his constant so we're imagining now that we've switched on the tap and we're just leaving the tap without filling with the further such as a constant rate the water is flowing into the bucket and emphasize they have will write an eye bar instead of a high so the equation now is tau d HT t is equal to 1 over g high bar minus h the first thing to notice about this equation is that there's an equilibrium value of H is equal to high bar over G then the right-hand side is 0 and so the left-hand side is 0-2 and so th DT is equal to 0 and so if H is equal to a bar over G then H doesn't change at time T H DT is 0 and so that's an equilibrium point by setting H delete that value at

the equation say that hey V starts changing so that would be if the highest the water was exactly at the point where the outflow matched the inflow the furthermore if H is bigger than I bar over G that the right hand side is going to be negative 1 over G hi bar minus H will be negative and so th DT will be negative 2 assuming that o is positive as it is so if if H is greater niver G you know the words if the height is above the equilibrium value then dhdt is negative and so the height will fall and so if the washer is above the upper looper value but Falls they can loop in rally and we saw that before so here the waters above the equilibrium value here d HT t will be negative and the water will fall until its approaches the equilibrium value and the converse is also true if H is less than I bar over G then the HTT will be positive and the water will rise back up towards the

equity value so what we have is what we call a stable iquilibrium if you move H away from the equity value head back towards it and we can say it's slightly more actually the further the H is from the equilibrium value the faster will return if you look at the case where H is less than I bar over G then the smaller H is the bigger thereafter the right hand side is the bigger dhdt is and so the faster H will it have will increase so the further H is below the equilibrium the faster will increase towards the equilibrium and vice versa if H is greater than I bar over G the over the more it's greater than I Barbra Jean the faster will fall towards I PI over G so those are the dynamics of the leaked integrated fire model when the input current is is constant in fact we can write on solution this is the solution after that equation H of T is equal to H of 0 minus I PI over G equilibrium value

or multiplying this e to the minus T over tau plus a higher bar over G and we're not going to go through how you solve the equation here it's actually reasonably straightforward to use something I call it interesting for a factor for example but needless to say this is the solution in that solution we have hate to zero is supposed to be the starting value the Newton condition were sort of assuming that the the we have the value of hat equals to zero we're looking what happens after that if we were starting at a different value then you might have hated T sub 0 H of T 1 or something either way hector's e represents the value when T equals to zero which were taking to be the initial value where we're starting the equation we're saying we were starting off with hatred some value let's see what happens after that at the other important thing is the e to the minus T over tau that's the exponential function sometimes

written in this other form exp if minus T over tau and the exponential is one of the standard functions of mathematics you know like styling and cards one of the functions that you can get a new calculator or is in a book of logs in the old days and these special functions are actually typically functions that arise out of important differential equations the exponential is important precisely because it solves that differential equations that look like this one yeah this is what the exponential looks like this is a plot of pi is equal to e to the minus T you can see at T goes to zero it's equal to one and then as T gets larger it approaches 0 so e to the minus T gets smaller and smaller and smaller the closer it gets to zero the slower changes and so it wouldn't actually reach your own tune it yeah I got to infinity but it gets incredibly close now reasonably quickly if you had each of the minus T over 2

well then you have to increase T to twice as much to get the same argument to thee into the e and so it falls half as fast you can see it fall slower and if you have is equal to 2t which would correspond to tau equals to 1/2 in the solution it falls much faster so the the Tau in the solution determines how quickly that exponential Falls for a small value of T it smalls it falls quite quickly for a large value of T it falls much slower but by the way you can see that the e to the minus T over tau decays away toward zero and H of T then approaches I bar over G which we know is the equilibrium value and so they solutions the question the dynamics is that if the H starts off somewhere away from the equilibrium and then it will move towards equilibrium in this typical exponential curve here are examples so here I bar has been chosen equal to G so the equilibrium value is one tells be chosen equal to one and we start off at

three different values so the the one that corresponds to the equilibrium value we started to we fall towards it if we start at three we fall still fall towards it let me start off falling faster and similarly if we start at zero we rise towards it so that's the the behavior of the into the equation based on that and that the solution that we just looked at I've just plotted it out but also matches our intuition what we discussed before which is that that H will go towards that William value and then further away it starts the faster it approaches initially and so that's the the case for a constant input now of course in the case we're interested in a neuron the input into neurons not going to be constant is going to be the result of the firing over the neurons and the postsynaptic pulses coming in from the synapse is through the dendrites or indeed if it's sort of in vitro

preparation the current being pumped into the neuron by the electrode which we might change in order to investigate the response of the neuron so we're not going to be interested in the constant input necessarily we're interested in the variable input and to solve for variable input as I said for a you can do it you can change the you can rewrite the equation so that you have written H of T directly as a as an integral but often that's not useful and doesn't give you much insight and it does assume that you kind of know what I of T is but if you weren't evolving a network of neurons you won't know what I of T is in advance because the I of T will be the consequence of the firing of the other neurons the spikes going from from neuron to neuron so often it's not useful practically to solve the equation analytically that is to write it down as we did for the constant that case of H of T is equal to some known mathematical

functions rather we solve it numerically which is basically for different time steps for different points in time we work out the exact number not the equation but the number that gives us what what H is and we'll talk about how to solve the equation numerically in a minute but before we do that we can still even from the constant case gained some insight or some intuition for what might happen in the variable case so in the variable case at a given moment in time you have I over G and you have I over G minus H and that gives you a value of D H DT and if the same if H is less than IG dhdt will be positive if H is bigger than IG dhdt will be negative in other words H will travel towards at any given moment hate will move towards whatever I over G is and we saw that the value of tau we can think of as as showing how fast it will decay and so we can think of the solutions to the equation if the input

is variable as H trying to get to I over G if I over G is constant H will decay exponentially towards a high over G but if I over G is is changing then by the time it gets towards it it will have moved on somewhere else so in other words the solution that we see the dynamics and we'll see a picture in a second is one where H is chasing IO over G if tau is very small it will be quite close to it if tau is larger it will it won't be so close well let's have a look

at the picture so here we said I of T equals 2 sine of T as an example we start at h20 equals to zero and we look at three different tale values so in this picture the input is given by the very small dotted line it's the sine function it's the one that goes right up to one and then right down to minus one if tau is equal to 0.25 it's a small value of tau in this case compared to how rapidly sine of T is changing you can see that that's the solid black line it's is that the solution is pretty much tracing the input but if you look at tau equals to 4 that's the dashed line then it's not doing such a good job of chasing it by the time it's getting towards tau that getting towards the input the input is already falling and in fact what you see is that the solution kind of smoothes out the the function because it's always chasing the function it's always a little bit behind the function because one way it comes to

the other way and so the the solution doesn't trace out all of the oscillations of the input and gives you there some sort of a smoother version it is in fact like an averaging over the past values of input with the past discounted Accord as the exponential that's often referred to by engineers particular is filtering so the output the solution here as the input it's smooth the input over the town's timescale indicated by Tao so for tau equals two for its smoothing the input over a test for the timescale of forage for to have equal 0.25 is smoothing input over timescale of 0.25 in other words since the input is changing at a time scale that's kind of around that that time scale the solution looks a lot like the input and so that's kind of the intuition for what's happening to live to the solution to this differential equation the solution tries to chase the input it

does it on the time scale given by tau and insult and giving a smooth version of the input if that intuition is enough away actually about numbers then we're going to have to use a numerical approach a numerical approach as I said before is using a computer not to work not to write down the solution in terms of some function but to write down values of that the solution will have at different points in time and that allows us to solve the differential equation to give numbers using your computer the numeric approach we're going to take is the Euler approximation it's kind of the the simplest numerical approach to solving differential equations but it's also kind of parody mikhyl a lots of the other approaches are just more complicated versions of the Euler approximation so why do you have a cyclist cycling at 5 meters per second and you know where they are now and you want to know where they will be a second

later well after a second you have the rate of change of their position the velocity 5 meters per second a second has passed as you imagine that they've traveled 5 meters now you don't know that there are you have no reason to expect but that will be exact you know when the the cyclist is starting off that they're going at 5 meters per second but over the second they might have changed the speed they might have started packing faster or slower however you know for a cyclist they don't change their speed that much over a second so you imagine that this 5 meters per se 5 meters is going to be slightly approximate because you don't know that they're going to go at exactly 5 second all through the second will you imagine that is their velocity is not going to change that much throughout the second and so five meters is a pretty good guess - how far they're gone

if you wanted to keep tracking their their position and you were able to ask them every second what their speed was well now you'd ask them again you know what their speed was maybe they're now going at four point nine meter meters per second and so you'd guess over the next second they would go four point nine meters rather than five meters being to be leaving off the fact that during the previous second they had been continuously at going at five meters per second they've been slowing down a tiny bit during that second so that's the approximation we're going to work to so just sort of set things up imagining of a differential equation DF DT is equal to big F of F comma T so that's like a more general version of what we were looking before in our book a case we have H instead of F and big F of T the thing on the right hand side in the case the book which was I divided by G minus H over tau but this is the same I move

that you move the tower from the left of the right just to make things more convenient for what we're going to do next but but this is basically the situation the differential equation of the sort that we had first order differential equation it's an equation for DF DT what F is the thing we're interested in in our case H naught F but this is the general example and what we're going to use is this approximation the one that we just mentioned before which is that the position the value of F at the T plus Delta T's who imagine we know the value of F is at t we're interested in in a short time later in the case of the cyclists that was a second later if we're doing neuro and neuronal simulations a small amount of time that is the time smaller than the typical fluctuation time of the of the neuron would be like one millisecond or sometimes a tenth of a millisecond but but the idea is that delta T is a small

amount of time and what we imagine is that the value of F at T plus delta T is the value of F plus small amount of time multiplied by how the rate of change of F DF DT which from our differential equation is big F in other words the like in the cyclists the position after a second is the position now plus the velocity by the second here the value of F at T plus delta-t is the value of f plus delta T times DF DT which we actually

know because DF DT is what is given by our differential equation so how do we go from there I had to to finding a numerical solution well what sorry I should say before going on that's an approximation people often writers in the following form f of T plus delta T is f of T the value before delta T has passed plus delta T times the derivative the rate have changed the FT T which we know is by the equation is big f plus other stuff which will involve the second derivative and so on how fast what's the rate of change of the rate of change how fast is the velocity changing and according to

mathematics you can expand that and those further terms would look like delta T squared so if delta T is small delta T squared will be smaller and so there is a theory that would allow you to actually work out the next term and make the expansion more exact those methods are often called runge-kutta methods and there's a logical formula it's more exact an approximation we're using here for the approximation we're using here is that we're taking the first two terms of this expansion called the Taylor expansion we're using the rate of change and the initial position get an approximate to the next position so in practice what you do is you divide time up in two steps so we're going to start at some time T zero so you took to be zero earlier on and then we're going to work out the approximate solution at time delta T which we'll call t1 and then time two times delta T which we'll call t2 and then times three times delta

T and so we're going to use the order approximation to go from we're going to start off knowing what the value is for a debt at T equals zero for example we'll use the Euler approximation to guess or to work out approximately what the value is at t 1 after delta T is passed then we'll use that to try and work out the value at T 2 and as you can see here this is an approximation so at each of these discretized values of time we have an approximate F and if between you know TI and TI plus one the df/dt has changed a good bit as we can kind of see between t2 and t3 well then the approximation is not going to be so exact so this is an approximation the F sub n is an approximation to the value that the function would have at the time T and the time T and in turn is siltation were using to mean at the time after and Delta T's has passed so then putting all that together using the Euler approximation we have that F n

plus 1 the approximate value at n plus 1 times delta T is equal to the approximate in our proximation is equal to the approximate value at F n after n Delta T's plus this extra bit which as I said is like multiplying the time by the rate of change it's like assuming the cyclist has traveled 5 meters if they were going 5 meters per second for a second I'm and so that then gives you an iterative solution you start off with F of 0 that's with N equals to 0 that allows you to work out f1 then if you put N equals 1 you get f2 is equal to f1 plus delta T big F of F 1 T t1 etc and so you can keep going okay and so the F the big F is the thing that's on the right-hand side of the differential equation so in our case that says that H n plus 1 is equal to H n plus the stuff that would be at the right-hand side in the differential equations that's I the value of the of the input current input

flow of water at TN minus H n again over tau multiplied by delta T so that there is a numerical formula that allows us to go step by step we know H 0 we work out H 1 approximately we work out H 2 we work out H 3 and that gives us an approximate set of numbers describing the behavior of the solution as time passes and here it's for a book to water but the same numerical techniques are used to find approximate solutions to the leaky integrating first equations to

allow us to calculate how a neuron modeled by the interface and fire equations that changes with time and we'll talk about that in the second half of this lecture so to summarize we as an equation for the height of water in a bucket and I've told you that that same equation is going to apply to the leaking trail our model of the neuron we looked at the solution for constant input that gave us some intuition as to how the solution is differential equation behaves and how would behave for variable input we saw that it filters the input it smooths it out and we learned how to solve the differential equation numerically using Hoarders approximation and as I said in the next half of this lecture we'll will talk about the actually Keon fire neuron and how this intuition will help us to understand something about how neurons behave

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent