Skip to main content
AI Hub
Home Browse Cases Countries Sources Explore Taxonomy About Submit
Sign In
DCI AI Hub — AI Tracker socialprotectionai.org/use-case/ESP-001
ESP-001 Exported 1 April 2026

INSS 'AI Doctor' — ML-Based Sick Leave Fraud Detection (Modelo de Priorización de Citas)

Country Spain
Deployment Status Full Production Deployment
Confidence Confirmed
Implementing Agency Instituto Nacional de la Seguridad Social (INSS), under the Ministry of Inclusion, Social Security and Migration

Overview

The Instituto Nacional de la Seguridad Social (INSS) — Spain's national social security institute — deploys two XGBoost (gradient-boosted decision tree) machine learning algorithms to assess sick leave (incapacidad temporal) cases on a daily basis. The system generates a numerical score between 0 and 1 for each worker currently on sick leave, estimating the likelihood that the worker is ready to return to work. These scores are used to prioritise which cases medical inspectors should review first, effectively creating a 'digital waiting list' that controls the order of medical inspection appointments.

The scoring system operates on a four-tier scale: 0.00–0.30 indicates slow recovery expected (maintain leave), 0.31–0.60 indicates favourable progress (standard review scheduling), 0.61–0.80 indicates notable improvement (priority appointment), and 0.81–1.00 indicates imminent clearance (possible end of leave). The model draws on a range of input variables including gender, age, place of residence (which carries three times the statistical weight of specific medical diagnosis), medical diagnoses, duration of current leave, patient medical history, prior leave history, case type, medical reports from public health services, reports from mutual insurance companies (mutuas), and inspector assessments recorded in the Atrium internal application.

The system was built by SAS (a US-based analytics software company) and implemented by ViewNext (a Spanish subsidiary of IBM), at a cost of at least EUR 1 million based on procurement tender documents. It was deployed in 2018 and integrated into inspector workflows from 2018. The current model version has been operational unchanged since November 2020.

Critically, the system operated in secret for approximately five years (2018–2023), with no public disclosure of its existence or functioning. It was exposed in April 2023 through an investigation by Lighthouse Reports and El Confidencial, part of the cross-border 'Suspicion Machines' investigative series that also examined algorithmic welfare systems in the Netherlands (SyRI), Serbia, and other countries. Following exposure, the Spanish Ministry of Inclusion denied transparency requests from journalists, citing that disclosure would 'compromise essential public interests' and affect system 'efficacy'.

Internal performance evaluations have revealed significant quality concerns. The system has a documented internal validation error rate of 15.4%, meaning it fails in approximately one out of every six cases. In the first half of 2025, only 35.48% of algorithmically-selected workers received medical discharge, compared to 41.48% for cases selected manually by inspectors — meaning human judgment consistently outperforms the algorithm. Senior INSS officials have conceded the algorithms are 'not accurate', and expert Ana Valdivia of the Oxford Internet Institute described the false positive performance as 'poor' and 'unbalanced'. Medical inspectors working with the system daily have stated they 'are not able to explain what it is'. The system has been described as 'rendered effectively useless' due to chronic underfunding and inspector staff shortages across the INSS inspection corps.

The incapacidad temporal programme processed by this system represents a major fiscal commitment: 2024 national spending was EUR 16.5 billion (approximately 1.8% of GDP), with spending having increased 60% since 2017. An average of 1.6 million workers are on sick leave on any given day across Spain. The system would be classified as high-risk under the EU AI Act (Annex III — systems determining access to public benefits), requiring conformity assessments, transparency obligations, and human oversight provisions. Compliance with these forthcoming requirements has not been verified.

Classification

AI Capabilities

Prediction (including forecasting) (primary)Ranking and decision systems

Use Cases

Compliance and integrity (primary)

Social Protection Functions

Implementation/delivery chain: Accountability mechanisms (primary)Implementation/delivery chain: Case management
SP Pillar (Primary)Social insurance

Programme Details

Programme NameIncapacidad Temporal (Temporary Disability / Sick Leave Benefits)
Programme TypeHealth Insurance
System LevelImplementation/delivery chain

Workers receive 60% of salary for days 4-20 of sick leave, 75% from day 21 onward. Maximum duration 365 days, extendable by 180 days. 2024 national spending was EUR 16.5 billion (~1.8% of GDP). Average 1.6 million workers on sick leave on any given day.

Implementation Details

Implementation TypeClassical ML
Lifecycle StageMonitoring, Maintenance and Decommissioning
Model ProvenanceCommercial/proprietary
Compute EnvironmentNot documented
Sovereignty QuadrantNot assessed
Data ResidencyDomestic
Cross-Border TransferNot documented

Risk & Oversight

Decision CriticalityHigh
Human OversightHOTL
Development ProcessFully third-party developed
Highest Risk CategoryGovernance and institutional oversight risks
Risk Assessment StatusNot assessed

Documented Risk Events

Internal validation error rate of 15.4% (fails in ~1 of 6 cases). Algorithm-selected cases have LOWER discharge rate (35.48%) than manually-selected cases (41.48%), meaning human judgment outperforms the algorithm. Place of residence weighted THREE TIMES HIGHER than specific medical diagnosis. System operated in secret for 5 years. INSS refused transparency requests citing 'essential public interests'. Medical inspectors report they 'cannot explain what it is'. Senior INSS officials conceded the algorithms are 'not accurate'. Expert Ana Valdivia (Oxford Internet Institute) described false positive performance as 'poor' and 'unbalanced'.

Risk Dimensions

Data-related risks

Representation bias

Governance and institutional oversight risks

Inadequate grievance or redressInsufficient human oversightInsufficient institutional capacityRegulatory non-complianceUnclear accountabilityWeak documentation or auditability

Market, sovereignty and industry structure risks

Restricted audit accessVendor lock-in

Model-related risks

Opacity or limited explainabilitySubgroup bias

Operational and system integration risks

Monitoring gap

Impact Dimensions

Accountability, transparency and redress

No identifiable decision ownerUntraceable decision pathway

Autonomy, human dignity and due process

Inability to contest or appeal outcomeLoss of individual agency or autonomyOpaque or unexplained decision

Equality, non-discrimination, fairness and inclusion

Discriminatory outcomeDisparate error rates across groupsSystematic exclusion from benefits or services

Systemic and societal

Erosion of public trust in SP systemPolitical backlash, litigation or controversy

Safeguards

Human oversight protocol

Deployment & Outcomes

Deployment StatusFull Production Deployment
Year Initiated2018
Scale / Coverage~1.6 million workers on sick leave nationally; processes cases daily across all INSS inspection offices
Funding SourceSpanish Social Security budget (at least EUR 1 million in SAS tender)
Technical PartnersSAS (fraud detection software platform); ViewNext (IBM subsidiary, implementation)

Outcomes / Results

Few of the originally promised gains have materialised after 5+ years. System described as 'rendered effectively useless' due to chronic underfunding and inspector staff shortages. Algorithm-selected cases perform worse than manually-selected cases (35.48% vs 41.48% discharge rate).

Challenges

Chronic INSS inspector staff shortages and budget cuts undermine the system's utility regardless of algorithm quality. 60% increase in sick leave spending since 2017 creates political pressure to use algorithmic tools even when they underperform. EU AI Act will classify this as high-risk (Annex III) requiring conformity assessment, transparency, and human oversight — compliance is unverified.

Sources

  1. SRC-005-ESP-001 Nieto Garrote, A. (2025) 'Sistemas de IA en las Entidades Gestoras de la Seguridad Social', Revista de Derecho de la Seguridad Social, Laborum.
    https://revista.laborum.es/index.php/revsegsoc/article/view/1215
  2. SRC-008-ESP-001 Andalucía Informa / elDiario.es (2026) 'Tu baja laboral la decide ahora un algoritmo con inteligencia artificial: el sistema del INSS está en el punto de mira'.
    https://andaluciainforma.eldiario.es/tramites/tu-baja-laboral-la-decide-ahora-un-algoritmo-con-inteligencia-artificial-el-sistema-del-inss-esta-en-el-punto-de-mira/
  3. SRC-007-ESP-001 Andalucía Informa / elDiario.es (2026) 'Así es la lista de espera digital del INSS: el algoritmo secreto que decide tu alta tras una baja laboral'.
    https://andaluciainforma.eldiario.es/asi-es-lista-de-espera-digital-del-inss-el-algoritmo-secreto-que-decide-tu-alta-tras-una-baja-laboral/
  4. SRC-004-ESP-001 Fidelitis (2025) 'El algoritmo del INSS que decide tu baja médica'.
    https://www.fidelitis.es/ia-bajas-medicas-inss-guarda-silencio/
  5. SRC-006-ESP-001 González, J.A. (2026) 'La Seguridad Social tira de la IA para cazar bajas laborales dudosas: un 35% de éxito', Diario de León, 23 February 2026.
    https://www.diariodeleon.es/economia/260223/2076512/seguridad-social-tira-ia-cazar-bajas-laborales-dudosas-35-exito.html
  6. SRC-001-ESP-001 Lighthouse Reports (2023) 'Spain's AI Doctor', Suspicion Machines series, April 2023.
    https://www.lighthousereports.com/investigation/spains-ai-doctor/
  7. SRC-003-ESP-001 Observatorio de Bioética y Derecho, Universitat de Barcelona (2023) 'La Seguridad Social usa una IA secreta para rastrear bajas laborales y cazar fraudes'.
    https://www.bioeticayderecho.ub.edu/es/la-seguridad-social-usa-una-ia-secreta-para-rastrear-bajas-laborales-y-cazar-fraudes
  8. SRC-002-ESP-001 The Olive Press (2023) 'How Spain's Social Security system is using artificial intelligence to identify fraudulent sick leave', 17 April 2023.
    https://www.theolivepress.es/spain-news/2023/04/17/how-spains-social-security-system-is-using-artificial-intelligence-to-identify-fraudulent-sick-leave/

How to Cite

DCI AI Hub (2026). 'INSS 'AI Doctor' — ML-Based Sick Leave Fraud Detection (Modelo de Priorización de Citas)', AI Hub AI Tracker, case ESP-001. Digital Convergence Initiative. Available at: https://socialprotectionai.org/use-case/ESP-001

Back to case page
AI Hub

Digital Convergence Initiative - AI Hub

Responsible, ethical use of AI in social protection

MarketImpact Platform developed by MarketImpact Digital Solutions
Co-funded by European Union and German Cooperation. Coordinated by GIZ, ILO, The World Bank, Expertise France, and FIAP.