Submitted:
30 October 2026
Posted:
30 October 2026
You are already at the latest version
Abstract
Climate change affects agricultural productivity through nonlinear and seasonally structured responses to temperature and precipitation. Global agricultural total factor productivity (TFP) attribution is commonly represented with a quadratic response to growing-season mean temperature and precipitation. We compare that benchmark with an expanded quadratic model and a Random Forest model using annual TFP growth for 168 countries, agricultural-area-weighted CRU TS observations, and eleven paired CMIP6 simulations with and without anthropogenic forcing. Under five-fold country-grouped cross-validation, the Random Forest shows higher out-of-sample predictive performance than either quadratic specification. Placebo reshuffling produces null R² distributions far below the observed value, while a year-by-region block bootstrap gives an average warming sensitivity near -0.9 percentage points of annual TFP growth per 1 °C. Held-out SHAP shows that precipitation, maximum temperature, and three-month climate windows contribute strongly to prediction, while accumulated local effects reveal nonlinear and direction-sensitive responses to year-to-year climate changes. Historical global attribution remains similar under the two response forms: the baseline quadratic gives -22.1% and the Random Forest -20.9% over 1962-2020. This agreement strengthens the finding that anthropogenic climate change has substantially reduced global agricultural productivity, while showing that a more flexible machine-learning response can reveal richer seasonal and nonlinear climate-TFP relationships. At the country level, attributed impacts are more dynamic and vary across rainfall-based moisture quintiles, with the Random Forest tending to attribute smaller losses than the quadratic in drier countries and larger losses in wetter countries.
Keywords:
agricultural total factor productivity
; machine learning
; random forest
1. Introduction
Climate change poses a growing challenge to agriculture because crop and livestock systems respond directly to temperature, precipitation, water availability, heat stress, and the timing of seasonal conditions. As a result, the impacts of climate change on agricultural productivity have been extensively studied initially through analysis of crop yields (e.g., Schlenker and Roberts 2006; Lobell et al. 2011; Ray et al. 2015; Lesk et al. 2016).
Empirical studies started with investigation of relationship between crop yield and climate have repeatedly documented nonlinear and geographically heterogeneous responses to climate. Schlenker and Roberts (2006) demonstrated that the nonlinear relationship between the corn yield and temperature with daily temperature over nearly 2,000 US counties and modeled the nonlinear relationship with Chebyshev polynomials. Schlenker and Roberts (2009) further extended the crops to soybeans and cotton and quantified the upper-limit temperature values favorable to the growth of individual crops. Lobell et al. (2011) built a nonlinear regression model up to quadratic terms with monthly temperature and precipitation with and without trends to assess the climate impacts on four major crops. They found that observed climate trends reduced global maize and wheat production relative to a no-warming counterfactual. Ray et al. (2015) showed that climate variability explains a substantial share of global crop-yield variability; and Lesk et al. (2016) documented large production losses associated with drought and extreme heat. Related work emphasizes that agricultural impacts depend on baseline climate, crop type, production system, and the capacity to adapt (Hatfield et al. 2011; Rosenzweig et al. 2014; Heino et al. 2023). In recent years, more studies have been using Machine Learning (ML) models to capture the nonlinear and other complex relationships between crop yield and climate conditions (e.g., Dhaliwal and Williams 2024; Xin et al. 2026; Goel and Pandey 2024; Liu et al. 2026).
In addition to the crop yield analysis, agricultural total factor productivity (TFP), a productivity measurement that accounts for the contributions of all inputs taken together in the production process, has also received increasing attention in climate impact research (Liang et al. 2017; Ortiz-Bobea et al. 2018; Letta and Tol 2019; Ortiz-Bobea et al. 2021; Yang et al. 2026). Liang et al. (2017) investigated climate impacts on U.S. (United States) agricultural TFP with 10 spatially aggregated temperature- and precipitation-based climate indices derived from grid cells with high correlations to TFP. Separate linear regression models were built for different sub-periods, and the annual TFP change was used as the response variable to remove the long-term uptrend of the TFP. Yang et al. (2026) investigated how climate change affects U.S. agricultural productivity, specifically total factor productivity (TFP) for 48 contiguous states of the U.S. (CONUS) with machine learning models and extended the model for assessment of climate impacts on future TFP growth. Their results showed that the climate change impacts are spatially heterogeneous under the Representative Concentration Pathway (RCP) 4.5 and 8.5 climate change scenarios from 2020 to 2050 although the effects on future agricultural productivity are consistently negative regardless of the region. On quantitative measures, the negative climate impact on the national level TFP assessed by Yang et al. (2026) is much weaker than that assessed by Liang et al. (2017).
Ortiz-Bobea et al. (2018) investigated the climate sensitivity of U.S. agricultural productivity based on the 1960-2004 state level TFP. They decomposed the state level TFP time series with the Hodrick-Prescott (HP) filter to remove the trend in TFP, attributed to technology innovation, and focused on the TFP deviation from the trend. They further divided the CONUS states into seven USDA Climate Hub Regions and studied impacts on the TFP deviation by the seasonal temperature and precipitation, especially the summer (June to August) temperature at the hub region level. The model of the TFP deviation as a function of the temperature bins and precipitation for each hub region was built with four degrees of freedom spline for temperature bins and 2nd order polynomial for the precipitation, both including the nonlinear relationships, similar to that used by Schlenker and Roberts (2009) for the temperature. With various fitting models, resampling strategies, and period splitting for model robustness assessment, they found significant differences in certain model parameters for specific regions and concluded that the climatic sensitivity of U.S. agricultural productivity is rising. This work helped establish the nonlinear and spatially heterogeneous climate–TFP relationships that were subsequently examined at the global scale.
The relationship between TFP values and climate variables, temperature and precipitation, on the global scale was conducted by Ortiz-Bobea et al. (2021, hereafter, OB21) based on historical TFP (1961-2015) of many countries. They constructed the logarithmic differences in TFP values as a quadratic function of average temperature and total precipitation over 5 months centered at the greenest month defined with smoothed NDVI values. They separated the influence of anthropogenic climate change (ACC) based on models with and without ACC and concluded that the ACC has reduced the global TFP by about 21% from 1961 to 2020. The estimates were also performed for 7 FAO regions, and the climate impacts on TFP growth rates are heterogeneous. The contribution to the TFP reduction for North America is relatively lower at about 12.5%. Their results also demonstrated increasing climate impacts and larger damage to vulnerable regions with low current productivity.
Letta and Tol (2019) used TFP data for 60 countries, covering 1960–2006 and a linear regression model on temperature with other controlling factors including precipitation to assess the climate (temperature) impact on TFP growth rates. The country-year level temperature is an annual average from monthly mean values with population weights spatially on the original cells. Both the response variable and predictors are with first difference values for the fixed-effect model. They found that the climate impact is negative for poor countries defined with GDP per capita and statistically insignificant in rich countries.
Previous work based on a baseline specification representing the weather response with a quadratic or polynomial function of growing-season or annual mean temperature and precipitation has established a climate signal in agricultural TFP at national and global scales (Liang et al. 2017; Ortiz-Bobea et al. 2018; Letta and Tol 2019; Ortiz-Bobea et al. 2021). That formulation is transparent and interpretable, but it compresses the annual climate sequence into individual annual means either for selected growing seasons, simple annual means, or adaptively selected areas and seasons. Such aggregation can compress information on within-year timing, temperature extremes, sustained precipitation conditions, and interactions among climate variables. Agronomic evidence suggests that temperature extremes, persistent rainfall deficits, and threshold behavior and its timing can matter in ways that the aggregate annual averages may not fully represent.
In this study, we investigate the impacts of temperature and precipitation on country level TFP growth rates as in previous studies. However, this study uses a more detailed climate representation based on overlapping three-month running means spanning the full 12-month annual cycle, together with annual summary statistics, and evaluates the relative contributions of these predictors to TFP-growth predictions. Since the number of inputs (predictors) is relatively high, and the predictor interactions may extend linear and the polynomial nonlinear structure, we choose Machine Learning (ML) methods. ML is increasingly used in agricultural prediction and climate-impact analysis (Chlingaryan et al. 2018; Crane-Droesch 2018; van Klompenburg et al. 2020), and more broadly in data-driven Earth-system research where complex spatial and temporal relationships are difficult to encode in a small parametric model (Reichstein et al. 2019). Random Forest is one of the commonly applied machine-learning models in crop-yield prediction and has shown strong performance in agricultural prediction applications (Chlingaryan et al. 2018; van Klompenburg et al. 2020; Dhaliwal and Williams 2024). With the ML models and more predictors, we also would like to seek more accurate assessment of climate impacts on country level TFP growth rates.
For this purpose, the results of OB21 would be our baseline. We therefore compare three increasingly informative representations on the same country-year panel: 1) a baseline quadratic model of OB21 but with growing-season mean temperature and precipitation; 2) an expanded parametric quadratic model with a similar structure to OB21 but with sixty climate predictors composed of minimum, maximum and mean temperature and precipitation in all months (3-month means) and annual summary statistics; 3) a selected machine-learning model, Random Forest (RF) with the same sixty inputs. We evaluate all three response models using country-grouped cross-validation so that entire countries are withheld during testing. With the most suitable model (i.e., RF) among the above three, we then use SHapley Additive exPlanations (SHAP) (Lundberg and Lee 2017) and accumulated local effects (ALE) (Apley and Zhu 2020) to identify which climate variables and 3-month windows contribute most strongly to RF predictions and to characterize the shapes of the learned responses. Finally, we freeze the fitted response functions and apply them to eleven paired CMIP6/DAMIP climate trajectories with and without anthropogenic forcing to assess whether introducing richer climate information and a flexible nonlinear response changes the estimated historical effect of anthropogenic climate change, both globally and across countries.
The remainder of the paper is organized as follows. Section 2 describes the data sets including the agricultural productivity, observed climate, agricultural land-cover, growing-season, and climate-model datasets. Section 3 presents data processing, predictor construction, the three response models, validation, model interpretation, and the historical attribution framework. Section 4 reports the results, section 5 discusses their implications and limitations, and section 6 concludes.
2. Data
This study combines country-level agricultural TFP with observed climate, agricultural land-cover, crop-calendar, national-boundary, and climate-model data.
2.1. Agricultural Total Factor Productivity
Country-level agricultural TFP indices follow Fuglie (2015) and measure aggregate agricultural output relative to aggregate input use. The underlying growth-accounting framework combines multiple outputs with land, labor, capital, livestock, fertilizer, feed, machinery, and other intermediate inputs, making TFP a broader productivity measure than crop yield alone. The source TFP data were from the data provided with OB21 (Ortiz-Bobea et al. 2021). After country-name reconciliation, 8,904 country-year TFP rate observations across 168 countries are available for 1962-2014. Figure 1 shows the 168-country coverage by FAO region.
2.2. Country-Specific Growing Seasons
Country-specific main growing seasons were developed primarily from the SAGE Crop Calendar Dataset at the University of Wisconsin-Madison (https://sage.nelson.wisc.edu/data-and-models/datasets/crop-calendar-dataset/), with the FAO Crop Calendar used as a supplementary source (https://www.fao.org/agriculture/crops/information-resources/am/) (Sacks et al. 2010; University of Wisconsin-Madison n.d.; FAO n.d.). The SAGE dataset provides planting and harvesting dates for major crops worldwide. For each country, the representative season was selected to reflect the major national crop-production cycle. The selected season was summarized as a six-month window spanning the main planting, vegetative-growth, reproductive, and harvest period; seasons crossing the calendar-year boundary were treated continuously.
The country-specific calendar serves two purposes. It defines the growing-season temperature and precipitation used by the baseline quadratic model, and it provides a common agricultural time origin for interpreting the selected three-month windows with the 3-month running mean inputs.
2.3. Climate Data
The observed climate data set for this study is the gridded Climatic Research Unit (CRU) Time-series (TS) data version 4.08 (CRU TS4.08) from the Climate Research Unit, University of East Anglia (Harris et al. 2020). The CRU gridded dataset has monthly temporal resolution, 0.5x0.5 degree spatial resolution covering the period 1901-2023, and is open to the public at the CRU website (https://crudata.uea.ac.uk/cru/data/hrg/cru_ts_4.08/). We use mean near-surface temperature, maximum temperature, minimum temperature, and monthly total precipitation. Mean temperature describes general thermal conditions, maximum temperature captures daytime heat exposure, minimum temperature captures nighttime and cold-season conditions, and precipitation represents water availability and exposure to rainfall deficits or excess. These four variables were selected to separate average thermal conditions, daytime heat, nighttime or cold conditions, and water availability while remaining consistently available in both the observed and climate-model datasets. These four variables are used consistently in the baseline, expanded quadratic, and RF analyses. The baseline uses mean temperature and precipitation, while the expanded quadratic and RF use all four climate variables. This also makes it possible to use the same physical climate dimensions in estimation, model interpretation, and historical attribution.
2.4. Agricultural Land-cover And Country-Boundary Data
Agricultural land cover is taken from the EarthStat global cropland and pasture dataset for circa 2000 (Ramankutty et al 2008), which provided at 5 arcmin (<10km) resolution and available from EarthStat (https://www.earthstat.org/). The dataset supplies the fraction of each grid cell occupied by cropland and pasture and is used to identify where agricultural activity is concentrated within national territory. Following Ortiz-Bobea et al. (2021), the circa-2000 cropland and pasture distribution is used as the spatial weighting layer for aggregating gridded climate data to the country level. Country boundaries follow the FAO Global Administrative Unit Layers (GAUL 2015), available through the FAO data catalog (https://data.apps.fao.org/catalog/dataset/global-administrative-unit-layers-gaul-2015). The two datasets combined are used for calculating the country level climate values with the gridded climate fields.
2.5. Data Sets from Climate-Model Ensemble
To separate the historical anthropogenic forcing attribution from reality, we use paired simulations from CMIP6 (Coupled Model Intercomparison Project Phase 6) and DAMIP (Detection and Attribution Model Intercomparison Project) both obtained through the Earth System Grid Federation (ESGF; https://esgf-node.llnl.gov/search/cmip6/). The trajectory with anthropogenic forcing combines CMIP6 historical simulations for 1961-2014 with ScenarioMIP SSP2-4.5 for 2015-2020 (Eyring et al. 2016; O'Neill et al. 2016; Riahi et al. 2017). The counterfactual trajectory uses DAMIP hist-nat, which includes natural solar and volcanic forcing but excludes anthropogenic forcing (Gillett et al. 2016). Both trajectories use the same model and ensemble members wherever possible. Eleven climate models were available with complete 1961–2020 coverage for all four climate variables used in the analysis—mean, maximum, and minimum temperature and precipitation—in both the forced and hist-nat trajectories. Monthly atmospheric output was selected directly from the CMIP6 Amon table and subsequently used to construct the same three-month windows and annual summaries as the observed CRU data. The eleven models were used on their native grids, with nominal horizontal resolutions ranging from approximately 100 to 500 km.
The paired forced and hist-nat simulations are used because attribution requires a counterfactual climate history. Their difference isolates the climate signal associated with anthropogenic forcing within each model, while the eleven-model ensemble reduces dependence on the behavior of any single climate model. Figure 2 illustrates this attribution input by mapping the end-of-period anthropogenic growing-season warming signal for 2016–2020, defined as the forced trajectory minus the natural-forcing counterfactual and averaged across the eleven climate-model pairs. This five-year period is used to represent the warming reached near the end of the attribution period while reducing year-to-year variability. Because the forced and hist-nat trajectories are nearly identical at the beginning of the record and diverge progressively over time, the late-period average provides a clearer representation of the accumulated anthropogenic warming signal.
The raw datasets are summarized together in Table 1. The data values will be preprocessed before being used for the model development and related evaluation and estimation.
3. Methods
The analysis proceeds in three linked stages. We preprocess the raw data values into country-year entity-attribute data format for feeding into the three regression models and conduct other analysis such as feature importance analysis and anthropogenic attribution to TFP growths.
3.1. Spatial Aggregation of Climate Data
All climate data values from various sources were converted to common units and monthly representations before analysis; precipitation fluxes were converted to monthly totals in millimeters, and temperature to °C. Gridded climate fields from CRU TS4.08 and ensemble data were aggregated to countries using agricultural areas rather than total national territory. For country i, grid cell g, and month t, the national climate value is
where Aig is cropland plus pasture area in grid cell g for country i. The EarthStat cropland and pasture fractions were converted to area using cell land area. For 13 small countries where usable agricultural-area weights could not be obtained from the EarthStat grid, climate values were instead calculated using land-area weights over the grid cells within the national boundary.
This choice is consequential for geographically large countries. For example, Russia's agricultural-area-weighted growing-season mean temperature is +4.6 °C, compared with -5.8 °C under territory weighting; Canada shifts from -6.7 °C to +3.1 °C, and the United States from 7.0 °C to 11.5 °C. Agricultural weighting therefore aims to characterize the climate experienced where production occurs rather than the climate of unfarmed tundra, desert, or other land.
3.2. Temporal Differencing and Aggregations
The raw TFP data are numerical values of TFP itself. As TFP is a relative value and is generally with an uptrend with time, most analysis use the annual TFP changes or TFP growth rates. In this study, we used the commonly accepted TFP growth rate, Δln(TFP), with Δ defining the annual differences, the current year value minus the previous year value. This growth rate is equivalent to a simple growth model yt = y0*exp(θt) with y0 being the TFP of the reference year and yt being the TFP after t years with a constant growth rate θ. In this study, t=1, and the TFP growth rate is defined on an annual basis only.
Climate predictors are also expressed as year-to-year changes within country so that the model learns associations between changes in climate and changes in productivity rather than differences in long-run productivity levels across countries. Nevertheless, the long-run impact could be easily estimated with the growth definition above.
For each of the four climate variables, mean temperature, maximum temperature, minimum temperature, and precipitation, we construct twelve overlapping three-month means from the monthly climate data, with the windows spanning the full annual cycle. We also calculate the annual maximum, annual minimum, and annual standard deviation from the twelve monthly values within each year. Thus, each climate family contributes fifteen predictors, and the four families contribute sixty in total. The three-month windows preserve seasonal timing and sustained multi-month conditions that are lost when an entire growing season is summarized by a single mean.
The three-month windows are a deliberate middle ground between a single seasonal mean and noisier month-by-month predictors: they retain within-year timing while summarizing sustained conditions over several months. The annual maximum, minimum, and standard deviation add information on extremes and variability that may not be captured by the moving windows alone.
With that said, we did aggregate mean temperature and precipitation values in growing seasons for each country (based on the SAGE Crop Calendar Dataset) to have the baseline quadratic model of OB21. Figure 3 shows the spatial distribution of the observed growing-season mean temperature and precipitation used for model estimation, highlighting the wide cross-country variation over the study period limited by the TFP data availability. However, those growing-season mean climate values would not be used in the other two models, which are designed to choose the influential 3-month means automatically.
3.3. Baseline Quadratic Response
The baseline response follows the structure of the global TFP model used by Ortiz-Bobea et al. (2021). It summarizes climate with two country-level growing-season variables - mean temperature and monthly precipitation - and represents each with a linear and quadratic term. We use this specification as a literature-based reference against which the expanded quadratic and RF are compared. In the revised predictive framework, the outcome and climate inputs are expressed as year-to-year changes within country so that all three response models are evaluated on a common target and validation design. The baseline response is written as:
where i indexes countries and t indexes years; TFPit is the agricultural total factor productivity index for country i in year t; Tit and Pit are the country-level growing-season mean temperature and monthly precipitation, respectively; and Δ denotes the year-to-year first difference, for example ΔTit = Tit − Ti(t−1). The coefficients β₁–β₄ represent the estimated linear and quadratic climate-response terms, and εit is the residual error term.
The baseline quadratic therefore answers the first question in the model sequence: how much transferable climate-TFP signal is captured by the compact response form used in the established attribution literature? Details common to all models, including country-holdout validation and the treatment of country and year identifiers, are given in section 3.6. Its role is deliberately limited to a reference point for both predictive comparison and historical attribution; it is not treated as an exact reproduction of Ortiz-Bobea et al. (2021), because the datasets, agricultural weighting, growing-season construction, and validation framework differ.
3.4. Expanded Quadratic Response
The second model asks whether the additional seasonal climate information improves predictive characterization while the response remains quadratic and additive. We therefore replace the two growing-season summaries in the baseline with the sixty seasonal and annual predictors defined above, while retaining a linear and squared term for each predictor. This expanded quadratic provides a direct bridge between the baseline and the machine-learning model: it changes the climate information available to the model without yet introducing nonlinear interactions among predictors. The modeling equation is written as:
Because the overlapping three-month windows and related temperature summaries are strongly correlated, the expanded quadratic uses Ridge regularization to stabilize estimation. The Ridge penalty is selected only during the training phase within consideration of testing results.
3.5. Random Forest Response
The third response relaxes the additive quadratic functional-form restriction while keeping the same sixty climate inputs for ML models. Based on a preliminary ML model search with a similar setting, we chose the RF regression model (Breiman 2001), which averages predictions from many regression trees. Data-driven node splits allow the model to represent thresholds, different responses in different parts of the climate distribution, and combinations of predictors without specifying those relationships in advance, and through this flexibility and combinations, RF can catch more complicated nonlinear and interactive relationships beyond explicit quadratic models.
During model development, we tuned the principal Random Forest hyperparameters, including the number of trees, the minimum number of observations allowed in a terminal leaf, and the number of predictors considered at each split. Hyperparameter evaluation was based on predictive performance within the training data and was completed independently of the historical attribution calculation. The selected Random Forest specification was then held fixed for the main comparison and attribution analysis.
Random Forests are stochastic because individual trees are trained on bootstrap samples and because only a randomly selected subset of predictors is considered at each split. Two runs with the same data and model settings can therefore differ slightly in their fitted trees and predictions. To check that the results do not depend on one random construction of the forest, the full grouped-cross-validation analysis is repeated with three random seeds (0, 1, and 2). The seeds simply initialize different reproducible random sequences; results are averaged across the three runs, and their spread is used to assess stability.
3.6. Validation and Inference
All three response models are evaluated using the same five-fold country-grouped cross-validation. Every observation from a country is assigned to the same fold; therefore, a country used for testing is completely absent from model training, scaling, and hyperparameter selection. This provides an independent country-level out-of-sample evaluation and prevents observations from the same country from appearing in both the training and test sets. No country or year identifiers are supplied to any of the three response models. The baseline quadratic, expanded quadratic, and Random Forest are evaluated on identical folds. This ensures that differences in predictive performance reflect differences in climate information and response structure rather than differences in how the models are evaluated. Predictive performance is summarized by R². The Random Forest result is averaged across the three seeds.
Two additional procedures assess whether the detected climate signal is credible. First, three placebo tests destroy the observed climate-productivity pairing by (i) reshuffling productivity across years within country, (ii) reshuffling productivity across countries within year, and (iii) reshuffling across the full panel. Each null distribution uses 200 draws and refits the model. These three nulls preserve different parts of the panel structure and test whether the observed R² could arise from country structure, common year structure, or generic flexible-model fitting rather than the climate-TFP association. Second, a year-by-FAO-region block bootstrap resamples blocks with replacement and refits the response to quantify uncertainty in the implied sensitivity of annual TFP growth to a uniform 1 °C warming. Blocking preserves broad spatial and temporal dependence more effectively than resampling individual country-years independently.
The validation procedures therefore answer complementary questions. Grouped cross-validation measures transfer to unseen countries, the placebo tests ask whether similar predictive skill can arise after the climate-productivity correspondence is deliberately broken, and the block bootstrap asks whether the estimated warming sensitivity is stable to resampling broad year-region blocks.
3.7. SHAP Interpretation
In addition to the model performance evaluation, the contribution of individual climate variables and seasonal windows will be assessed. We will focus on the RF predictions with SHapley Additive exPlanations (SHAP), which provides an additive decomposition of an individual model prediction into feature contributions relative to a baseline prediction (Lundberg and Lee 2017). For a given country-year, a positive SHAP value indicates that a predictor moves the Random Forest prediction upward relative to the baseline, while a negative value moves it downward. Thus, SHAP values contain information on both the magnitude and direction of a predictor's contribution for individual observations. For global importance, however, we use mean absolute SHAP values so that positive and negative contributions do not cancel when aggregating across observations.
SHAP values are computed only for held-out observations, so each value is obtained from a model that was not trained on that observation's country. Across five grouped folds and three random seeds, fifteen Random Forest models are fitted. Each country-year therefore receives one set of SHAP values from its held-out fold for each of the three seeds, and these values are averaged across seeds before summary statistics are calculated. We summarize mean absolute SHAP values by climate variable, by predictor family, by FAO region, and by the start month of each three-month window relative to the country's own growing season. These summary SHAP values identify which types of climate information and which parts of the annual cycle contribute most strongly to the Random Forest's held-out predictions for the whole globe and for different regions.
3.8. Accumulated Local Effects
To examine the dependence of TFP growth rates on the values of a predictor in detail, we use a recently developed approach, Accumulated Local Effects (ALE) plots (Apley and Zhu 2020) to individual predictors in the RF model. For generating the ALE plots, the range of a predictor is divided into intervals, and within each interval the model is evaluated at the observed lower and upper values while the other predictors remain at their observed values. For each interval, the difference between the model prediction at the upper boundary and the model prediction at the lower boundary is averaged across all observations whose predictor values fall within that interval, producing an average local effect for that part of the predictor range. These interval-specific effects are then added sequentially from lower to higher predictor values to obtain the accumulated effect at each point along the predictor range. The resulting curve shows how the model's predicted TFP growth changes as that climate feature moves through values that actually occur in the data.
ALE is particularly useful in this application because the seasonal climate predictors are strongly correlated. A partial-dependence curve can create unrealistic combinations by varying one climate predictor independently of the others, whereas ALE relies on local changes within the observed joint distribution. We calculate ALE for the leading SHAP predictors across the same fifteen held-out fits, show 5-95% bands across fits, and display the observed predictor density for context. SHAP identifies which variables and time windows contribute most strongly to the Random Forest predictions; ALE complements it by showing whether those contributions follow smooth gradients, thresholds, steps, or other nonlinear response shapes and by locating where those changes occur.
ALE therefore addresses a different question from the global mean-absolute SHAP summary. SHAP ranks how strongly information contributes to predictions, whereas ALE traces how the fitted prediction changes across the observed range of a predictor. Signed SHAP indicates whether a predictor raises or lowers predictions for individual observations. It does not directly provide a population-level response curve. ALE is therefore used to visualize the fitted response across the predictor range. Because ALE estimates local changes using observations within each interval, it reduces reliance on unrealistic predictor combinations that can arise when predictors are strongly correlated.
The ALE curves suggest that an important part of the fitted response may depend on whether a climate variable increases or decreases from one year to the next, rather than only on the size of that change. To test this pattern more directly, we also fit a direction-only Random Forest as a diagnostic. Each of the sixty first-differenced climate predictors is recoded as a binary indicator equal to 1 when the year-to-year change is positive and 0 when it is zero or negative. The Random Forest is then refit using the same country-grouped folds, the same model specification, and the same three random seeds as the full model. This comparison removes the magnitude of each climate change while preserving only its direction, allowing us to quantify how much predictive information is retained by knowing whether conditions became warmer or cooler, wetter or drier, from one year to the next.
3.9. Historical Attribution Framework
The attribution analysis asks how much the fitted climate-TFP response changes when it is exposed to a simulated climate history with anthropogenic forcing rather than an otherwise comparable history with natural forcing only. The response function is first estimated from observed CRU climate and observed TFP growth and then frozen; it is not retrained on CMIP6 output. For country i and year t, the annual attributable effect is
where Zitwith is the climate trajectory containing anthropogenic forcing and Zitnat is the paired natural-forcing trajectory. If the fitted response predicts lower TFP growth under the forced trajectory, Dit is negative. These annual log-growth effects are accumulated within each country through 2020 and converted to proportional TFP effects using the exponential transformation. Results are then averaged across countries and across the eleven climate-model pairs, following the published impact framework used for comparison with Ortiz-Bobea et al. (2021).
The paired climate-model trajectories are adjusted before being used as inputs to the fitted statistical models. Climate models can differ from CRU observations in their average climate and in the magnitude of year-to-year variability. For each country and climate variable, we therefore adjust the simulated series so that its 1961–1980 mean corresponds to the CRU climatology and its year-to-year variability is scaled toward that observed in CRU. The scaling factor si is the ratio of the observed to modeled standard deviation of the first-differenced series and is bounded between 0.25 and 4, as shown in Equation (5),
Here, the bars over X denote temporal averages over 1961–1980, with X̄i,obs representing the CRU mean and X̄i,model representing the climate-model mean for country i.
The adjustment parameters are calculated from the forced trajectory and then applied in the same way to both the forced and hist-nat trajectories. Thus, the adjustment changes their climatology and variability but does not itself create a difference between the paired trajectories. The adjusted climate series are then used as inputs to the fitted baseline quadratic and Random Forest models.
The climate–TFP response models are first estimated using the TFP and CRU climate data. Once fitted, the models are held fixed and applied separately to the forced and hist-nat climate trajectories. For each country and year, the difference between the two predicted TFP-growth responses is taken as the estimated effect associated with anthropogenic climate forcing. The climate-model simulations therefore enter only at the attribution stage and do not influence estimation of the climate–TFP relationship.
For the country-level comparison, countries are ranked by their mean monthly precipitation and divided into five equally sized groups from driest to wettest. Within each group, we compare the attributed effects from the quadratic and Random Forest models using the mean estimate from each model, their mean difference, and the percentage of countries for which the Random Forest produces a smaller estimated loss. This provides a simple way to examine whether differences between the two response models vary with baseline moisture conditions.
4. Results
4.1. Climate Signal and Out-of-Sample Validation
We first examine whether the literature-based baseline quadratic detects a contemporaneous weather signal before comparing it with more flexible response structures. Table 2 reports the coefficient estimates, country-clustered standard errors, and p-values. In the baseline quadratic, the four weather terms are jointly significant (p = 0.0005). The strongest coefficient-level evidence is in precipitation: both precipitation terms are significant at approximately p = 0.001, whereas the squared temperature term is not (p = 0.405). The qualitative coefficient pattern is broadly consistent with Ortiz-Bobea et al. (2021), including the signs of the temperature and precipitation terms and the stronger statistical evidence for the precipitation response. We do not rely on any single coefficient as the main result; the baseline model serves as the reference point for the country-holdout comparison that follows.
4.2. Country-Holdout Model Comparison and Validation
Table 3 shows the primary model comparison with identical country-grouped folds. The baseline quadratic, based on growing-season mean temperature and precipitation, attains R² = 0.0097. The expanded quadratic receives with sixty seasonal and annual predictors attains R² = 0.0054. The Random Forest, using those same sixty inputs, attains R² = 0.0440. Because the expanded quadratic and Random Forest use matched climate information, the performance difference is associated with response flexibility rather than simply with access to more predictors.
The Random Forest provides the highest country-holdout predictive performance of the three response structures and is the focus of the subsequent interpretation. Its R² = 0.0440 remains small in absolute terms, and the result is stable across the three random seeds (standard deviation 0.0006). Figure 4a provides a placebo test of whether this predictive performance could arise after breaking the correspondence between climate and productivity. For each of the three reshuffling schemes, the data are randomly rearranged 200 times and the model is re-evaluated using the same grouped cross-validation procedure. All three null distributions are centered below zero and remain well below the observed R², showing that the observed predictive signal disappears when the temporal, spatial, or overall pairing between climate and TFP growth is disrupted. This provides evidence that the positive country-holdout R² reflects a systematic weather-productivity relationship rather than chance alignment in the panel.
Figure 4b examines the uncertainty in the estimated response to warming using a block bootstrap. In each bootstrap replicate, groups of observations defined by FAO region and year are resampled with replacement. Each selected block therefore contains all country observations belonging to that region in that year. A new sample is assembled from these blocks, the response model is refitted, and the implied change in annual TFP growth under a uniform +1 °C warming is recalculated. Repeating this procedure produces the distribution shown in Figure 4b. The distribution is centered near -0.90 percentage points of annual TFP growth per +1 °C, and the 90% interval is approximately [-1.50, -0.37] percentage points. Importantly, the entire 90% interval is below zero, indicating that the estimated warming response remains negative across the bootstrap resamples. The width of the distribution shows uncertainty in the magnitude of the response, but its consistently negative location supports the conclusion that higher temperature is associated with lower annual TFP growth in the fitted relationship.
4.3. Grouped Climate Contributions
After establishing the predictive comparison, the next question is what climate information the Random Forest actually uses and what response patterns account for the additional predictive skill.
Figure 5 shows the held-out absolute SHAP values aggregated based on climate variables and the 3-month windows with respect to the starting month of growing season. For the climate-variable comparison, the absolute SHAP values of the fifteen predictors belonging to each climate variable are combined, and the resulting contributions for precipitation, maximum temperature, minimum temperature, and mean temperature are expressed as shares of their total contribution. These shares are then summarized across the held-out predictions. The precipitation group contributes the largest share to the model, at roughly 37%, followed by maximum temperature at about 25%, minimum temperature at about 20%, and mean temperature at about 18% (Figure 5a). The prominence of maximum temperature relative to mean temperature is consistent with the possibility that daytime heat plays a more important role in agricultural productivity than the mean temperature. It is interesting to note that the contribution from minimum temperature is also higher than that from mean temperature. Those findings tell us that mean temperature may not be sufficient for the investigation of agricultural productivity.
Across feature families, the absolute SHAP values are also aggregated based on the temporal dimension and the annual statistic. It is found that overlapping three-month windows account for 83.8% of total mean absolute SHAP attribution, whereas annual maximum, annual minimum, and variability summaries account for much smaller shares. As a result, Figure 5b shows only contributions based on the most informative three-month windows with respect to the starting month of growing seasons. The major temporal contributions come from the first four months of growing seasons with peaks roughly one to two months after the country-specific growing season starts. In many annual cropping systems, this period broadly corresponds to crop establishment and early vegetative development, although exact crop-development stages differ among countries and crops. One special striking contribution is a secondary peak in Figure 5b around the eighth month after the start. The late-year peak may indicate that climate outside the nominal six-month crop growing season can carry predictive information, potentially through soil moisture, land preparation, livestock, perennial crops, or other agricultural processes.
Table 4 lists the relative SHAP shares of each climate variable group in the seven FAO regions. The values show broadly similar ordering but meaningful geographic variation. Precipitation leads in six of seven FAO regions, ranging from 42.5% in the South West Pacific to 32.3% in Europe and Central Asia with North America as an exception over which the 27.7% precipitation share is lower than the 28.4% share by the maximum temperature. In addition to that, maximum temperature becomes relatively more prominent in the Near East and North Africa and Europe and Central Asia.
To investigate the impacts of individual predictors to the TFP growth rates, we display the accumulated local effects (ALE) plots for the six predictors with the largest mean absolute SHAP attribution (Figure 6). The curves show changes in predicted Δln(TFP), expressed in percentage point, as a function of the year-to-year change in each selected climate variable. Precipitation effects step upward as changes become positive, while temperature effects generally step downward. To test this pattern directly, we recorded each of the sixty climate predictors as a binary direction indicator and refit the Random Forest on the same country-grouped folds and three seeds. This direction-only Random Forest attains grouped-CV R² = 0.0196, compared with 0.0440 for the full Random Forest that uses the actual magnitudes of climate changes. Thus, the direction of year-to-year climate change retains a substantial share of the predictive signal, while the magnitude and joint seasonal configuration of the changes provide additional information.
4.4. Anthropogenic Impacts at Global and Country Scales
Following Ortiz-Bobea et al. (2021), we estimate the cumulative effect of anthropogenic climate change on agricultural TFP at both the global and country levels. The attribution is performed separately for each country and year rather than by applying a single global temperature change. For each climate-model pair, the fitted quadratic or Random Forest is applied to that country's climate predictors under the forced trajectory and the corresponding hist-nat trajectory. The difference between the two predicted TFP-growth responses is calculated annually, accumulated through 2020 within each country, and then converted to a proportional TFP effect. The global effect for each climate model is obtained by averaging the resulting country-level effects.
Within the published attribution framework, the baseline quadratic gives a cumulative anthropogenic climate-change effect on agricultural TFP of -22.08% over 1962-2020, while the Random Forest gives -20.87% (Table 5; Figure 7). The difference between ensemble means is 1.20 percentage points, or 5.5% relative to the quadratic estimate. The Random Forest gives the larger loss in five of the eleven climate models and the smaller loss in six. Our quadratic estimate is close in magnitude to the approximately -21% benchmark reported by Ortiz-Bobea et al (2021), although differences in climate data, growing-season construction, spatial weighting, model ensemble, and global aggregation mean that it should be interpreted as a comparable implementation rather than an exact reproduction.
The similarity in the global mean masks more dynamic country-level differences. Figure 8 shows that the broad direction of the attributed effect is similar across the two response functions, with negative impacts widespread under both, but the magnitude assigned to individual countries can differ substantially. Twenty-seven of the 168 countries differ by more than 10 percentage points. Regional differences partly offset in the global average (Table 6): the Random Forest gives smaller losses than the quadratic in the Near East and North Africa and in Europe and Central Asia, but larger losses in Latin America and the Caribbean and in Asia.
Country-level differences also vary systematically across the rainfall-based moisture quintiles (Table 7). In the two driest quintiles, the Random Forest gives smaller losses in 76% and 79% of countries, with mean Random-Forest-minus-quadratic differences of +6.04 and +4.95 percentage points. The middle quintile is close to neutral (+0.51 percentage points; 53% with smaller Random Forest losses). In the two wettest quintiles, the Random Forest gives smaller losses in only 33% and 29% of countries, and the mean differences reverse to -2.55 and -2.92 percentage points. Thus, the Random Forest tends to estimate smaller losses than the quadratic in drier baseline climates and larger losses in wetter baseline climates.
5. Discussion
The model sequence clarifies what machine learning contributes to climate-TFP analysis. Expanding from two growing-season summaries to a seasonally resolved climate record creates a richer representation of exposure, while the Random Forest adds the ability to use that information through nonlinear thresholds and interactions resulting in better predictive performance. SHAP and ALE then show which parts of the climate record drive the fitted response and how those responses differ from a smooth quadratic form. Importantly, this richer characterization leaves the global historical attribution close to the baseline estimate while redistributing the magnitude of impacts across countries.The model comparison suggests that the value of machine learning in this setting comes from combining detailed seasonal information with a flexible response structure, rather than from adding predictors alone. The expanded quadratic has access to the same sixty climate variables as the Random Forest, but it remains additive and smooth, and it does not show any gain in modeling power against the baseline model. Tree-based splits in RF can instead use different variables and time windows in different parts of the predictor space, allowing thresholds and non-additive combinations to emerge without being specified in advance.
SHAP clarifies which parts of that expanded climate representation are most useful. Precipitation contributes the largest overall share of mean absolute SHAP attribution, followed by maximum temperature, minimum temperature, and mean temperature. The larger contribution of maximum temperature than mean temperature indicates that daytime heat contains predictive information that is compressed when temperature is represented by one seasonal average. The three-month windows account for 83.8% of total mean absolute SHAP attribution, and the timing profile places the strongest importance on windows beginning roughly one to two months after the growing season starts, with another important period later in the annual cycle. This secondary peak may reflect additional agricultural activity outside the primary growing season, such as secondary or minor cropping seasons in some countries, land preparation, residual soil-moisture effects, perennial crops, or livestock-related responses. Together, these results show that both the type and timing of climate conditions matter to the fitted relationship.
ALE adds a complementary interpretation by showing that the leading fitted responses are often step-like around zero year-on-year climate change rather than smooth dose-response curves. The direction-only diagnostic reinforces this pattern: even after the magnitude of each climate change is removed, a substantial fraction of the Random Forest's predictive information remains. Together, these results suggest that whether conditions become warmer or cooler, or wetter or drier, is an important part of the learned relationship, while magnitude, timing, and interactions provide additional information. Such response shapes are agronomically plausible because rainfall, heat, nighttime temperature, and daytime extremes can affect planting, phenology, respiration, water stress, and recovery differently across stages (Peng et al. 2004; Deng et al. 2015; Mechiche-Alami and Abdi 2020).
At the global level, the most notable result is the similarity of the historical attribution despite the added flexibility of the Random Forest. The ensemble mean changes only from -22.1% under the baseline quadratic to -20.9% under the Random Forest. Moreover, both estimates are quantitatively close to the approximately -21% estimate reported by Ortiz-Bobea et al. (2021), although differences in data and implementation mean that our baseline should be viewed as a comparable implementation rather than an exact reproduction. This helps explain why the global totals remain close: the two approaches differ in how they represent seasonal climate information, but they imply a similar overall historical effect of anthropogenic climate change. The agreement therefore suggests that the broad global attribution is relatively robust to a substantially richer predictor set and a more flexible response structure.
At the country level, the picture is more dynamic. The two response functions broadly agree on the direction of historical impacts but redistribute their magnitude across countries, so a stable global average can coexist with materially different national estimates. The country-level comparison further shows that this heterogeneity varies with baseline moisture, with the Random Forest tending to attribute smaller losses than the quadratic in drier climates and larger losses in wetter climates. This moisture gradient suggests that response flexibility changes how impacts are distributed across climate regimes rather than shifting all country-level estimates uniformly in one direction. They are consistent with a broader literature showing that climate sensitivity varies across production systems, climatic zones, and agricultural environments (Ray et al. 2015; Liang et al. 2017; Ortiz-Bobea et al. 2018; Moore and Lobell 2015; Kukal and Irmak 2018).
Several limitations remain. Climate explains only a small fraction of annual TFP-growth variation, and the models do not include technology, policy, management, markets, conflict, or other important determinants of productivity. Country-level aggregation also combines diverse crops, livestock systems, and production environments into a single national response. The analysis therefore emphasizes comparative predictive performance and historical attribution under one consistently applied framework. Future work can extend the approach with finer spatial data, management and socioeconomic predictors, alternative agricultural calendars, and longer independent periods for validation.
6. Conclusions
This study shows that adding detailed seasonal climate information together with a flexible Random Forest response improves the characterization of the climate-TFP relationship relative to the quadratic models considered here. The interpretation results further show that precipitation, temperature extremes, and within-year timing all contribute information that is not fully represented by growing-season averages alone.
With this added flexibility in model structure under the Random Forest, the global historical attribution estimate remains similar to that of the baseline quadratic model, changing only from -22.1% under the baseline quadratic to -20.9% under the Random Forest. Moreover, both estimates are quantitatively close to approximately -21% estimate reported by Ortiz-Bobea et al. (2021), despite the Random Forest using a substantially richer set of climate predictors. Reaching a similar estimate with a richer predictor set and nonlinear response structure strengthens the finding that anthropogenic climate change has substantially reduced global agricultural productivity while showing that the underlying climate-TFP relationship can be considerably more complex than the aggregate estimate alone suggests.
At the country level, however, the two models can assign different magnitudes of impact. These differences also follow a baseline moisture gradient, with the Random Forest tending to attribute smaller losses than the quadratic in drier climates and larger losses in wetter climates. Thus, the global attribution appears relatively robust to model structure, while the geographic distribution of those impacts is more sensitive. The machine-learning framework therefore complements the baseline quadratic approach by providing greater detail on the seasonal, nonlinear, and geographic structure underlying a broadly similar global historical attribution.
Author Contributions
E Guo: conceptualization, data curation, formal analysis, investigation, methodology, software, validation, visualization, writing - original draft. R Yang: data curation, methodology, resources, supervision, writing - review and editing. Both authors read and approved the final manuscript.
Data availability statement
Agricultural TFP data are available at links provided by Ortiz-Bobea et al. (2021). CRU TS 4.08 is available from the Climatic Research Unit, University of East Anglia. Cropland and pasture fractions are from EarthStat (Ramankutty et al. 2008). Crop-calendar information is from the University of Wisconsin-Madison SAGE Crop Calendar Dataset and the FAO Crop Calendar. CMIP6 historical and SSP2-4.5 output and CMIP6 DAMIP hist-nat are available through the Earth System Grid Federation. Country boundaries are from FAO GAUL 2015. The codes and datasets in this study are available on Zenodo at https://doi.org/10.5281/zenodo.23671429.
Conflicts of Interest
The authors declare no competing financial interests or personal relationships that could have influenced the work reported in this paper.
References
- Apley, D. W.; Zhu, J. Visualizing the effects of predictor variables in black box supervised learning models. J. R. Stat. Soc. B 2020, 82, 1059–86. [Google Scholar] [CrossRef]
- Breiman, L. Random forests Mach. Learn 2001, 45, 5–32. [Google Scholar] [CrossRef]
- Chlingaryan, A.; Sukkarieh, S.; Whelan, B. Machine learning approaches for crop yield prediction and nitrogen status estimation in precision agriculture: A review. Comput. Electron. Agric. 2018, 151, 61–69. [Google Scholar] [CrossRef]
- Crane-Droesch, A. Machine learning methods for crop yield prediction and climate change impact assessment in agriculture. Environ. Res. Lett. 2018, 13, 114003. [Google Scholar] [CrossRef]
- Deng, N.; Ling, X.; Sun, Y.; Zhang, C.; Fahad, S.; Peng, S.; Cui, K.; Nie, L.; Huang, J. Influence of temperature and solar radiation on grain yield and quality in irrigated rice system. Eur. J. Agron. 2015, 64, 37–46. [Google Scholar] [CrossRef]
- Dhaliwal, D.S.; Williams, M.M. Sweet corn yield prediction using machine learning models and field-level data. Precis. Agric. 2023, 25, 51–64. [Google Scholar] [CrossRef]
- Eyring, V.; Bony, S.; Meehl, G.A.; Senior, C.A.; Stevens, B.; Stouffer, R.J.; Taylor, K.E. Overview of the Coupled Model Intercomparison Project Phase 6 (CMIP6) experimental design and organization. Geosci. Model Dev. 2016, 9, 1937–1958. [Google Scholar] [CrossRef]
- FAO. Crop Calendar. Food and Agriculture Organization of the United Nations, n.d. Available online: https://cropcalendar.apps.fao.org.
- Fuglie, K. Accounting for growth in global agriculture. Bio-Based Appl. Econ. 2015, 4, 201–34. [Google Scholar] [CrossRef]
- Gillett, N.P.; Shiogama, H.; Funke, B.; Hegerl, G.; Knutti, R.; Matthes, K.; Santer, B.D.; Stone, D.; Tebaldi, C. The Detection and Attribution Model Intercomparison Project (DAMIP v1.0) contribution to CMIP6. Geosci. Model Dev. 2016, 9, 3685–3697. [Google Scholar] [CrossRef]
- Goel, M.; Pandey, M. Crop Yield Prediction Using AI: A Review. 2024 2nd International Conference on Disruptive Technologies (ICDT); LOCATION OF CONFERENCE, IndiaDATE OF CONFERENCE; pp. 1547–1553.
- Harris, I.; Osborn, T.J.; Jones, P.; Lister, D. Version 4 of the CRU TS monthly high-resolution gridded multivariate climate dataset. Sci. Data 2020, 7, 1–18. [Google Scholar] [CrossRef]
- Hatfield, J.L.; Boote, K.J.; Kimball, B.A.; Ziska, L.H.; Izaurralde, R.C.; Ort, D.; Thomson, A.M.; Wolfe, D. Climate Impacts on Agriculture: Implications for Crop Production. Agron. J. 2011, 103, 351–370. [Google Scholar] [CrossRef]
- Heino, M.; Kinnunen, P.; Anderson, W.; Ray, D.K.; Puma, M.J.; Varis, O.; Siebert, S.; Kummu, M. Increased probability of hot and dry weather extremes during the growing season threatens global crop yields. Sci. Rep. 2023, 13, 1–13. [Google Scholar] [CrossRef]
- Kukal, M.S.; Irmak, S. Climate-driven crop yield and yield variability and climate change impacts on the U.S. great plains agricultural production. Sci. Rep. 2018, 8, 3450. [Google Scholar] [CrossRef] [PubMed]
- Lesk, C.; Rowhani, P.; Ramankutty, N. Influence of extreme weather disasters on global crop production. Nature 2016, 529, 84–87. [Google Scholar] [CrossRef]
- Letta, M.; Tol, R. S. J. Weather, climate and total factor productivity Environ. Resour. Econ. 2019, 73, 283–305. [Google Scholar] [CrossRef]
- Liang, X.-Z.; Wu, Y.; Chambers, R. G.; Schmoldt, D. L.; Gao, W.; Liu, C.; Liu, Y.-A.; Sun, C.; Kennedy, J. 2017 Determining climate effects on U.S. total agricultural productivity. Proc. Natl. Acad. Sci. U.S.A. 114, E2285–E2292. [CrossRef]
- Liu, Z.; Di, L.; Yang, R.; Guo, L.; Zhang, C.; Li, H.; Shao, B. In-season crop yield prediction: State of the art and future research direction. Int. J. Appl. Earth Obs. Geoinf. 2026, 146. [Google Scholar] [CrossRef]
- Lobell, D.B.; Schlenker, W.; Costa-Roberts, J. Climate Trends and Global Crop Production Since 1980. Science 2011, 333, 616–620. [Google Scholar] [CrossRef] [PubMed]
- Lundberg, S. M.; Lee, S.-I. 2017 A unified approach to interpreting model predictions. Proc. 31st Int. Conf. on Neural Information Processing Systems (NIPS’17); Curran Associates Inc.: Red Hook, NY; pp. 4768–77.
- Mechiche-Alami, A.; Abdi, A. M. Agricultural productivity in relation to climate and cropland management in West Africa. Sci. Rep. 2020, 10, 3393. [Google Scholar] [CrossRef]
- Moore, F.C.; Lobell, D.B. The fingerprint of climate trends on European crop yields. Proc. Natl. Acad. Sci. 2015, 112, 2670–2675. [Google Scholar] [CrossRef]
- O'NEill, B.C.; Tebaldi, C.; van Vuuren, D.P.; Eyring, V.; Friedlingstein, P.; Hurtt, G.; Knutti, R.; Kriegler, E.; Lamarque, J.-F.; Lowe, J.; et al. The Scenario Model Intercomparison Project (ScenarioMIP) for CMIP6. Geosci. Model Dev. 2016, 9, 3461–3482. [Google Scholar] [CrossRef]
- Ortiz-Bobea, A.; Knippenberg, E.; Chambers, R.G. Growing climatic sensitivity of U.S. agriculture linked to technological change and regional specialization. Sci. Adv. 2018, 4, eaat4343. [Google Scholar] [CrossRef] [PubMed]
- Ortiz-Bobea, A.; Ault, T.R.; Carrillo, C.M.; Chambers, R.G.; Lobell, D.B. Anthropogenic climate change has slowed global agricultural productivity growth. Nat. Clim. Chang. 2021, 11, 306–312. [Google Scholar] [CrossRef]
- Peng, S.; Huang, J.; Sheehy, J.E.; Laza, R.C.; Visperas, R.M.; Zhong, X.; Centeno, G.S.; Khush, G.S.; Cassman, K.G. Rice yields decline with higher night temperature from global warming. Proc. Natl. Acad. Sci. 2004, 101, 9971–9975. [Google Scholar] [CrossRef]
- Ramankutty, N.; Evan, A.T.; Monfreda, C.; Foley, J.A. Farming the planet: 1. Geographic distribution of global agricultural lands in the year 2000. Glob. Biogeochem. Cycles 2008, 22. [Google Scholar] [CrossRef]
- Ray, D. K.; Gerber, J. S.; MacDonald, G. K.; West, P. C. Climate variation explains a third of global crop yield variability. Nat. Commun. 2015, 6, 5989. [Google Scholar] [CrossRef] [PubMed]
- Reichstein, M.; Camps-Valls, G.; Stevens, B.; Jung, M.; Denzler, J.; Carvalhais, N.; Prabhat. Deep learning and process understanding for data-driven Earth system science. Nature 2019, 566, 195–204. [Google Scholar] [CrossRef] [PubMed]
- Riahi, K.; Van Vuuren, D.P.; Kriegler, E.; Edmonds, J.; O’Neill, B.C.; Fujimori, S.; Bauer, N.; Calvin, K.; Dellink, R.; Fricko, O.; et al. The Shared Socioeconomic Pathways and their energy, land use, and greenhouse gas emissions implications: An overview. Glob. Environ. Chang. 2017, 42, 153–168. [Google Scholar] [CrossRef]
- Rosenzweig, C.; Elliott, J.; Deryng, D.; Ruane, A.C.; Müller, C.; Arneth, A.; Boote, K.J.; Folberth, C.; Glotter, M.; Khabarov, N.; et al. Assessing agricultural risks of climate change in the 21st century in a global gridded crop model intercomparison. Proc. Natl. Acad. Sci. USA 2014, 111, 3268–3273. [Google Scholar] [CrossRef]
- Sacks, W.J.; Deryng, D.; Foley, J.A.; Ramankutty, N. Crop planting dates: an analysis of global patterns. Glob. Ecol. Biogeogr. 2010, 19, 607–620. [Google Scholar] [CrossRef]
- Schlenker, W.; Roberts, M.J. Nonlinear Effects of Weather on Corn Yields*. Appl. Econ. Perspect. Policy 2006, 28, 391–398. [Google Scholar] [CrossRef]
- Schlenker, W.; Roberts, M.J. Nonlinear temperature effects indicate severe damages to U.S. crop yields under climate change. Proc. Natl. Acad. Sci. 2009, 106, 15594–15598. [Google Scholar] [CrossRef]
- University of Wisconsin-Madison, Center for Sustainability and the Global Environment Crop Calendar Dataset. n.d. Available online: https://sage.nelson.wisc.edu/data-and-models/datasets/crop-calendar-dataset/.
- van Klompenburg, T.; Kassahun, A.; Catal, C. Crop yield prediction using machine learning: A systematic literature review. Comput. Electron. Agric. 2020, 177. [Google Scholar] [CrossRef]
- Xin, M.; Liu, Q.; Yang, R. A comprehensive comparison of transformer and RNN models for corn yield prediction: A case study of the U.S. corn belt. Smart Agric. Technol. 2026, 14. [Google Scholar] [CrossRef]
- Yang, R.; Wang, S. L.; Liu, Q.; Xin, M. Climatic effects on U.S. agricultural productivity: evidence and prediction from total factor productivity and crop yields. Int. J. Appl. Earth Obs. Geoinf. 2026, 146, 105028. [Google Scholar] [CrossRef]
Figure 1.
The 168 countries in the estimation and attribution panel, colored by FAO region.

Figure 2.
Anthropogenic warming signal: 2016-2020 mean difference in growing-season country-mean temperature between the forced trajectory (historical + SSP2-4.5) and the natural-forcing counterfactual (hist-nat), averaged across eleven CMIP6 model pairs.
Figure 2.
Anthropogenic warming signal: 2016-2020 mean difference in growing-season country-mean temperature between the forced trajectory (historical + SSP2-4.5) and the natural-forcing counterfactual (hist-nat), averaged across eleven CMIP6 model pairs.

Figure 3.
Observed growing-season climate, CRU TS 4.08, 1962-2014 country means. (a) Mean temperature. (b) Monthly precipitation.
Figure 3.
Observed growing-season climate, CRU TS 4.08, 1962-2014 country means. (a) Mean temperature. (b) Monthly precipitation.

Figure 4.
Validation of the weather-productivity relationship. (a) Grouped cross-validated R² under three placebo reshuffling schemes, 200 draws each; the black vertical line marks the observed value with unshuffled data. (b) Block-bootstrap distribution of the implied change in annual TFP growth for +1 °C warming. The black vertical line is the average impact and the dashed vertical lines represent the boundary values of the 90% confidence interval. “pp” means “percentage point.”.
Figure 4.
Validation of the weather-productivity relationship. (a) Grouped cross-validated R² under three placebo reshuffling schemes, 200 draws each; the black vertical line marks the observed value with unshuffled data. (b) Block-bootstrap distribution of the implied change in annual TFP growth for +1 °C warming. The black vertical line is the average impact and the dashed vertical lines represent the boundary values of the 90% confidence interval. “pp” means “percentage point.”.

Figure 5.
Grouped climate contributions. (a) Share of total mean absolute SHAP attribution by climate variable groups. (b) SHAP importance of overlapping three-month windows by their start month relative to each country's growing-season start; the shaded band marks the nominal six-month growing season.
Figure 5.
Grouped climate contributions. (a) Share of total mean absolute SHAP attribution by climate variable groups. (b) SHAP importance of overlapping three-month windows by their start month relative to each country's growing-season start; the shaded band marks the nominal six-month growing season.

Figure 6.
Accumulated local effects for the six predictors with the largest mean absolute SHAP attribution. Curves show mean ALE responses across 15 held-out fits, with 5–95% bands across fits and observed-data density. Three-month predictors are defined by calendar month; horizontal axes show °C for temperature and mm for precipitation..
Figure 6.
Accumulated local effects for the six predictors with the largest mean absolute SHAP attribution. Curves show mean ALE responses across 15 held-out fits, with 5–95% bands across fits and observed-data density. Three-month predictors are defined by calendar month; horizontal axes show °C for temperature and mm for precipitation..

Figure 7.
Attributed effect for each of the eleven CMIP6 model pairs under the baseline quadratic and Random Forest responses. Vertical reference lines mark the two ensemble means and the published benchmark.
Figure 7.
Attributed effect for each of the eleven CMIP6 model pairs under the baseline quadratic and Random Forest responses. Vertical reference lines mark the two ensemble means and the published benchmark.

Figure 8.
Country-level attributed effects, ensemble means across eleven climate-model pairs, shown for the baseline quadratic, the Random Forest, and the difference between them (Random Forest minus baseline quadratic).
Figure 8.
Country-level attributed effects, ensemble means across eleven climate-model pairs, shown for the baseline quadratic, the Random Forest, and the difference between them (Random Forest minus baseline quadratic).

Table 1.
Data sources.
| Dataset | Variables used | Native resolution | Period | Role |
|---|---|---|---|---|
| Agricultural TFP dataset from Ortiz-Bobea et al. (2021) | TFP index | country, annual | 1961-2014 | outcome |
| CRU TS 4.08 (Harris et al 2020) | Tmean, Tmax, Tmin, precipitation | 0.5°, monthly | 1961-2014 | observed climate |
| SAGE / FAO crop calendars | planting and harvest timing | country / crop calendar | historical calendar | growing-season definition |
| EarthStat cropland and pasture (Ramankutty et al 2008) | cropland, pasture fraction | 5 arcmin | 2000 | agricultural land cover |
| GAUL 2015 | country boundaries | vector | - | spatial boundaries |
| CMIP6 historical (Eyring et al 2016) | tas, tasmax, tasmin, pr | model grid, monthly | 1961-2014 | historical segment of the forced trajectory |
| CMIP6 ScenarioMIP SSP2-4.5 | tas, tasmax, tasmin, pr | model grid, monthly | 2015-2020 | SSP2-4.5 extension of the forced trajectory |
| CMIP6 DAMIP hist-nat (Gillett et al 2016) | tas, tasmax, tasmin, pr | model grid, monthly | 1961-2020 | natural-forcing counterfactual |
Table 2.
Baseline quadratic weather response. Country-clustered standard errors, which allow errors to be correlated across years within each country, are shown in parentheses; p-values are reported separately.
Table 2.
Baseline quadratic weather response. Country-clustered standard errors, which allow errors to be correlated across years within each country, are shown in parentheses; p-values are reported separately.
| Term / statistic | Estimate (SE) | p-value |
| ΔT | -1.52 × 10⁻³ (8.20 × 10⁻³) | 0.853 |
| (ΔT)² | -1.88 × 10⁻⁴ (2.26 × 10⁻⁴) | 0.405 |
| ΔP | +6.28 × 10⁻⁴ (1.89 × 10⁻⁴) | 0.001 |
| (ΔP)² | -1.19 × 10⁻⁶ (3.70 × 10⁻⁷) | 0.001 |
| Joint Wald F | 5.27 | 0.0005 |
| Number of observations | 8,904 |
Table 3.
Primary model comparison on identical country-grouped folds.
| Model | Climate information | Response form | Grouped-CV R² |
| Baseline quadratic | Growing-season mean T and P | Quadratic | +0.0097 |
| Expanded quadratic | Canonical 60 predictors | Ridge-stabilized quadratic | +0.0054 |
| Random Forest | Canonical 60 predictors | Tree ensemble | +0.0440 |
Table 4.
Share of mean absolute SHAP attribution by climate variable within FAO region, mean across held-out fits (%).
Table 4.
Share of mean absolute SHAP attribution by climate variable within FAO region, mean across held-out fits (%).
| FAO region | Precipitation | Tmax | Tmin | Tmean |
|---|---|---|---|---|
| South West Pacific | 42.5 | 22.4 | 19.1 | 16.0 |
| Latin America and Caribbean | 41.6 | 23.1 | 18.8 | 16.5 |
| Asia | 39.3 | 24.4 | 19.0 | 17.2 |
| Africa | 38.8 | 24.3 | 19.6 | 17.3 |
| Near East and North Africa | 32.5 | 27.4 | 21.2 | 19.0 |
| Europe and Central Asia | 32.3 | 26.5 | 21.6 | 19.5 |
| North America | 27.7 | 28.4 | 23.2 | 20.7 |
Table 5.
Cumulative attributed effect of anthropogenic climate change on agricultural TFP, 1962-2020 (%). ΔT is the model-specific anthropogenic change in growing-season mean temperature (forced minus hist-nat) for each climate-model pair.
Table 5.
Cumulative attributed effect of anthropogenic climate change on agricultural TFP, 1962-2020 (%). ΔT is the model-specific anthropogenic change in growing-season mean temperature (forced minus hist-nat) for each climate-model pair.
| Model | ΔT (°C) | Quadratic | Random Forest | Difference |
|---|---|---|---|---|
| ACCESS-CM2 | +1.34 | -23.90 | -21.66 | +2.24 |
| ACCESS-ESM1-5 | +1.32 | -29.04 | -24.38 | +4.65 |
| BCC-CSM2-MR | +0.86 | -15.96 | -17.21 | -1.25 |
| CNRM-CM6-1 | +1.10 | -21.51 | -21.23 | +0.28 |
| CanESM5 | +1.99 | -31.08 | -27.75 | +3.33 |
| FGOALS-g3 | +1.43 | -21.31 | -21.78 | -0.47 |
| GFDL-ESM4 | +1.01 | -18.36 | -18.71 | -0.35 |
| HadGEM3-GC31-LL | +1.44 | -29.59 | -26.11 | +3.48 |
| IPSL-CM6A-LR | +1.63 | -23.00 | -23.62 | -0.62 |
| MIROC6 | +0.90 | -14.13 | -15.31 | -1.18 |
| MRI-ESM2-0 | +0.85 | -14.97 | -11.82 | +3.14 |
| Ensemble mean | +1.26 | -22.08 | -20.87 | +1.20 |
Table 6.
Cumulative attributed effect by FAO region, ensemble means across eleven climate-model pairs (%). T is regional average of observed growing-season mean temperature, and ΔT is the ensemble-mean anthropogenic growing-season warming (forced minus hist-nat).
Table 6.
Cumulative attributed effect by FAO region, ensemble means across eleven climate-model pairs (%). T is regional average of observed growing-season mean temperature, and ΔT is the ensemble-mean anthropogenic growing-season warming (forced minus hist-nat).
| FAO region | # of countries | T (°C) | ΔT (°C) | Quadratic | Random Forest | Difference |
|---|---|---|---|---|---|---|
| Africa | 46 | 24.9 | +1.2 | -18.9 | -18.1 | +0.8 |
| Asia | 24 | 23.3 | +1.1 | -20.5 | -22.2 | -1.7 |
| Europe and Central Asia | 41 | 14.8 | +1.3 | -21.4 | -16.8 | +4.6 |
| Latin America and Caribbean | 28 | 24.1 | +1.3 | -23.3 | -26.7 | -3.4 |
| Near East and North Africa | 20 | 22.0 | +1.4 | -30.4 | -25.2 | +5.2 |
| North America | 2 | 14.8 | +1.4 | -21.6 | -17.7 | +3.9 |
| South West Pacific | 7 | 23.5 | +1.1 | -20.8 | -20.5 | +0.2 |
Table 7.
Country-level attribution by baseline moisture quintile. Mean P is mean monthly precipitation. Quadratic and Random Forest columns report mean cumulative attributed effects within each quintile. RF − quadratic is the difference in percentage points. RF smaller loss (%) denotes the percentage of countries within each quintile for which the Random Forest gives a smaller attributed TFP loss than the quadratic model.
Table 7.
Country-level attribution by baseline moisture quintile. Mean P is mean monthly precipitation. Quadratic and Random Forest columns report mean cumulative attributed effects within each quintile. RF − quadratic is the difference in percentage points. RF smaller loss (%) denotes the percentage of countries within each quintile for which the Random Forest gives a smaller attributed TFP loss than the quadratic model.
| Baseline moisture quintile | Mean P (mm/month) | Quadratic (%) | Random Forest (%) | RF - quadratic (pp) | RF smaller loss (%) |
| Driest | 26 | -27.8 | -21.7 | +6.04 | 76% |
| 2 | 64 | -21.8 | -16.9 | +4.95 | 79% |
| 3 | 117 | -18.7 | -18.2 | +0.51 | 53% |
| 4 | 169 | -19.8 | -22.4 | -2.55 | 33% |
| Wettest | 263 | -21.6 | -24.5 | -2.92 | 29% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.