Automating Society 2019

By Karma Peiró

Spain is still far away from having any regulation on automated decision-making (ADM). The Digital Strategy for a Smart Spain 2025 [SP 1] is a guide that tries to show the way forward for technological innovation over the coming years. Other initiatives promoted by the Spanish government try to push private companies to make a commitment to technological innovation, but their budget is small. Within the scientific community, there is an interest in advancing the ethical issues related to the application of ADM. Scientists want to ensure that a human, or team of humans, will always be able to make the final call, following any automated decisions. [SP 2]

However, all applications of ADM are in a very experimental phase. Many of the examples collected here are announcements of predictions of what Artificial Intelligence might do in sectors such as banking, health or security, but not enough time has elapsed to obtain qualitative results or to verify whether the ADM systems are as good as originally planned.

Political debates on aspects of automation – government and parliament

Digital Strategy for a Smart Spain 2025

The Ministry of Energy, Tourism and Digital Agenda is currently developing a Digital Strategy for a Smart Spain. This is based on the results of the current Digital Agenda for Spain (originally created in 2015) and addresses new rights. The document describes the application of Artificial Intelligence (AI) as a new opportunity: “The consolidation of platforms as fundamental agents of change and their role as arbitrators in the digital ecosystem will allow the advancement of industry, intensive automation, and the use of artificial intelligence”.

The Digital Strategy for a Smart Spain 2025 [SP 3] is based on five pillars:

  • Data Economy (the ownership, value and ethics of data; development of digital tools that enhance the use of data in tourism, energy efficiency, diseases, problems of marginalisation, etc.)
  • Ecosystems (public and private digital transformation; business and administrative digital transformation)
  • Smart Regulation (sectoral economic regulation and defence of competition; revision and reform of taxation that combats the erosion of tax bases; avoidance or tax evasion that the digital environment makes possible; maintain protection of users’ rights and consumer protection)
  • Technological Infrastructure (extension of ultra-fast broadband connectivity; development of 5G networks and services)
  • Citizenship and Digital Employment (improvement and alignment with the needs of the productive fabric of digital skills and competences and the promotion of STEM –Science, Technology, Engineering, Mathematics)

Activa Industria 4.0 Programme

The Activa Industria 4.0 programme [SP 4] is supposed to assist the digital transformation of companies in Spain. Some 400 industrial companies from the 17 autonomous communities of Spain could benefit from this programme to advance their digital transformation and improve their competitiveness by adopting new enabling technologies. The programme is part of the Industry Connected Strategy 4.0 of the Ministry of Economy, Industry and Competitiveness.

With a budget of € 4 million, this initiative aims to understand the usefulness of applying technologies such as Big Data, web analytics, cybersecurity, cloud computing, robotics, sensorics, virtual reality and 3D printing.

National Plan for Scientific and Technical Research and Innovation

The main objective of this plan for 2017-2020 [SP 5] is to identify and define strategic areas, strengths and contributions in the fields of research, development and innovation with the scientific and technical advice of experts and institutions. The plan gives financial support to research centres, universities, and companies that are adopting digital transformation projects, applied to processes like organisational innovation and societal challenges. The actions included in this National Plan contemplate the financing and co-financing by different administrations: national government and the European Structural and Investment Funds available for research and development and innovative activities. The research and development expenditure has been estimated by considering that total research and development spending reaches 2% of GDP in 2020, and the necessary convergence with the European average (EU-28).

The Artificial Intelligence lab of Aragon

The Technological Institute of Aragon (ITAINNOVA) [SP 6] is a public institution funded by the Department of Industry and Innovation of the Government of Aragon. It will invest €3.5 million in the improvement of four laboratories before 2020. The goal is to start the improvement of the SHM (Structural Health Monitoring) laboratory: here the work is concentrated on intelligent systems, Artificial Intelligence and cognitive systems, and the Internet of Things (IoT).

Research and Innovation Programme on Advanced Digital Technologies

In November 2017, the Catalan government approved a research and innovation programme in advanced digital technologies. The aim of the programme was to promote technological development, establish synergies between research and innovation centres, improve the recruitment of talent, encourage investment, look into the impact of technology on administration and production, and to analyse how citizens lives are changing due to digitisation.

To obtain these results, the programme foresees the development of collaborative research, development and investigative projects in technologies such as 5G, the Internet of Things, Artificial Intelligence, computer vision, blockchain, and quantum technology. The programme is part of the SmartCAT strategy [SP 7] of the Catalan government and the research and innovation strategy for the smart specialisation of Catalonia (RIS3CAT). For 2018-2020, it has a budget of around €10 million.

Political debates on aspects of automation - civil society and academia

The Fairness Measures Project

The growing use of automated decision-making has the potential to increase the risk of discrimination against disadvantaged groups. The Fairness Measures Project is a group of data scientists from Chile, Germany and Spain, led by Carlos Castillo (Pompeu Fabra University, Barcelona). The main goal of this group is to develop fairness-aware algorithms and systems [SP 8], and to provide relevant software and datasets to the research community through the website The data sets cover several fields and applications such as finance, law and human resources, and provide common fairness definitions for machine learning. Up until now, the main results have included fairer algorithms for the ranking of people in searches within social networks and on job websites. This work has been received well in the media.

Barcelona Declaration for the Proper Development and Use of AI in Europe

This manifesto [SP 9]—lead by scientists Luc Steels (ICREA Research Professor) and Ramon López de Mántaras (Spanish National Research Council, CSIC)—is the result of the BDebate Conference, held in March 2017 in Barcelona. The manifesto proposes guidelines for the creation of a ‘code of conduct’ for AI practitioners, and it was very well received by the scientific community. The signatories of the manifesto believe that “AI can be a force for the good of society, but that there is also concern for inappropriate, premature or malicious use. This declaration is a step to ensure that AI is indeed used for the common good in safe, reliable, and accountable ways”.

Regulatory and self-regulatory Measures

Science, Technology and Innovation Law

The Law 14/2011 [SP 10] regulates everything related to scientific and technological research. The regulation also proposed the creation of the Spanish Committee of Research Ethics—an independent and consultative body on professional ethics in scientific and technical research. The Committee issues reports, proposals and recommendations on matters related to professional ethics in scientific and technical research.

The Digital Strategy of the Catalan government

The Catalan government is preparing a regulatory framework [SP 11] on digital rights and duties. Although it is still at the draft stage, it focuses on collaboration in an open working group with institutions, professionals, experts and civil society. An announcement regarding the framework for the strategy was made in July 2018. It lists the rights and duties which the law will enforce, but it has not been defined yet. The aim is to present the strategy in 2019.

ADM in Action

Automated weed mapping

In February 2018 a team of researchers from the Spanish National Research Council (CSIC) presented a system for early weed mapping. [SP 12] It combines automatic learning techniques with photogrammetric techniques to help determine the height of the plants. “The algorithm generates maps of treatment that will help farmers in decision-making to improve crop management through the localised application of herbicides at the optimum phenological level, with substantial phytosanitary effects”, said Ana Isabel de Castro Megías, a CSIC researcher at the Institute of Sustainable Agriculture in Córdoba. This study was carried out by a group of researchers led by Francisca López Granados from the Institute of Sustainable Agriculture in Córdoba, the Institute of Agrarian Sciences of Madrid, and the University of Salzburg (Austria).

Spanish Public Employment Service reduces benefits for the long-term unemployed

The Spanish Public Employment Service (SEPE) uses an automated system to calculate unemployment benefits and to allocate job offers, interviews and training courses. Over the last eight years, the number of people receiving benefits for long-term unemployment has decreased by more than 50 percent. However, it is unclear how much this automated system helped with this decrease. [SP 13] One of the reasons for this is deficient data reconciliation. This is due to the simultaneous use of incompatible software [SP 14], meaning that a single mistake in a single field in a spreadsheet, in a database, or in the software running the allocation of the money can make a substantial difference.

VeriPol – a tool to detect false complaints to the police

An international team of researchers has developed the VeriPol tool which is used to indicate the probability that a complaint made to the police is false. It automatically analyses calls using natural language processing and machine learning techniques. The police claim that it is accurate 91% of the time. This success rate is fifteen percent higher than expert (human) police officers. The false negatives are 7.3% and the false positives 9.7%. [SP 15] “This tool will help the police to focus research more effectively and to discourage false reports,” says Federico Liberatore, a researcher at the Department of Statistics and Operations Research at the Complutense University of Madrid (UCM). [SP 16]

VeriPol was developed for violent robberies, intimidation and theft. In recent years there has been an increase in the number of fabricated reports of these types of crime. From two sets of complaints, true in case one and false in the other, VeriPol automatically learns the central features of each set and trains a statistical model. [SP 17] The application has been tested on over one thousand reports from 2015 provided by the Spanish National Police. It is the first time that a system like this has been implemented by the National Police. The project started in 2014 as a collaboration between UCM, the Carlos III University of Madrid, the University of Rome “La Sapienza”, and the Ministry of Home Affairs of Spain.

Predictive evaluation by SAVRY

The goal of this investigation is to evaluate the predictive power and fairness of an expert assessment instrument called the Structured Assessment of Violence in Youth (SAVRY) and to compare it against standard machine learning (ML) algorithms. The system is used in forensic criminology and it was developed for assessing the risk of violence in adolescents (aged 12-18), but it was also seen to be effective in predicting the risk of general criminal recidivism. SAVRY plays a role in individual lives, and it influences the youth crime rate, as it can be used in intervention planning, such as clinical treatment plans or release and discharge decisions. Although these kinds of assessments do not intend to discriminate by gender or race, previous studies in the US—where similar systems have been used—have revealed unintended cases of discrimination.

The HUMAINT (HUmanity vs MAchine INTelligence) [SP 18] is an interdisciplinary research project that proposes evaluating fairness, taking into account the uncertainty of some predictions. In addition, it discusses the implications of different sources of bias for fairness and performance analysis. Researchers compare the performance of expert assessment with machine learning algorithms that also use information on defendant demographics and criminal history. “Our dataset comprises observations of 4,752 teenagers who committed offences between 2002 and 2010, and whose recidivist behaviour was recorded in 2013 and 2015. SAVRY is available for a subset of 855 defendants”, says Carlos Castillo, a member of HUMAINT.

SAVRY is in general fair, while the machine learning models tend to discriminate against male defendants, foreigners, or people of specific national groups, says Castillo: “Machine learning could be incorporated into SAVRY, but if aspects of algorithmic justice are not taken into account, it could generate an unfair prediction.” The evaluation [SP 19] showed that humans were much better than ADM, but that ADM can be more precise with the results.

RisCanvi – an actuarial risk assessment tool

RisCanvi is a statistical risk assessment system used in Catalan prisons, similar to LSI-R (Canada), Compass (US) and OaSys (UK). Although the tool makes predictions, the actual decisions are made by professional experts who sign off on any measures. The Department of Justice of the Catalan government launched the tool in 2010 and applied it to all inmates in all prisons, and not just for cases involving violent crime.

The Catalan government published a very positive evaluation of the tool’s predictive ability. [SP 20] [SP 21] However, researchers, including Lucía Martínez Garay, urged caution. [SP 22]

Detection of hate in social media

Juan Carlos Pereira Kohatsu, a 24 year-old data scientist, created a tool to automatically detect hate on Twitter as part of his master’s thesis. [SP 23] The tool was developed with help from the National Bureau for the Fight against Hate Crimes, part of the Ministry of the Interior, which is considering using it operationally to react to local outbursts of hatred.

Bismart – predictive algorithms to provide social aid

Bismart, a Spanish company, uses advanced data analysis systems to predict when it’s necessary to provide aid to elderly people [SP 24], without having to ask for it and before an emergency occurs. Smart Social Home Care is designed to go from a palliative to a proactive approach, and to distribute resources more efficiently. According to the company, the system aggregates data about social services, health, population, economic activity, utility usage, waste management, and more. Then, it uses this data to identify and predict groups and areas that will need urgent help. According to their website, the system is being used in Bilbao and Barcelona.

Bismart also provides services to detect illegal short-term rentals [SP 25] (e.g. Airbnb), as well as a predictive policing solution. [SP 26]

Jurimetria – a statistical and predictive tool for the legal sector

Jurimetria is a piece of statistical and predictive jurisprudential software that helps legal professionals analyse their cases. It systemises and extracts content from more than 10 million judicial decisions, coming from all instances and jurisdictional orders of Spain. [SP 27] According to the company [SP 28], half a million new resolutions are incorporated every year. In the same way, all the parameters of the judicial statistics of courts and tribunals of Spain are processed, updated, enriched and integrated continuously, including information on the duration, congestion, resolution, pendency and litigation in the legal system. The application allegedly allows users to extract and reveal unpublished procedural success patterns, starting from a complex framework of millions of jurisprudential documents to provide a quick and accurate response to all questions that may arise around a judicial process.

Machine learning to avoid financial fraud

BBVA, the second-largest Spanish bank, uses the services of Brighterion (a Mastercard company) to automatically detect fraud. [SP 29]

Diagnosis of bipolar disorder

Researchers from the CIBERSAM (National Institute of Mental Health) used a self-learning algorithm to automatically detect bipolar disorder based on neuroimaging data. [SP 30] The study, conducted on 3,000 patients in Barcelona, showed a level of accuracy of 65% using the algorithm. According to the authors, this was more accurate than diagnosis by a human, but too poor to be used in practice.

Mediktor – automated diagnosis

Mediktor is a tool for automated diagnosis. It relies on IBM technology but the Artificial Intelligence component is different from IBM’s Watson. In 2017, Mediktor was tested on 1,500 patients at two hospitals in Barcelona and Madrid [SP 31] and showed a success rate of 91.3%, in comparison with diagnosis by a medical professional. [SP 32]

SavanaMed – records processing

SavanaMed is an Artificial Intelligence system that transforms the free text of clinical records into structured data. [SP 33] It is already in use in Madrid, Castilla-La Mancha, Castilla y León, Valencia, Andalusia and Catalonia, which together make up two thirds of Spain’s population. The system has processed more than 150 million clinical records.

Detection of diabetic retinopathy

A hospital in Barcelona is in the process of applying ADM to diagnose diabetic retinopathy—an illness that causes blindness—based on photographs of the retina. [SP 34] The process has already been used elsewhere, but this experiment will be the first on a population from Southern Europe.

Karma Peiró

Karma Peiró is a journalist specialized in Information and Communication Technologies (ICT) since 1995. Lecturer in seminars and debates related to data journalism, transparency of information, privacy, open dataand digital communication. She’s co-director of the Diploma in Data Journalism at the Faculty of Communication and International Relations Blanquerna URL (Barcelona). Also she’s member of the Advisory Council for the Transparency of Barcelona City Council, member of the board for the Barcelona Open Data Initiative and member of the Council for the Governance of Information and Archives.