A patient digital twin is a computational replica of a real person, not their cells or genome, but the trajectory of their disease over time. Given what a doctor knows about a patient today, the twin asks: what is most likely to happen next? When will the disease worsen? Which therapy will the public-health system actually deliver? When does survival risk cross the threshold that demands intervention?
For rare-disease patients, these questions are the difference between a five-year diagnostic odyssey and a treated child. Yet most digital-twin research today (DT-GPT, TwinWeaver, Foresight, ETHOS) is trained on hospital networks in the United States and Europe, predicting cancer trajectories or ICU outcomes for patients in well-funded systems. None of it is built around a public-health system that serves 215 million people across a country the size of a continent.
We built GEMEO to close that gap.
What a patient digital twin actually does
Imagine a clinician sees a child with progressive ataxia, recurrent infections, and an elevated alpha-fetoprotein level. The most likely diagnosis is ataxia-telangiectasia. But that is just the start of the problem. The clinician now needs to know:
- How will this child's respiratory status evolve over the next five years?
- What is the probability that lymphoma surveillance will be needed by age twelve?
- Will siblings carry the mutation?
- Is the indicated therapy actually dispensed in this patient's state of residence?
- What is the nearest specialised reference centre, and how do similar patients fare there?
A patient digital twin answers these questions in a unified way. It builds a 3,072-dimensional embedding of the patient, combining the clinical narrative, the suspected disease, and the demographic context, and runs that embedding through a constellation of clinical capabilities at once. Cohort retrieval finds patients who looked similar in the past. A trained event-sequence model forecasts the next clinical events. A neural survival model estimates time-to-event risk. A protocol-compliance head checks whether the recommended therapy passes the public-health system's eligibility rules.
The architectural pattern is what we call bootstrap-then-learn. Every module ships with a deterministic implementation that runs from day one (Cypher queries, rule-based heuristics, LLM prompts) and is hot-swapped for a learned model when training data is available. The platform is operational on day one in a low-resource setting without a single trained checkpoint, which matters because most LMIC clinical-AI deployments live there for months before any GPU-trained model arrives.
Why this matters
Consider three real-world implications:
Earlier intervention. If the twin predicts that a child with spinal muscular atrophy will need invasive ventilation by age three, that prediction can trigger upstream conversations, a referral, a clinical-protocol authorisation request, a nutritional plan, months before the deterioration becomes visible. For diseases where therapeutic windows close fast, weeks matter.
Fewer "phantom" prescriptions. A drug recommendation that the patient cannot obtain through their public-health system is not a recommendation; it is a delay. By scoring every therapy against per-state dispensation aggregates, the twin surfaces what is actually deliverable today and what would require a judicial process. Clinicians and families can make informed plans instead of discovering after the fact that the indicated drug is not in the state's formulary.
Population-level visibility. Because the same architecture serves every patient, the twin's predictions can be aggregated across regions to expose disparities that no single clinical encounter would reveal, which states are most likely to deny coverage for which therapies, which reference centres are saturated, which rare diseases have their highest mortality concentrated in regions without specialists.
How GEMEO learns the future
We trained GEMEO on three subsystems of DATASUS, the Brazilian Ministry of Health's open data portal, across ten years of records covering São Paulo, Rio de Janeiro, and Minas Gerais, the three most populous Brazilian states.
The APAC system is the pipeline through which Brazilian rare-disease patients receive high-cost therapies, enzyme-replacement therapies for lysosomal storage diseases, biologicals for paroxysmal nocturnal hemoglobinuria, neuromuscular drugs for spinal muscular atrophy. Crucially, every APAC record contains a stable patient-level identifier (a hashed health-card number, AP_CNSPCN), which means the same patient's authorisations across years can be linked into a true longitudinal trajectory. We linked 13,304 patients this way, with 98.9% age-year monotonic consistency. That linkage is what turns aggregate health-system data into individual digital twins.
Validating against the future
The most rigorous test of a trajectory model is also the simplest. Train the model on records observed during 2014–2018, then ask it to predict events occurring during 2019–2023. The ground truth is the actually observed future, independent records from a window the model has never seen.
On 661 held-out patient cohorts, GEMEO's joint event-sequence Transformer (DT-FM-Joint, 4.95 million parameters) reaches state-of-the-art trajectory forecasting performance.
| Model | Parameters | Top-1 accuracy | Top-5 accuracy |
|---|---|---|---|
| Uniform random | — | 0.3% | 1.8% |
| Trigram language model | — | 21.5% | 84.6% |
| GRU baseline | 0.25M | 64.1% | 94.9% |
| GEMEO DT-FM-Joint | 4.95M | 67.6% | 87.3% |
Test perplexity on held-out tokens is 1.64. The DT-FM-Joint top-1 gain over the GRU is significant at McNemar p=0.0021. This is, to our knowledge, the strongest published trajectory prediction performance for rare-disease patients in any public-health-system setting.
An ablation that removes the orphan-drug authorisation events from training collapses both binary heads to baseline. Removing them is removing the operative signal. Brazil's public-health system records the trajectory the patient lives, and GEMEO learns it.
Impact
The implications extend beyond a single research result. A patient digital twin that is reproducible from public-health records and integrated end-to-end with the protocols of a national public-health system is a different category of clinical AI from anything else available today. It is operational without a research grant, without an EHR vendor partnership, and without an institutional credential.
What this enables, concretely:
- Reference centres can run their own twin on the patients they actually see, with their actual outcomes, without sending data anywhere. Every centre's data stays local; the model architecture is shared.
- Patient organisations can use the public results to surface state-by-state gaps in deliverability and inform advocacy.
- Public-health agencies can run prospective audits, "Are our PCDT-recommended therapies reaching the patients they were designed for?", by cross-referencing predicted trajectories with actually observed records.
- Other LMIC public-health systems can adapt the same architecture to their own data subsystems. India, China, South Africa, Mexico, and others have the same structural shape: a public payer, a protocol layer, a high-cost-drug authorisation pipeline, a mortality registry. The data is the work; the architecture transfers.
What's next
Three concrete extensions are in flight:
- External validation on MIMIC-IV, using a rare-disease subset (MIMIC-RD), to confirm that the GEMEO architecture generalises beyond the Brazilian public-health system.
- Tier-1 clinician evaluation: a blinded study in which Brazilian geneticists, paediatricians, and internists rate the plausibility of GEMEO-generated trajectories against held-out ground truth (following the methodology of Foresight).
- Federated training across the 45 reference centres, scaling the platform beyond DATASUS into deeply phenotyped real-world cohorts without moving any patient data outside its originating centre.
The model code, trained checkpoints, and ingestion pseudocode are released open source. The orchestration layer that wraps GEMEO into a clinician-facing product is intentionally not part of this open-source release; the reproducible scientific artifact is the model, the data pipeline, and the evaluation harness.
Sources
The data used in this study comes exclusively from DATASUS’s open portal (SIH-RD, APAC-Medicamentos, SIM), released by Brazil’s Ministry of Health for transparency and research purposes.
Legal basis
Processing was performed under Art. 7, IV (studies by a research body) and Art. 11, II, items “c” and “f” (sensitive health data for public-health studies and research) of Brazil’s General Data Protection Law (LGPD, Federal Law 13.709/2018).
Pseudonymisation
No personally identifiable data (names, taxpayer IDs, plaintext health-card numbers, or addresses) was accessed or processed. The AP_CNSPCN identifier is a hash of the National Health Card generated upstream by the public-health system itself, the longitudinal linkage of 13,304 patients is performed on this pre-existing pseudonym, with no re-identification.
Non-reidentifiability
The model neither stores nor reconstructs individual patient trajectories; its predictions operate over aggregate embeddings and do not permit reverse inference to individuals.
Not a diagnosis
GEMEO is a research tool. Its predictions do not constitute medical diagnosis, prescription, or a substitute for clinical evaluation by a licensed professional.
Ethics review
Studies based exclusively on Brazil’s open and anonymised DATASUS records are exempt from CEP/CONEP ethics review pursuant to National Health Council Resolution 510/2016, Art. 1, sole paragraph, V.
Compliance
The authors declare compliance with Brazil’s LGPD, the Access to Information Law (Federal Decree 7.724/2012), and the DATASUS open-data usage policy.