The gravitational pull exerted by Barcelona on the world's travellers remains irresistible. A record 7.4 million tourists visited the Catalan capital in 2013, seduced by the city's cocktail of high culture and hedonism, and Catalonia's proud history of self-governance and autonomy from the rest of Spain.
This same spirit of innovation and independence of mind has inspired Barcelona's new technology community and given birth to a pioneering project involving government rail operator Ferrocarrils de la Generalitat de Catalunya (FGC) and Barcelona-based firm Awaait Artificial Intelligence (AWAAIT).
Together, they have developed the Detector inspection system. Employing artificial intelligence (AI) to monitor payment of tickets and access to stations on the Barcelona-Vallès and Llobregat-Anoia lines, Detector has the potential to revolutionise fare-dodging surveillance technology worldwide.
"Traditional fare dodging detection involves mass control," says Xavier Arrufat, AWAAIT's managing director. "A team of inspectors and guards blocks a segment of the metro network and everyone is checked for a valid ticket, meaning the deployment is cumbersome, inefficient and easily detectable.
"What the Detector system offers instead is precise, selective control. Everything is automated and computerised, allowing us to gather and analyse data about the fare-dodging offence itself but also passenger traffic. Cameras also record inspectors when they identify and fine an offender, meaning rail operators can then use these real-time statistics to improve and evolve ticket-inspection tactics.
"The bottom line is that you have a much more measurable and tangible results. From the very start of Detector's deployment the drop in tailgating rates was impressive. FGC likes the technology so much that it intends to employ it in stations with the highest traffic volumes across the network."
Automatic for the people: the Detector inspection system explained
Originally conceived in 2008 as a civil engineering consultancy, AWAAIT -meaning 'watchful' in Arrufat's native Catalan - turned itself over to AI research and development in 2012 after the global economic downturn decimated Spain's construction industry. Now, with the advent of the Detector system, the fledgling company has established itself as a serious player in the field of AI.
"We signed a collaboration agreement with FGC in April 2013 and then installed a prototype of the camera in Provença station the following month," Arrufat tells me from AWAAIT's headquarters on Barcelona's famous Avinguda Diagonal. "Generation five of the Detector system began operation in February of this year, and the commercial launch took place at the end of April and in early May."
The inspection system consists of a camera that monitors the ticket stamping area and generates an alert when it spots a suspected fare-dodger. Using mobile terminals, this alert is then relayed to an inspector as a sequence of images within three seconds of the user passing through the gate.
"The camera is connected to a local or remote computer and it is this that contains the intelligent element - the robot or brain - of the system," states Arrufat. "The alert itself is distributed via an android application to smart phones carried by the inspectors, who can then study the sequence of images depicting the alleged offender and make a decision about whether or not to intercept them."
The new system not only automates the process of monitoring video cameras at ticket barriers by replacing the station's existing integrated control centre, it also generates exhaustive fare-dodging data in real-time, meaning staff can analyse and predict established patterns of offender behaviour.
Most importantly, Detector minimises the inconvenience that mass ticket inspections cause to fare-paying passengers by replacing them with selective checks by smaller teams, as Arrufat explains.
"From an operational perspective, leaner control teams and low-frequency checks are important," he confirms. "Good controls have to be estocastic and unpredictable, but people must also be aware of the system for it to act as an effective deterrent - FGC had very low fare-avoidance rates, around 0.041%, and yet still the tailgaters persisted. Detector covers these aspects exceptionally well."
Arrufat is quick to refute claims by European transport workers' unions that increased automation will result in widespread job losses and is a less-reliable long-term option than trained station staff.
"I have talked to rail network inspectors in Barcelona and they don't see Detector as a threat but rather as a technical aid to the job," he states. "After all, if you have a tool that lets you know which individual has committed the crime, your success rate and your perception of your work improves since you are only targeting the minority that doesn't want to pay. It's all about social fairness."
Rise of the machines: how AI informs transport technology
The US computer and cognitive scientist John McCarthy, who coined the term artificial intelligence back in 1955, neatly defined it as "the science and engineering of making intelligent machines".
Half a century on, rapid advancements in graphics processing units (GPUs) - high-powered electronic circuits used to accelerate scientific, engineering, and enterprise applications - mean that AI is no longer an abstract concept, but is widely employed in the fields of intrusion and fraud detection.
"Detector would not have been possible without significant advancements in computer technology over the past four to five years," says Arrufat. "AI is now great for pattern recognition and transport operators already use it for other processes such as scheduling and asset management.
"The technical brain we use for Detector is known as a neural network, which is designed to replicate as closely as possible the performance of actual human neurones - perhaps 100 or so - but is much simpler. These neural networks are relatively complicated to design; you have to decide how many neurones to use, how to connect them and what kind of functionality they should have.
"Even more difficult is how to train them. Essentially, we are telling the computer what is right and what is wrong, and by comparing what is right and wrong hundreds of thousands of times the machine adjusts its parameters, so that the next time you show it an image, it proceeds with some simple multiplications and is able to make a decision - black or white, up or down - in milliseconds.
"The advantage is that once the system has learned how to act, the response is very consistent," he continues. "Years ago, this training would have taken months, whereas now, thanks to the gaming community, it only takes hours. Gamers pushed for the introduction of GPUs, which are basically massive number-crunching machines. AWAAIT took advantage of these advancements and now we are able to multiply the speed of some computations by as much as 50 to 100 times."
The human touch: the SmartTrain concept and black swan events
FGC plans to install Detector technology at Catalunya and Muntaner stations in the course of 2014 as part of its SmartTrain concept, which promotes 'intelligent' and sustainable network management.
In January 2014, the first three of 24 electric multiple-units that FGC ordered for its Vallès network entered service on the routes from Barcelona Plaça Catalunya to Terrassa and Sabadell. The new €151m aluminium-bodied fleet features alternating current traction motors and is also equipped for regenerative braking, enabling a large proportion of energy to be recovered.
Barcelona's new generation of tech-savvy commuters now enjoy flat-screen passenger information displays inside the cars and CCTV transmits images to FGC's control centre in real time. Against this backdrop, I conclude by asking Arrufat how he sees technology evolving in the short to mid-term.
"AWAAIT is mostly dedicated to video analytics, but we have witnessed increased interest in using AI algorithms for infrastructure monitoring and maintenance," he says. "However, while computers may be consistent, they are still not able to learn by themselves and cannot provide solutions to black swan events - one-in-a-lifetime, disaster-type scenarios. For that you require human input.
"A jet airliner, for example, has a lot of compuetrised, automated tools, but in a black swan scenario a properly trained human being with common sense is going to display more advanced responses than any computer currently invented. So, as with the Detector system, we can, at present, develop tools that help people by letting them know that something is wrong, but not replace them."