# Google Summer of Code 2021

**URL:** <https://brian.discourse.group/t/google-summer-of-code-2021/397>\
**Category:** Announcements\
**Created:** [2 June 2021 09:23 UTC](https://brian.discourse.group/t/google-summer-of-code-2021/397 "2021-06-02T09:23:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![antelk](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@antelk](https://brian.discourse.group/u/antelk)\
**Post date:** [2 June 2021 09:23 UTC](https://brian.discourse.group/t/google-summer-of-code-2021/397/1 "2021-06-02T09:23:55Z")

</div>

Hi everyone,

I would like to greet everyone and introduce myself as this year’s GSoC student 🙂  
My name is Ante and I am currently a graduate student in computational bioelectromagnetics at the University of Split.  
Even though my formal training is in electronic engineering at Uni of Split, and I did my masters at the department of electronic systems at Aalborg University, I decided to take a slightly different route after discovering that I was extremely interested in bioelectromagnetism and bioinformatics in general.

The theme of my project at GSoC is the integration of the model fitting toolbox with the `sbi` package to enable simulation-based inference on `brian2`'s models.  
Summary of the project is available [here](https://summerofcode.withgoogle.com/projects/#4982864942202880), and my progress will be available in [the Projects section](https://github.com/brian-team/brian2modelfitting/projects/1) of `brian2modelfitting`.

I am looking forward for this summer of code and for being able to participate in such a wonderful open source community 🙂

---

<div class="post-metadata">

**Author:** ![rth](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/rth/32/16_2.png) [@rth](https://brian.discourse.group/u/rth)\
**Post date:** [2 June 2021 16:51 UTC](https://brian.discourse.group/t/google-summer-of-code-2021/397/2 "2021-06-02T16:51:51Z")

</div>

Hi @antelk,

Welcome to the forum!

I’m really looking forward to your results!

Last winter, I attempted to move from my standard tools for parameter fitting (various genetic algorithms) to SPI. It looked convenient to have a generative model after fitting instead of just a set of parameters that fit a neuron dynamics. The `sbi` worked pretty well for a small number of parameters (4-5), but it stuck in the real-world 24-parameter model. I documented this in the bug report [here](https://github.com/mackelab/sbi/issues/405). I wonder whether it is a problem of the specific model or a general disadvantage of the inference-based fitting.

So, good luck with your GSoC. I think this community will appreciate if your report here results from any `sbi` benchmarks and tests.

---

<div class="post-metadata">

**Author:** ![antelk](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@antelk](https://brian.discourse.group/u/antelk)\
**Post date:** [3 June 2021 08:50 UTC](https://brian.discourse.group/t/google-summer-of-code-2021/397/3 "2021-06-03T08:50:35Z")

</div>

Hi @rth,

Thank you for the warm welcome, I really appreciate it 🙂

In the issue you opened, you mentioned that the total size of the summary statistics vector is 242.  
To the best of my knowledge, sequential neural posterior estimation (SNPE) algorithm implemented in `sbi` should have no problems with high-dimensional outputs, unlike classical likelihood-free inference approaches such as ABC, as described in ([Gonçalves2020](https://elifesciences.org/articles/56261)).  
The authors claim that SNPE can even be applied to raw data without explicitly deriving any summary features.  
Regarding the number of parameters, in the same paper, the full posterior distribution for the somatogastric ganglion over 31 parameter in total is given as an example of a real-world application of `sbi`.  
The code associated with the mentioned example is available [here](https://github.com/mackelab/IdentifyMechanisticModels_2020/tree/master/7_stg), you can check it out and maybe figure out what’s going wrong in your case.  
If I find out anything, I will let you now.

Also, I will try to create short blog posts of my progress each week and I will post a link in this thread as soon as the first post is up online.

---

<div class="post-metadata">

**Author:** ![rth](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/rth/32/16_2.png) [@rth](https://brian.discourse.group/u/rth)\
**Post date:** [3 June 2021 14:04 UTC](https://brian.discourse.group/t/google-summer-of-code-2021/397/4 "2021-06-03T14:04:20Z")

</div>

Thank you, @antelk ! I’ll take a look. As jan-matthis@github suggested, I reduced the number of parameters to 4, and `sbi` performed very well. I could be any of my 24 parameters. However, as soon as I released more than 5-7 inference stuck. I think _(entirely not sure)_ that combination Ca2+ dynamics, SK channel, L- and T-types calcium channels are the culprits. Specifically, T-channel with GHK equation on the board.

I’m looking forward to your blog post.

---

<div class="post-metadata">

**Author:** ![antelk](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@antelk](https://brian.discourse.group/u/antelk)\
**Post date:** [1 September 2021 12:04 UTC](https://brian.discourse.group/t/google-summer-of-code-2021/397/5 "2021-09-01T12:04:47Z")

</div>

Hi all,

just a quick update: GSoC is now officially over and I have successfully finalized my project.  
Sorry for no updates in between 😬

The final code submission is available [here](https://github.com/brian-team/brian2modelfitting/pull/64). Probably the most interesting thing for a regular Brian user would be the tutorial that is not yet available in the stable docs but can be accessed [here](https://brian2modelfitting.readthedocs.io/en/sbi_support/introduction/tutorial_sbi.html).

Thank you all!

---

<div class="post-metadata">

**Author:** ![rth](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/rth/32/16_2.png) [@rth](https://brian.discourse.group/u/rth)\
**Post date:** [1 September 2021 13:33 UTC](https://brian.discourse.group/t/google-summer-of-code-2021/397/6 "2021-09-01T13:33:34Z")

</div>

Hi @antelk,

WoW! You have done a fantastic job! Congratulation!  
Thank you for sharing!

It is quite a hectic time here, but as soon as I have time to reimplement my LGN neuron in Brian, I’ll run learner (as opposite to fitter) first.

---

<div class="post-metadata">

**Author:** ![antelk](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@antelk](https://brian.discourse.group/u/antelk)\
**Post date:** [1 September 2021 14:00 UTC](https://brian.discourse.group/t/google-summer-of-code-2021/397/7 "2021-09-01T14:00:15Z")

</div>

Hi, @rth,

Thank you very much!

Looking forward to your feedback.
