TERRA: a model trained on 112.6 million cells simulates how gene inactivation changes a region of tissue
TERRA: a model trained on 112.6 million cells simulates how gene inactivation changes a region of tissue
On August 4, a preprint describing TERRA appeared on bioRxiv. The model was trained on spatial measurements from 112.6 million cells across 636 sections of 20 human tissues. These measurements capture both gene activity within each cell and the cell's location in an organ section.
A cell in the kidney, a tumor, or the pancreas exists among immune, vascular, and connective tissue cells. This immediate environment is associated with the cell's state: the same genes may behave differently depending on which cells surround it.
In July, Pan-human Azimuth organized cell profiles from 23 tissues into a common hierarchy of cell types, giving similar cells from different organs the same names. These names, however, do not describe how neighboring cells affect a cell's state.
TERRA takes the active genes of a central cell together with up to ten nearby cells, ordered by distance. During training, it masks some genes and uses the remaining genes and neighboring cells to predict a latent representation of the missing genes. It does not predict their raw activity levels, but instead reconstructs a stable representation of the tissue region. A single model can therefore produce connected representations of genes, individual cells, and their local environment.
The authors tested transfer to new data using a separate version called TERRA-96M, which was trained without 215 sections. Across four held-out datasets containing new samples, donors, a new dataset, and a new measurement technology, it achieved the highest agreement with annotated cellular niches among the spatial models compared by the authors. These niches are recurring combinations of neighboring cells. The full TERRA-112M model was trained on the entire corpus, and the team released its weights and code.
The authors began testing computational gene inactivation in kidney tissue. They inactivated genes with established roles in different kidney regions, and the strongest changes appeared in the corresponding cells and their neighborhoods. This experiment tested whether TERRA could connect a change in a gene with the surrounding tissue organization.
The authors then computationally inactivated CTLA4 and PDCD1 in nine kidney sections collected before treatment from five patients. These genes encode the targets of ipilimumab and nivolumab, which are cancer immunotherapies. After this intervention, the spatial gene representations were closer to three real kidney sections collected after therapy than either the original data or control interventions involving random or housekeeping genes.
From the predicted shifts, the authors selected 23 genes that also differed between tissue collected before and after therapy. In the post-treatment sections, this gene program was concentrated in regions containing clusters of immune cells. In public data from blood immune cells of six patients with lung cancer who received pembrolizumab, the program was more strongly expressed in the three patients with documented kidney injury associated with this therapy.
Comparison with real tissue provides a stricter test of the model than similarity between its internal numerical representations. An analysis of errors in virtual cell models showed that an evaluation method can reward prediction of an average profile even when that prediction misses the changes that motivated the experiment.
TERRA therefore makes it possible to formulate a testable hypothesis about how a change in one gene alters the immediate environment of nearby cells. A subsequent spatial measurement can compare this prediction with real tissue.