Deep learning insights into distinct patterns of polygenic adaptation across human populations Authors: Devashish Tripathi, Chandrika Bhattacharyya, Analabha Basu Published: 2024 ABSTRACT AbstractResponse to spatiotemporal variation in selection gradients resulted in signatures of polygenic adaptation in human genomes. We introduce RAISING, a two-stage deep learning framework that optimizes neural network architecture through hyperparameter tuning before performing feature selection and prediction tasks. We tested RAISING on published and newly designed simulations that incorporate the complex interplay between demographic history and selection gradients. RAISING outperformed Phylogenetic Generalized Least Squares (PGLS), ridge regression and DeepGenomeScan, with significantly higher true positive rates (TPR) in detecting genetic adaptation. It reduced computational time by 60-fold and increased TPR by up to 28% compared to DeepGenomeScan on published data. In more complex demographic simulations, RAISING showed lower false discoveries and significantly higher TPR, up to 17-fold, compared to other methods. RAISING demonstrated robustness with least sensitivity to demographic history, selection gradient and their interactions. We developed a sliding window method for genome-wide implementation of RAISING to overcome the computational challenges of high-dimensional genomic data. Applied to African, European, South Asian and East Asian populations, we identified multiple genomic regions undergoing polygenic selection. Notably, ∼70% of the regions identified in Africans are unique, with broad patterns distinguishing them from non-Africans, corroborating the Out of Africa dispersal model. Introduction Understanding the evolution and genetic basis of complex traits generating phenotypic differences within and among human populations is a primary goal of human genetics (1). Within the past 100000 years, modern humans have spread across the globe (2,3) and adapted to diverse conditions (4,5), such as adaptation to an arctic environment (6), high altitude (7), ultraviolet radiation exposure (8), the transition from a hunter-gatherer diet to agricultural diet (9) and adaptation in response to pathogens (10). This indicates that local adaptation has been a pivotal evolutionary force in their successful habitation through an immensely diverse and dynamic environment. Environmental factors that vary across geographical space and time indirectly affect the fitness of individuals through their phenotypes (11). The genetic architecture of the traits ranges from monogenic to polygenic and is linked to the mode of adaptation for that particular phenotype (12). In the post-genome-wide association studies (GWAS) era, with the knowledge of the polygenic nature of human traits, it is anticipated that we have been successful in identifying the strongest and clearest selective sweeps (13), whereas polygenic adaptations (14) are the most likely modes of response to changes in selection gradient (12). The selective sweep models assume that sweep at one locus is independent of sweeps at other loci in the genome and has a higher power in detecting hard sweeps underlying monogenic or oligogenic traits, which provides insight into the recent and ongoing selection (15,16). The evidence from several GWAS suggests that most of the traits (adaptive) are highly polygenic (17) and can be defined as a combination of the countably finite quantitative trait or protein-altering loci having small effects with epistatic interaction among genetic loci (18). The pattern of allele frequencies in the polygenic selection model is much different from the selective sweeps model. The polygenic adaptation usually acts on the standing variation at multiple loci, resulting in a smaller shift in allele frequencies underlying adaptive traits. Over time, polygenic adaptation shifts the mean phenotype of the populations to their local optimum and thereby causes changes in allele frequencies of genetic variants underlying those adaptive phenotypes (12). Eventually, polygenic adaptation of populations to their local environment produces a spatial cline of adaptive phenotypes and underlying allele frequencies across geographical space (19,20). The allele frequency patterns across space can be impacted by the dynamics of demographic movements like population dispersal, admixture and genetic drift, which challenges the detection of genomic regions under polygenic adaptation (21,22). Environmental factors such as pathogen exposure might also result in a non-linear pattern of allele frequencies across geographical space (23). Furthermore, an individual’s overall fitness is determined by multiple adaptive traits, and each trait might be affected by various selective pressures that have complex patterns across space (24). Therefore, population demography and environmental pressures further complicate the detection of genomic regions under polygenic adaptation. In literature, various approaches for detecting genetic loci under local adaptation can be categorized into genetic differentiation outlier test, population-specific haplotype homozygosity and genotype–environment association (GEA) (25). Genetic differentiation methods such as Fst-based genome scans identify loci that show higher observed differentiation between populations than the expected distribution of Fst under neutrality (26,27). Extended haplotype homozygosity-based approaches such as XP-EHH (28) and iHS (29) exploit LD patterns, assuming that selection sweep results in a few high-frequency haplotypes with extended LD compared to expectation under neutral evolution. Both approaches discussed above assume a known test statistic distribution under the known demographic model. Misspecifying the demographic model of the populations under study results in an inaccurate null distribution of the test statistic, increasing the false discoveries of genetic loci under adaptation (21). The methods discussed above for detecting selective sweeps need more power in detecting selection acting on polygenic traits where modest shifts in allele frequencies across many loci can result in significant changes in a trait (30). GEA methods such as pcadapt (31) and redundancy analysis (RDA) (32) implement statistical linear models that capture the linear relationship between allele frequencies and environmental factors to detect the genetic variants affected by linear selection gradients over geographical space, which also implicitly assumes a simple diffusion or a serial founder effect of dispersal. All these approaches test each genetic loci independently during a genome scan, which increases the multiple testing burden. Moreover, existing GEA methods capture variations within environmental factors or genotype data but not together (23). Considering the challenges in existing methods, there is a need to develop a method capable of utilizing whole genome sequence (WGS) data to uncover the genetic basis of polygenic traits under adaptation. The advent of large-scale WGS data allow researchers to relax the assumptions in model-based approaches and move towards a data-driven approach in population genetics (33). Also, WGS provides rich information compared to DNA genotyping chips for detecting genetic loci under adaptation (34). In particular, supervised deep learning (DL) methods, which are equipped to deal with complex underlying models, have shown promise in solving inherently complicated population genetics problems (35,36). Examples include identifying signatures of natural selection, inferring demographic history (37), estimating recombination rate (38) and inferring admixture (39). Supervised DL applications in the field of evolution can be broadly classified into two groups. A simulation-based approach that simulates genomic datasets assuming a demographic model to train the DL algorithm for detecting the selective sweeps and then scans the real genomic dataset for signatures of selective sweeps (40–42). Another approach belongs to the GEA class, which directly trains DL algorithms on real genomic datasets to identify genomic loci highly correlated with the environment (43). Previously, researchers proposed DeepGenomeScan (43) which implements a deep neural network (DNN) that models GEA to detect genetic loci under polygenic adaptation. DeepGenomeScan is a single-step approach that combines hyperparameter space search and optimal architecture training to identify the genetic loci under adaptation. DeepGenomeScan performs only a hundred trials of grid or random search (44) methods for hyperparameter tuning. These hyperparameter optimization methods do not explore ample hyperparameter space and might not result in an optimized architecture. Previous research suggests that the learning and predictive performance of neural networks on a dataset is sensitive to the choice of architecture and other hyperparameters, such as regularization and learning rate (45). DeepGenomeScan models the relationship between the input genotype data and environmental factors in a univariate manner, i.e. if there are N environmental factors, it performs hyperparameter tuning for each pair of (G, Oi), trains the best architecture and performs feature selection. The one-by-one modeling approach is time-inefficient and does not capture the structure within the environmental factors. The authors used European populations from the POPRES project (46) genotyped using the Affymetrix 500K single nucleotide polymorphism(SNP) chip. DeepGenomeScan used a quality control (QC) dataset of 1382 individuals and 283499 genetic loci as the input data and geographical coordinates as the response variable to detect the genetic loci under polygenic adaptation. The application of DeepGenomeScan on high-dimensional WGS data with low sample size presents significant challenges, including increased model complexity due to a large number of parameters, increased computational burden during hyperparameter tuning and an increased risk of model overfitting (47,48). Furthermore, the univariate approach makes the method computationally intensive and infeasible for genomewide application. To overcome the concerns in the existing DL and statistical linear model-based approaches, the goals of this study were to: Develop a general neural network framework that separates the process into two independent stages: one for hyperparameter tuning and another for the training of optimized architecture to accomplish feature selection and prediction tasks. Develop a general neural network framework that separates the process into two independent stages: one for hyperparameter tuning and another for the training of optimized architecture to accomplish feature selection and prediction tasks. Model genotype data and environmental factors in a multi-output regression approach. Model genotype data and environmental factors in a multi-output regression approach. Develop a bootstrap approach for hyperparameter tuning on genotype data and investigate the transferability of obtained neural network architecture across other simulation replicates or genomic regions. Develop a bootstrap approach for hyperparameter tuning on genotype data and investigate the transferability of obtained neural network architecture across other simulation replicates or genomic regions. Develop a feature selection method that leverages the learned weight parameters from the neural network to quantify the contribution of genetic variants in predicting selective pressures. Develop a feature selection method that leverages the learned weight parameters from the neural network to quantify the contribution of genetic variants in predicting selective pressures. Evaluate the performance of the proposed DL framework on published simulated datasets. Evaluate the performance of the proposed DL framework on published simulated datasets. Conduct simulations to investigate the impact of demographic history and selective pressures on the performance of the proposed method and existing polygenic detection methods. Conduct simulations to investigate the impact of demographic history and selective pressures on the performance of the proposed method and existing polygenic detection methods. Design a sliding window approach to facilitate genomewide implementation of the proposed DL method. Design a sliding window approach to facilitate genomewide implementation of the proposed DL method. Implement the method on WGS datasets from African, European, South Asian and East Asian populations to identify genomic regions undergoing adaptation. Implement the method on WGS datasets from African, European, South Asian and East Asian populations to identify genomic regions undergoing adaptation. To achieve these goals, we have developed RAISING (Supplementary Text S1, Materials and methods), a two-stage, fast and flexible neural network implementation framework for detecting genomic signatures of polygenic adaptation. In the first stage, RAISING performs hyperparameter tuning using the best-performing optimization methods out of Bayesian optimization (49), Hyperband (50) and a new method, ‘RandomSearch + lm (RSLM).’ The RSLM (Supplementary Text S1) method combines random search and a statistical linear model to find the best neural network architecture. In the second stage, RAISING trains the optimized architecture on the entire dataset (https://github.com/keras-team/keras-tuner) and performs the feature selection using DeepFeatImp (Supplementary Text S1), a new method that uses learned weights from the trained neural network to measure the contribution of input features in the prediction of outcomes. To implement RAISING on real genomic datasets, we used a genotype count matrix as input data and principal component loadings PC1 and PC2 as proxies for the geographical coordinates (51,52). To overcome the challenges associated with the implementation of neural networks on genomic data, we have developed a sliding window method (‘Materials and methods’ section). Earlier work suggests that a sliding window approach for genome scans could reduce the multiple testing burden and increase statistical power in detecting genetic adaptation (25). The sliding window approach comes with the challenge of finding the optimum window size, as a larger window size tends to increase false positives, and a smaller window size tends to increase false negatives (53). We implement the first step of RAISING, which performs hyperparameter tuning on a random subset (window) from the whole genome to find the optimum window size and neural network architecture. Then, the optimized architecture is transferred across the genome in a sliding window manner to identify the genomic signatures of polygenic adaptation. We used existing simulated data (32), and new simulated datasets under multiple complex demographic scenarios with realistic population genetic parameters such as recombination and mutation rate for detecting genetic loci under polygenic selection. Across all simulations for detecting genetic loci under polygenic adaptation, we found that RAISING outperformed statistical linear models and existing DL approach DeepGenomeScan with a higher true positive rate (TPR) and lower (1 − precision). We have also compared the computational time of RAISING with the DeepGenomeScan and found that RAISING is 60-fold faster than the DeepGenomeScan on the published simulated dataset. We have applied RAISING to identify the genomic regions under polygenic adaptation in four continental groups: African and European populations from the 1000 genomes project (1KGP) (54), the human genome diversity project (HGDP) (55), and South Asian and East Asian populations from the GenomeAsia100K consortium (GA100K) (56). The results suggest distinct signature patterns in Africans, with ∼70% of the genomic regions identified in the African populations not shared with other continental groups. In contrast, many of the identified genomic regions in non-Africans are shared among the continental groups. The observation corroborates with the Out of Africa (OoA) dispersal model, which proposed that founder effect, human migrations and local adaptation have resulted in shared genomic signals among non-Africans. Materials and methods We begin with a comprehensive description of RAISING, a novel automated DL framework for detecting genomic regions under polygenic adaptation. Initially, we investigated the robustness of neural network architectures derived from various hyperparameter tuning methods. We then describe the published and new simulation used to evaluate RAISING’s performance compared to existing polygenic detection methods belonging to the class of GEA methods. Next, we outline the pipeline that performs genome scans using RAISING through a sliding window method. This is followed by the statistical procedures for identifying outlier genomic regions, assessing shared signals across continental groups and conducting enrichment analyses of genomic regions under polygenic adaptation to identify enriched gene ontology (GO) biological processes. RAISING: a two-stage deep learning framework RAISING is an automated, two-stage, supervised DL framework that first performs hyperparameter optimization followed by training of optimal architecture for feature selection and prediction tasks. The mathematical formulation of RAISING, including a description of RSLM and DeepFeatImp, is attached in the supplementary section (Supplementary Text S1). RAISING is written in Python3 (v3.10), utilizing TensorFlow (v2.11.0) (57) and Keras (v2.11.0) (https://github.com/keras-team/keras). To implement RAISING, the user needs to specify the dataset for supervised learning and the learning task. RAISING streamlines hyperparameter tuning and the training of optimized architecture for inference tasks, including feature selection and prediction. The framework is divided into two distinct stages: Hyperparameter optimization: In the first stage (STAGE 1), RAISING performs hyperparameter tuning to find the optimal neural network architecture (Figure 1A). STAGE 1 requires a neural network architecture search space (NASS), specification of hyperparameter tuning algorithm for searching the NASS, a loss function and model performance metrics. The NASS contains infinitely many architectures generated by combining the hyperparameter space and the output layer defined based on the supervised learning task. The hyperparameter tuning block in STAGE 1 selects a neural network architecture from the NASS that optimizes the loss function using either a K-fold cross-validation or a train-test split strategy. RAISING automatically selects the loss function and metrics based on supervised learning tasks but allows user-defined functions. By default, RAISING optimizes the loss function on train and test data, but the user can specify optimization over either train or test data. RAISING offers flexibility by providing a range of optimization algorithms, including our novel RSLM algorithm and existing methods like Hyperband, random search and Bayesian optimization, available through the KerasTuner (v1.1.3) package (https://github.com/keras-team/keras-tuner). RSLM is a novel method that integrates a random search algorithm and a statistical linear regression model with first-order interactions to learn the mapping between hyperparameter combinations and the loss function. The fitted linear model predicts the loss function on a larger user-defined hyperparameter space and selects the hyperparameter configuration with the optimized predicted loss (Supplementary Text S1). RAISING allows users to specify early stopping, dropout and regularization techniques to reduce overfitting. Hyperparameter optimization: In the first stage (STAGE 1), RAISING performs hyperparameter tuning to find the optimal neural network architecture (Figure 1A). STAGE 1 requires a neural network architecture search space (NASS), specification of hyperparameter tuning algorithm for searching the NASS, a loss function and model performance metrics. The NASS contains infinitely many architectures generated by combining the hyperparameter space and the output layer defined based on the supervised learning task. The hyperparameter tuning block in STAGE 1 selects a neural network architecture from the NASS that optimizes the loss function using either a K-fold cross-validation or a train-test split strategy. RAISING automatically selects the loss function and metrics based on supervised learning tasks but allows user-defined functions. By default, RAISING optimizes the loss function on train and test data, but the user can specify optimization over either train or test data. RAISING offers flexibility by providing a range of optimization algorithms, including our novel RSLM algorithm and existing methods like Hyperband, random search and Bayesian optimization, available through the KerasTuner (v1.1.3) package (https://github.com/keras-team/keras-tuner). RSLM is a novel method that integrates a random search algorithm and a statistical linear regression model with first-order interactions to learn the mapping between hyperparameter combinations and the loss function. The fitted linear model predicts the loss function on a larger user-defined hyperparameter space and selects the hyperparameter configuration with the optimized predicted loss (Supplementary Text S1). RAISING allows users to specify early stopping, dropout and regularization techniques to reduce overfitting. Model training and feature selection: In STAGE 2, RAISING trains the optimized neural network architecture obtained from STAGE 1 on the entire dataset to learn the relationship between input features and output variables (Figure 1B). After training, RAISING performs feature selection to measure the contribution of input features in predicting the output. RAISING offers various feature selection algorithms, including DeepExplainer and KernelExplainer from the SHAP (v0.41.0) (58) package, and our novel method DeepFeatImp, which is an extension of the method (59) implemented in the H2O package (https://github.com/h2oai/h2o-3), uses learned weight matrix from the first hidden layer to estimate the feature importance. DeepFeatImp generalizes this approach by utilizing weight matrices from all hidden layers in a trained neural network to estimate input feature contributions (Supplementary Text S1). Although feature selection from multiple hidden layers has not been required to detect genetic adaptation, we have simulated a case study (Supplementary Table S8) where DeepFeatImp utilizes the learned weight matrix from a DNN for feature selection. Additionally, STAGE 2 allows multiple replications of neural network training to account for randomness in weight and bias initialization. The final model consists of averaged weights and bias parameters across replicates, and input feature contributions are averaged across replicates. Model training and feature selection: In STAGE 2, RAISING trains the optimized neural network architecture obtained from STAGE 1 on the entire dataset to learn the relationship between input features and output variables (Figure 1B). After training, RAISING performs feature selection to measure the contribution of input features in predicting the output. RAISING offers various feature selection algorithms, including DeepExplainer and KernelExplainer from the SHAP (v0.41.0) (58) package, and our novel method DeepFeatImp, which is an extension of the method (59) implemented in the H2O package (https://github.com/h2oai/h2o-3), uses learned weight matrix from the first hidden layer to estimate the feature importance. DeepFeatImp generalizes this approach by utilizing weight matrices from all hidden layers in a trained neural network to estimate input feature contributions (Supplementary Text S1). Although feature selection from multiple hidden layers has not been required to detect genetic adaptation, we have simulated a case study (Supplementary Table S8) where DeepFeatImp utilizes the learned weight matrix from a DNN for feature selection. Additionally, STAGE 2 allows multiple replications of neural network training to account for randomness in weight and bias initialization. The final model consists of averaged weights and bias parameters across replicates, and input feature contributions are averaged across replicates. The two stages of RAISING are independent of each other. If the user already has a neural network architecture, it can be directly provided in STAGE 2 for performing feature selection and prediction tasks. RAISING can be applied to various supervised learning tasks such as regression, classification and multi-task learning. The default hyperparameter search space is generally suitable for these diverse tasks. For multi-task problems, DeepFeatImp is the only applicable method in the literature integrated with the Keras package functional API to perform feature selection. Comparison of hyperparameter tuning methods We aim to compare the performance of architectures obtained from random search and model-based hyperparameter tuning methods. We further investigated the transferability of the optimized architecture across other genomic regions under adaptation. We have extracted the known genomic regions under natural selection in Europeans (29). For the South Asian populations, we performed a principal component analysis (PCA) and labeled each individual with PC1 and PC2 loadings (Supplementary Figure S4). We selected a genomic region chr2: 135989231−137089231 (hg19) and performed the hyperparameter tuning using Bayesian optimization, Hyperband and RSLM. Hyperparameter tuning methods monitored the mean squared error (MSE) loss for 100 epochs and provided an optimum ANN architecture that minimizes the MSE. We estimated the execution time of algorithms by conducting 200, 300 and 500 trials for Bayesian optimization, 1000 trials for Hyperband and RSLM based on 1000 trials of random search. To assess the transferability of artificial neural networks (ANN) architecture obtained from each algorithm across other genomic regions, we trained each architecture on 50 randomly sampled genomic regions under natural selection in Europeans (29). We estimated the MSE loss on train and test data for 100 epochs during model training in each of the 50 genomic regions. After 100 epochs, we performed repeated measures analysis of variance(ANOVA) to test the equality of MSE distribution between the Bayesian optimization, Hyperband and RSLM algorithms. We then performed a post-hoc paired t-test to identify which algorithms have a significant difference between MSE. Description of simulated datasets used for evaluating polygenic detection methods We utilized both published and new simulated datasets to assess the performance of RAISING. We conducted new simulations under various scenarios to investigate the challenges posed by the interplay of demographic histories, environmental factors and selection duration (in generations) in detecting genomic signals of polygenic adaptation. Overview of published simulated data We tested RAISING on an existing simulated dataset (32) previously used to compare the DeepGenomeScan, RDA and pcadapt methods (32,43). The simulations were performed using the simuPOP package (60), an individual-based forward-time simulator that models the evolution of populations in response to the environment. The simulation scenario consisted of 64 populations arranged on an 8 × 8 2D lattice, evolving under a 2D stepping-stone demographic model. The authors simulated 1000 loci, divided into 200 chunks of 5 SNPs each. The authors initialized each population with 200 diploid individuals, an initial allele frequency of 0.5, a migration rate of 0.1 among neighboring populations and a recombination rate of 0.1 between adjacent loci. The authors defined three quantitative traits coded by ten different sets of genetic loci. Each trait was defined as the sum of genotypes of 10 independent loci and a random noise from normal distribution N(0,2). The first trait (QT1) is coded by genetic loci (1, 11, 21,…, 91), the second trait (QT2) is coded by genetic loci (101, 111,…, 191) and the third trait (QT3) is coded by genetic loci (201, 211,…, 291). The simulations resulted in 970 neutral loci and 30 selected loci. The authors have defined ten environmental factors consisting of linear, quadratic and patchy environments. The environmental factor 1 (env1) is a quadratic gradient acting on trait 1, the environmental factor 2 (env2) is a linear gradient acting on trait 2, and the environmental factor 3 (env3) affects a subset of populations through trait 3. The other environmental factors are pseudo environments and do not affect the fitness of the individuals. Individual fitness was calculated using a Gaussian distribution, with the population’s phenotype aiming to reach the local environmental optimum. An individual’s overall fitness is the product of the fitness values corresponding to QT1, QT2 and QT3. The environmental gradient affected the fitness of individuals for 500 generations. At the end of the simulation, ten individuals from each population were sampled, resulting in genotype data for 640 individuals with 1000 genetic loci. The authors performed 100 replications of the simulation, resulting in 100 simulated dataset replicates. Overview of new simulations We designed simulations to investigate the effect of demographic history, environmental factors and selection duration (in generations) on the performance of GEA methods for detecting genetic loci under polygenic adaptation. The developed simulation pipeline first generates the coalescent history of the extant populations using msprime (61) and records the tree sequences with the mutations on the genealogy. These tree sequences from msprime are then loaded into SLiM (62) and serve as a starting point for forward simulations to simulate the effect of environmental gradients on the fitness of individuals (Figure 3.1). We perform the simulations under three types of demographic models: Demographic Model 1 (D1): Extant populations derive their ancestry from a single ancestral group and have a constant effective population size throughout their evolutionary history. In this model, we used a 2D stepping stone model, structuring 25 populations on a 5 × 5 2D grid with a population size of 500 and a migration rate of 0.01 (Figure 3.2A). Demographic Model 1 (D1): Extant populations derive their ancestry from a single ancestral group and have a constant effective population size throughout their evolutionary history. In this model, we used a 2D stepping stone model, structuring 25 populations on a 5 × 5 2D grid with a population size of 500 and a migration rate of 0.01 (Figure 3.2A). Demographic Model 2 (D2): Extant populations derive their ancestry from different ancestral groups and have a constant effective population size. This model consists of five populations: pop2 and pop3 derived from an ancestral population (Anc2) 5000 generations ago, pop4 and pop5 derived from another ancestral population (Anc3) 10000 generations ago. Ancestral populations Anc2 and Anc3 separated from Anc1 15000 generations ago, and pop1 and Anc1 separated from the root population 20000 generations ago. All populations have a constant effective population size of 5000 over their evolutionary history. Migration is allowed between pop2 and pop3, pop4 and pop5 post-split from the ancestral population, and between pop1 and Anc1 post-split from the root population with a migration rate of 0.001 (Figure 3.2B). Demographic Model 2 (D2): Extant populations derive their ancestry from different ancestral groups and have a constant effective population size. This model consists of five populations: pop2 and pop3 derived from an ancestral population (Anc2) 5000 generations ago, pop4 and pop5 derived from another ancestral population (Anc3) 10000 generations ago. Ancestral populations Anc2 and Anc3 separated from Anc1 15000 generations ago, and pop1 and Anc1 separated from the root population 20000 generations ago. All populations have a constant effective population size of 5000 over their evolutionary history. Migration is allowed between pop2 and pop3, pop4 and pop5 post-split from the ancestral population, and between pop1 and Anc1 post-split from the root population with a migration rate of 0.001 (Figure 3.2B). Demographic Model 3 (D3): This model shares the same gene tree as D2 but includes several demographic events, such as population bottlenecks, decline and expansion. Anc2 (Ne = 2000) and Anc3 (Ne = 3000) underwent instantaneous bottlenecks after splitting from Anc1 (Ne = 5000). Anc1 and pop1 underwent bottlenecks after splitting from the root population (Ne = 15000). Population groups (pop2 and pop3) and (pop4 and pop5) experienced expansion post-split, reaching a present-day effective population size of 5000. Population group pop1 had a population decline post-split from the root population (Ne = 15000), reaching a present-day size of 5000 from an initial size of 10000 post-bottleneck (Figure 3.2C). Demographic Model 3 (D3): This model shares the same gene tree as D2 but includes several demographic events, such as population bottlenecks, decline and expansion. Anc2 (Ne = 2000) and Anc3 (Ne = 3000) underwent instantaneous bottlenecks after splitting from Anc1 (Ne = 5000). Anc1 and pop1 underwent bottlenecks after splitting from the root population (Ne = 15000). Population groups (pop2 and pop3) and (pop4 and pop5) experienced expansion post-split, reaching a present-day effective population size of 5000. Population group pop1 had a population decline post-split from the root population (Ne = 15000), reaching a present-day size of 5000 from an initial size of 10000 post-bottleneck (Figure 3.2C). For all the scenarios, we have chosen a genomic region of 10 Mb, a recombination rate of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${10^{ - 8}}$\end{document} per base pair per meiosis, and a mutation rate of 1.25e-8 per base per generation. After setting up the demographic model in msprime (61), we generated the tree sequence and overlaid mutations on the genealogy. Using the PySLiM package, the tree sequence with mutations was annotated with SLiM (62) metadata, including individual sex labels and population sex ratio. The annotated tree sequence was then loaded in SLiM. For D2 and D3, we sampled five subpopulations of population size 500 from each population group (pop1 to pop5) and arranged them on the 2D grid representing a complex population structure. For D1, we continued with the population structure setup for producing coalescent history (Figure 3.3A). In D2 and D3, populations with the same genetic background adapted to diverse environmental optima, with a migration rate of 0.01 between subpopulations of the same genetic background and 0.001 between different genetic backgrounds, creating a barrier to gene flow (Figure 3.3B and C). We simulated the effect of linear and environmental gradients across a 2D space for all the demographic models. An individual’s fitness is affected by environmental gradient through a polygenic trait, defined as a linear combination of 20 QTLs with variable effect sizes drawn from a normal distribution N(0,0.1). A random noise from a Gaussian distribution is added to the polygenic trait. The fitness of individuals in a population is defined using a Gaussian distribution, such that an individual in the optimum environment has the highest fitness. The linear and quadratic eenvironmental gradients are generated using the following equations: The linear environment has the lowest environment value on the left side of the grid and the highest value on the right side. The quadratic environment has the highest values in the center of the 2D grid and the lowest values on either side of the grid (Supplementary Figure S2). We ran the forward simulation with SLiM for 1000 generations, sampled 50 individuals randomly, and periodically saved the output genomes in variant call format (VCF) format at 200, 400, 600, 800 and 1000 generations. This pipeline resulted in VCF files at five-time points across two environmental factors containing 1250 individuals sampled from 25 populations. The discussed pipeline produced a single simulation replicate (Figure 3.1). We replicated the above pipeline 20 times, resulting in a total of 200 simulated datasets under each demographic model corresponding to the combination of simulation replicates (I), environments (E) and selection durations (G). Following minor allele frequency (MAF) ≥ 5%, the post-QC data have around 15000 genetic variants that vary across simulation replicates. Comparison of RAISING with existing methods on published simulated dataset for polygenic detection To implement RAISING on the existing simulation dataset, we performed hyperparameter tuning using Bayesian optimization as the hyperparameter search converged within 300 trials and had a relatively smaller execution time compared to RSLM. We performed hyperparameter tuning on a single simulation replicate and transferred the optimized ANN architecture across simulation replicates (Supplementary Table S10). We implemented the optimized ANN architecture on each simulated replicate and estimated the contribution of 1000 genetic loci (QRAISING) in predicting the ten environmental factors using the DeepFeatImp (Supplementary Text S1) method (Figure 2.1). We have also implemented ridge regression (RIDGE), taking genotype data as input, fitting the model over each environmental factor and extracting the weights of the genetic loci in predicting the environment. This has resulted in a feature importance matrix (QRIDGE) containing weights of 1000 genetic loci across ten environmental variables. We implemented PGLS, with genotype data as the output variables and environmental factors as the input data, resulting in a feature importance matrix (QPGLS) of the same size as RAISING and RIDGE. As implemented in DeepGenomeScan, we used Mahalanobis distance to identify outlier genetic loci, classifying a genetic locus with a P-value threshold of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${10^{ - 10}}$\end{document} as selected, otherwise neutral. We have estimated the TPR, false positive rate (FPR) and (1 − precision) by comparing the predicted labels (selected/neutral) to the actual labels (selected/neutral). We have used the mean estimates of TPR, FPR and (1 − precision) from the published tool DeepGenomeScan (43) to compare with the RAISING. We implemented DeepGenomeScan on a single replicate to estimate the execution time and extrapolated the expected time for 100 simulation replicates. The execution time for RAISING is the sum of the hyperparameter tuning time and the model training time for feature selection across 100 replicates. Comparison of RAISING with existing methods on the new simulated dataset We compared RAISING, pcadapt and ridge regression on the new simulations. In each demographic model, for each combination of simulation replicates (I), environments (E) and selection durations (in generations) (G), we implemented RAISING, which performed hyperparameter tuning (Supplementary Table S1) and feature selection (Figure 2.1). The distribution of feature importance obtained in each triplet (I, E, G) is positively skewed, and we empirically found that lognormal distribution could be the best fit for the observed distribution. Using the fitted lognormal distribution, we estimated P-values to determine the significance of feature importance values for genetic loci in the extreme right tail. Applying a P-value threshold \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${10^{ - 3}}$\end{document}, we classified the loci as selected or neutral. For each triplet combination (I, E, G), we implemented pcadapt and ridge regression. For each triplet combination (I, E, G) corresponding to the algorithms RAISING, pcadapt and ridge regression, we estimated the TPR and (1 − precision) using the predicted and actual labels (selected/neutral). We have further compared RAISING with the DeepGenomeScan, we restricted the comparison to simulations under demographic model D1 due to various issues posed by DeepGenomeScan in relation to high computational cost and DL training on high-dimensional genomic data. RAISING genome-wide implementation For each continental group, Africa, Europe, South Asia and East Asia, we used individual principal component loadings PC1 and PC2 as a proxy for geographical coordinates (Supplementary Figure S4). We developed a sliding window approach to perform genome scans to identify signatures of polygenic adaptation by modeling the relationship between WGS data and principal components (PC1, PC2) loadings. Initially, we explored two bootstrap sampling strategies: ‘one-out-n’ (sampling a single random subset for hyperparameter tuning) and ‘k-out-n’ (sampling multiple subsets for hyperparameter tuning). However, no significant differences in architecture or model performance were observed between these approaches when evaluated on 25 random genomic subsets of 1000 variants from South Asian populations (Supplementary Figure S5). Consequently, we implemented a sliding window method utilizing the ‘one-out-n’ approach for each continental group. This method performs hyperparameter tuning on a randomly sampled genomic segment (window). Then, it transfers the resulting optimal neural network architecture across the entire genome to detect signatures of polygenic selection. To determine the ideal window size for implementing the sliding window method, we defined a set of candidate sizes (S) based on the number of genetic variants: For each size (s) in S, we randomly sampled a subset of genotype data (Gs) containing s SNPs. We used Gs as input data and PC loadings (PC1, PC2) as the proxies of geographical structure. We split the dataset Gs into train and test data in the ratio of 75:25. We performed hyperparameter tuning using Bayesian optimization on train-test split data to obtain the optimized neural network architecture (Supplementary Tables S5 and S6). We then evaluated the performance of the optimized architecture on 25 randomly sampled genotype data subsets Gs and recorded the MSE and R² metrics on both train and test data (Supplementary Algorithm S1 and Supplementary Table S7). The optimal window size was chosen to minimize the difference in MSE and R² between the train and test data, ensuring robust and generalizable performance across the genome (Figure 4A, Part 1). With the optimal window size (s = 30000) and corresponding optimal neural network architecture (Supplementary Table S6) obtained for each continental group. Next, for each continental group, we partitioned the genome containing \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${M_{SNP}}$\end{document} into N non-overlapping segments of size 21000, except the first and last segments. This resulted in 263, 150, 171 and 161 genomic segments in African, European, South Asian and East Asian populations, respectively. For each segment, the sliding window approach incorporates neighboring segments (left and right) and advances in 1000 SNP increments starting from the left neighbor segment and slides over the right neighbor segment, ensuring that each genetic marker within the segment of interest is represented in 10 consecutive sliding windows of size 30000 SNPs. After training the optimal neural network on each window, we estimated the contribution of input features (genetic variants) in predicting the principal component loadings (PC1, PC2) across ten sliding windows. For each segment of interest, we obtained a feature importance matrix Q corresponding to each of PC1 and PC2 (Figure 4A, Part 2; Supplementary Figure S1 and Supplementary Algorithm S1). Notably, the genetic variants within the first and last segment will not have representation in each of the ten sliding windows. Identification of genomic regions under polygenic adaptation Following the estimation of the feature importance (Q) corresponding to genomic segments within each continental group, we aimed to identify the outlier genomic regions potentially under polygenic adaptation. Based on evidence from the Cullen and Frey plot from the fitdistrplus package (63), we found that a lognormal distribution is a good proxy for the observed feature importance distribution. Therefore, for each segment within the continental groups, a lognormal distribution is fitted over a positively skewed normalized feature importance vector for the jth column of feature importance matrix Q (j = 1,2,..,10) and estimated the P-values, which resulted in the P-value matrix P of the same size as Q. These P-values were aggregated using a trimmed mean across ten windows to obtain an aggregated P-value matrix \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${P_{mean}}$\end{document}. The matrix \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${P_{mean}}$\end{document} for each segment captures the statistical significance regarding the contribution of each genetic locus to the prediction of PC1 and PC2, with P-values close to zero indicating that the genetic locus is putatively under polygenic adaptation (Supplementary Algorithm S2). To pinpoint outlier genomic regions harboring potential signatures of polygenic adaptation, we leveraged the Matrix Profile algorithm (64), a data structure initially developed for identifying anomalies in time series data and with potential applications in genomics (https://www.cs.ucr.edu/%7Eeamonn/MatrixProfile.html). The principle is that genomic regions containing genetic loci under polygenic selection should exhibit distinct patterns compared to regions under neutral evolution. For each segment, we applied the matrix profile algorithm to the P-value matrix P using a sliding window of 5 SNPs, a subsequence length we determined to yield the highest correlation between P-values and Euclidean distances in a sample of 50 genomic segments across each continental group (Supplementary Figure S3). The algorithm calculates the Euclidean distance between a 5-SNP subsequence and all other subsequences of the same length within the genomic segment and stores the minimum Euclidean distance. This process iterates across the entire genomic segment and generates a profile of distances for subsequence starts at each position. For each segment within the continental groups, we extracted the top 1% of genetic loci based on the Euclidean distances and defined outlier regions as 5-SNP subsequences starting at each outlier genetic locus. This resulted in a matrix of outlier genomic regions corresponding to PC1 and PC2. The representative P-value of the outlier genomic region is defined as the minimum of the mean P-values of genetic loci in the genomic region. Following the genome-wide scan in each continental group, we applied a Bonferroni correction (alpha = 0.05/(N)) to account for multiple segments, which resulted in a refined set of population-specific genomic regions exhibiting significant evidence of polygenic adaptation (Figure 4A, Part 2; Supplementary Algorithm S2). Assessment of shared genomic signals across continental groups To investigate the extent of shared adaptive signals, we examined whether genomic regions identified as outliers in one continental group showed evidence of adaptation in other groups. For each continental group, we derived an empirical distribution of the statistic, defined as the weighted average of the maximum and minimum P-values of the SNPs within the outlier genomic regions. For each genomic region under polygenic adaptation in one group, we calculated the defined statistic in the other continental groups. If the statistic does not lie in the tails of the empirical distribution of the continental group under consideration (P-value ≥ 0.05), we inferred that the region is potentially under adaptation in the tested continental groups. Enrichment analysis We have used GREAT (65) software to perform the enrichment analysis of genomic regions under polygenic adaptation. We used the Binomial test (adjusted P ≤ 0.05), Hypergeometric test (adjusted P ≤ 0.05), observed region hits ≥ 5 and 2-fold enrichment to select the enriched GO biological processes. We then used Revigo (66) to generate the network of the GO biological processes. Data and materials availability GenomeAsia 100k project (GA100K) (56) individual VCF files are available from the European Genome Phenome Archive under accession ID EGAS00001002921. From the GA100K dataset, we extracted 691 individuals from South Asia and 697 individuals from East Asia. In the South Asia dataset, we extracted individuals from mainland India belonging to four ancestral groups: ancestral north Indians, ancestral south Indians, ancestral Austroasiatics and ancestral Tibeto-Burmans (67). From the 1000 genomes project dataset (54), we removed 630 related individuals (first and second degree). We merged the Human Genome Diversity Project (55) and 1KGP datasets and extracted 784 individuals of African ancestry and 680 individuals of European origin. We started with 6060391 autosomal markers for South Asia and East Asia and 20744298 autosomal markers for Africa and Europe. To implement RAISING for each continental group, we filtered genotype data with MAF ≥ 5%, call rate 100% and Hardy–Weinberg, P ≤ \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${10^{ - 8}}$\end{document}. This resulted in 3599192 SNPs for South Asians, 3375592 SNPs for East Asians, 5526442 SNPs for Africans and 3141384 SNPs for Europeans. We used PLINK (v2.0) (68) to conduct QC and data preparation to perform PCA and detect signals of polygenic adaptation. RAISING is implemented in Python (v3.9) and utilizes the following packages for various tasks: pandas (v1.5.2), numpy (v1.23.5), TensorFlow (v2.11.0), Keras (v2.11.0), KerasTuner (v1.1.3), scikit-learn (v1.0.2), pysnptools (v0.5.10) and SHAP (v0.41.0). These packages were used for data wrangling, hyperparameter tuning, model training and feature selection. We used the stumpy (v1.12.0) package to implement the matrix profile algorithm for identifying outlier genomic regions. The ggplot2 (v3.4.0) package in R is used to prepare the figures. Principal component analysis To perform PCA, we have used the pipeline described in the GA100K project. For each continental group, we conducted variant-level QC of the data using the following criteria: MAF ≥ 1%, call rate ≥ 98%, Hardy–Weinberg equilibrium, P-value ≤ \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${10^{ - 8}}$\end{document} and linkage disequilibrium pruning with a sliding window of 50 SNPs and a window increment of 5 SNPs. For any pair of SNPs in the window with r2> 0.2, the first SNP of the pair was removed. After QC, we retained 563537 variants for South Asian populations, 478573 variants for East Asian populations, 1228965 variants for European populations and 2571702 variants for African populations. The QC steps and PCA were conducted using PLINK (v2.0) (68). Results We found that model-based hyperparameter tuning methods outperformed random search-based methods. RAISING outperformed the existing GEA methods on previously published and newly simulated datasets. Notably, RAISING demonstrated the transferability of optimized neural network architectures across genomic regions and across the simulation replicates which significantly reduced the computational time. Finally, the results of a genome-wide implementation of RAISING using a sliding window approach identified the genomic signals of polygenic adaptation across African, European, South Asian and East Asian populations, highlighting unique signatures in African populations compared to non-Africans. Model-based hyperparameter tuning yields superior performance and transferability across genomic regions We performed hyperparameter tuning on a genomic region (chr2:135989231–137089231(hg19)) and obtained optimal ANN architectures with minimum log10(MSE) estimates of −2.9385 for Bayesian, −2.9480 for Hyperband and −3.1969 for RSLM (Supplementary Table S1 and ‘Materials and methods’ section). Following the training of optimized ANN architectures from each algorithm on a random sample of 50 genomic regions, the average log10(MSE) and standard error (SE) of log10(MSE) after 100 epochs on the training datasets were (−2.66, 0.034) for Bayesian, (−1.134, 0.0105) for Hyperband and (−2.695, 0.0308) for RSLM (Figure 1C). The average log10(MSE) and SE of log10(MSE) after 100 epochs on the test datasets were (−2.575, 0.0301) for Bayesian, (−1.1232, 0.0109) for Hyperband and (−2.614, 0.0276) for RSLM (Figure 1C). A repeated measures ANOVA on MSE from training and test datasets after 100 epochs suggests a significant difference between the hyperparameter tuning algorithms (P-value < \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${10^{ - 16}}$\end{document}). Post-hoc tests, using pairwise paired t-tests with Bonferroni correction, indicate a significant difference between (Hyperband and RSLM) and (Hyperband and Bayesian) on training and test datasets (P-value < 2.2e-16). However, there is no significant difference between the RSLM and Bayesian algorithms on the training or test dataset (P-value = 1). The execution time of RSLM was ∼4 h, given that 1000 trials of random search methods were performed. Bayesian optimization execution time increased exponentially with the number of trials and took approximately 1 h for 200 trials, 3 h for 300 trials and 8 h for 500 trials. Hyperband performed 1000 trials in ∼2 h (Supplementary Table S2). RAISING, a two-stage, automated DL framework. Panel (A) represents the workflow for implementing STAGE 1 of the RAISING, which performs hyperparameter tuning to identify the optimum neural network architecture. The workflow requires the specification of dataset for supervised learning along with the supervised learning task. The framework generates a NASS, uses a hyperparameter tuning algorithm and specifies loss function and metrics depending on the learning task. Then, it performs hyperparameter tuning to select the optimum architecture, which optimizes the loss function using K-fold cross-validation or train-test split of the dataset. Panel (B) represents STAGE 2 of RAISING, which performs the feature selection and prediction tasks. STAGE 2 performs the N iterations of training the optimized neural network architecture obtained from STAGE 1 on the entire dataset. Then, estimates the average of feature importance, weights and bias parameters over N iterations to mitigate the effect of random initialization of the weights and bias parameters in the network during model training. STAGE 2 outputs the feature importance, and the predictive model consists of average weights and bias parameters. (C) Averaged log10 transformed MSE (y-axis) of Hyperband, Bayesian and RSLM hyperparameter tuning algorithms for 100 epochs (x-axis) on training and test datasets obtained from 50 random sampled genomic regions. Enhanced TPR and computational efficiency of RAISING in detecting genetic loci under polygenic adaptation Comparison of RAISING with existing methods using published simulated data We used the simulated data ((32); ‘Materials and methods’ section) to investigate the performance of RAISING, ridge regression (RIDGE) (69), PGLS (70) and DeepGenomeScan (43). For the quantitative trait QT1, the average TPR of RAISING was 0.606, PGLS was 0.372 and RIDGE was 0.110. For trait QT2, the average TPR of RAISING, PGLS and RIDGE were 0.986, 0.891 and 0.877, respectively. For trait QT3, the average TPR of RAISING, PGLS and RIDGE were 0.322, 0.128 and 0.027, respectively (Figure 2.2A). The overall FPR of RAISING was 0.0018, PGLS was 0.0019 and RIDGE was 0.0016 (Figure 2.2B). The overall (1 − precision) of RAISING was 0.084, PGLS was 0.115 and RIDGE was 0.120 (Figure 2.2C). The Kruskal–Wallis test for each trait, suggested a significant difference in TPR between algorithms (P-value<10−10). On comparing RAISING with the existing DL approach DeepGenomeScan, we found RAISING to be time-efficient and to have higher average TPR in detecting genetic loci than DeepGenomeScan. RAISING achieved a relative increase in TPR corresponding to three quantitative traits (QT1 = 10%, QT2 = 1%, QT3 = 28%) compared to DeepGenomeScan (Supplementary Table S3). The execution time of RAISING on 100 simulated replicates was ∼2 h, whereas the execution time of DeepGenomeScan was 121 h (Supplementary Table S4). The execution time of DeepGenomeScan increased linearly with the number of environmental factors and simulation replicates. The main factors contributing to the increased TPR and 60-fold faster execution of RAISING are the transferability of ANN architecture across simulation replicates and the implementation of a multi-output regression approach to model the relationship between genotype data and environmental factors (‘Materials and methods’ section). Application of RAISING on existing simulated datasets and comparison of RAISING with PGLS and ridge regression (RIDGE) for detecting genetic adaptation. Panel (2.1) represents the pipeline that implements STAGE 1 of RAISING to perform hyperparameter tuning on a sampled simulation dataset for selecting the optimal neural network architecture. Then, STAGE 2 of RAISING was implemented on each of the 100 simulation replicates, resulting in the feature importance of genetic loci across ten environmental factors. For each replicate, genetic loci are then classified as selected or neutral and compared with the actual labels of genetic loci to estimate the TPR, FPR and (1 − precision). In panel (2.2), the figures show the TPR distribution of RAISING, PGLS and RIDGE for each quantitative trait (A) and the overall FPR (B) and (1 − precision) (C) distributions corresponding to RAISING, PGLS and RIDGE. Comparison of RAISING with existing methods on new simulations involving complex demographic history We simulated the effect of environmental factors on the evolution of polygenic trait under three demographic models: D1 (Figure 3.2A), D2 (Figure 3.2B) and D3 (Figure 3.2C). We have compared the TPR and (1 − precision) of RAISING with the pcadapt (31) and ridge regression (RIDGE) (69) (‘Materials and methods’ section). Workflow for conducting new simulations and comparison of RAISING with pcadapt and ridge regression (RIDGE) for detecting polygenic adaptation. Panel (3.1) shows the pipeline that simulates the demographic history of populations using msprime, which produces the tree sequences with mutations for demographic models (D1, D2, D3); the tree sequences are then annotated with SLiM metadata using PySLiM, and then tree sequences are loaded into SLiM which introduced selection gradient (linear, quadratic) for a specified selection duration (200, 400, 600, 800 and 1000 generations) and produced VCF files containing genomic data of 1250 sampled individuals. Panel (3.2) shows the demographic model setup in msprime. Panel (A) represents the 2D stepping stone demographic model 1 (D1). (B) The demographic model 2 (D2) consists of five ancestral populations with constant effective population sizes. (C) The demographic model 3 (D3) consists of five ancestral population faced population bottlenecks, expansion and decline in the past. Panel (3.3) shows the arrangement of populations on a 2D grid under demographic models D1 (A), D2 (B) and D3 (C) after loading the msprime generated tree sequences into SLiM. Panel (3.4) shows the trend of TPR and (1 − precision) of RAISING, pcadapt and ridge regression along with 95% CI in both linear and quadratic environmental gradients under demographic models D1 (A), D2 (B) and D3 (C); the x-axis represents the time period for which selection gradient was affecting the fitness of individuals. Refer to Figure 1 for the RAISING implementation on simulation replicates. Demographic Model D1 Under a linear environment, RAISING showed a relative increase in average TPR ranging from a 2-fold increase at 200 generations (pcadapt:0.1680, RAISING:0.3527) to a 3-fold increase at 1000 generations compared to pcadapt (pcadapt:0.0906, RAISING:0.2838). The trend was similar for the quadratic environment, with average TPR ranging from approximately a 2-fold increase at 200 generations (pcadapt:0.1721, RAISING:0.3102) to 1000 generations (pcadapt:0.1385, RAISING:0.2957). RAISING consistently had a lower average (1 − precision) across all generations compared to pcadapt and ridge regression in the quadratic gradient. In the linear gradient, pcadapt had a slightly lower average (1 − precision) than RAISING post 400 generations with overlapping 95% confidence intervals (CIs) (Figure 3.4A). On comparing RAISING with DeepGenomeScan, we found that RAISING consistently had higher average TPR and lower average (1 − precision) across all generations and environments. Under a linear environment, RAISING had approximately a 2-fold increase in average TPR at 200 generations (RAISING:0.3527, DeepGenomeScan:0.2083), which increased up to 5-fold at 1000 generations (RAISING:0.2838, DeepGenomeScan:0.0606). The pattern remained similar in the quadratic environment, with average TPR ranging from ∼2-fold at 200 generations (RAISING:0.3102, DeepGenomeScan:0.1995) to a 7-fold increase at 1000 generations (RAISING:0.2957, DeepGenomeScan:0.0421) (Supplementary Figure S11). Demographic Model D2 Under a linear environment, at 200 generations, RAISING’s average TPR was 0.2965, ∼6-fold higher than pcadapt’s average TPR of 0.0501, and continued to be higher across the generations with the smallest relative increase being 2-fold at 400 generations (pcadapt:0.08, RAISING:0.1650) and the most considerable 10-fold change at 1000 generation (pcadapt:0.0201, RAISING:0.2010). Under a quadratic environment, RAISING initially showed a 72% higher average TPR at 200 generations (pcadapt:0.1930, RAISING:0.333), despite a dip below pcadapt at 400 generations (pcadapt:0.3481, RAISING:0.3284), RAISING’s TPR increased and had ∼6-fold higher average TPR compared to pcadapt at 1000 generations (pcadapt:0.0578, RAISING:0.2662). RAISING had approximately 84% lower average (1 − precision) in a linear environment than pcadapt at 200 generations (pcadapt:0.4886, RAISING:0.077). The quadratic environment had a similar trend, with RAISING having average (1 − precision) 63% lower than pcadapt at 200 generation (pcadapt:0.316, RAISING:0.1164). Over time, (1 − precision) for RAISING increased but remained much lower than pcadapt. Both pcadapt and ridge regression showed an increasing trend in (1 − precision) over time, reaching close to one (Figure 3.4B). Demographic Model D3 In a linear environment, at 200 generations, RAISING’s average TPR was 0.1750, approximately 89% higher than pcadapt’s average TPR of 0.0926, maintaining a superior performance across generations. The most significant margin was observed at 600 generations, with RAISING’s average TPR 0.3105 being ∼17-fold higher than pcadapt’s average TPR 0.0186. In the quadratic environment, RAISING demonstrated a 24% higher average TPR at 200 generations (pcadapt:0.2570, RAISING:0.3196) and significantly higher average TPR across other generations except for the 400th generation (pcadapt:0.3855, RAISING:0.33). Regarding (1 − precision), RAISING consistently showed a lower average (1 − precision) than pcadapt in both environments. At 200 generations, RAISING’s average (1 − precision) was ∼53% lower in the linear environment (pcadapt:0.865, RAISING:0.407) and 60% lower in the quadratic environment than pcadapt (pcadapt:0.6408, RAISING:0.2568). RAISING’s average (1 − precision) remained significantly lower than pcadapt and ridge regression across generations (Figure 3.4C). Across the three demographic models, statistical analysis using ANOVA for a linear regression model with interactions indicated that RAISING is significantly superior to pcadapt and ridge regression in terms of TPR and (1 − precision) (P-value < \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${10^{ - 15}}$\end{document}). In D1, we found no significant interaction between the algorithm’s TPR and environments or selection durations, suggesting these factors do not affect the algorithm’s TPR in detecting the genetic loci. However, there was a significant interaction between the algorithm’s (1 − precision) and environments and selection durations (P-value < 0.001), indicating these factors affect the algorithm’s error rate under demographic model D1. In D2, we found a significant interaction between environments and the TPR of algorithms (P-value< \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${10^{ - 8}}$\end{document}), indicating varying environmental conditions affect the algorithm’s TPR under demographic model D2. There was also a significant interaction between the algorithm’s (1 − precision) and selection durations (P-value < \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${10^{ - 6}}$\end{document}), indicating varying selection durations affect the algorithm’s error rate under demographic model D2. In D3, we found a significant interaction between the TPR of algorithms and environments, selection duration (P-value < \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} ${10^{ - 8}}$\end{document}), indicating varying environmental conditions and selection periods affect the algorithm’s TPR under demographic model D3. We also found a significant interaction between the algorithm’s (1 − precision) and environments (P-value < 0.01), indicating varying environments affect the algorithm’s error rate under demographic model D3 (‘Materials and methods’ section). Under demographic model D1, we have also performed the neutral evolution and implemented RAISING to estimate the FPR in linear and quadratic environment. We observed that RAISING had consistently low average FPR, which ranges from 0.00027 at 200 generations to 0.00014 at 1000 generations under linear environment, and 0.00022 at 200 generations to 0.00017 at 1000 generations under quadratic environment (Supplementary Figure S9). The designed simulations, encompassing multiple demographic histories (D1–D3), environmental gradients (linear, quadratic) and selection durations (200–1000 generations), revealed a complex interplay of factors influencing the TPR and (1 − precision) of methods in detecting signals of polygenic adaptation. Notably, RAISING consistently outperformed both pcadapt and ridge regression, demonstrating higher TPR and lower (1 − precision) across all the simulated scenarios. Genome-wide detection of polygenic adaptation signals with RAISING: a sliding window approach In simulations under demographic model D1, we tested the use of PC1, PC2 as a proxy of actual environments and found that PCs can reliably detect the genetic loci under polygenic selection with high R-squared (between PCs and actual environments) close to 0.9 in linear and 0.8 in quadratic environments. We observed that across all generations in both linear and quadratic environments, PC coordinates can reliably detect the genetic loci under adaptation, with TPR and (1 − precision) close to the estimates obtained from the use of actual environments (Supplementary Figure S10). Thus, for each continental group: African, European, South Asian and East Asian populations, we performed the PCA and labeled each individual with corresponding PC1 and PC2 loadings, which were used as proxies for geographical coordinates (‘Materials and methods’ section; Supplementary Figure S4). We then modeled the relationship between WGS data and (PC1, PC2) loadings using a sliding window method to perform genome scans using RAISING for identifying genomic signals of polygenic selection (Figure 4A). Application of RAISING on the WGS data of each continental group using a sliding window method. Panel (A) describes the workflow of implementing RAISING for genome scans using a sliding window method. The pipeline was partitioned into two parts: Part 1 implements STAGE 1 of the RAISING to identify the optimal neural network architecture and the optimum window size. It implements STAGE 1 for a set of window sizes (SNPs) and selects the window size and corresponding architecture having the consistent MSE and R-squared when implemented the optimized architecture across 25 randomly sampled genomic regions from the genome. In Part 2, the genome gets partitioned into N non-overlapping segments, and for each segment the STAGE 2 of the RAISING was implemented using a sliding window method with ten sliding windows resulting in the feature importance estimates of genetic loci in the genomic segment under consideration. Then, a Bonferroni correction (0.05/N) followed by a Matrix Profile algorithm resulted in putative set of genomic regions under polygenic adaptation. Panel (B) shows the distribution of the MSE and R-squared when optimized ANN architecture corresponding to each window size was trained on train and test data from 25 randomly sampled genomic regions within the African, European, South Asian and East Asian populations. The observed optimum window size based on MSE and R-squared distribution was 30000 SNPs with generalizable ANN architecture across genome within each continental group. Optimizing window size and neural network architecture for sliding window implementation of RAISING in genome scans To implement RAISING for genome scans using a sliding window approach, we determined the optimum genomic segment size (window size) and the optimized neural network architecture for that window size. We observed that a window size of s = 30000 markers was optimum for each continental group, with relatively small MSE and R² metric differences between train and test data (Figure 4B and Supplementary Table S7). On average, the (MSEtrain, MSEtest) for the African populations was (0.74, 0.93), and the corresponding (R²train, R²test) was (0.895, 0.695). The European population exhibited an (MSEtrain, MSEtest) of (0.668, 1.091), while its (R²train, R²test) was (0.929, 0.504). For the South Asian population, the (MSEtrain, MSEtest) was (0.676, 0.772), and the (R²train, R²test) was (0.901, 0.783). The East Asian population’s (MSEtrain, MSEtest) was (0.526, 0.627), and the corresponding (R²train, R²test) was (0.947, 0.836). The observations around MSE and R-squared suggest that the architecture obtained for a window size of 30000 markers can be transferred across the genome (Supplementary Table S6; ‘Materials and methods’ section). Distinct patterns of polygenic adaptation revealed in African populations compared to non-African populations We identified 1959, 1268, 1201 and 1332 genomic regions under polygenic adaptation in African, European, South Asian and East Asian populations, respectively. The average size of the genomic regions identified was 4424 base pairs (bp) for Africans (Supplementary Dataset S1), 8425 bp for European (Supplementary Dataset S2), 7572 bp for South Asians (Supplementary Dataset S3) and 8360 bp for East Asians (Supplementary Dataset S4) (Figure 5A and Supplementary Figure S6). Of 1959 genomic regions identified in Africans, 69.07% were unique to Africans, 23.18% were shared between pairs of populations, 6.58% were shared among triplet populations, and 1.17% were shared among all continental groups. Of 1268 genomic regions identified in Europeans, 30.36% were unique to Europeans, 35.73% were shared between pairs of populations, 25.39% were shared among triplet populations, and 11.91% were shared among all continental groups. Of 1201 genomic regions identified in South Asians, 29.64% were unique to South Asians, 33.36% were shared between pairs of populations, 26.81% were shared among triplet populations, and 8.33% were shared among all continental groups. Of 1332 genomic regions identified in East Asians, 30.41% were unique to East Asians, 33.86% were shared between pairs of populations, 24.55% were shared among triplet populations, and 11.19% were shared among all continental groups (Figure 5A; ‘Materials and methods’ section). Enrichment analysis of the genomic regions showing signatures of polygenic selection. In the figure (A), the distinct population specific pattern of the selected genomic regions is shown. The violin plot indicates the size of the genomic regions selected in four continetal groups: Africa (AFR), Europe (EUR), South Asia (SAS), East Asia (EA). The proportion of unique and shared (paired, triplet and all) regions are depicted in pie chart, just above the population-wise violin plot. (B) The genomic regions are further classified into three categories based on the pattern of sharing across populations. Category 1 includes 423 regions shared across all four groups, and 1,837 regions shared between AFR and any non-Africa(non-AFR) populations. Category 2 includes uniquely shared within AFR populations. Category 3 incldues the regions (1001) shared only among non-African populations. We did not find any enriched GO terms in the regions uniquely selected among SAS, EA and EUR populations. (C) Enriched GO terms from the genomic regions of Category 1 are shown in the network diagram. The shaded GO terms are enriched from the regions shared across all four populations. (D) A gene–gene network prepared from the genomic regions uniquely selected among AFR. Transcription factor genes are shown in the dark shades. Genes belong to four different sub-graphs are denoted in four different shapes. (E) GO terms enriched in the regions only shared among non-Africans are shown, and clustered terms are highlighted. Enrichment analysis identifies biological processes under polygenic adaptation We classified the putatively selected regions into three broad categories: (i) regions that are shared between Africans and non-Africans (2260 regions), (ii) regions uniquely selected among Africans (1353 regions) and (iii) regions uniquely selected among non-Africans (1001 regions) (Figure 5B and Supplementary Table S9). A total of 55 GO terms were enriched in the regions belonging to Category 1 (Supplementary Dataset S5). These are related to broad biological functions like fertility and reproduction (GO:0001890: placenta development and GO:0046545: development of primary female sexual characteristics), metabolisms (GO:0045913: positive regulation of carbohydrate metabolic processes and GO:0046322: regulation of fatty acid oxidations) and adaptive immune responses (GO:0031664: regulation of lipopolysaccharide-mediated signaling pathway and GO:0031295: T-cell costimulation) (Figure 5C). Those biological processes have been identified as targets of selection in multiple selection scans of global populations (71,72). We also identified pathways important in neurophysiological functions, such as synaptic transmission and potassium ion transport, which could be important targets in the global adaptation process. A few GO terms (12 out of 55) GO:0007369 (gastrulation), GO:0006813 (potassium ion transport) and GO:0043502 (regulation of muscle adaptation) are enriched in the genomic regions, which show evidence of selection in all four continental populations (Figure 5C). Regions uniquely selected among the Africans show evidence of enrichment in GO terms (9 in total) related to the developmental and reproductive process (Supplementary Figure S7 and Supplementary Dataset S6). Upon deeper inspection, we identified that within the genesets, gene-specific transcriptional regulator (PC00264), intercellular signal molecule (PC00207) and Scaffold/adaptor protein (PC00226) are the majority ones, with 40.3%, 16.40% and 9.00%, respectively, an observation which is intriguingly different from other comparison groups (Supplementary Figure S8). Out of the 27 genes related to the transcriptional regulator protein, we noted the presence of genes from the SOX (SRY-related HMG-box) family, C2H2 zinc finger family and Homeodomain-binding family (Figure 5D). For the genomic regions belonging to Category 3, i.e. uniquely selected among the non-Africans, we identified enriched pathways related to pigmentation which are absent in the other two categories, and we recapitulated the findings on genes such as TYR and TYRP1 associated with melanin production, like previous studies (29). We also identified signatures of selection on genes related to energy metabolism (GO:0009267), carbohydrate biosynthetic process (GO:0043255) and pancreatic endocrine functions (GO:0031018), suggesting selection pressures due to changed diet and metabolism during the transition to agriculture. However, we noticed that a large proportion of enriched GO terms (16 out of a total of 37) are related to kidney functions and development (Figure 5E and Supplementary Dataset S7). We found no enriched GO biological processes in the regions uniquely selected among European, South Asian and East Asian populations with the defined criteria (‘Materials and methods’ section). Discussion In this study, we developed RAISING, a novel two-stage DL approach for detecting genomic signals of polygenic adaptation. RAISING first performs hyperparameter tuning to optimize the neural network architecture, followed by feature selection to identify genetic loci under polygenic selection. Initially, we compared various hyperparameter tuning methods to assess the robustness of corresponding optimized neural network architecture across genomic regions. We then compared the performance of RAISING with the existing GEA methods using published and newly designed simulations. This allowed us to investigate the challenges introduced by demographic history, selective pressures and selection duration (in generations) in detecting genomic signals of polygenic adaptation. We developed a sliding window approach for genome-wide application of on African, European, South Asian and East Asian populations genomic data to detect genomic signals of polygenic adaptation. Additionally, we performed enrichment analysis, identifying novel biological processes under adaptation. RAISING is designed to detect genomic regions under polygenic adaptation in response to the local environment. By leveraging the power of neural networks, RAISING effectively captures the complex patterns of ‘subtle allele frequency changes’ resulting from polygenic selection. Our approach separates hyperparameter optimization and model training for feature selection into two independent processes. This separation enhances computational efficiency and robustness in neural network architecture search, which is particularly beneficial when dealing with high-dimensional genomics data. In the first stage, RAISING identifies an optimal neural network architecture through hyperparameter optimization. In the second stage, RAISING uses this optimized architecture to perform training on the entire dataset, pinpointing genetic loci underlying polygenic adaptation. Notably, our multi-output regression approach allows RAISING to model the joint effect of multiple environmental factors on allele frequencies. This provides a more comprehensive understanding of the complex relationship between allele frequencies and the environment. Our evaluation revealed the superior performance of model-based hyperparameter tuning methods, specifically Bayesian optimization and RSLM, compared to the random search approach Hyperband. This superiority of model-based methods stems primarily from their ability to explore a larger hyperparameter space in a relatively smaller computational time, resulting in robust neural network architectures. We found that the optimized architecture obtained from a single genomic region could be effectively transferred to other regions. This demonstrates a key advantage of RAISING, significantly reducing the computational burden during genome-wide analyses. These findings underscore the importance of extensive hyperparameter optimization in achieving optimal performance of DL models in genomics. A suboptimal architecture can negatively impact downstream tasks like prediction and feature selection. While transfer learning offers the potential to bypass hyperparameter tuning when strong evidence for architecture transferability exists, our findings suggest that in the absence of such evidence, thorough hyperparameter optimization remains essential for developing robust and reliable models. In our evaluation using previously published simulated data, RAISING consistently outperformed PGLS, ridge regression and DeepGenomeScan in detecting genetic adaptation. RAISING demonstrated significantly higher TPR and lower (1 − precision) for each quantitative trait in detecting genetic loci under polygenic adaptation. Notably, RAISING substantially enhanced TPR and efficiency compared to DeepGenomeScan, an existing DL approach. The 60-fold reduction in execution time, coupled with increased TPR in detecting genetic loci under adaptation, highlights the effectiveness of RAISING’s extensive hyperparameter tuning, multi-output regression modeling and ability to transfer optimized neural network architecture across simulation replicates. However, it is essential to note that the published simulation used a simplified 2D stepping-stone model, which may not fully capture the demographic complexity of real-world populations. Additionally, the simulations assumed constant effect sizes for genetic loci underlying the polygenic trait and did not incorporate realistic population genetics parameters such as recombination and mutation rates. Therefore, further investigation is needed to assess RAISING’s performance under more complex and realistic evolutionary scenarios. We designed simulations incorporating three demographic models (D1–D3) with varying levels of complexity in demographic history, linear and quadratic environmental gradients, and varying selection durations (in generations) to investigate the challenges introduced by these factors in detecting polygenic adaptation. Across all scenarios, RAISING consistently outperformed pcadapt and ridge regression, demonstrating its robustness in diverse evolutionary scenarios. Our results suggest that accurately accounting for a population’s demographic history is crucial for identifying signals of polygenic adaptation. In the simplest model (D1), where populations share a similar genetic background, neither environmental variation nor selection duration substantially impacted the TPR of methods to accurately identify genetic loci under adaptation. However, in model D2, where populations originated from five distinct ancestral groups with constant population sizes, environmental variation significantly affected the TPR of methods, highlighting the importance of accounting for even relatively simple population structure. The impact of demographic history was most pronounced in the most complex model (D3). In D3, which shares the same genealogy as D2 but includes demographic events like population bottlenecks, declines and expansions, the scenario proved most challenging for accurately detecting polygenic adaptation. In this case, both environmental factors and selection duration significantly influenced the TPR of methods, suggesting that methods failing to account for such complex demographic history may miss true signals of adaptation and increase false discoveries. RAISING’s superior performance compared to other methods across all scenarios, particularly under the complex demographic model D3, suggests that DL frameworks can effectively capture signals of polygenic adaptation even when demographic history is intricate. This ability to bypass the need for explicit demographic model assumptions is a significant advantage of data-driven approaches like RAISING over traditional methods like pcadapt and ridge regression, which often rely on the assumption of simplified demographic models that may not accurately reflect the true evolutionary history of populations. We performed a genome scan using RAISING in a sliding window manner to detect genomic signals of polygenic adaptation in four continental groups: African, European, South Asian and East Asian populations. We found an optimal window size of 30000 SNPs consistent across all populations. However, the optimized ANN architecture corresponding to the optimum window size varied between populations, particularly in critical hyperparameters such as learning rate, dropout and regularization parameters (Supplementary Table S6). Despite allowing up to five hidden layers during hyperparameter tuning (Supplementary Table S5), we consistently observed that the optimal ANN architecture consisted of one hidden layer (Supplementary Table S6). This observation aligns with the universal approximation theorem (73), which states that even a single hidden layer with sufficient neurons can effectively capture complex patterns in the data. We implemented the ANN architecture across the genome for each continental group and identified genomic regions under polygenic selection. We observed that Africans have significantly more genomic regions under polygenic adaptation, with smaller genomic region size(base pairs) than non-Africans. Shared genomic region analysis revealed that ∼70% of the genomic regions identified in Africans are not shared with other continental groups. In non-African populations, ∼30% of the genomic regions are unique to them, while the remaining 70% of the genomic regions are shared across the continental group. The uniqueness of the African genomes has been observed in multiple studies of human genomic variation and natural selection (74–76). Previous studies observed a high genetic diversity among Africans, highly correlated with geography (77). Local adaptation has been identified as a primary factor contributing to the distinct signatures of selection in Africans (77–79). In the present study, we observed that the genomic regions uniquely showing signatures among Africans annotated to 76 genes and enriched in 9 biological pathways; while in the shared regions, we noted that the ratio of genes to GO is 321 genes to 55 GO and 154 genes to 37 GO among Category 1 and Category 3, respectively (Supplementary Dataset S5 and Supplementary Dataset S7). In Africans, ∼40% of the selected genes function in transcriptional regulation, compared to ∼8% across the genome (80). We hypothesize that these transcriptional regulator proteins can modulate a wide array of biological functions and can be under the target of selection in early evolutionary time, as it was enriched distinctly among the African populations (Supplementary Figure S8). The distinct patterns we observed between Africans and non-Africans could be due to the evolutionary history of modern humans. The African continent has been the only habitat of modern humans for ∼300000 years (81), whereas the post-OoA event led to the colonization of the rest of the world within the past 100000 years (2,82). The high proportion of shared genomic regions among non-African continental groups supports the OoA population dispersal model (75) and suggests that the founder effect may have resulted in shared patterns of genomic signals of polygenic adaptation. The unique genomic signals of polygenic adaptation in non-African populations are likely due to their encounters with novel and local environmental pressures throughout their evolutionary history. As in the current study, we noticed that besides the traits related to pigmentation and metabolism (28,83,84), many biological pathways related to renal development and functions are enriched only among non-Africans. Kidneys play a vital role in regulating myriad biological functions by maintaining fluid homeostasis at the systemic level (85,86). After the OoA event, anatomically modern humans faced several environmental changes, such as diets, population densities and pathogen exposure, which led to selective pressures on the genomes. We presume that as physiological functions such as fluid homeostasis and pH balance governed by kidneys interact with central pathways such as metabolism and inflammatory responses (86), genes that are involved in kidney functions and development become an important target of natural selection. DL algorithms hold great promise for addressing complex research questions in population genetics, even with datasets of moderate size. Our study demonstrates that with as few as 1250 individuals and ∼15000 loci, RAISING can detect a sufficient proportion of the true genomic signals of polygenic adaptation, particularly those with larger effect sizes. As more genome-wide data becomes available, the accuracy and TPR of RAISING are expected to improve in detecting genomic signals. One of the primary challenges in applying DL to genomics is the potential for overfitting and sensitivity to architecture choices. RAISING reduces the chance of overfitting by incorporating regularization, dropout and early stopping techniques (87) while emphasizing the importance of rigorous hyperparameter tuning to ensure robust and reliable models. Another challenge lies in the interpretability of complex DL models. While RAISING’s feature selection method offers some insight into the relative importance of genetic variants, future refinements could focus on developing more interpretable DL approaches for population genetics. While RAISING demonstrates significant promise, there are opportunities for further refinement. Integrating prior information in the literature, such as incorporating functional annotations or previously identified adaptive variants, could enhance RAISING’s ability to pinpoint genetic loci under adaptation. Integrating RAISING with the generative adversarial networks (GAN), which generate realistic synthetic data have been used to infer demographic model parameters (88), could further enhance the RAISING’s TPR. RAISING has shown promising results in identifying genetic loci undergoing polygenic selection within a local geographical space. However, environments with abrupt changes, where selective pressures vary significantly across short distances, might pose a challenge for RAISING. Future investigations could explore the method’s efficacy across a broader range of simulated demographic histories, environments and phenotypes to further refine and generalize its capabilities. Despite these areas for future exploration, RAISING represents a powerful tool for identifying genomic signals of polygenic adaptation, paving the way for a deeper understanding of the genetic architecture underlying adaptive traits. RAISING can be applied across other species to identify signals of polygenic selection. Beyond its demonstrated success in detecting polygenic selection, the RAISING framework shows promise for broader applications in population genetics. The method can be theoretically extended to GWAS and transcriptome-wide association studies, which could help identify genetic variants or gene expression patterns associated with complex traits and diseases. The RAISING framework has the potential to make significant contributions across various fields, advancing our understanding of complex biological processes. Supplementary Material