Year: 2026
Type: preprint
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.7×10⁻¹ vs. 3.1×10⁻⁴). 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 Author summary A person’s genetic risk for a disease is usually summarized as a single number, but that number means nothing on its own. It is useful only once we know where it falls among thousands of other people (i.e. percentile). Meanwhile, someone who has had their genome sequenced usually wants to know about more than one disease risk. Producing that product means scoring an entire population against every published genetic risk model that exists, which today’s tools cannot do efficiently. We rebuilt the calculation to run on a graphics card as one large matrix multiplication. We then let an AI coding agent rewrite and speed it up on its own, through repeated cycles of measuring, planning and testing. Practicing on artificial data made the code fast there but slow, and sometimes inaccurate, on real genomes. Practising on real genomes avoided that trap. Running the same instructions using an AI coding agent three separate times produced three very different program sets. The final program scored all 3,202 people in the 1000 Genomes Project against all 5,385 published risk models in under seven hours. We release the resulting reference distributions so that a new score can be interpreted at once, without anyone re-running the cohort.
Authors: Adam Afyouni, Boyuan Yang, Cong Liu
Institutions: Boston Children's Hospital, Emory University, Harvard University
Language: English
Subfield: Genetics
Domain: Life Sciences
Open Access status: green
OpenAlex ID: W7218641840
