A generative model for relational health records
I work on a model that learns from hospital records as they are stored: many linked tables, ordered in time. It then writes synthetic patient records with the same structure.
- Status
- My own research, in progress
- Data
- MIMIC-IV, in the OMOP format
- Model
- A transformer with attention at two levels, trained to reconstruct hidden events
- Methods
- Masked-event pretraining, attention across relational tables, synthetic data generation
The problem
Most models for tabular data assume that the data is one flat table. Hospital data is not one table. The record of a patient is spread over tables for diagnoses, drugs, lab results, procedures and visits. The tables are linked by keys and ordered in time.
To make one table from them, you must decide what to count and what to drop. The order and the timing of events are lost first.
Synthetic health data has the same problem in the other direction. A synthetic patient is only useful if the tables still agree with each other: each drug belongs to a visit, the dates are in order, and nothing happens after death.
What I work on
The model reads records in OMOP, the standard format that hospitals use for this data. So it is not tied to one hospital.
- A patient is a list of events. Each event says what happened, in which table, when, and with what value.
- Attention works at two levels. First inside each table, then across the tables. So an event in one table can depend on events in the others.
- The model learns by reconstruction. I hide a part of each record. The model must predict the hidden events: what they are, when they happen and their values. No labels are necessary.
- Generation is the same task with everything hidden. The model gets an age and a sex and writes the complete record: first the visits, then the events inside each visit.
- The structure of the database is enforced. Dates are in order, events are inside visits, and nothing happens after death. The result is a complete database in the same format as the real one.
Where this is going
The goal is a synthetic MIMIC-IV that is faithful enough to be useful and safe enough to share. Then work on clinical data does not always have to start with an access procedure.
Two questions decide whether a synthetic dataset reaches that goal: does it copy real patients, and is it realistic? I measure both. They are also the subject of my work in SEARCH.