Genomic prediction using subsampling

Background Genome-wide assisted selection is a critical tool for the genetic improvement of plants and animals. Whole-genome regression models in Bayesian framework represent the main family of prediction methods. Fitting such models with a large number of observations involves a prohibitive computational burden. We propose the use of subsampling bootstrap Markov chain in genomic prediction. Such method consists of fitting whole-genome regression models by subsampling observations in each round of a Markov Chain Monte Carlo. We evaluated the effect of subsampling bootstrap on prediction and computational parameters. Results Across datasets, we observed an optimal subsampling proportion of observations around 50% with replacement, and around 33% without replacement. Subsampling provided a substantial decrease in computation time, reducing the time to fit the model by half. On average, losses on predictive properties imposed by subsampling were negligible, usually below 1%. For each dataset, an optimal subsampling point that improves prediction properties was observed, but the improvements were also negligible. Conclusion Combining subsampling with Gibbs sampling is an interesting ensemble algorithm. The investigation indicates that the subsampling bootstrap Markov chain algorithm substantially reduces computational burden associated with model fitting, and it may slightly enhance prediction properties. Electronic supplementary material The online version of this article (doi:10.1186/s12859-017-1582-3) contains supplementary material, which is available to authorized users.


Background
The use of genomic tools has become important for the genetic improvement of complex traits in plants and animals through genome-wide prediction (GWP). GWP provides an interesting solution for the selection of traits with low heritability, such as grain yield in crops and milk production in dairy cattle, as well as for traits that present challenging or expensive phenotyping.
Over the past decade, researchers have tried to overcome the pitfalls of increased computational burden associated with gains in prediction accuracy from GWP of complex traits. Increases in predictive ability (and computational burden) are often associated with better statistical learning properties, such as regularization and variable selection [1]. Hence models with an improved ability to identify patterns provide more robust predictions, but computational costs are involved.
In statistical learning, resampling techniques are common approaches used to turn weak learners into strong learners [2]. Gianola et al. [3] showed that bootstrapping aggregation could improve prediction accuracy of kernel-based genomic best linear unbiased prediction (GBLUP) model in genomic prediction of plant and animals. We hypothesized that a similar approach could apply to whole-genome regression methods, often referred to as the Bayesian alphabet [4].
Besides computational advantages offered by some resampling methods, these techniques may also help to overcome theoretical shortcomings of some of these Bayesian methods, such as the bias of BayesA [5]. The objective of this study was to evaluate the predictive and computational outcomes from the application of a resampling technique ensemble with the Gibbs sampler to a Bayesian ridge regression model.

Sampling procedures
In addition to the increasing number of markers available over time due to higher density single nucleotide polymorphism (SNP) arrays and even resequencing, computation challenges include the large number of samples from which those genotypes are taken [6]. The computational burden associated with large population sizes is more evident in plant breeding, where hundreds of crosses with large offspring are genotyped and selected every season using GWP. Sampling methods are often necessary to enable such complex statistical procedures in large datasets. Among those, two main classes of sampling techniques are Markov chain Monte Carlo (MCMC) and Bootstrapping.
The MCMC method is possibly the most popular Monte Carlo algorithm with application to linear models, providing a feasible framework to resolve high-dimensional problems (i.e., more parameters than observations) with moderate computer power [7]. Likewise, bootstrapping also provides an interesting framework for solving large-scale problems [8,9], particularly a method known as subsampling [10] used to reduce data dimensionality.

Gibbs sampling
Gibbs sampling is a widely used MCMC technique, applied in conjunction with Bayesian methods to generate the posterior distribution of the parameters. The posterior distribution is denoted as p ΘjX ð Þ, where Θ represents the set of unknown parameters Θ ¼ θ 1 ; ; θ 2 ; …; ; θ r f g , and X represents the data. The Gaussian model described in the following section, unknown parameters include the intercept ( μ ), the vector of regression coefficients ( b ) and variance components, as , whereas the observed data comprises the genotypic information (X) of individuals and phenotype (y), as X ¼ X; y f g: Gibbs sampling algorithms are based on updating each parameter with samples drawn from the full-conditional posterior distribution, one parameter at a time while holding every other parameter constant. Each parameter θ is sampled from where p θjX ð Þ denotes the posterior distribution of θ, the likelihood is expressed as f Xjθ ð Þ and the prior distribution of θ is π θ ð Þ. In most implementations, regression coefficients are sampled individually from normal distributions whereas variance components are sampled from scaled inverse chi-squared distributions [4,5]. Every time a parameter (i.e., regression coefficients and variance components) or a conjugated prior is updated, its value is stored as samples of the posterior distribution. The final Bayesian estimator is the expectation of the posterior distribution, obtained as the mean of the posterior distribution.

Bootstrapping aggregation
A natural strategy to increase prediction accuracy is to build and combine multiple prediction models generated from samples of a large dataset, averaging the outcome predictor [11]. Bootstrapping aggregation, or simply 'bagging' , is implemented in linear models by fitting the function f 1 x ð Þ; f 2 x ð Þ; …; f B x ð Þ with B bootstrapped samples of the dataset and the final model, with reduced variance, will be given bŷ Regression coefficients are stored each time the model is fitted, hence generating an empirical distribution of each parameter. Bagging parameters are obtained as the mean of this distribution.
With bootstrapping, when samples are obtained with replacement, the number of observations sampled is commonly the same size as the initial dataset, recognizing that some observations may be sampled more than once. When bootstrapping is performed with fewer samples than the original number of observations, sampling can proceed either with or without replacement. The latter case is known as subsampling.

Subsampling bootstrap Markov chains
MCMC and Bootstrap are usually implemented separately, such that some studies have attempted to compare the performance of these samplers [12]. Nevertheless, both methods can be co-implemented. A co-implementation that is becoming popular in the context of big data is a technique known as subsampling bootstrap Markov chain (SBMC). In this algorithm, the Markov chain update mechanism is performed upon a subset ( x ) of the whole data (X) and a different subset is used to update the parameters in each round of MCMC. Therefore, each parameter is sampled from the posterior distribution The concept of subsampling Gibbs sampler was first presented by Geyer [13] and some predictive properties were further investigated by MacEachern and Peruggia [14]. Regarding the applications to genome-wide prediction of complex traits, SBMC can be used to update the regression coefficients [15], hence increasing the computational performance of model fitting.

Statistical model
The family of whole-genome regression methods is a standard set of models widely applied for genomic prediction [4]. Among these, Bayesian ridge regression is a regularized model that assigns the same variance to every marker. The linear model is described as follows: where y is the response variable (i.e., the phenotypic information), μ is a scalar representing the intercept, X is the genotypic matrix coded as {0,1,2} for {AA, Aa, aa} where rows correspond to the genotypes and columns correspond to the molecular markers, b is a vector of regression coefficients that represents the additive value of allele substitutions, and e is the vector of residuals. In this model, both regression coefficients and residuals are assumed to be normally distributed as beN 0; Iσ 2 b À Á and eeN 0; Iσ 2 e À Á . The variances are assumed to follow a scaled inverse chi-squared distribution with a given prior shape (S) and prior degrees of freedom (ν), thus Þand σ 2 e eχ À2 S e ; ; ν e ð Þ. High-dimensional methods are regularized to enable fitting the model without losing predictive properties [2]. The regularization of linear models occurs by shrinking regression coefficients, which also biases predictions downwards [1]. The Bayesian ridge regression attempts to estimate regression coefficients with the minimum bias necessary for a satisfying prediction (i.e., minimum variance), a solution referred to as best linear unbiased predictor [4,5]. As an optimization problem, the loss function to be minimized by the model (equation 4) that balances variance and bias is described as where λ is the regularization parameter, the ratio between the residual variance and the genetic variance of marker effects, as λ ¼ σ 2 e =σ 2 b . For the model in consideration, the regularization parameter assumes a single value for all regression coefficients.

Coefficient update
Sorensen and Gianola [16] show that the full conditional distribution of regression coefficients for Gibbs sampling from a normal distribution has a closed form. The expectation is derived from the Cholesky decomposition of the left-hand side (LHS) of the mixed model equation. The computational cost of operations such as solving the mixed model equation is described in terms of n observations and p parameters. The cost associated with the Cholesky decomposition is p 3 , making it computationally unfeasible for high-dimensional problems (p≫n), such as whole-genome regression methods. On the other hand, the Gauss-Seidel residual updating (GSRU) algorithm [15] has a computational cost of 3pn , which is much lower than for the Cholesky decomposition in this scenario. A Gibbs sampler based on GSRU updates the j th regression coefficient as where x j is the vector corresponding to the j th marker and Ã represents the data and all parameters other than the one being updated. The coefficient update is followed by update of the vector of residual The greatest advantage of GSRU comes from the low computational cost of updating the right-hand side (RHS) of the mixed model equation [15], solving the linear system one parameter at a time without computing X'X. Subsequently, variance components are updated as where S e , ν e , S b , and ν b correspond to the prior parameters "shape" and "degrees of freedom" of the residual and genetic variance, respectively.

SBMC extension
We here propose incorporating subsampling into the Gibbs sampler. This variation implies sampling a ψ fraction of the data ( ψ ∈ ½0; 1 ) to update regression coefficients and residual variance in each round of MCMC. For a matter of notation, let X e and e e represent the bagged subsamples, in other words, a fraction of X and e that contains ψ percent of observations sampled at random in a given round of MCMC. This modified GSRU would have an expected computational cost of 3pnψ.
To accommodate bagged samples, sampling algorithms of regression coefficients and residual variance undergo a slight modification. Regression coefficients are updated or sampled as with subsequent residual update The entire k th round of MCMC is updated using the subsampled dataset x k ¼ fX e; e eg . Since the residual variance is a function of the number of observations, its update is slightly modified from equation 8 as The sampling procedure above assumes that the variance associated to markers in the subsamples are approximately the same as in the whole data (σ 2 x e ≈σ 2 x ). That is, the marker sum of squares (x'x) is expected to reduce linearly according to the proportion of bag samples (ψx'x) to avoid recalculating the sum of squares of bagged markers (x e ′ x e) for each round of MCMC. In genetic terms, the subset is assumed to have the same allele frequencies as the whole set.
The SBMC algorithm is implemented in the R package bWGR [17] using the R 2 rule proposed by Pérez and de Los Campos [18] to estimate prior shapes using the whole data, based on R 2 ¼ 0:5, with the values of prior degrees of freedom set as ν e ¼ 5 and ν b ¼ 5. In the R 2 rule [18], prior shapes are estimated as and Dataset Three datasets available on R packages [18,19] were chosen to demonstrate the effect of bagging on genomic prediction, including a wheat panel from the International Maize and Wheat Improvement Center (CIM-MYT), as the median of grain yield observed in four environments [20]; a mouse panel designed to study body mass index [21] but using only half the SNP panel obtained by skipping every other marker; a soybean panel with eight bi-parental families with elite parents from the SoyNAM project [19] with phenotypes observed in eighteen environments; and a simulated F 2 population with 10 chromosomes of 50 cM each, genotyped at density of 1 SNP/cM, and with one QTL every 10 cM placed between markers. Heritability of traits was computed by restricted maximum likelihood (REML) upon the animal model with additive kernel [22]. Markers with minor allele frequency below 0.05 were removed. Datasets are summarized in Table 1.

Prediction metrics
Prediction statistics were obtained with a 10-fold cross validation scheme. We fitted the Bayesian ridge regression model using subsampling from 25 to 100%, by increment of 1%, with and without replacement. We set the algorithm for 4000 MCMC iterations to ensure convergence [16], with 500 of burn-in [18].
To determine the efficacy of subsampling, we evaluated the mean square prediction error (MSPE), prediction bias as the slope of linear regression between predictions and observations (β y;y ), computation time in minutes, and predictive ability as the Pearson's correlation between predictions and observations (Cor y;y ).

Results
The mean outcome of prediction metrics across datasets is presented in Fig. 1. The results by individual dataset are presented in the Additional file 1. Numeric results for some proportions of subsampling are presented in Table 2.

Computational improvement
The computational time had a linear response to subsampling (Fig. 1d). As expected, subsampling is clearly beneficial to speed up the computation of model fitting. The same trend was observed for individual datasets (Additional file 1). Although our evaluation of the improvement of computational performance used relatively small datasets, we believe the results must hold for larger datasets.
In comparison to fitting the model with whole data (Table 2), the computation time to fit the model at 50% subsampling was 33.6% faster with replacement and 58.3% faster without replacement. Yet, the computational cost was less than expected, once 3pnψ with ψ ¼ 0:5 should provide a model fitting 100% faster. This difference can be attributed to the computational cost of the sampling process along with the fixed cost of the initial problem settings. Computationtime 100% faster was achieved for subsampling 33% (or less) without replacement.
Interestingly, subsampling with replacement presented a slightly higher computational cost, also presenting worse predictive properties for subsampling lower than 40% or higher than 60%.

Implications of subsampling on prediction parameters Bias
The use of the complete dataset was nearly unbiased ( Table 2). Subsampling with replacement was biased downwards, presenting the least bias at 40% replacement (β y;y ¼ 0:824). Subsampling without replacement presented slight upward bias, being 1.8 and 5.8%  [23] more biased than the complete dataset at 33 and 50% subsampling, respectively.

Predictive ability
Across datasets (Table 2), the loss in predictive ability was negligible. Correlation between predictions and observations decreased 0.2% by subsampling with replacement at 50% subsampling, and 0.4% without replacement at both 33 and 50% subsampling.

MSPE
The negative impact on MSPE due to subsampling was also negligible. An increase of 0.3 and 0.2% were observed at 33 and 50% subsampling without replacement ( Table 2). The impact of subsampling on MSPE was slightly higher with replacement, increasing 1.76% at 50% subsampling.

Dataset specific analysis
Although negligible, we observed a slight improvement in predictive ability and MSPE for all datasets at some optimal subsampling point. The optimal subsampling and respective improvement in predictive ability and MSPE are presented in Table 3.

Prediction machinery
Any algorithm that enhances prediction or computation performance is valuable for machine learning. At its optimal utilization, SBMC has the potential of improving prediction while reducing the computational cost [14]. However, reported results vary regarding any prediction  improvement provided by subsampling [8,24]. Subsampling has not been investigated in big data, for neither large n nor large p , and that is a specific niche where subsampling may work best.
Previous studies indicate that there are no guarantees that SBMC will improve prediction, but it at least provides results equivalent to the whole dataset; however, we showed that subsampling can also provide a positive outcome for genomic prediction besides the computational aspects (Table 3), where the improvement reached 2.5% for the mouse data. We recommend including a bagging WGR with 50% subsampling without replacement in cross-validation studies looking for the most accurate prediction model.

Random data
An interesting statistical property provided by SBMC is that data is sampled from a larger set, which is associated with that definition of a random term. This occurs because the observations used to update parameters are sampled from the empirical distribution of the data. This property violates the Bayesian assumption that data are given.
In classical Bayesian analysis, inferences are made based upon the posterior distribution of parameters given data, whereas random data implies that the parameters are sampled from the distribution of parameters given the current state of data. MCMC drives the posterior towards a relative entropy, possibly with larger sample variance associated with the continuous resampling used to update parameters with different subsets of data, but without obvious implications for the interpretation of the results [25].

Incompleteness of data
Geyer [26] discussed the issue of subsampling Markov chains concluding "one does not get a better answer by throwing away data." Nevertheless, he emphasizes that the value of the technique is 1) the reduction of dimensionality of n , and 2) the reduction of auto-correlation among chains.
Our counterargument is that the all data are used in the course of model fitting, although not simultaneously. In addition, accurate estimates are obtained when the subsampling strategy is used correctly [14]. We show that subsampling is a valid approach for genomic prediction purposes to fit high-dimensional models (p≫n).

Future directions
Subsampling uses only part of the data to fit the model in each MCMC round, that enables the computation of prediction statistics with the subset left out, which is referred to as out-of-bag statistics (OOB) [27]. The information provided by OOB is similar to the outcome of a cross-validation, with the advantage of being computed during the model fitting. Therefore, OOB could be used to re-weight observations (i.e., boosting). Another possibility is to adapt SBMC to other learning methods, such as elastic net [28], where OOB statistics could be utilized in the search for the tuning parameters without having to perform explicit cross-validation [29].
Conclusion SBMC decreases computation time without compromising prediction properties. We observed that subsampling approximately 33-50% without replacement and 40-60% with replacement in each round of MCMC is advantageous for fitting the model. Subsampling can dramatically reduce computational burden with little reduction in accuracy and, in some cases, enhanced predictive properties. This study provides insight into a general method for incorporating a particular type of bagging ensemble into the Gibbs sampling of wholegenome regressions.

Additional file
Additional file 1: Results presented by individual dataset Figure S1. Time to fit the model (y axis) varying the subsampling method (x axis). Figure S2. Prediction ability (y axis) varying the subsampling method (x axis). Methods include Bayesian ridge regression (BRR) with regular sampler, and SBMC subsampling from 25 to 100%, with and without replacement. Figure S3. Mean squared prediction error (y axis) varying the subsampling method (x axis). Methods include Bayesian ridge regression (BRR) with regular sampler, and SBMC subsampling from 25 to 100%, with and without replacement. Figure S4. Bias (y axis) varying the subsampling method (x axis). Methods include Bayesian ridge regression (BRR) with regular sampler, and SBMC subsampling from 25 to 100%, with and without replacement.