Ashkan Pirmani Real world data and federated machine learning

I answer medical questions with data I am never allowed to see.

I build the methods, and the systems other groups can run.

Health data sits in many places, in many countries. The rules will never let it come together in one place. So I send the method to the data instead. The data never moves. And I keep it simple enough that a small team can run it without me.

See what that produced

  • Doctorates Two PhDs, electrical engineering at KU Leuven and biomedical sciences at Hasselt University 2024
  • Funding Awarded a personal Innovation Mandate, a government grant to take your own research into a company. Mine is inside Johnson & Johnson 2026
  • Award ECTRIMS grant, given at the largest multiple sclerosis conference in the world, for the personalisation method 2025
  • Paper First federated study in multiple sclerosis on everyday care records. First author, in npj Digital Medicine 2025

01Result

The model that never saw the data beat the model that did

Privacy is supposed to cost accuracy. Keep the data apart, get a worse model. I tested that on ordinary care records from 32 countries and it is not true. What is measured below is one question: two years ahead, will this person get worse? All three models answer it on the same patients. The score is area under the curve, where 0.50 is a coin toss and 1.00 is perfect. Nothing changes between the rows except where the data sat.

0.50, a coin toss1.00, perfect

Adapted to each site. Data never moved. 0.8398
All data pooled in one place. 0.8092
Federated, one shared model for everyone. 0.7840

Standard deviations were 0.0019, 0.0012 and 0.0019, across five repetitions. All three numbers are from the paper, table 2.

Measured on

26,246patients
283,115clinical episodes
146centres
32countries
0records moved

The middle bar is the ceiling everyone assumes. It is not the ceiling. What made the difference was letting the model fit each site, instead of forcing one model on all of them. Plain federated averaging, the bottom bar, is worse than pooling. That is why the field keeps saying privacy is expensive.

One caveat I will make myself, before you make it for me. The pooled model is a single global model. The winner is adapted to each site. So what won here is personalisation. What federation did was make that personalisation possible without moving one record. That is the claim I stand behind, and it is the more useful one. Pirmani et al., npj Digital Medicine 8(478), 2025. Code is public.

02Work

What I built, and what it does

Start here if none of this is your field. A model normally learns by having all the data in one place. Mine does the opposite: it travels to each centre or registry in turn, learns there, and moves on. The records never go anywhere. Everything below is built on that one idea.

Four things, and you can operate all of them. Click and drag. Every number in these came out of the paper it cites, so they are evidence rather than decoration. More on how the two fields actually work.

Two rules run through all four. If a method needs a systems engineer, it will not get used. If it needs me in the room to run, it is not finished.

FL4E Benchmark data Drag it, or use the arrow keys Designed and built. 2024

Sharing is treated as all or nothing, so groups that cannot do all of it walk away. I introduced the degree of federation: every centre decides for itself whether its data leaves, and the middle is a real place to stand. Turn the dial.

Fully federated 0.846

A benchmark, not the clinical study. Public data, small on purpose, so the shape of the effect is easy to check. Fed-Heart-Disease, 740 records across 4 centres, logistic regression, federated averaging, five repeats. Area under the curve. JMIR Formative Research 8:e55496, 2024.

FLoRank Drag it, or use the arrow keys Led. 2025

Every site wants a model shaped to its own patients. A full private copy each is too expensive, and it stops them learning from one another. So the model splits in two. The shared half travels every round. The private half never leaves. Drag the round forward and watch which half is doing the learning.

Mean performance
across sites
84.8%
Private per site 3.1%

In plain words: every site keeps a small private piece of the model, shaped to its own patients, and only the shared piece ever travels.

The trace follows a run. While only the shared half is learning it plateaus around 72 per cent; unlocking the private half takes it to about 85. That step is what the method is for, and it is invisible if you only read the final number. The layer is y = xW + b + scale · GELU(xBA). W is shared and federated. B and A are the private half, and there is a non linearity between them, which is what makes it more than a linear adapter. Parameter counts are arithmetic on a 512 by 512 layer. This is the work the ECTRIMS grant was awarded for.

FLkit Press either one, or tab to it Led and maintain. Live since 2024

Everything a team needs to start a federated project already exists. It is just scattered across frameworks, legal templates, glossaries and other people's heads, and no two of those speak the same language. Most teams stop at that wall. So we gathered it.

39 pages, eight sections, four life cycle stages and seven worked project stories, covering multiple sclerosis, inflammatory bowel disease, genomics and brain computer interfaces. Built on the model of the ELIXIR research data management kit. Open, and it takes contributions. Pirmani, Vermeulen et al., 2026.

Built with

Python, PyTorch, Flower, PySyft, scikit-learn, pandas. R and SQL. Docker, Kubernetes, Git and continuous integration. Azure and Google Cloud.

Publications

03Networks

None of this works alone

I follow one thread the whole way along. What a patient leaves behind, how it gets out of the system holding it, who is allowed to touch it, what the clinician actually meant when they typed it, the model, and then the evidence that goes back to a patient. Most people own one link in that chain. I have had to own all of them, and the hard part was never the model.

The people I sit between

Clinicians, epidemiologists, registry custodians, engineers and lawyers, across more than thirty countries. None of them share a vocabulary. Getting one definition of the same thing to hold across all of them is the work behind every number on this page.

The networks I work in

The MSBase registry, 146 centres in 32 countries. The worldwide multiple sclerosis and COVID-19 effort, where I built the pipeline. OHDSI Belgium, and the organising team for OHDSI Europe 2025. ELIXIR supports FLkit. The methods run on Flower.

Industry, and who vouches

A Flemish Innovation Mandate to take this work into industry, inside Johnson & Johnson Innovative Medicine. I work with Patrick Ryan, who leads Global Epidemiology there, and with Liesbet Peeters and Yves Moreau on the academic side.

Explaining it to people

Seven master's theses supervised in machine learning at KU Leuven, and Data Science in Healthcare lectured at Hasselt University. Explaining a thing to somebody who has never seen it is still the fastest way to find out whether it is simple enough yet.

04Contact

Get in touch

If you have data that cannot move, or a question that needs more patients than one place can offer, I would like to hear about it.

I grew up speaking Turkish, Azerbaijani and Persian. English came fourth, and Dutch is still coming. It is probably why I write in short sentences.

Before any of this I spent two years working out where Iran Post should put its sorting hubs. Moving parcels and moving models turn out to be the same problem. You are always deciding what travels and what stays.

Email ashkan_pirmani@outlook.com