You are here

Basic network simulation video

An example of network simulation using Nengo interactive plots. The example network is a neural integrator constructed in the basic construction video.

In this video I'll demonstrate simulating the network that we constructed in the last video. As you can see I'm beginning where I left off. I have an integrator network that has already been constructed for me. If I go to the top right corner, I can click on this icon, which we refer to as the "interactive plots" icon. When I do that, we have a blank interactive plot, which shows the network structure. It plots just the nodes and connections. So I have my integrator population of neurons, and I have my input function.

(0:29) If I'd like to verify that this is in fact performing the function we'd like, I can go to the integrator population and right-click. Then plot the value of the variable that is being represented in the population of cells. I can also plot the value of the input. If I hit play, I will see the input value and the integrator value. So we see the input that we defined, and we can watch the integrator value. Returning to the bottom, we can grab this time slider, and we can actually look slowly through the simulation response over time. So we can see that we have input that goes up, the integrator begins integrate that, so we have a positive slope, the input turns off, and then the integrator stops integrating and we get a constant value. So it's holding that information stably over time, just as we had desired.

(1:14) We can pause the simulation and reset it to inject that same input again. We'd like to convince ourselves that all this is been done with neurons. So we can right click again on the integrator population and plot something slightly more neural, something like a spike raster. You can see that we can quickly run out of room on a small screen, so we can shrink some of our plots using the scroll wheel to get them out of the way a little bit. Now when I hit play, we can see that the spikes generated by some of the cells are being plotted in this plot down here. If we would like to see more spikes (it is only showing about 10%), we can show about 25% or more, we can choose that by right clicking on the plot, and now we see the activity, the population spike patterns, over 25 of those neurons, since we have 100 neurons.

(2:02) Now this is called "interactive plots," so if we return to our input and select the control option, we actually get a slider, which we can use to interact with our simulation in real-time. So let me reset the plot and hit play. You can see that the slider will reflect the input that we defined. We can also grab that slider and give it some input. So if I give a slightly negative input, we can see that the integrator is now going downwards. If I get that back close to zero, I should be able to stop the integrator and it will go stable. So indeed we can verify the integration by manually controlling the input directly. If we give it a positive input, and stop it -- approximately stop it -- we can see that the integrator again goes stable.

(2:45) One final plot I'd like to demonstrate here is if we right-click on the integrator population and choose the voltage grid, we get a plot which actually shows us all of the neuron's responses over space. So we can think of this as a cortical sheet where we've got 10 neurons by 10 neurons. Whenever there's a yellow dot that is a spike that's been generated, which would also be plotted on the spike plot. The grayscale shows the subthreshold voltage of those neurons. So if we reset the neurons in the simulation and hit "play", we can see the population patterns of activity over space, as the neurons are performing integration. We can make that a little bit more obvious by giving it an extreme input. We can see a bunch of neurons are turned on, and if you'll notice as I go the opposite direction the neurons which were "off" with the previous input are now "on" with this input. And we can watch that pattern switch back and forth. So this is interesting because we can actually think of this is kind of like a simulated calcium imaging to show us that activity of neurons over the cortical sheet.

(3:47) Now before I leave this simulation I'd like to show one last feature of interactive plots. If we go down to the bottom and click on this triangle -- let me slide this up so you can see what showed up as I clicked that triangle -- we've got several parameters that we can use the control the interactive plots. I will discuss them in a subsequent video. But, I'd like to point out here that we can click on this "save layout" button. That's important because now, once we've clicked on it, this layout will be saved. So the next time we open our network in Nengo, when we click "interactive plots," that layout will automatically be loaded for us. We can just hit play and we're back right where we left off. We've got all the same information that we had asked for before. So that concludes this video. In the next one I'll talk about some more features of interactive plots.