Main

Land borders can be effectively conceptualized as complex coupled human–natural systems, where political, social, and ecological processes interact in unique and often intensified ways1,2. Border areas cover nearly 1/3 of the terrestrial biodiversity hotspots3,4,5, and support above 1/6 of the global human population6. Additionally, they concentrate diverse development gradients, governance asymmetries, ecological vulnerabilities, and geopolitical tensions—including 45% of global armed conflicts and over 40 unresolved territorial disputes7,8. Obviously, their importance extends far beyond their spatial extent. Therefore, such characteristics make them pivotal for understanding the dynamics of land systems and for achieving Sustainable Development Goals (SDGs), like SDG 1 (No Poverty), SDG 13 (Climate Action), SDG 15 (Life on Land), and SDG 16 (Peace, Justice, and Strong Institutions)9,10.

Since the 1990s, border areas among neighboring countries have transitioned from peripheral zones of socio-economic development to new frontiers11,12,13. This vigorous development has promoted land use changes, such as agriculture-forest conversion, which are often presented14,15,16,17,18. Importantly, agricultural activities play an important role in altering regional human well-being and environments19,20. The development of regional integration has accelerated the concentration of infrastructure, population, and other elements at national borderlands21,22,23,24. A recent study reported that 16% of land use changes were in the borderlands globally25, including the transformation of cropland. However, this seemingly modest share conceals the critical role of borderlands as institutional and ecological frontiers, where divergent national policies and land systems converge—amplifying the impacts of even small-scale land changes. Therefore, it is essential to study the dynamic changes, drivers, and impacts of cropland changes over border areas.

Globally, cropland expansion and/or loss are attributed to human activities and natural climate change26,27,28, but are further complicated by the presence of national boundaries. Different countries implement contrasting land use, agricultural, and conservation policies, creating sharp cross-border gradients29,30. These policy discontinuities often result in divergent trajectories of cropland change, even under similar ecological conditions. Socio-economic factors have proven to be increasingly important in border agricultural practice31,32, e.g., the land management policy of cross-border cultivation33,34. However, local to global cropland-related analyses are mostly focused on administrative units (e.g., countries)19,20,35,36, overlooking the distinctive behaviors and ecological consequences of borderland systems. Notably, the role of border cropland change in shaping biodiversity has rarely been evaluated at a global scale.

Here, we quantified the characteristics of cropland changes in the borderlands at national, continental, to global scales during the 21st century by integrating high-frequency time-series (2001–2020) satellite observations. We further employed an interpretable machine learning model (XGBoost-SHAP) to determine the influences of natural and socio-economic elements on border cropland changes and their underlying mechanisms. Additionally, we investigated the biodiversity-productivity feedback of cropland changes over border areas using a structural equation model (SEM). These global coverage analysis of integrating diverse data, models, and methods enables us to understand the patterns, drivers, and consequences of cropland changes in the borderlands.

Results

Cropland in border areas was approximately 206.73 ± 1.23 Mha, or 17% of the global total area and showed an accelerating reduction in the 21st century (Fig. 1A and Supplementary Fig. 1). From 2001 to 2020, 75, 14, and 11% of border cropland was stable, reduced, and expanded. Among them, cropland reduction was observed in 153 of the 290 groups of national border areas (Supplementary Table 1). Importantly, we found that a total of 32.80 ± 0.87 Mha of cropland was converted to other land types in the last 21-years, including 67% into grasslands and 32% into forests (Fig. 1B and Supplementary Table 2). For example, in African border areas, half of cropland reduction was due to grassland encroachment since 2001. At the national level, the Russia-Kazakhstan border showed the largest loss globally (2.78 ± 0.19 Mha) (Fig. 1C and Supplementary Table 1). Additionally, using our bordering/off-bordering model-derived (see Supplementary Table 3 and Methods), we found that cropland reduction and/or expansion exhibited border-prone features or border-oriented development tendencies (Supplementary Fig. 2). Over 56% of cropland reduction and 53% of expansion occurred within the 30 km near-border zones.

Fig. 1: Spatio-temporal pattern and change of cropland in border areas in the twenty-first century.
Fig. 1: Spatio-temporal pattern and change of cropland in border areas in the twenty-first century.
Full size image

A The proportion of stable cropland, cropland reduction, and cropland expansion within 0.05° × 0.05° grid cells. The lower-left subpanel in A represent annual variations of cropland area in border areas around the globe from 2001 to 2020, and the shaded area corresponds to 95% confidence band. In A, example of the five pairs of bilateral border countries with the cropland changes, like the border of US-CA (United States-Canada), BR-PY (Brazil-Paraguay), RU-KZ (Russian–Kazakhstan), SD-ET (Sudan-Ethiopia), LA-TH (Laos-Thailand). Administrative boundary data sourced from the GADM database (https://gadm.org/). B Land cover conversions from cropland in border areas between 2001 and 2020. The chord diagram illustrates the primary land cover types (e.g., forest, grassland) that replaced former cropland, with analysis at global level and major continents. NAM (North America), SAM (South America), EUR (Europe), AFR (Africa), and Asia. C. Aerial view and remotely-sensed survey of the homogeneousness and heterogeneousness of land use/cover in the above-mentioned five pairs of bilateral border countries, obtained from MCD12Q1 product in 2001 (left) and 2020 (right) and Google Earth imagery in 2001 (left) and 2020 (right). In B,C the same legend is used to represent land use types and their transformations. The International Standards Organization (IOS) two-letter country codes represent the borderlands between the two countries, e.g., US-CA are the United States-Canada borders. The full names of the IOS can be found in Supplementary Table 1.

We then analyzed the relative importance of the underlying causes in determining the changes of border cropland using the Extreme Gradient Boosting (XGBoost) model, combined with Shapley Additive Explanations (SHAP) to interpret the underlying mechanisms (see Methods and Supplementary Fig. 3). Given that cropland loss is the dominant trend observed in our study, our primary analysis focuses on revealing the drivers behind this reduction. Our analysis reveals that the drivers of cropland loss exhibit marked heterogeneity at both global and continental scales. Globally, temperature (TEM), slope (Slope), and GDP were the three most important drivers (Fig. 2A). The SHAP value analysis further indicates that marginal natural conditions are a key force pushing land out of cultivation: for instance, high elevation (ELE) and steep slopes (Slope) both significantly increase the probability of cropland loss (Fig. 2B). In contrast, on the socio-economic side, while high GDP is generally associated with cropland loss, areas with high population density (POP) and high road density (Road) show a lower probability of loss.

Fig. 2: Potential causes for border cropland loss.
Fig. 2: Potential causes for border cropland loss.
Full size image

A The importance and contribution of each natural and socio-economic factors on cropland loss in global and continental border areas based on the mean absolute value of SHAP. NAM, North America; SAM, South America; EUR, Europe; AFR, Africa; ASIA, Asia. B SHAP values based on the global random forest model, with colors indicating the feature values. Red for high values and blue for low values. C The results of the effect of changes in each feature on the model’s prediction. The meaning of the Y-axis (Partial Dependence) as the marginal effect on the prediction probability. The sub-panels in C represent one predictor, with the red line indicating the average trend and the gray area representing the data variance. ELE, Elevation; TEM, Temperature; PRE, Precipitation; POP, Population; GDP, Gross Domestic Product; NTL, Nighttime Lights.

At the continental level, while natural conditions such as temperature and topography remain the dominant drivers in most regions, the relative importance of socio-economic factors varies substantially (Fig. 2A). In North and South America, for example, temperature (TEM) was the absolute dominant driver of cropland loss (mean SHAP = 0.77 and 0.72, respectively). In Asia and Africa, by comparison, the influence of population (POP) was the most prominent among all socio-economic factors (mean SHAP = 0.25 and 0.21, respectively), showing a greater relative importance than in other continents. Notably, the mechanisms driving cropland gain are substantially different from those driving loss. Globally, favorable climatic conditions, such as high temperatures (TEM) and precipitation (PRE), along with a strong economic base (GDP), were the most critical drivers for cropland expansion (see Supplementary Fig. 4-5 for details). This dichotomy of driving mechanisms is further supported by our Partial Dependence Plots (Fig. 2C), which show, for example, that high elevation (ELE) strongly predicts cropland loss while inhibiting its gain (Supplementary Fig. 6).

To gain deeper insights into the underlying mechanisms that drive the correlation between cropland change and biodiversity in global border areas, we used a SEM to explore the mediating role of landscape productivity (measured as NPP) (Fig. 3A). We found that cropland loss exerts an impact on biodiversity through a critical indirect pathway: cropland loss significantly increases landscape-level productivity (path coefficient = −0.084, p < 0.001), and this increase in productivity, in turn, significantly promotes higher biodiversity (path coefficient = 0.124, p < 0.001). This result strongly demonstrates that the mediating effect of NPP is the key mechanism driving the positive association between cropland loss and improved biodiversity.

Fig. 3: Mechanisms for the correlation between cropland change and biodiversity.
Fig. 3: Mechanisms for the correlation between cropland change and biodiversity.
Full size image

A is the structural equation model (SEM) analysis. The numbers in the path diagram represent the global means and 95% confidence intervals of standardized path coefficients and the colors (red and blue arrows represent positive and negative effects, respectively) and the widths of the arrows represent the signs and magnitudes of the path coefficients, respectively. The path effect plot (lower panel) decomposes the total effect of cropland change on biodiversity into the direct effect (‘a’) and the indirect effect (‘b’) mediated by NPP. The value for the indirect effect ‘b’ is calculated as the product of the two path coefficients along the indirect path. ‘TE’ represents the total effect (direct + indirect). The model robustness of structural equations is reported in Supplementary Fig. 7. B shows the results of the correlation between multi-year cropland loss and biodiversity including (i) amphibians, (ii) birds, (iii) mammals, and (iv) mean species richness using coefficients of variation (%). In B, the “bar” (the vertical black line within each violin) represents the data range within 1.5 times the interquartile range (IQR), and the “plot” (the white point or square on the line) indicates the median of the data. The color gradient within each violin plot corresponds to the x-axis, visually representing the rate of cropland loss; reddish tones indicate the least severe loss rates. C represent the spatial distribution of impact of NPP changes (p < 0.05) on biodiversity of (i) amphibians, (ii) birds, (iii) mammals, and (iv) mean species richness in global border areas over 2001-2020.

While our causal model pinpoints this effect as indirect, further analyses confirm the strong overall association between them. We also noted significant relationships between cropland change and amphibians (P < 0.01), birds (P < 0.01), mammals (P < 0.05), and mean species richness (P < 0.05) (Fig. 3B). Spatially, the areas with increased NPP had relatively high species richness (Fig. 3C). Additionally, the high rates of cropland reduction generally coincided with areas of higher species richness, forming a “high-high” pattern and with regional variability. The cropland loss contributed to a 26% ( ± 0.25%) increase of biodiversity, with the conversion of cropland to grassland making the largest contributions (Supplementary Fig. 8).

Discussion

Our study discovered and quantified the patterns, drivers, and impacts of cropland change over the borderlands from 2001 to 2020. We found that approximately 17% of global cropland were in border areas, and showing a noticeable decline trend (3%) in the 21st century, in contrast with increase at the global level (Fig. 1 and Supplementary Fig. 1). Importantly, 67% and 32% of the cropland were converted into grasslands and forests (Fig. 1 and Supplementary Table 2). Our XGBoost models further showed that natural and socio-economic factors jointly influence border cropland loss (Fig. 2). We further showed positive feedback of cropland reduction on biodiversity by influencing productivity (Fig. 3 and Supplementary Fig. 8-9). Here, about 70% of border areas show increased trends of cropland productivity, with an increment of 7% (total productivity) and 9% (average productivity per unit area), respectively (Supplementary Fig. 9 and Supplementary Table 4). While border areas account for just one-twelfth of the Earth’s land surface, they carry outsized national to global importance. Our new perspectives and findings on border-cropland can enrich existing pan-regional cropland studies, and further provide an encouraging basis for food security and sustainable development in global border areas.

We also observed that over 52% of borderlands are decreasing in cropland under the border population growth since 2001 (Supplementary Fig. 10). The reduction of border cropland had diverse consequences, including the enhanced pressure on agricultural yields and food security37,38,39. This, in turn, had profound effects on the dynamics of biodiversity-productivity37,38,39. Our border results also supported that cropland reduction may contribute to biodiversity recovery. Previous studies suggest that the increase of productivity could be accompanied by the improvement of the ecological environment37,38,39, such as the increase of the area of ditches and other wetlands around farmland and the improvement of water quality, as well as the improvement of fractional vegetation coverage in farmland, which can provide more habitats for amphibians, birds, and mammals40,41,42. In our study, with the exception of cropland conversion to construction land, which decreased landscape productivity by 13%, cropland conversions to other land cover types led to a notable increase in productivity, ranging from 4% to 16% (Supplementary Table 5).

Additionally, compared to global scales35,43,44,45, we identified that natural conditions, such as temperature and elevation, are dominant drivers of cropland change in border areas. However, this should not be interpreted as environmental determinism46,47. Rather, our results indicate that these factors mediate the spatial patterns of human land-use decisions by defining a landscape of biophysical constraints and opportunities. Our SHAP analysis provides direct evidence for this: cropland loss is most strongly predicted by characteristics of marginal land—such as high elevation, steep slopes, and low temperatures—where agriculture is most vulnerable to socio-economic pressures48,49,50. Conversely, cropland gain is primarily predicted by favorable conditions, indicating that expansion is a deliberate human choice targeting the most suitable areas19,51,52,53. Thus, our model successfully captures the critical interaction between environmental context and human agency in shaping borderland agricultural landscapes. This also suggests the need for sustainable land management and cultivated land development strategies in border areas54,55.

Notably, geopolitical and geo-economic relationships of cooperation or competition and conflict or confrontation among neighboring countries are influencing agriculture-forest conversion7,22,30,56,57,58. This is strongly evidenced by the distinct ‘bordering’ pattern we observed, where cropland change exhibits a border-prone feature. This spatial concentration suggests that the border itself acts as a powerful mediating force, where geopolitical dynamics are most intensely manifested. For example, cross-border cooperation might spur agricultural development in near-border zones59, while geopolitical tensions could simultaneously lead to land abandonment for security reasons in the same areas56,60. With the continuous development of geo-relations, land use, including cropland changes in the border areas, will undergo more consequential changes and may bring more potential ecological, socio-economic, and political problems61,62,63,64,65. In such cases, incorporating the geo-relationships and their spatial expression as ‘bordering’ or ‘off-bordering’ patterns into causal mechanism models of border land use changes should be an immediate priority25.

In summary, borderlands are changing rapidly. When overlaid with local to global climate, eco-environmental, and socio-economic elements in the Earth system, our border views can play a bridge role to evaluate the social and ecological impacts. Our analysis suggests that the sustainable development of land resources in border areas should be incorporated into future assessments with the high-resolution and time-series mapping of important land categories. Regions in the border areas, such as cropland in this study, provide an essential data foundation for border studies. Importantly, a more effective border-related scientific platform is also needed to investigate the resources and their dynamics in the border areas in an era of geo-data25, supporting the sustainable development of land on Earth.

Materials and data

Border areas

Land borders are a symbolic resource of economic significance and political profile. Border areas specifically refer to the borderlands of neighboring countries29. Therefore, we initially identified the borderlands of 313 groups of countries across five continents, including Asia, Africa, Europe, North America, and South America. International border studies and border management have varying standards for the extent of the border zone, such as 5 km for Russia, 20 km for China, 30 km for the European Union, and 60 km for the United States1366. After comprehensive consideration, this study defines the border area as a 60 km buffer zone on both sides of the national boundary. Statistical data show that the global border area covers about 1/12 of the land surface. In this study, cropland and its changes are detected in 290 of the 313 groups of border countries, so we analyzed mainly these 290 groups of national borderlands (Supplementary Table 1).

Notably, cropland changes in border areas may also be correlated with the length of the national borderline, the buffer sizes, and the number of neighboring countries6. However, we conducted correlation test and found no significant relationship between the length of various national borderlines and either an increase (P > 0.05) or a decrease (P > 0.05) in border cropland change (Supplementary Fig. 11). Furthermore, cropland in buffer zones within different distances from national boundaries (i.e., 20, 30, 60, 90, 100, and 120 km) shows a consistent decreasing trend when the border extent changed (Supplementary Table 6). This indicates that the main findings of our border-prone patterns in cropland area reduction are robust and prevalent. However, more precise and/or finer resolution data product are needed in the future to observe changes over long time series at national, pan-regional to global borderlands67.

Data Source

This study utilizes land use data, natural environment data, and socio-economic data to characterize the spatio-temporal patterns and driving factors of cropland changes in the borderlands globally. The global boundary data were obtained from the Global Administrative Areas (GADM) database. The land use data (2001–2020), with a spatial resolution of 500 m, were sourced from the MCD12Q1 product of MODIS. Following the methodology of our previous study67, we re-classified these data into six primary categories, including cropland, grassland, forested land, construction land, bare land, and others (Supplementary Table 7). All land use data were reprojected and resampled to the target projection (Equal Earth). In our analysis of the drivers of cropland changes in the borderlands globally, we considered changes in elevation, slope, temperature, and precipitation as indicators of natural conditions (see Supplementary Methods for detailed description and Supplementary Table 8). Gross domestic product (GDP), population, night lighting (NLT), and roads served as indicators of socio-economic development.

Importantly, to characterize the impact or consequence of changes in cropland, we selected two key ecological indicators: ecosystem productivity, represented by NPP, and biodiversity, represented by species richness. NPP is the total amount of carbon absorbed by plants through photosynthesis, minus the carbon lost due to plant respiration68. It represents the net amount of organic matter produced by the ecosystem over time. Unlike gross primary productivity (GPP), which only reflects the total carbon absorbed by plants, NPP accounts for the carbon loss through respiration and shows the actual organic matter available for growth and consumption. NPP is a better measure of cropland productivity because it reflects net carbon fixation, providing insights into the ecosystem’s carbon storage and energy flow. Additionally, NPP is valuable in biodiversity studies because it relates to carbon cycling, nutrient availability, and other factors that influence ecosystem stability and biodiversity40. We used species richness and total abundance of three common terrestrial vertebrate taxa (amphibians, mammals, and birds) to represent terrestrial biodiversity38. Species richness data were calculated through the spatial overlap of range maps for birds, mammals, and amphibians (the three common vertebrate taxa) with an equal-area 10 km grid cell. All data were reprojected and extracted to compute a grid of 0.05°.

Although our study enhances the understanding of cropland dynamics along global borders, several issues and uncertainties remain in terms of datasets. For instance, cropland in border areas is often characterized by small-scale smallholder production. Some cropland changes are missed and underestimated due to the coarse resolution of 500 m MODIS-based products. Additionally, rotational farming practices or swidden agriculture, which are common in Africa and Southeast Asia, are overlooked in the dataset45. Consequently, this study has uncertainties in tropical areas experiencing agricultural transitions and evolution due to this specific land management practice.

Analysis method

We summarize the methods that are used in this study to track the patterns, drivers, and consequences of cropland change in global border areas.

Land use change

Bordering/off-bordering model (or buffer zone analysis)

To quantify the spatial patterns or characteristics of cropland change in the borderlands globally, we established six buffer zones (i.e., 0–10, 10–20, 20-30, 30–40, 40–50, and 50–60 km) at 10 km intervals around the national boundaries. When land use changes or cropland transformation more obviously in areas closer to the border (near-border areas), this phenomenon is termed ‘bordering’. Conversely, when the degree of land use change is greater in areas further from the border (far-border areas), this phenomenon is referred to as ‘off-bordering’. Previous studies have demonstrated that the bordering/off-bordering characteristics of land use could reflect the impact of geopolitical relations and policies on land use change to a certain extent13. In this study, we further categorize the bordering/off-bordering characteristics into 4 patterns, based on the specifics of border cropland changes, i.e., bordering expansion, off-bordering expansion, bordering reduction, and off-bordering reduction (Supplementary Fig. 2 and Supplementary Table 3).

Land use transfer matrix

The land use transfer matrix can reflect the transfer direction and transfer quantity of each land use type in the region, which can well reveal the spatial and temporal evolution process of the land use pattern. Its mathematical model is as follows.

$${S}_{{ij}}=\left(\begin{array}{ccccc}{S}_{11} & {S}_{12} & {S}_{13} & \cdots & {S}_{1n}\\ {S}_{21} & {S}_{22} & {S}_{23} & \cdots & {S}_{2n}\\ {S}_{31} & {S}_{32} & {S}_{33} & \cdots & {S}_{3n}\\ \cdots & \cdots & \cdots & \cdots & \cdots \\ {S}_{n1} & {S}_{n2} & {S}_{n3} & \cdots & {S}_{{nn}}\end{array}\right)$$
(1)

Where S is the variation area of each land-use type, n is the total types of land use, and i and j are the types of land use at the beginning and end of the study.

Multi-year trends in cropland

The cropland area from 2001 to 2020 was aggregated into 0.05° × 0.05° grids annually. A long-term trend analysis was then conducted for each grid to identify monotonic trends of continuous increase or decrease in cropland over the 21st century. This study employed the Mann-Kendall test, a non-parametric method applicable to all data distributions without requiring the normality assumption. The model produced two outputs: the slope of change and a p-value for significance. Cropland areas with significant trends (p < 0.05) were used as a mask to extract all relevant slopes, ensuring that the analysis focused exclusively on significant cropland changes. If the slope <0, it indicates a significant shrinking trend in cropland within the grid over the past 20 years. Conversely, if the slope > 0, it represents a significant expansion trend. The Mann-Kendall test involves two primary outputs:

The slope (β) is estimated using the Theil-Sen method, defined as:

$$\beta ={{\rm{median}}}\left(\frac{{x}_{j}-{x}_{i}}{j-i}\right),\forall i < j$$
(2)

Here, \({x}_{i}\) and \({x}_{j}\) represent data points at time steps \(i\) and \(j\), respectively, and \(j > i\). The median of all possible slopes provides a robust estimate of the overall trend.

The Mann-Kendall test statistic SSS and its variance Var(S)\text69. (S)Var(S) are computed:

$$S=\mathop{\sum }\limits_{i=1}^{n-1}\mathop{\sum }\limits_{j=i+1}^{n}{{\mathrm{sgn}}}\left({x}_{j}-{x}_{i}\right)$$
(3)

Where:

$${{\mathrm{sgn}}}\left({x}_{j}-{x}_{i}\right)=\left\{\begin{array}{cc}+1, & {if}{x}_{j}-{x}_{i} > 0,\\ 0, & {if}{\,x}_{j}-{x}_{i}=0,\\ -1, & {if}{\,x}_{j}-{x}_{i} < 0\end{array}\right.$$
(4)

The variance is given by:

$${{\rm{Var}}}\left(S\right)=\frac{n\left(n-1\right)\left(2n+5\right)}{18}$$
(5)

If tied ranks exist, an adjustment is made to \({{\rm{Var}}}(S)\).

The standard normal Z-statistic is then calculated as:

$$Z=\left\{\begin{array}{cc}\frac{S-1}{\sqrt{{{\rm{Var}}}\left(S\right)}}, & {if}S > 0,\\ 0, & {if}S=0,\\ \frac{S+1}{\sqrt{{{\rm{Var}}}\left(S\right)}}, & {if}S < 0.\end{array}\right.$$
(6)

The p-value is obtained using the standard normal cumulative distribution function (CDF):

$$p=2\cdot \left(1-\Phi \left(\left|Z\right|\right)\right)$$
(7)

Identifying driving factors by using interpretable machine learning

We integrated the Extreme Gradient Boosting (XGBoost) and SHAP methods to enhance the prediction and interpretation of cropland changes in border areas. The XGBoost is a popular tree-based ensemble learning algorithm composed of multiple iterative decision trees, widely used for classification and regression tasks. It features advantages such as support for multithreaded computing and shrinkage techniques to prevent overfitting70. Recently, XGBoost has been employed within the SHAP framework for local explanations. The SHAP method, derived from the Shapley value concept in game theory, is considered an improvement over the Local Interpretable Model-agnostic Explanations (LIME) approach for model interpretability.

In this study, we utilized the non-linear XGBoost algorithm to model cropland change in border areas, driven by eight factors, including socio-economic and natural conditions. Cropland existing before 2001 was labeled as stable cropland (0), while cropland reduced between 2001 and 2020 was labeled as1, and expanded cropland was labeled as2. Since our XGBoost model is a multi-class classifier, the SHAP explainer generates a separate set of attribution values for each class (stability, loss, and gain). This allowed us to both explore the overall drivers of cropland change by aggregating the SHAP values, and to decouple the distinct mechanisms driving opposing trends through independent analysis. In this study, we conducted both analyses but focused primarily on the drivers for class1 (cropland loss), the dominant trend, while also examining the drivers for class2 (cropland gain) to allow for a clear decoupling of the factors contributing to cropland abandonment versus those driving its expansion. To prevent overfitting, we applied correlation analysis and the Variance Inflation Factor (VIF)71 to eliminate variables with low predictive power, ensuring that only the most relevant features were included in the model. The XGBoost model was implemented in Python, and its accuracy was evaluated through ten-fold cross-validation, with the average accuracy of all ten iterations calculated to assess the model’s generalization performance.

The SHAP method quantifies the impact of each feature on the model’s predictions, providing theoretically grounded local explanations72. By calculating the average marginal contribution of each predictor variable across all possible combinations, SHAP assigns an importance value to each feature for specific predictions. For a given input sample x with M features, the SHAP mechanism can decompose an individual prediction into feature contributions as follows:

$$f\left(x\right)=g\left({x}^{{\prime} }\right)={{{\varnothing }}}_{0}+\mathop{\sum }\limits_{i=1}^{M}{{{\varnothing }}}_{i}{x}_{i}^{{\prime} }$$
(8)

Where \(f\) and \(g\) represent the original and explanation models, respectively, \({\varnothing }_{0}\) is the mean prediction value, and \({\varnothing }_{i}{x}_{i}^{{\prime} }\) is the SHAP value for feature i in sample x. SHAP can also be used for global explanations, with feature importance defined as:

$${I}_{{{SHAP}}_{j}}=\frac{1}{n}\mathop{\sum }\limits_{i=1}^{n}\left|{{{\varnothing }}}_{{ji}}\right|$$
(9)

Where j and i represent the input variable and data sample, respectively, and n is the number of samples.

We applied SHAP to detect the effects of different factors (SHAP values) and their main effects (SHAP main values, excluding interactions with other input variables). Using various tools within the SHAP framework, we were able to clearly interpret the impact mechanisms of socio-economic and natural environmental factors on cropland change. The patterns of feature importance and SHAP values remained consistent.

Impact assessment of border cropland change

To explore the potential mechanisms by which cropland affects biodiversity, we performed SEM, including both direct and indirect paths. We hypothesized that the effect of cropland changes patterns on biodiversity is mediated by their impact on NPP. To test and estimate this hypothesis, we constructed an SEM that included mediating variables of NPP. Path coefficients were estimated using maximum likelihood estimation based on the normalized values of cropland changes, NPP, and biodiversity. Additionally, we assessed the model’s effectiveness by calculating various statistics and fit indices, such as the chi-square test, the goodness-of-fit index (GFI), the normed fit index (NFI), the incremental fit index (IFI), the comparative fit index (CFI), and the root mean square error of approximation (RMSEA). The SEM was initially applied to each pixel of cropland across the border areas, and we subsequently selected pixels with cropland reduction.

NPP change in border cropland

Generally, NPP is a proxy variable for analyzing crop productivity68. In this research, variations in the NPP of croplands in global border areas from 2001 to 2020 were quantified to delineate the effects of changes in cropland on food production and ecological equilibrium. Given that the resolution of both the NPP and land use data is 500 m, it is feasible to overlay the NPP directly onto the corresponding cropland layer. This approach enables the computation of the total and per unit area NPP for each region annually. In addition, we have also simultaneously analyzed multi-year trends in cropland NPP, which can be done by referring to the multi-year trends in cropland above.

Biodiversity consequences of border cropland reduction

To represent terrestrial biodiversity consequences of cropland loss in border areas, we used species richness and total abundance of three common vertebrate taxa: amphibians, mammals, and birds68,73. Species richness data were calculated by spatially overlapping range maps for these taxa—birds, mammals, and amphibians—within a 10 km equal-area grid cell. We summarized the rate of cropland shrinkage within a 0.05° grid, along with the total number of mammals, amphibians, and birds, as well as the mean species richness index. We conducted spatial overlap analysis to generate bivariate maps of cropland shrinkage rates and biodiversity. Additionally, we calculated the correlation between the rate of cropland shrinkage and the four biodiversity indicators for each grid.

Impact of NPP change on biodiversity

To assess the terrestrial biodiversity consequences of NPP changes, we utilized four distinct species richness indicators. Three of these taxa-specific, representing the species richness of amphibians, mammals, and birds, which was calculated by spatially overlapping their respective range maps within a 10 km equal-area grid cell38. The fourth indicator was a composite ‘mean species richness index’ that provides a generalized measure of overall diversity. For the analysis, we first summarized the rate of cropland shrinkage and NPP changes within a 0.05° grid. We then conducted spatial overlap analysis to generate bivariate maps and calculated the correlation between these change rates and each of the four biodiversity indicators per grid cell. This approach provides valuable insights into the mechanisms through which land use changes may influence ecosystem stability and species abundance.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.