Picture this... May 17th, late afternoon, sitting on my couch exhausted... Probably watching Netflix and stressing out how I should do some work on my thesis or, at least, do anything else other than be a complete slacker.
I turn on my laptop, take a look at the mail and there's a very pleasant surprise:
Hi antelk,
Your proposal Support of the simulation-based inference with the model fitting toolbox has been accepted!
Welcome to GSoC 2021!
We look forward to seeing the great things you will accomplish this summer with INCF.
I have to be honest... I did not expect to get in, and I was equally thrilled and terrified. Still, more thrilled than terrified and I can proudly introduce myself as a 2021 GSoC student :)
I will work on the project Support of the simulation-based inference with the model fitting toolbox together with my mentor Marcel Stimberg and the rest of the model fitting team under the Brian simulator project. Brian is a free and open source, cross-platform simulator for biological neurons and spiking neural networks. It is written in the extremely efficient manner using the Python programming language and the entire code-base is open sourced and available on GitHub.
brian2modelfitting
toolbox allows the user to find the best fit unknown parameters for recorded traces and spike trains.
The focus of my project is the integration of the sbi
library into the brian2modelfitting
toolbox to extend currently implemented fitting capabilities for custom excitable single cell models with simulation-based inference techniques.
This will enable brian2modelfitting
to not only result in a single set of optimal parameters, rather in the full posterior distribution over parameters.
It will also expolit prior system knowledge sparsely, using only the most important features to identify mechanistic models which are consistent with the measured data by means of recorded traces and spike trains.
sbi
library is a completely separate effort and its development is coordinated at the Macke lab.
Relevant URLs:
brian2modelfitting
project pages on GitHub.During the first period of the project, i.e., from May 17th to June 7th, all students have to participate in something called Community bonding, during which we are required to become familiar with the community practices and processes by actively participating on mailing lists, IRC, Gitter, etc. Me personaly, I waited for a couple of days to have my first virtual meeting with Marcel. He explained the inner workings of GSoC and the INCF (International Neuroinformatics Coordinating Facility), an international non-profit umbrella organization that embrace principles of Open, FAIR and Citable neuroscience, under which Marcel also operates for the duration of the GSoC. We agreed to have casual video calls each week, communicate daily via e-mail, Gitter, and Github issues, but make our best to keep the most of the communication open for the entire community through the official Brian discourse channel.
I delved deep into both brian2modelfitting
and sbi
documentation.
I also went through a couple of relevant tutorials:
brian2
online tutorials;brian2modelfitting
;sbi
development team.I read a couple of recent papers that cover the simulation based inference:
sbi
library and goes into details of currently implemented families of neural inference algorithms;Also, I wanted to refresh my memory on the version control:
After the second virtual meeting, Marcel and I agreed that the next steps should be:
brian2modelfitting
repository on GitHub.The third virtual meeting resulted in a discussion on several implementation details and a final agreement on the development of the code itself and best practices for version control.
Jun 7th to June 13th (posted on June 11th)
sbi
and went through the Introduction to Brian online workshop.Jun 14th to June 20th (posted on June 18th)
sbi
, issue #44.eFEL
library, or any other library for that matter, currently in use in brian2modelfitting
toolbox.Jun 21th to June 27th (posted on June 25th)
antropy
that provides multiple time-efficient algorithms for computing the complexity of time-series. Decided to try it out on the example of simulated voltage traces from the Hodgkin-Huxley neuron model and proposed a pull request where the correlation between entropy metrices for voltage traces is showcased. My example has been merged to the master branch of antropy
repository, and is now available as the official example :)brian2modelfitting
repository on GitHub.Jun 28th to Jul 4th (posted on Jul 2nd)
Inference
and Fitter
classes could potentially be refactorized in a way that they have a common superclass.Jul 5th to Jul 11th (posted on Jul 9th)
sbi
through model fitting toolbox.brian2
with sbi
in the official advanced section of brian2
examples, available here, to the current API of the model fitting toolbox.Jul 12th to Jul 18th (posted on Jul 16th)
sbi_support
branch.Inferencer
class, issue #57brian2
with sbi
in the official advanced section of brian2
examples, available here, to the current API of the model fitting toolbox.Jul 19th to Jul 25th (posted on Jul 23rd)
sbi
developers, this issue should be resolved by the end of this weekJul 26th to Aug 1st (posted on Aug 2nd)
Aug 1st to Aug 8th (posted on Aug 7th)
brian2modelfitting
will by default turn on sbi
automatic feature extractionInferencer
class.sbi
.Inferencer
and Fitter
class.Aug 9th to Aug 15th (posted on Aug 14th, updated on Aug 15th)
sbi
integration into the brian2modelfitting
is available in the Project pages in the brian2modelfitting
GitHub repository.sbi_support
is merged to the master branch. After the merge, the full documentation will be available at https://brian2modelfitting.readthedocs.io.Aug 16th to Aug 22nd (posted on Aug 23rd)
I did some final work on the documentation and created a comprehensive tutorial on how to perform simulation-based inference by using brian2modelfittin
. I also did some smaller changes in the code while testing and writing documentation. Finally, I proposed the last pull request for this project. The pull request #60 summarizes all the work done during the (GSoC) 2021 and it serves as a final work product that is used for the second round of evaluations.
Tl;dr: GSoC was a lot of fun... hard, but fun!
Considering my original project plan, I would say that I satisfied all features that Marcel and I agreed on during the initial stage of the project itself. The only thing I would do differently is to start with tests earlier.
It was definitely not easy to balance obligations at the university, health problems that can happen (and that happened to me during this project) and respecting deadlines and requirements defined together with the mentor. However, this was a great experience and I would do it again. Work habits, speed of learning of new, foreign concepts, programming skills... all of this, at least in my case, has improved exponentially. In addition, my communication skills, especially as a non-native English speaker, have improved - I have become more confident when addressing, often extremely big names in this area. Of course, the knowledge I gained, which spilled over from my field of computational electromagnetism to computational neuroscience, helped me broaden my horizons and think about how to apply the newly acquired skills to my own research.
So my advice to any potential 2022 GSoC student is: do not hesitate to sign up, do not hesitate to get in touch with anyone who can help you to become a GSoC student, be a good person, and do what you love and do your best. Note that the GSoC can be very hard, sometimes extremely stressful, but it all pays off once you submit the last pull request :)
Christoph Bandt, Bernd Pompe. Permutation entropy: A natural complexity measure for time series, Physical Review Letters 2002, 88, 174102; doi: 10.1103/physrevlett.88.174102
Kyle Cranmer, Johann Brehmer, Gilles Louppe. The frontier of simulation-based inference, Proceedings of the National Academy of Sciences Dec 2020, 117 (48) 30055-30062; doi: 10.1073/pnas.1912789117
Pedro J Gonçalves, Jan-Matthis Lueckmann, Michael Deistler, Marcel Nonnenmacher, Kaan Öcal, Giacomo Bassetto, Chaitanya Chintaluri, William F Podlaski, Sara A Haddad, Tim P Vogels, David S Greenberg, Jakob H Macke. Training deep neural density estimators to identify mechanistic models of neural dynamics, eLife 2020 9:e56261; doi: 10.7554/eLife.56261
Seyed Mehran Kazemi, Rishab Goel, Sepehr Eghbali, Janahan Ramanan, Jaspreet Sahota, Sanjay Thakur, Stella Wu, Cathal Smyth, Pascal Poupart, Marcus Brubaker. Time2Vec: Learning a Vector Representation of Time, preprint 2019
Jan-Matthis Lueckmann, Jan Boelts, David S Greenberg, David, Pedro J Gonçalves, Jakob H Macke. Benchmarking Simulation-Based Inference. preprint 2021
Cyrille Rossant, Dan F. M. Goodman, Jonathan Platkiewicz and Romain Brette. Automatic fitting of spiking neuron models to electrophysiological recordings, Frontiers in Neuroinformatics 2010, 4; doi: 10.3389/neuro.11.002.2010
Alvaro Tejero-Cantero, Jan Boelts, Michael Deistler, Jan-Matthis Lueckmann, Conor Durkan, Pedro J Goncalves, David S Greenberg, Jakob H Macke. sbi: A toolkit for simulation-based inference, Journal of Open Source Software 2020, 5. 2505; doi: 10.21105/joss.02505