AAU Student Projects is unavailable between June 15th 1.30pm and 17th 1.30pm due to planned system maintenance. The projects cannot be downloaded during this period.
AAU Student Projects - visit Aalborg University's student projects portal
A master's thesis from Aalborg University
Book cover


Adapting SNPbag for Phenotype Prediction: A Transformer-Based Approach to Polygenic Risk

Author

Term

4. term

Publication year

2026

Submitted on

Abstract

This thesis examines whether transformer-based models can improve binary phenotype prediction from genotype data by going beyond the additive assumptions of standard polygenic risk score methods. It develops and evaluates SNPbag, a BERT-style encoder trained in two stages: (1) pretraining by reconstructing randomly masked genotypes from their genomic context and (2) fine-tuning for phenotype classification. SNPbag is benchmarked against LDpred2-auto, a Bayesian PRS method, using synthetic HAPNEST data comprising 100,000 individuals and 14,000 SNPs from chromosome 22; phenotypes are simulated under a logistic disease model with 500 causal variants and 10% prevalence. Pretraining validation accuracy increased from 84.18% at 1,000 individuals to 90.19% at 100,000 with no signs of overfitting, indicating that the model captures meaningful genomic structure. In downstream phenotype prediction, discriminative performance was limited: SNPbag achieved a test AUC of 0.54 and LDpred2-auto 0.51, only marginally above the 0.5 baseline. These outcomes reflect strict computational constraints (including a single fine-tuning epoch with a frozen encoder for SNPbag and restricting LDpred2-auto to 14,000 SNPs on one chromosome) rather than fundamental limitations of the approaches. The thesis highlights extending sequence length, increasing training data, and fully fine-tuning the encoder as key directions for future work.

Dette speciale undersøger, om transformerbaserede modeller kan forbedre prediktionen af binære fænotyper fra genotypedata ved at gå ud over de additive antagelser i klassiske polygeniske risikoscoremetoder. Arbejdet udvikler og evaluerer SNPbag, en BERT-lignende encoder trænet i to trin: (1) prætræning ved at rekonstruere tilfældigt maskerede genotyper ud fra deres genomiske kontekst og (2) finjustering til fænotypeklassifikation. SNPbag benchmarkes mod LDpred2-auto, en bayesiansk PRS-metode, på syntetiske data fra HAPNEST med 100.000 individer og 14.000 SNPs fra kromosom 22; fænotyperne er simuleret med en logistisk sygdomsmodel med 500 kausale varianter og 10% prævalens. Prætræningen viste stigende valideringsnøjagtighed fra 84,18% ved 1.000 individer til 90,19% ved 100.000 uden tegn på overfitting, hvilket tyder på, at modellen indfanger meningsfuld genomisk struktur. I den efterfølgende fænotypeprediktion var den diskriminerende ydeevne begrænset: SNPbag opnåede AUC 0,54 og LDpred2-auto 0,51, kun marginalt over 0,5. Resultaterne afspejler væsentlige beregningsmæssige begrænsninger (bl.a. kun én finjusterings-epoke med frossen encoder for SNPbag og analyse af kun 14.000 SNPs fra ét kromosom for LDpred2-auto) snarere end en fundamental svaghed ved modellerne. Specialet peger på længere sekvenser, mere træningsdata og fuld finjustering af encoderen som centrale næste skridt.

[This apstract has been generated with the help of AI directly from the project full text]