SNVformer: An Attention-based Deep Neural Network for GWAS Data

Kieran Elmes, Diana Benavides‐Prado, Neşet Tan, Trung B. Nguyen, Nicholas A. Sumpter, Megan Leask, Michael Witbrock, Alex GavryushkinbioRxiv 2022

TL;DR

This paper introduces SNVformer, a novel Transformer-based deep neural network designed to overcome the limitations of traditional linear models in Genome-Wide Association Studies (GWAS). By effectively encoding single nucleotide variants (SNVs) and leveraging a scalable attention mechanism, SNVformer achieves competitive prediction accuracy for complex diseases like gout, paving the way for more sophisticated genotype-phenotype association models.

What Problem Does This Paper Address?

Genome-Wide Association Studies (GWAS) are a cornerstone of genetic research, helping us link genetic variations to diseases and traits. However, the current gold standard relies heavily on simple, linear models. These models often fail to capture complex genetic interactions, such as epistasis (gene-gene interactions), which are crucial for understanding many diseases. While more advanced methods exist to model these interactions, they often struggle to scale to the massive datasets generated by modern GWAS. This creates a gap: we have vast amounts of genetic data, but our analytical tools are too simplistic to fully exploit it for predictive modeling of complex traits. The authors aim to bridge this gap by developing a deep learning architecture that can handle the scale and complexity of GWAS data.

Methods

The core of SNVformer is a Transformer-based neural network architecture, adapted for genetic data. Key methodological innovations include:

  • Scalable Transformer Architecture: They utilize a variant of the Transformer architecture, specifically inspired by the Linformer model, which reduces the quadratic complexity of the standard self-attention mechanism to linear complexity. This is crucial for handling the long sequences of SNVs present in genomic data.
  • Purpose-Designed SNV Encoder: A novel encoder is developed to represent SNVs. Each SNV is broken down into its genomic position and its major/minor alleles. Different zygosity states (homozygous, heterozygous) and types of variants (insertions, deletions, unknown values) are mapped to a set of 32 unique integer tokens. This encoding captures essential genetic information in a format suitable for the Transformer.
  • Input Representation: The encoded SNVs are then combined with positional encodings and fed into the Transformer encoder.
  • Classification Output: The output of the Transformer encoder is processed by a fully connected layer and a softmax function to produce a binary classification for the phenotype (e.g., gout or no gout).

Datasets

The study primarily uses data from the UK Biobank (UKBB).

  • Training and Testing: Approximately 487,000 individuals' SNV data was used. For the specific gout prediction task, a training set of 12,108 individuals (6,054 cases, 6,054 controls) was created, with 25% of this set reserved for testing.
  • Feature Augmentation: In addition to genotype information, the model also incorporates demographic data (age, sex, BMI) for each individual.
  • SNV Selection: A subset of approximately 66,000 SNVs was selected based on their association with urate levels (p-value < 10⁻⁶) and a minimum allele frequency of 10⁻⁴.

Key Insights and Ideas

  • Transformer's Potential for Genomics: The paper demonstrates that Transformer architectures, originally developed for natural language processing, can be effectively adapted for complex genomic data analysis, including modeling gene-gene interactions.
  • Efficient Encoding of Genetic Variants: The proposed SNV encoding scheme is a critical component, allowing the model to process sparse genetic information efficiently without needing to expand to the entire genome.
  • Confidence as an Accuracy Indicator: The study found that the network's output score, which can be interpreted as a confidence level, is a good predictor of the accuracy of its classification. Higher confidence scores correlate with more accurate predictions.
  • Beyond Linear Models: The results highlight the limitations of linear models in GWAS and showcase the potential of deep learning to capture more nuanced genetic effects for improved disease prediction.

Key Results

  • Prediction Accuracy: SNVformer achieved an AUROC of 0.83 when classifying individuals for gout using genotype and demographic information on a balanced test set.
  • Confidence-Accuracy Correlation: The paper shows a strong correlation between the network's prediction confidence (output score) and its actual accuracy, with scores deviating from 0.5 leading to higher accuracy.
  • Scalability: The use of a Linformer-based architecture allows for efficient processing of long SNV sequences, making it scalable to large GWAS datasets.

Limitations and Future Work

  • Focus on a Single Trait: The current study focuses on predicting gout. Future work will involve extending the model to analyze a wider range of complex traits and phenotypes.
  • Interpretability: While the Transformer architecture has the potential for interpretability, the authors plan to further investigate methods to identify which specific SNVs and combinations are driving predictions, potentially using attention matrix analysis.
  • Data Integration: The authors aim to explore how to integrate existing biological knowledge, such as gene interactions from scientific literature, into the model to further enhance its predictive power.
  • Pre-training Embeddings: Investigating pre-training SNV embeddings using large-scale language modeling techniques on the entire UKBB dataset is a planned future direction.
  • Comparison to Other Methods: The paper acknowledges the need to compare SNVformer against other state-of-the-art methods, including polygenic risk scores, which have shown varying accuracies depending on the inclusion of clinical and demographic factors.

Summary updated

Abstract

Abstract Despite being the widely-used gold standard for linking common genetic variations to phenotypes and disease, genome-wide association studies (GWAS) suffer major limitations, partially attributable to the reliance on simple, typically linear, models of genetic effects. More elaborate methods, such as epistasis-aware models, typically struggle with the scale of GWAS data. In this paper, we build on recent advances in neural networks employing Transformer-based architectures to enable such models at a large scale. As a first step towards replacing linear GWAS with a more expressive approximation, we demonstrate prediction of gout, a painful form of inflammatory arthritis arising when monosodium urate crystals form in the joints under high serum urate conditions, from Single Nucleotide Variants (SNVs) using a scalable (long input) variant of the Transformer architecture. Furthermore, we show that sparse SNVs can be efficiently used by these Transformer-based networks without expanding them to a full genome. By appropriately encoding SNVs, we are able to achieve competitive initial performance, with an AUROC of 83% when classifying a balanced test set using genotype and demographic information. Moreover, the confidence with which the network makes its prediction is a good indication of the prediction accuracy. Our results indicate a number of opportunities for extension, enabling full genome-scale data analysis using more complex and accurate genotype-phenotype association models.
BibTeX
@misc{elmes2022snvformer,
  author = {Kieran Elmes and Diana Benavides‐Prado and Neşet Tan and Trung B. Nguyen and Nicholas A. Sumpter and Megan Leask and Michael Witbrock and Alex Gavryushkin},
  title = {{SNVformer: An Attention-based Deep Neural Network for GWAS Data}},
  year = {2022},
  doi = {10.1101/2022.07.07.499217},
  howpublished = {bioRxiv},
}
Figure