rondo

sixty touches of nothing, then one ball changes the room

A small neural net reads every touch of a move and says how likely it is to end in a goal. On the 5-0 against Real Madrid, Barcelona's first goal sits under 5% for almost sixty touches. Then Iniesta plays one ball and it is 32%.

Neural networks
Football
Python
NumPy
StatsBomb
32%
one pass

the net's chance after Iniesta's ball to Xavi, up from 5.0% the touch before.

13%
all night

Madrid's best moment of the match, Di María's cutback in the 37th minute.

0.648
AUC

on a season it never saw, a little ahead of a straight line at 0.643.

The question

A rondo is the keep-ball drill Barcelona built a style on: pass, move, keep it, wait. On the scoresheet a move is a goal or it isn't, and the twenty passes before the last one look like nothing happened. They are where the waiting is. So the question is simple. At each touch, how likely is it that this possession ends in a goal, and which touches change that?

Expected goals already answers it for the shot. This asks it of everything before the shot, and reads the answer out live, so a move can be watched the way it felt: a long stretch of nothing, and then a ball that changes the room.

Watch a goal

The 5-0 of 29 November 2010, Guardiola's Barcelona against Mourinho's Madrid at the Camp Nou. Xavi's opener is 62 touches over 85 seconds, and for almost all of them the net stays under 5%: Barcelona keep the ball, lose it at the right edge of the box, win it back and start again through Valdés. Then Messi finds Iniesta on the left, Iniesta carries it to the corner of the box and slides it across to Xavi, and the number goes from 5% to 32% in one pass. The second goal is the same shape. Pedro's is 57 touches at about 3% until Villa takes Xavi's long switch to the byline and cuts it back: 6% to 27%.

The replay · Barcelona 5-0 Real Madrid, 29 November 2010
Every touch, and the net's chance that the move ends in a goal
Valdés
...
chance this ends in a goal
Barcelona win the ball
touch 0 of 62, 9′
0%10%20%30%40%first touchthe shot
replay
The ball moves from each pass, carry and shot to the next as StatsBomb logged them. Nobody else is drawn because the 2010 data doesn't say where anyone else was. The number is the net's chance, after each touch, that this possession goes on to score. It never saw this match, or any match from 2010/11, in training.

The whole match

Laid across the ninety minutes, the 5-0 is a row of low hills on Barcelona's side with a handful of spikes, and almost nothing on Madrid's. Villa's two goals are both Messi through balls, 4% to 27% and 2% to 20%. Jeffrén's in stoppage time is Bojan turning 2.5% into 20% with one pass. Madrid's best moment all night is Di María's cutback from the left byline in the 37th minute, and the net puts it at 13%.

The match line · every possession of the 5-0
A row of low hills, a few spikes, and almost nothing from Madrid
Barcelona
Real Madrid
10%10%20%20%30%30%40%40%0'15'30'45'60'75'90'HTXaviPedroVillaVillaJeffrénxavi's goal: one iniesta ball, 5.0% to 32%sixty touches at 3%, then villatwo messi through balls, two villa goalsthe net gets this one wrong (below)bojan to jeffrén, stoppage timemadrid's best all night: 13%Barcelona ↑Real Madrid ↓
Each spike is one possession, as tall as the net's chance after each of its touches; Barcelona's rise above the line and Madrid's hang below it, and dots are goals. Of Barcelona's 96 possessions, 7 went above 10% and 5 of those scored. Madrid had 86, and 2 went above 10%. Any of the goals can be replayed above.

Who moved the needle

The net scores every touch of 2010/11, so it can also say whose touches did the most. Take each touch's lift, the net's chance after it minus the chance after the touch before, and add a player's lifts up over the season. Messi comes first, with 8.0 goals' worth of chance from 4,992 touches, 43 of which added ten points or more on their own. Second is not Xavi or Iniesta but Dani Alves, a right back, at 6.6.

Xavi touched the ball more than anyone, 5,540 times, and comes fourth: touch for touch, Xavi adds less than Iniesta or Busquets. Villa is last and below zero. Villa's moves usually ended in a shot, and a shot isn't a touch here, so the lost balls count against Villa and none of the goals count for. This measures the build-up, not who scored.

Who moved the needle · Barcelona, 2010/11, unseen
Messi added the most, and a right back came second
goals' worth of chance added02468Messi8.0Dani Alves6.6Iniesta4.3Xavi4.0Busquets2.9Piqué2.7Abidal2.5Pedro2.0Maxwell1.8Mascherano1.6Adriano0.9Thiago0.6Milito0.5Afellay0.5Keita0.3Valdés0.2Puyol0.1Villa-0.8
Every Barcelona touch of the season the net never saw, 33 matches. A touch's lift is the net's chance after it minus the chance after the touch before, so a pass that turns 3% into 25% adds 22 points and a pass that gives the ball away loses what the move had. The bars add each player's lifts up into goals' worth of chance. Shots are not touches here, so finishing is left out. Players with at least 600 touches; a big lift is a touch that adds ten points or more.

The model

The training data is every Barcelona league match StatsBomb has released for free: 524 matches, from Messi's debut season in 2004/05 to his last in 2020/21. Both sides' possessions are used, so Madrid can be scored too, which makes 985,628 touches. A touch is a pass, carry or dribble, and its label is whether the same possession went on to score.

Each touch is described by 40 numbers: where the ball ends up, its distance and angle to goal, whether it is in the box, what kind of touch it was and whether it worked, whether StatsBomb marked it a cross or a through ball, how the possession started (a counter, a corner, a goal kick), how long it has gone on, how far it has come and how fast the last three touches moved it. The net has two hidden layers of 48 and 24 units and is written in NumPy. Five copies are trained from different starting points and averaged, because one copy on its own moved around from seed to seed by more than it beat the baseline. The settings were picked on a tenth of the training matches, held aside.

The whole of 2010/11, the 5-0 included, was held out of training and is the test: its 33 matches, 66,581 touches and 6,162 possessions, 90 of which scored.

modellog lossBrierAUC
the averageevery touch gets the training rate, 2.3%0.11660.02430.5
logistic regressionthe same inputs, added up in a straight line0.11210.02390.643
the nettwo hidden layers, five copies averaged; one copy alone scores 0.643 to 0.650 AUC0.11180.02390.648
Calibration · the 2010/11 season, unseen
When the net says 3%, about 3% score
1%1%5%5%10%10%20%20%40%40%the net saidactually scoredsays 25%, 34% scored: shy at the topmost of a match lives here
Each dot is a band of touches from the held-out season, at what the net said on average against how often those possessions really scored, sized by how many touches it holds. On the dashed line the net means exactly what it says. Both axes are square-root.

For telling stories, the number that matters is calibration: when it says 30%, about 30% should score. On the season it never saw, it holds across the range that most of a match lives in. Below 20% every band sits within half a percentage point of what was said. At the top it is shy: the 107 touches it put between 20% and 40% averaged 25%, and 34% of them scored. So the big jumps on this page are, if anything, smaller than they should be.

Log loss and Brier are the honest scores for a probability, lower is better; AUC says how often a touch from a scoring move ranks above one from a move that went nowhere.

What it gets wrong

It is barely better than a straight line. The net beats the logistic regression on the same inputs, by a little and on every score, and an AUC of 0.65 means it is a long way from knowing which ordinary midfield pass will become a goal. That is partly the question: most touches in a scoring move happen far from goal, where nothing yet separates them from the thousands that go nowhere. On Barcelona's own possessions alone the AUC is 0.60, because nearly all of them look alike at midfield.

It leans on labels. StatsBomb tags some passes as through balls, and the net has learned to trust the tag. In the 77th minute Pedro's through ball on a counter lands about twenty yards into Madrid's half and the net says 24%; Bojan then carries it to the edge of the box and it falls to 10%, which is backwards.

It sees only the ball. Event data from 2010 says where each touch happened and nothing about where the other 21 players were, so a pass into an empty box and a pass into six defenders are the same number. Later seasons have StatsBomb's 360 freeze frames, which would fix this, but not the 5-0.

Where it stands

It works for one match. The next step is to let any of the 524 matches be picked, then to add the 360 frames for the seasons that have them and see whether knowing where defenders stand moves the scores or only the stories.

Data: StatsBomb Open Data. The fetch, features, training, export and players scripts are in research/rondo, and train.py prints every model number on this page. Training takes under a minute per copy on a CPU, and the page ships only the net's answers for this one match.