Hi Marcel,
Firstly, thank you for putting so much effort into this.
> If I run your code with a fixed seed to have the same input spikes, then I do not see any change in behaviour regardless of whether I include the up_bound/low_bound code or not.
This is an interesting behavior. As you may be able to tell from the code, the up_bound/low_bound code is part of the positive and negative threshold events. Perhaps we had an error in our standard thresholding code, and when we added the up_bound/low_bound code, we inadvertently fixed the error with the non-up_bound/low_bound thresholds. I will roll back to the older version of the model equations when I get a chance, and I will test that code with a fixed seed like you have.
Just to clarify, when you say the behavior is unchanged, do you mean that across multiple runs of the simulation file, the output is the same. That would be expected, since the seeds are fixed. We are concerned with only a single run of the simulation script. The input stream of spikes should be at some frequency X. We would like the output stream to be at X frequency (with a tight error bound). However, the two streams should not be correlated. So, if I take the total number of spikes in the input stream and divide it by the total number of ticks for the simulation, then that result should be the same as when I divide the total number of spikes in the output stream by the total number of ticks. However, the spikes in the input stream and output stream should not occur during the same time tick. Before we added the up_bound/low_bound code, our output stream did not have the same frequency as our input stream.
> Re-reading your earlier mails after having had a look at your model, I also do not quite get why having two subsequent decreases in membrane potential is problematic/suprising: since your threshold is random, the membrane potential can still be above threshold after one 16V decrease, therefore triggering another spike and another 16V decrease.
That’s correct, but the behavior we saw in the figures was a 16V decrease without a spike occurring. Only the first two 16V decreases in a chain of 3 or 4 could be accounted for bt a output spike occurring.
> You mean when you look at things over time steps, not over time, right?
Yes, we look over time ticks. For us, the length of each time tick is a function of the clock rate we supply to all the computational units (since this is all modeled after a digital CMOS neural substrate).
> Oh, a small thing I noticed: the C++ code for lfsr_rand is incorrect (and therefore gives different results than Cython), bit22 is defined in the same way as bit32.
Thanks for catching this! It will save me a lot of frustrated debugging time :).
> Finally, one general question: did you have a specific issue that made you fork the entire Brian2 repository instead of developing your "ibm_lib" as an independent package? We had extensibility in mind when we designed Brian 2, so if there is something that you wanted to do that wasn't possible without modifying Brian2 itself, then this would probably be considered a bug!
Our group selected Brian because its frontend is straightforward and easy to understand. Furthermore, with numpy readily available, we can use almost all of the array operations we would use in MATLAB which was our previous environment. Most importantly, Brian is a framework that takes models of neurons and their connections defined by mathematical equations, then generates code for simulation. This is important to us, because our end goal is to translate a model of a neural system into synthesizable Verilog code for an FPGA. Specifically, our field is computer architecture, so our interests are to take biologically relevant learning mechanisms and map them to novel hardware platforms. With this in mind, it makes sense to fork our own repository, since we expect to be adding and modifying the rendering and generation backend of Brian quite a lot.
Again, thanks for all your help with our issues.
- Kyle