A climate classifier lost accuracy when countries were kept apart
Across 3,144 country-year records, XGBoost accuracy fell from 74.9% under a random split to 62.4% when every test country was unseen—a practical warning about geographic leakage.
The short version
- What happened
- The estimation sample contained 3,144 country-year observations from 131 countries between 2000 and 2023, after 96 rows with missing or non-positive emissions were removed.
- Who it affects
- Public officials need models that work for their country, not merely on repeated records from countries the system already knows.
- What remains unproven
- Observational panel data, sample-defined emission categories, predictor missingness, sparse regional test groups and no causal policy identification.
Keep in mind
Observational panel data, sample-defined emission categories, predictor missingness, sparse regional test groups and no causal policy identification.
Source analysis · 1 linked source. Primary analysed source date: 16 October 2026.
Read the full report · 4 min The evidence, methods, implications and limitations
A familiar country can make a model look smarter
A model for sorting countries into low, medium and high per-capita CO2 groups looked materially better when the same country could appear in both training and test data. XGBoost reached 74.9% accuracy under a random country-year split, but 62.4% when the researchers kept every test country entirely outside training. That 12.5-point loss matters for any government tempted to treat a high headline score as proof that a model will travel.
The peer-reviewed study assembled a maximum panel of 135 countries from 2000 to 2023 using World Bank indicators and OECD environmental-tax data. Four countries lacked usable emissions coverage; removing 96 rows with missing or non-positive CO2 left 3,144 country-year observations from 131 countries. Eight predictors covered trade, growth, governance, investment, urbanisation, labour participation and environmental-tax revenue.[1]
The stricter test exposed the middle category
Because national institutions, trade structures and emissions change slowly, a random row split lets the model recognise profiles it has effectively seen before. The primary holdout instead reserved 33 entire countries—792 observations—for testing. Across six algorithms, accuracy ranged from 62.2% to 65.0%. Nested country-grouped cross-validation produced overlapping uncertainty intervals and no decisive winner, including against ordered-logit baselines.
The middle-emission class caused the most trouble. XGBoost correctly classified 235 of 253 low observations and 119 of 259 high observations, but only 140 of 280 middle observations; 94 were pushed into the low group. Regional results were too sparse for confident rankings: North America and South Asia each contributed one test country, while the Middle East and North Africa contributed two.
Chronological tests were stronger than the unseen-country test. Random forest reached 74.0% when trained through 2017 and tested on 2018–2023, while XGBoost reached 71.0% in a one-year-ahead task. This suggests the model transferred more readily across time within familiar national systems than across different countries.[1]
The distinction that matters
How the validation design changed the answer
The records stayed similar; what changed was whether a country could appear on both sides of the train-test boundary.
Random rows
Country-years mixed across train and test
XGBoost accuracy 74.9%
Whole countries
33 test countries absent from training
XGBoost accuracy 62.4%
Policy limit
Rank predictive associations
No causal effect established
Prediction is not a policy lever
Government effectiveness, urban population growth and environmental-tax revenue ranked highly in the explanation methods. Yet the direction can be misleading without context. High environmental-tax revenue accompanied many high-emission, high-income states because those countries have both taxable pollution and administrative capacity. The study did not show that environmental taxes increase emissions, or that changing a governance score would cause a country to change category.
For climate analysts, the evidence check is therefore about use: this classifier may flag broad monitoring profiles, but it does not estimate policy effects or replace physical emissions inventories. Overall predictor missingness was 5.9%, category thresholds depended on the sample, and some regional tests contained only one or two countries. The paper also reported no external funding or commercial conflicts, while disclosing limited generative-AI assistance with manuscript language and layout rather than the scientific analysis. Confidence would rise with genuinely out-of-sample regional cohorts, richer energy-system variables, preregistered causal comparisons and public replication code. The clearest result is methodological: keep geography out of the training set when geography is the claim.[1]