Description: In the TVB (https://www.thevirtualbrain.org/) ecosystem there is a code repository called tvb-ext-xircuits offering a graphical way to define, configure and run simulation workflows. The purpose of this project is to implement a new set of xircuits components, in particular for running Parameter Space Explorations (so a range of simulations with little variation in 2-3 parameters).
Expected results: A set of new xircuits components , with at least one demo xircuits file.
I came across this project and it really caught my attention. I’ve been working with Python and JupyterLab for a while now, and the idea of building visual workflow components for brain simulations sounds like something I’d genuinely enjoy working on.
I spent some time going through the tvb-ext-xircuits repo on GitHub to get a feel for how things are set up. The way xircuits components are structured is pretty clean — each one has clear inputs and outputs, which makes the whole system easy to reason about. I also looked at the examples folder to understand how these components connect together in a workflow.
The Parameter Space Exploration part is what excites me the most. From what I understand, the goal is to let researchers define a range for 2-3 simulation parameters and then automatically run all the combinations, right? I can see how that would save a huge amount of manual effort compared to changing parameters one by one.
A few things I’d love to get your thoughts on when you get a chance:
Should the new PSE components build on top of any existing parameter sweep logic in tvb-library, or is the idea to create something fresh specifically for the xircuits workflow?
For the demo xircuits file, do you have a particular simulation scenario in mind that would be a good showcase, or is that something I can propose?
Are there any open issues in the repo that would be a good starting point for a first contribution?
I’ve already forked the repo and got the extension running locally. Happy to jump in with a small PR to get started.
Just a small update from my side — I spent some more time
going through the code today and noticed that most of the
TVB component classes didn’t have any docstrings. So I put
together a quick PR that adds documentation to the main ones
like Simulator, Generic2dOscillator, Kuramoto, LinearModel,
ConnectivityFromFile, and the noise components.
Here’s the link if you want to take a look:
Nothing fancy — just descriptions of what each component
does and what the inputs and outputs mean. Figured it might
save some time for anyone new coming into the project.
On the PSE side, I’ve been going through the TVB docs to
understand how parameter sweeps work on the simulator level.
Got some rough ideas forming for how the components could
be structured, but I’d love to hear your thoughts before
going too far in any direction.
My name is Kedie Wu, a Software Engineering sophomore at Fudan University. My experience includes building APIs and developing user interfaces for my school’s app, primarily working with Python, C++ and Java. I came across this project and found it closely aligned with my interests and experience.
I’ve successfully set up the agent locally and submitted PR #77, which fixes missing environment configuration that was blocking local setup for new contributors.
I have been exploring the tvb-ext-xircuits repo to understand the architecture and identified a key UI limitation: components like Literal Float only support fixed values, which currently makes Parameter Space Exploration (PSE) impractical. I’ve checked the current .xircuits library but haven’t found any components that support this kind of feature. I’d love to hear your thoughts on how we could make this happen!
And I share the same main concern with @sandeepkumar about this project.
For the demo xircuits file, do you have a particular simulation scenario in mind that would be a good showcase, or is that something I can propose?
Should the new PSE components build on top of any existing parameter sweep logic in tvb-library, or is the idea to create something fresh specifically for the xircuits workflow?
Are there any open issues in the repo that would be a good starting point for a first contribution?
That’s a good catch on the Literal Float thing — I ran
into the same thought while looking at how the components
pass values around. Right now everything expects a single
fixed value, so if we want to do parameter sweeps for PSE,
we’d need new components that can handle ranges instead.
That feels like the main puzzle to figure out here.
I also spent some more time poking around the code today
and stumbled on a couple of things that seemed off. The
Simulator component didn’t have any checks for missing
inputs — so if you accidentally left the connectivity
unconnected, it would just blow up with some hard-to-read
TVB error. And over in the connectivity component,
plt.show() was running in blocking mode, which can lock
up the whole workflow if you’re in JupyterLab or running
headless.
Went ahead and put together a fix for both of those:
On the PSE side, one thing I keep going back and forth on
is how the runner should actually work — should it just
call the existing Simulator component for each combination
in a loop, or would it be cleaner to do things at a lower
level? Curious what Lia and the team think about that.
Great start! Thank you both for your Pull Requests and invested time into knowing tvb-ext-xircuits. Your feedback and contributions are already very useful!
A PSE flow in ext-xircuits would ideally complement the similar widget and logic, as detailed here:
I’ve gone through both the PSE widget code in tvb-widgets
and the ParallelSimulations.xircuits example. I can see how
the current loop + Literal approach works, and how dedicated
PSE components could make multi-parameter sweeps much cleaner
on the canvas.
I’m putting together a GSoC draft this week and will share
it here for your feedback.
I’ve been digging into the pse_widget.py logic and the ParallelSimulations.xircuits example. The comparison was very helpful—I can see now that while Literal inputs work for basic setups, integrating Range and Loop components specifically for PSE will be key to handling automated parameter sweeps more efficiently in ext-xircuits.
I’m currently refining these ideas into my GSoC draft and expect to share it here for your feedback in the next few days.
I’m a Master’s student at Jadavpur University, currently conducting my dissertation research at the National Brain Research Centre (NBRC) in India. My background is in Physics and Biotechnology. My current work focuses on computational network models of brain dynamics.
I’ve been following the discussion on the new PSE components for tvb-ext-xircuits with great interest. In my own research, manual parameter exploration is often a significant bottleneck. The idea of a graphical workflow to automate these sweeps within the Xircuits environment is incredibly appealing.
While the existing discussions have addressed the core loop logic and UI fixes, I am particularly interested in the analytical side of the PSE workflow. For a researcher, a parameter sweep is only as useful as the metrics used to evaluate the results. When exploring a 2D or 3D grid, we often need to calculate specific indicators—like Functional Connectivity Dynamics (FCD) or phase-locking values—to identify the most biologically relevant regimes.
I have a couple of questions regarding the project’s scope:
Is the goal to focus strictly on the execution framework, or is there an interest in implementing Analysis Specific Nodes that could calculate and visualize these higher-level metrics directly on the canvas?
Has there been any consideration for PSE components that could refine the parameter grid based on the results of an initial coarse sweep?
I have already forked the tvb-ext-xircuits repository and am exploring how the current components handle data passing between the Simulator and the Visualizers. I would love to contribute a proposal that emphasizes the integration of research-grade analysis metrics into the PSE workflow.
Looking forward to hearing your thoughts on the scientific direction of the project!
Following up on your feedback about PSE components — I’ve submitted
a PR that implements the Range and Grid approach you described:
It adds 7 new components in a new xai_pse library:
Range components: PSELinspaceRange, PSEArangeRange, PSEValueList
— these replace static Literal inputs with dynamic ranges that
output Python lists compatible with existing ForEach loops
Grid component: PSEParameterGrid — generates all (param1, param2)
combinations using itertools.product
Metric components: PSEResultCollector, PSEGlobalVariance,
PSEVarianceOfVariance — for collecting and analyzing sweep results
The design follows the patterns in oscillator.py and simulator.py,
and complements the PSE widget logic in tvb-widgets. All 35 tests pass.
No existing files were modified.
My GSoC proposal has also been submitted on the portal. Would love
your feedback on the component design.
Hi @ BrainManiac0309
Very interesting approach.
We would be happy to read and support such a direction, if you want to pursue.
Surely it will stand-out, and it would bring benefit to the overall TVB framework, if implemented.
Variety in the components proposed might even allow us to pick more than one student for this period, if the organisers will allow it.
So, full support from our side as potential mentors to write a proposal in this direction.
This is a fantastic discussion. Sandeep, great job on rapidly prototyping the foundational loop and grid execution components!
Ritam, your point about “Analysis Specific Nodes” resonates deeply with me. As an Intelligent Medical Engineering student whose research heavily relies on modeling clinical sEEG signals and closed-loop neuromodulation, I completely agree that the true value of a PSE workflow lies in its biological and clinical interpretability.
Building upon Lia’s feedback about encouraging “variety” in components, I would like to propose a GSoC direction focused on Clinical & Nonlinear Dynamic Analysis Nodes, specifically tailored for epilepsy modeling within the TVB framework.
While the standard PSE handles the Cartesian execution, researchers simulating seizures often need to sweep the excitability parameter (e.g., x_0 in the Epileptor model) and immediately extract the dominant dynamic modes to identify the Seizure Onset Zone (SOZ) or bifurcation points.
My proposal will focus on introducing high-level metric components such as:
Dynamic Mode Evaluator Node: Leveraging Koopman operator theory / DMD to extract temporal spatial features from the simulated multi-channel sEEG sweeps.
Bifurcation/Transition Metric Node: Automatically identifying parameter thresholds where the network transitions from a resting state to a seizure state.
I have just sent my detailed academic CV (highlighting my work on DMD+MPC and Epileptor simulations) to the mentoring team via email. I am currently integrating these clinical-mathematical nodes into my GSoC draft and will share it shortly.
Looking forward to collaborating and pushing the scientific boundaries of tvb-ext-xircuits together!