GSOC 2026 Project #27 : Integrating personalized hemodynamic response function in The Virtual Brain & EBRAINS

Mentor: Daniele Marinazzo <daniele.marinazzo@gmail.com>

Skill level: Intermediate to Advanced

Required skills: Python, Docker; familiarity with neuroimaging tools (AFNI, FSL, FreeSurfer) would be beneficial

Time commitment: Full time (350 hours)

About: The hemodynamic response function (HRF) is a crucial mapping between neural activity and the recorded BOLD signal in fMRI experiments. Accounting for differences in the HRF shape is crucial when making inference on neural activity. The same should apply to computational models of large scale brain activity when the target is the BOLD signal or properties derived from it such as the Functional Connectivity. On the other hand models so far use a standard shape for the HRF. In resting state fMRI there is no explicit onset of neural activation, making it challenging to estimate the HRF using a linear model. A toolbox by our group proposes a point process model to estimate the HRF from resting state BOLD signals.

Aims: This project will have the aim to derive the empirical HRF for each brain region and each subject from BOLD recordings, and then to use this HRF in a computational model of brain activity (The Virtual Brain, implemented in EBRAINS). The legacy approach will be compared with the proposed one.

Website: rsHRF | EBRAINS

Tech keywords: Python, Docker, The Virtual Brain, rsHRF

Hi Daniele!

I’m Srikanth, a GSoC 2026 applicant interested in Project #27. I wanted to reach out partly to express genuine interest, and partly to ask how I should be preparing.

My background is strongest in Python and Docker — I’ve built data pipelines and containerized some fairly involved build systems — so the integration and tooling side of this project feels natural to me. Neuroimaging tools like AFNI, FSL, and FreeSurfer are newer territory, but I’ve started working through tutorials and I’m actively building that up.

The science here really does excite me — I’d love to contribute to that.

If you have any resources you’d point a motivated student toward, or advice on where to focus, I’d really appreciate it.

Thanks for your time!
Srikanth

Hi, thanks for your interest! You can get an account on EBRAINS and run the TVB pipeline there.

Then you can explore rsHRF.

Thank you so much Daniele!

  • I went through this lecture to understand the TVB environment.Secured an EBRAINS account and ran TVB Tutorial 1 — building and simulating a region-level brain network model from scratch, configuring connectivity, neural mass models, and integrators to generate whole-brain activity, with real simulation output already in hand.
  • Understood what rsHRF does, tried setting up with python package ran into errors with pyawt package,ended setting rsHRF up as a BIDS-app.Understood all 8 steps.
  • Sourced the dataset — identified ds000228 on OpenNeuro, cloned both the raw data and the fMRIPrep derivatives.

I had a couple of questions
1)Are there any specific datasets you’d recommend I work with — like is ds000228 the right call or is there something you’d point me to that’s more standard for rsHRF work?

2)Beyond the bids-apps documentation, are there any papers or references that break down what each parameter is doing in addition to this — the TR, passband, onset search windows and so on — ideally something that shows worked examples or real outputs so I can see exactly what changing these parameters looks like in practice?

Hi

the dataset is ok (ideally one would start with a classical resting state, but naturalistic viewing could also work).

The TR is determined by the dataset. The passband is the hemodynamic range, the defaults in the app are ok, also for the other parameters.

You can follow the paper. The matlab version has worked examples, you can reproduce them in python.

Greetings Prof. Marinazzo,

My name is Ying, and I am currently a second-semester Bachelor student in Health Informatics at Technische Hochschule Deggendorf (Germany). As a pythonist, my main interest lies at the intersection of computer science and neuroscience, which is why this project immediately caught my attention.

I have already started working with rsHRF mentioned in the project and completed the following steps:

  • Successfully installed the rsHRF Python package

  • Generated a canonical HRF using spm_hrf( RT = 2.0 ) and saved the resulting plot

  • Verified the basic functionality of rsHRF in a small test script

  • Simulated a BOLD signal and convolved it with the HRF to better understand the workflow

  • Uploaded my test script and plots to GitHub:
    https://github.com/cindyywang/rsHRF

From my current understanding, the final goal of the project is to integrate tailored HRFs into The Virtual Brain. As a next step, I plan to read the paper more carefully and explore the MATLAB version in order to better understand the working examples and reproduce them in Python.

Thank you very much for your time.

Best regards,
Ying

Dear Ying

thanks for your work.

There must be some misconception, since the BOLD signal is already convolved with the HRF. So the idea would be to simulate some synaptic activity and the convolved with an upsampled version of the HRF retrieved from empirical BOLD.

I would suggest to get an account on EBRAINS and run the default TVB simulation from there, and think how you would include the rsHRF in the BOLD monitor, instead of the Balloon-Windkessel model.

All the best

Daniele

DAY 3:

Hey Prof. Marinazzo,

I wanted to share a brief update on my progress.

I implemented an rsHRF-based pipeline to estimate voxel-wise hemodynamic response functions directly from resting-state BOLD fMRI using the BIDS-APP I setup.
Using the canon2dd method, I generated subject-specific HRFs along with deconvolved neural activity signals.

The results show realistic HRF dynamics with spatial variability (e.g., delayed peak at ~8–9s), establishing a strong foundation for integrating empirical HRFs into TVB simulations.

I had previously run the TVB pipeline with the default set of parameters on EBRAINS to get the raw and BOLD HDF5 data for neural activity and exported it as tvb_simulation_7006.zip.I’m now looking into incorporating rsHRF-based convolution into this pipeline to study its impact on the simulated outputs.

I’ve captured all of this in my GITHUB REPOSITORY

In the plot that generated the regional HRF,the right plot seems to be an outlier. Mean time-to-peak of 19.6s. The canonical HRF peaks at ~5–6s, and mine should have been ~8–9s.Could you share any comments you have on the same,if any

I’ve already built a working foundation across both HRF estimation and the initial TVB integration, so I can continue iterating on this quickly with any of the valuable feedback you provide.

Best regards,
Srikanth

Hi Srikanth

thanks a lot for the update. Have you checked if the long time to peak is simply the result of multiplying it by a wrong value of TR? Otherwise I am not sure what could have caused it.

Hey Daniele!

I used a TR of 2 and I saw this was recommended,is there another TR value you think would work better for this scenario with the ds000228 dataset?

Also Daniele,today I will be attempting to migrate to a classic resting state dataset after Ive incorporated rsHRF-based convolution into the TVB pipeline to study its impact on the simulated outputs,please suggest some prospect datasets I can migrate to,Daniele.

Thank you!

Hi. You cannot assign a TR yourself. The TR is the sampling frequency of the data. You should use the one coming with the dataset description.

You can choose a dataset of your preference. Since TVB requires a particular processing for structural data, you can choose data already processed for TVB. This one for example Pre- and post-surgery brain tumor multimodal magnetic resonance imaging data optimized for large scale computational modelling | Scientific Data

1 Like

Got it,Daniele!

This was my reference for considering the TR to be 2s.I see this was recommended for the dataset I’m currently using,Daniele.

Thank you so much for the dataset reference! I will be working with this new dataset,I will keep you posted with my progress,Daniele.

DAY 4:

Hey Prof. Marinazzo,

I wanted to share my brief update on my progress for today.

I proceeded to compare the new rsHRF-convolved TVB results against the baseline tvb_simulation_7006.zip (default parameters run) to assess the effect of empirical HRFs.

Simulation runs indefinitely, no output. The exported tvb_simulation_7006.zip was empty/not as expected.

Uploaded connectivity data from here — specifically connectivity_66.zip, simulation still hung with no change.

Attempted full project upload — failed with HTTP 504 (gateway timeout).

Tried fetching the default LinkandShare_a connectivity referenced in the TVB getting-started tutorial — the resource was not found at the TVB client area URL.

Is the simulation hanging a known issue?Could you please attach a working connectivity/project I can use?

Best regards,
Srikanth

DAY 5:
Hey Prof. Marinazzo,

Please find my update from today:

I faced some problems with TVB simulations yesterday like I covered in my update,I was able to resolve the issue after importing a new default project.My simulation just succeeded and I’m unblocked to proceed.

On the rsHRF side, the regional HRFs (76 regions) are prepared and ready to be used for empirical convolution.

I currently have one simulation running locally:

  1. BOLD monitor simulation (500000ms, sampling period 2000ms) — this will serve as the canonical HRF baseline for FC comparison
  2. I will be running raw monitor simulation (500000ms, sampling period 2000ms) — this will provide the neural activity timeseries for empirical rsHRF convolution

What Is In Hand Right Now

  • hrfs_76.npy :white_check_mark:

  • BOLD simulation running :hourglass_not_done:

  • Raw simulation will be ready for tomorrow’s work​:hourglass_not_done:

Tomorrow’s Plan:

  1. Export both BOLD and Raw timeseries

  2. Verify both (~250 timepoints × 76 regions each)

  3. Convolve Raw with hrfs_76.npy → empirical BOLD

  4. Compute FC_canonical vs FC_empirical

Feel free to suggest any modifications to my current approach and additional directions worth exploring.Thank you Daniele!

Best regards,
Srikanth

Dear Prof. Marinazzo,

thanks for your correction and guidiance. Sorry for my late reply. After all, I am still a full time student during semester.

I have implemented a complete pipeline for Project 27 that integrates structural connectivity, neural simulation, subject-specific HRFs, and functional connectivity analysis. The current version already performs SC → neural activity → HRF convolution → simulated BOLD → FC comparison for each subject. At this stage, the neural simulation component is implemented in a minimal form to validate the HRF integration and analysis pipeline. I am now replacing this module with a full TVB neural model (e.g., Generic2D/Wong–Wang) to ensure the simulation is fully consistent with the TVB framework used in EBRAINS.

Highly appreciate for your time and have a good weekend!

All the best

Ying

DAY 6:
Hey Prof. Marinazzo!

The consistent feedback loop we have established over these past few days has been incredibly rewarding and helpful in keeping the work on track — the full end-to-end prototype is now complete.

END-TO-END PIPELINE FEATURES

:white_check_mark: BIDS-APP rsHRF pipeline — set up and run on ds000228 from Day 1, producing subject-specific HRFs across 155 regions using the canon2dd method

:white_check_mark: HRF TR correction — following your feedback, identified that the peak was being misread due to incorrect TR interpretation (canon2dd internal TR of 800ms vs assumed 2000ms). Corrected and resampled to 2000ms grid, HRFs now peak at ~8s as expected (see fig6)

:white_check_mark: TVB local setup — resolved EBRAINS hang and 504 timeout issues by pivoting to a local TVB instance, successfully imported 76-region connectivity and configured the simulator

:white_check_mark: Canonical BOLD baseline — TVB simulation completed (250 timepoints × 76 regions, TR=2000ms), FC matrix computed from canonical HRF convolution (see fig7, fig8)

:white_check_mark: Empirical HRF convolution pipeline — built and ready, HRFs trimmed to 76 regions to match TVB connectivity as a temporary approximation pending dataset migration.The empirical BOLD and FC_empirical vs FC_canonical comparison have been generated

"The pipeline is fully in place — SC → neural activity → empirical HRF convolution → simulated BOLD → FC comparison → FC empirical vs canonical comparison

Please find attached the plots generated so far:

fig5: Regional HRFs from rsHRF estimation

fig6: HRF before vs after TR correction

fig7: TVB canonical BOLD timeseries

fig8: FC matrix from canonical BOLD

Please find attached the complete pipeline in the repository.

https://github.com/Srikanth-Mohan-dev/rsHRF-estimation-and-tvb-modeling

Yours sincerely,
Srikanth

Thanks! The simulated data looks flat, I suspect there’s something wrong in the TVB parameters. The system should be tuned in a state in which spontaneous oscillations emerge.

1 Like

Hey Daniele,thanks for your valuable feedback!

I will review the default parameter settings in the TVB and tune the system to reach a regime with spontaneous oscillations and get back immediately,Daniele

Thank you for the feedback, Professor. I have tuned the Generic2dOscillator parameters (a=0.5, d=0.02, noise nsig=0.01) and confirmed spontaneous oscillations are now present — neural std jumped from 0.15 to 0.85. The overnight TVB simulation has now completed and the attached fig7 and fig8 are generated directly from this output.

fig7: TVB canonical BOLD timeseries

fig8: FC matrix from canonical BOLD

Could you please review them and suggest changes to parameters if any, Professor.

Best regards,
Srikanth

Are you sure that these are spontaneous oscillations and not noise? Please remove the diagonal and check the structure of the FC matrix. If it’s not structured (should bear some modular resemblance with the SC one), then it’s just noise.

1 Like