Methods, systems, and apparatus, including computer programs encoded on computer storage media, for generating data structures from graphs. The computer accesses a graph having patient nodes representing patients and patient
health data nodes representing
health data for patients, the nodes being connected by edges. The computer generates subgraphs by identifying patient nodes and patient
health data nodes associated with a particular healthcare provider. The computer generates, by a subgraph neural network, a healthcare provider
data structure for a respective subgraph. The computer generates, by a first graph neural network,
patient data structures for a respective patient graph network and health data structures for a respective health
data graph network. Each healthcare provider
data structure, patient graph network, health
data structure, has a lower dimension than the corresponding subgraph, patient graph network, and health
data graph network, respectively. The computer provides at least one of the data structures to a model.