Agent-optimized GPU polygenic scoring at cohort scale
- 1Boston Children's Hospital, Department of Pediatrics, Division of Genetics and Genomics, Boston, MA
Abstract
A polygenic score (PGS) is a unitless weighted sum of allele dosages, interpretable only as a percentile within a reference distribution. Evaluating risk across models requires scoring each individual against a whole reference panel, but current CPU pipelines process targets or models sequentially, making full cross-product calculations prohibitively expensive. We reformulated PGS calculation as a cohort-wide sparse matrix product on a GPU and optimized it via an autonomous coding agent under read-only inputs, cold starts, and strict numerical validation against pgsc_calc. The scorer was "trained" by the agent accessing synthetic data and real 1000 Genomes data. On a synthetic benchmark, the scorer achieved a 10.6-fold speedup during the training course (184.9 s to 17.4 s) and ran 71-fold faster than pgsc_calc. However, on held-out real genomes, the synthetic-trained scorer was 15.3-fold slower than the real-data-trained version and diverged significantly from pgsc_calc (maximum absolute difference of 3.7x10-1 vs. 3.1x10-4). Three replications of the synthetic loop from an identical prompt showed that agent optimization trajectory variance explains 91 to 96% of total wall-clock variance, against 0 to 2.6% for the data sampled and 0.2 to 3.3% for repeated execution. A memory-bounded rebuild then scored all the 3,202 1000 Genome genotypes against all 5,385 models in 6.5 h within a 72 GB memory cap, released here as a frozen scoring manifest with ancestry-stratified reference distributions for the whole PGS Catalog
Related
- DeepU-PRS: nonlinear and uncertainty-aware SNP heritability modeling for annotation-informed polygenic risk scoring.
- All of Us diversity and scale yield context-dependent improvements in polygenic prediction
- From Nagelkerke's R2 to Liability-Scale Variance Explained for Polygenic Scores
- Implementing a Multi-Ancestry Polygenic Risk Score for Coronary Heart Disease in a Diverse Cohort
- Monitoring the translation initiation process in prokaryotes via large-scale examination using optimized SSU-seq technique
BibTeX
@misc{afyouni2026agentoptimized,
title = {{Agent-optimized GPU polygenic scoring at cohort scale}},
author = {A. Afyouni and B. Yang and C. Liu},
howpublished = {bioRxiv},
year = {2026},
month = sep,
doi = {10.64898/2026.09.28.755102},
url = {https://www.biorxiv.org/content/10.64898/2026.09.28.755102v1},
note = {CC BY},
}
RIS
TY - UNPB
TI - Agent-optimized GPU polygenic scoring at cohort scale
AU - A. Afyouni
AU - B. Yang
AU - C. Liu
PY - 2026
DA - 2026/09/28
PB - bioRxiv
DO - 10.64898/2026.09.28.755102
UR - https://www.biorxiv.org/content/10.64898/2026.09.28.755102v1
AB - A polygenic score (PGS) is a unitless weighted sum of allele dosages, interpretable only as a percentile within a reference distribution. Evaluating risk across models requires scoring each individual against a whole reference panel, but current CPU pipelines process targets or models sequentially, making full cross-product calculations prohibitively expensive. We reformulated PGS calculation as a cohort-wide sparse matrix product on a GPU and optimized it via an autonomous coding agent under read-only inputs, cold starts, and strict numerical validation against pgsc_calc. The scorer was "trained" by the agent accessing synthetic data and real 1000 Genomes data. On a synthetic benchmark, the scorer achieved a 10.6-fold speedup during the training course (184.9 s to 17.4 s) and ran 71-fold faster than pgsc_calc. However, on held-out real genomes, the synthetic-trained scorer was 15.3-fold slower than the real-data-trained version and diverged significantly from pgsc_calc (maximum absolute difference of 3.7x10-1 vs. 3.1x10-4). Three replications of the synthetic loop from an identical prompt showed that agent optimization trajectory variance explains 91 to 96% of total wall-clock variance, against 0 to 2.6% for the data sampled and 0.2 to 3.3% for repeated execution. A memory-bounded rebuild then scored all the 3,202 1000 Genome genotypes against all 5,385 models in 6.5 h within a 72 GB memory cap, released here as a frozen scoring manifest with ancestry-stratified reference distributions for the whole PGS Catalog
ER -