Free · WaitlistJoin the waitlist for the free 2-day Vibecoding & AI Agents Intensive (autonomous Hermes + DeepSeek agent · led by Jemal Hamidun, Head of AI at Alpina Digital & MIPT)Join the waitlist →

A Country-Risk Model for 174 Countries 'Peeked' Into the Future: Accuracy Dropped from 77% to 67%

A physicist and product manager built Seldon, an open model that estimates the risk of war and devaluation in 174 countries. Its initial AUC was 77%, meaning it ranked a future crisis-hit country above a calm one 77% of the time (a coin flip gives 50%). An audit found leaks: the average 2015 ruble rate already "contained" the December 2014 collapse. After the cleanup, the score fell to 67%, so check what the model knew on the forecast date.

AI-processed from Хабр: Машинное обучение; edited by Hamidun News
A Country-Risk Model for 174 Countries 'Peeked' Into the Future: Accuracy Dropped from 77% to 67%
Source: Хабр: Машинное обучение. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceХабр: Машинное обучение ↗
Editor-in-Chief
Key metric #165 of the 121 unit tests corrupt data dated after the forecast date and still expect the same answer
Key metric #2A simple formula with 4 features caught 44% of new wars in the top 10 (random would be 7%)
Key metric #3Before 2014, the model ranked Ukraine only 43rd out of 138

Imagine you trained a model to predict crises and it shows excellent results. You're pleased, but then you discover the answer was sitting in the training data. That is exactly what happened with the Seldon project. Its author is a physicist by training and a product manager by profession. She built an open model that estimates the probability of war, devaluation, and banking crisis in 174 countries. The first quality score was 77%; after an external audit it became 67%. The gap came from future leaks: the model saw things it could not have known on the forecast date.

How to Read "77%" and "67%"

The author measures quality with AUC. It answers a simple question: if you pick at random a country that later had a crisis and a country that did not, how often does the model rank the first one as riskier? A coin flip gives 50%, and the ideal is 100%. For devaluations, the initial result was 77%. After cleaning the data, it was 67%.

The project's idea grew out of Asimov's Foundation trilogy, where the mathematician Seldon calculates the fate of empires. The down-to-earth version: can open data (the Uppsala Conflict Data Program database, the IMF, and the World Bank) estimate the risk for a specific country? The model covers four events: the start of a war, a devaluation within a year, a sharp exchange-rate jump within a month, and a banking crisis. The code, tests, and reports, including negative results, are on GitHub.

Where the Future Leak Came From

The clearest case involves the ruble. In macroeconomic databases, the exchange rate is recorded as an annual average. The ruble collapsed in December 2014, so the average rate for 2015 is much weaker than for 2014. The model "predicted" the 2015 crisis even though the collapse was already in its features. After switching to a December-to-December comparison, Russia moved from 10th to 60th out of 121 in risk ranking one year before the collapse.

A second example: annual GDP is published only the following spring, but the model knew it as of January 1. It is the same mistake as a credit-scoring model using a salary that the bank learned about six months later.

The project now has 121 unit tests, and 65 of them check the same thing. A test takes the forecast date and corrupts all data after it. If the forecast changes even slightly, the model is looking ahead. This technique is easy to transfer to credit scoring, customer-churn forecasting, or demand forecasting.

What Worked and What Didn't

The physics idea of "critical slowing down" was not confirmed. The expectation was that exchange-rate fluctuations would grow before a devaluation. But for countries that pegged their currency to the dollar, a calm exchange rate turned out to be a warning sign: the central bank holds the rate until the very end and spends its reserves, so outside it looks quiet while the money runs out inside.

The idea also failed for wars: in 80% of annual windows with battle deaths, the signal is simply zeros. The news archive, household deposits, and currency purchases proved to be a "thermometer, not a barometer": they react to a crisis once it is already underway. The author worked on this part before the audit and did not recalculate it, so she does not report figures for it.

The simplest things worked best. A simple formula with four features is the best at catching wars: child mortality as a measure of poverty, the type of political regime, a war in neighboring countries, and the country's own conflict history. Its AUC is 82.

5%. The top ten of its ranking contained 44% of all new wars, whereas a random ordering would give 7%. Before its 2020 war, Azerbaijan ranked 3rd out of 131 countries.

For currencies, the "compressed spring" worked: a fixed exchange rate, prices rising faster than those of trading partners, and reserves melting away. Belarus in 2015 landed 1st out of 119. Gradient boosting, decision trees, and "smart" features such as party ideology and UN voting records did not beat ordinary logistic regression.

Honest Limitations

The sample is small: 151 wars over thirty years, 246 devaluations, and only nine banking crises suitable for testing. With nine events, the uncertainty interval for banks almost reaches the coin-flip level. The banking model is calculated for only 26 of the 174 countries; for the rest, the website states the reason no estimate is available.

The model is blind to wars that come "out of silence." Before 2014, it ranked Ukraine 43rd out of 138, Syria before 2011 49th, and Libya 67th. For post-Soviet countries, the one-year devaluation forecast is worse than a coin flip: 42–47%. The crashes of 1998 and 2014 hit the entire region at once, through oil and the ruble, while the model looks at each country's internal indicators.

What to Take Into Your Own Work

A beautiful metric means nothing until you know what the model knew at the moment of the forecast. The author freezes forecasts in the repository once a month so she can compare them with reality a year later. Such a check cannot be tuned after the fact. Practitioners should adopt three habits: tests that corrupt data after the forecast date, publishing negative results, and forecasts fixed in advance. The project is open, and the author asks people to look for new leaks in it: by her account, a bug report like that is worth more than any praise.

Story

Key Questions Answered

How to Read "77%" and "67%"?

The author measures quality with AUC. It answers a simple question: if you pick at random a country that later had a crisis and a country that did not, how often does the model rank the first one as riskier? A coin flip gives 50%, and the ideal is 100%. For devaluations, the initial result was 77%. After cleaning the data, it was 67%. The project's idea grew out of Asimov's Foundation trilogy, where the mathematician Seldon calculates the fate of empires.

Where the Future Leak Came From?

The clearest case involves the ruble. In macroeconomic databases, the exchange rate is recorded as an annual average. The ruble collapsed in December 2014, so the average rate for 2015 is much weaker than for 2014. The model "predicted" the 2015 crisis even though the collapse was already in its features. After switching to a December-to-December comparison, Russia moved from 10th to 60th out of 121 in risk ranking one year before the collapse.

What Worked and What Didn't?

The physics idea of "critical slowing down" was not confirmed. The expectation was that exchange-rate fluctuations would grow before a devaluation. But for countries that pegged their currency to the dollar, a calm exchange rate turned out to be a warning sign: the central bank holds the rate until the very end and spends its reserves, so outside it looks quiet while the money runs out inside. The idea also failed for wars: in 80% of annual windows with battle deaths, the signal is simply zeros.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…