Spain’s draft law on artificial intelligence includes a provision that has caught the attention of tax experts: the details of the algorithms and AI systems used by the tax authority to fight fraud would remain secret.
The draft law
The government has put forward a draft organic law to regulate the use of artificial intelligence, adapting Spanish law to the European AI Act. Its stated aim is to protect citizens when AI systems could affect their health, safety or fundamental rights, with a system of supervision and penalties for misuse.
The tax provision
One part of the draft amends the General Tax Law to establish that the details of automated, algorithmic or AI systems used by the Tax Agency to detect fraud will be confidential. In practice:
- the way these systems work would not be made public;
- taxpayers would not necessarily know why they had been selected for an inspection.
The justification
The tax authority’s argument is that revealing how it detects fraud would allow those trying to evade taxes to adapt their behaviour and avoid detection. Tax inspection plans have long been kept confidential for the same reason.
The criticism
Critics argue that extending this confidentiality to automated systems goes too far. Their concerns include:
- The right to defence. The Spanish Constitution guarantees effective legal protection. If a taxpayer cannot know why an algorithm flagged them or what data was used, it is harder to challenge the decision.
- Errors and bias. Automated systems can make mistakes or reproduce biases in the data they use. Without transparency, those errors are hard to detect.
- A paradox. A law designed to protect fundamental rights in the use of AI could, in this area, reduce transparency.
The European context
The EU AI Act classifies certain uses of AI by public authorities as high-risk, requiring human oversight, documentation and transparency. How those obligations apply to tax authorities, and how they will be balanced against the need to protect anti-fraud methods, is one of the questions the Spanish law will have to answer.
What comes next
The draft is still going through the legislative process and could change. Professional associations and legal experts are expected to push for safeguards, such as independent audits of the systems or the right to a human review of decisions.