
Spain’s tax agency, Agencia Tributaria, has fully stepped into the AI era. Human “gut feeling” is increasingly being replaced by algorithms that work around the clock, cross-checking huge data sets – and deciding which taxpayers should be examined more closely.
Over the past few years, tax authorities around the world have been moving away from classic random audits toward more data-driven risk analysis. Spain is now one of the clearest examples of this shift.
According to former Hacienda employee Emilio Baena, who worked ten years at Agencia Tributaria, every taxpayer in Spain now has a “risk profile” score that is updated in real time. This profile is based on a wide range of data points: filing history, income, spending patterns, bank transactions, business interests, international links and much more.
The end result: it is no longer a human caseworker who first decides whether something looks suspicious – it is an AI-driven algorithm.
The picture emerging from Spanish media and expert commentary can be summed up in a few points:
Baena’s warnings, as reported in Spanish media, give a clear picture of what kind of behaviour can attract the attention – or concern – of Spain’s tax authority. Roughly speaking, it falls into six categories:
1. Spending that doesn’t match your income
If your lifestyle – travel, purchases, investments – sits well above the income you declare, the algorithm reacts. This applies to both individuals and business owners.
2. Unclear money moving between accounts
Large or frequent transfers between your own accounts or those of close relatives, without clear economic logic or documentation, can be seen as attempts to hide where money comes from or what it is really used for.
3. International transactions and cryptocurrencies
Cross-border payments, use of platforms in other countries and crypto trading rank high on the risk radar, especially if they aren’t backed up by what you report in your tax return.
4. Cash and odd invoicing patterns
An unusually high share of cash transactions, “creative” invoices or recurring patterns that deviate from normal practice in your sector (for example many small invoices to stay below reporting thresholds) can trigger automatic follow-ups.
5. Links to foreign company registers
If your name appears in international company registers, trust structures or other ownership databases, it is factored into your risk profile – especially if it doesn’t show up clearly in your tax filings.
6. Contradictions with data from banks and platforms
The tax agency receives data directly from banks, employers, payment platforms and sometimes even marketplaces. If what you report yourself differs too much from these sources, there’s a good chance the AI system will flag your case.
In short: the old belief that “no one looks at minor discrepancies” is becoming less and less true – even relatively small deviations can be detected automatically if they match certain risk patterns.
Baena stresses that the difference from the old, manual model is psychologically important. A human inspector can change priorities, miss details or simply run out of time. An AI system:
The message to taxpayers is therefore not only “follow the law” but also “be consistent and transparent in everything you do”. If your tax returns, account movements and actual economic reality line up, the chances decrease that the algorithm will classify you as a risk – even if you haven’t done anything illegal.
While the AI push is being highlighted as an effective way to combat tax fraud, it is also causing concern among tax lawyers and advisers, mainly around:
Several Spanish tax experts are calling for clearer rules on how AI may be used in the selection of tax cases, as well as mechanisms to detect and correct systematic errors or distortions.
For people who manage their finances properly, this development is essentially a logical continuation of something that has been around for years: automatic reporting from banks, employers and insurance companies.
But the AI step does have some practical consequences:
For readers in other European countries, Spain’s example is a preview of how tax administration may soon look across the continent: more data, more AI, less randomness – and a much greater need to understand what our economic “digital shadow” actually reveals.
Source articles