Popformer: Learning general signatures of positive selection with a self-supervised transformer
Zong, L.; Friedler, S. A.; Mathieson, S.
Show abstract
Understanding natural selection can help shed light on the genetics underpinning adaptive evolution. The widespread availability of large-scale human genetic variation data has led to the development of data-driven methods for detecting signatures of selection, many of which are based on deep learning. However, these methods often fail to generalize well to the diversity of selection signatures across a broad range of evolutionary scenarios. We propose a novel transformer-based model, Popformer, for learning encodings of general patterns of genetic variation. Popformer includes site-wise and haplotype-wise attention, allowing us to capture variation among both genetic positions and individuals. It additionally learns relative positional embeddings for inter-SNP distances. The model is pre-trained with an analog of the masked language modeling objective across a range of real human genomic data, similar to the task of genetic imputation. Using dimensionality reduction, we show that the pre-trained model learns meaningful embeddings of genomic windows that correspond with population structure. We also show that the model can accurately perform genotype imputation. We further fine-tune the model on selection classification and demonstrate that our model is more accurate than other selection classification methods, on selection simulations of both well-specified and mis-specified demographic models. Using a novel real data validation approach, we apply Popformer to human data from the 1000 Genomes Project and reveal its ability to generalize from simulated data to the diversity of real data. Overall, our method provides a new direction for population genetic inference methods, with future fine-tuning applications including the inference of recombination rates, introgression, and local ancestry. Author summaryNatural selection lies at the heart of adaptation and evolution. Identifying genomic signals of natural selection can lead to insights about evolutionary pressures acting on populations, and provide an understanding of how populations differentiate. Detecting these signals using only present-day genomic data is difficult, and methods developed for this task often use specialized simulations, trading generalization for power. We show here that adapting deep learning techniques from modern language and image processing can be used to identify signals of selection with both high power and robustness to misspecification. By pre-training our transformer model, Popformer, on real data, we induce learned model representations that are representative of the variation in real data. We fine-tune our model on simulations inferred from European populations, and compare with other machine learning methods and summary statistics. Our results suggest that both our model architecture and our training regime are useful for strong performance in diverse simulation tests and in recovering known selection signatures in real data.
Matching journals
The top 6 journals account for 50% of the predicted probability mass.
Similar papers in this journal
Similar papers in this journal
- Sparse haplotype-based fine-scale local ancestry inference at scale reveals recent selection on immune responses 96%
- Efficient variance components analysis across millions of genomes 96%
- Hi-C-LSTM: Learning representations of chromatin contacts using a recurrent neural network identifies genomic drivers of conformation 96%
Similar papers in this journal
- Aberrant landscapes of maternal meiotic crossovers contribute to aneuploidies in human embryos 95%
- Direct detection of natural selection in Bronze Age Britain 95%
- Low-pass sequencing increases the power of GWAS and decreases measurement error of polygenic risk scores compared to genotyping arrays 94%
Similar papers in this journal
- Domain-adaptive neural networks improve supervised machine learning based on simulated population genetic data 98%
- An approximate full-likelihood method for inferring selection and allele frequency trajectories from DNA sequence data 96%
- Scalable probabilistic PCA for large-scale genetic variation data 96%
Similar papers in this journal
"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.