Cortex

decentralized neuroimaging · in the browser

Train MRI segmentation
without moving the data.

A working simulator of edge and federated learning for brain imaging. Scrub through synthetic MRI volumes, watch client-side segmentation sharpen, and run a federated training session where several hospitals improve one shared model - while every scan stays on the machine that holds it.

4
sitesnon-iid datasets
0 GB
raw data movedstays at the edge
~4.8 MB
per updateweight deltas only
FedAvg
aggregationsample-weighted
federated sessionround 000 · ready
slice viewerT1w · 132³ synthetic
AXIALz=66
pred · dice 10%
50%
gray matterwhite matterCSF
federated consoledecentralized
Site 01idle
Site 02idle
Site 03idle
Site 04idle
global dice / accuracy10.0%
0255075100
aggregate loss2.350
0.001.252.50
0GB
raw data moved
0.0MB
weights exchanged
0GB
data kept local
network conditions
178 ms

round-trip delay between sites and the aggregator

12%

chance a site misses a round (offline / busy GPU)

2

how much each site trains before syncing

1.0×

playback rate of the round loop

event log
  1. 00:00Aggregator online. Global model initialized (UNet-lite, 1.2M params).

the mechanism

One round of federated learning

Federated learning flips the usual pipeline. Instead of pooling scans into a central lake, the model travels to the data. Each round repeats four steps, and the only thing that ever crosses the network is a set of weights.

  1. 01

    Distribute

    The aggregator sends the current global model to every participating site.

  2. 02

    Train locally

    Each site trains on its own scans for a few epochs. Raw images never move.

  3. 03

    Send deltas

    Sites return only the weight changes - a few megabytes, no patient data.

  4. 04

    Aggregate

    The server averages updates (weighted by dataset size) into a better model.

edge computation

The model runs where the scan lives

BrainChop showed that a full volumetric segmentation network can run entirely in a browser tab - no upload, no server round-trip, no PHI leaving the room. The slice viewer above mirrors that idea: the overlay is computed client-side, and as the shared model improves, the predicted tissue boundaries snap to the reference.

  • Inference happens in the client, so a scan can be segmented without it ever being uploaded.
  • Latency and dropout are facts of life across hospitals; the simulator lets you feel their effect on convergence.
  • Non-identically distributed data across sites is the hard part - and the reason aggregation is sample-weighted.
data vs. model movement
siteMRI scansstays local🔒aggregatorglobal modelweight delta →← new modelraw scans never traverse this link

grounded in real research

Built on the decentralized neuroimaging work of Sergey Plis and collaborators

This is an educational reconstruction, not the production systems. It takes the core ideas from a body of work on running neuroimaging analysis at the edge and across institutions, and turns them into something you can poke at directly.

BrainChop

edge inference

In-browser volumetric MRI segmentation. A deep model runs fully client-side on the user's own machine, demonstrating that neuroimaging inference does not require a server or an upload.

COINSTAC

federated analysis

A framework for decentralized analysis of neuroimaging data across institutions. Computation is sent to each site; only aggregate results and model parameters are shared, never the raw data.

Federated averaging

aggregation

The workhorse algorithm here: local models are combined into a global one by averaging weights in proportion to each site's dataset size, balancing contributions from uneven cohorts.

Edge neuroimaging

the thesis

Sergey Plis and collaborators have long argued for moving computation to where sensitive data lives. Privacy, bandwidth, and governance all improve when the model travels instead of the scans.

COINSTAC (Collaborative Informatics and Neuroimaging Suite Toolkit for Anonymous Computation) and BrainChop are projects from the decentralized-analysis research community. References are descriptive; consult the original publications and repositories for the real implementations.

Cortex - federated neuroimaging simulator
A demonstration prototype by Ian Taylor