GSoC logo

Journal


Table of contents

  1. Introduction
  2. Project synopsis
  3. First steps
  4. Weekly reports
  5. Conclusion
  6. References

1. Introduction

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 :)


2. Project synopsis

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:


3. First steps

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:

I read a couple of recent papers that cover the simulation based inference:

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:

  1. installing all dependencies for the future work and creating a development environment;
  2. opening issues on GitHub that would closely resamble tasks for the first coding phase, i.e., from June 7th up to Phase 1 evaluations scheduled on July 12th. All issues can be tracked through the project pages in the 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.


4. Weekly reports

Week 1

Jun 7th to June 13th (posted on June 11th)

What have I get done this week?

What am I planning to do next week?

Is anything blocking my progress?

Week 2

Jun 14th to June 20th (posted on June 18th)

What have I get done this week?

What am I planning to do next week?

Is anything blocking my progress?

Week 3

Jun 21th to June 27th (posted on June 25th)

What have I get done this week?

What am I planning to do next week?

Is anything blocking my progress?

Week 4

Jun 28th to Jul 4th (posted on Jul 2nd)

What have I get done this week?

What am I planning to do next week?

Is anything blocking my progress?

Week 5

Jul 5th to Jul 11th (posted on Jul 9th)

What have I get done this week?

What am I planning to do next week?

Is anything blocking my progress?

Week 6

Jul 12th to Jul 18th (posted on Jul 16th)

What have I get done this week?

What am I planning to do next week?

Is anything blocking my progress?

Week 7

Jul 19th to Jul 25th (posted on Jul 23rd)

What have I get done this week?

What am I planning to do next week?

Is anything blocking my progress?

Week 8

Jul 26th to Aug 1st (posted on Aug 2nd)

What have I get done this week?

What am I planning to do next week?

Is anything blocking my progress?

Week 9

Aug 1st to Aug 8th (posted on Aug 7th)

What have I get done this week?

What am I planning to do next week?

Is anything blocking my progress?

Week 10

Aug 9th to Aug 15th (posted on Aug 14th, updated on Aug 15th)

What have I get done this week?

What am I planning to do next week?

Is anything blocking my progress?

Final Week

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.


5. Conclusion

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 :)


6. References

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