Skip to content
gtt
← The logEntry 04 of 04

Study

Who has the ball? The possession problem, drawn

What H, A, D and X mean, why spellF1 punishes flicker, how to spot a change of possession when the ball is missing 41% of the time, and the smoothing toolbox — every idea drawn on an invented toy match, plus the plan we test first.

Context

Before writing a line of the model, we read the rules, the scorer and the literature. The full notebook, in Spanish and with every source, is linked on the side. This entry is the same study, drawn.

Every match in the figures is an invented toy match: nothing here comes from the match data. The scores next to the timelines are not typed by hand — they are computed with the official spellF1 and macroF1 formulas, applied to the toy.

41%of graded frames have no ball in the tracking
17possessions in the public 5 minutes: our only ground truth
0.2433spellF1 to beat (the baseline, full match)
≈ 1 / Nwhat one flicker, false stop or missed possession costs

1 · Four letters, one rule

Every frame gets one letter: H Barça on the ball, A Athletic on the ball, D dead ball, X no answer. A possession is a maximal run of the same team with the ball alive. A stoppage always splits possessions — even when the same team restarts.

A toy match · 40 invented seconds
①HBarça build up

0:03 · Barça move it through midfield → H

②AAthletic cut it out
intercepts + controls

0:11 · the pass is intercepted and kept → A, possession #2

③DOut of play
nobody owns a dead ball

0:18 · the ball crosses the touchline → D

④HBarça throw it in

0:24 · play restarts with a clear owner → H, possession #3 (a new one)

Home (H)Away (A)Ball
The same 40 seconds as letters · 1 cell = 1 s
H · home in possessionA · away in possessionD · dead ball

Four possessions: #1 and #3 are both Barça, but the stoppage between them makes them two. The numbers above the strip count possessions; the circled ones are the four pitches.

What the rules settle, in one breath:

  • A loose or contested ball stays with the last team that had it. The definition already has hysteresis built in.
  • A touch without control is not a change: a deflection, a block, an aerial duel nobody controls afterwards.
  • H H D D H H is two possessions, not one.
  • The ground truth is the "owner" of a corrected tracking, derived mechanically and never smoothed — which is why very short possessions exist (section 2).
  • Who owns a dead ball is not asked. Dead is just D.

X means "repeat my last answer"

The scorer fills every X with the last letter we gave in that half before it counts possessions. So an X inside a possession is free, and an X at a hand-over drags the old team across it.

X inside a possession vs X at a hand-over · 1 cell = 1 s
H · home in possessionA · away in possessionD · dead ballX · no answerpossession recovered (IoU ≥ 0.5)not recovered

The first three X sit inside possession #1: harmless for spellF1. The next four sit on the hand-over to Athletic: the scorer reads them as H, so possession #2 starts four seconds late. Holding the letter inside a possession and guessing at the hand-over — even one second late — beats both.

2 · How the board scores us

spellF1 treats each possession as one object, the way a coach counts them:

  1. Fill every X with the previous letter.
  2. Cut each half into possessions: runs of H or A. D runs separate them.
  3. Pair each predicted possession with a true one of the same team, one-to-one, by time overlap (IoU = shared time ÷ total time).
  4. Compute the F1 of that pairing at IoU 0.3, 0.4, 0.5, 0.6 and 0.7, and average the five.

macroF1, the tie-break, counts frames instead. The two disagree on purpose:

Six answers to the same 12 seconds · 1 cell = 0.2 s (5 frames)
H · home in possessionA · away in possessionD · dead ballpossession recovered (IoU ≥ 0.5)not recovered

Green underline = that possession is recovered at IoU 0.5; orange = it is not. One wrong cell out of 60 barely moves macroF1 but breaks a possession into three. Being 1 s late pushes the 0.6 s possession completely off its real interval.

Three consequences shape everything we build:

The count ceiling · predict r times the real number of possessions and spellF1 cannot pass…
r = 1 · exact count1.00
r = 1.50.80
r = 20.67
r = 30.50
r = 5 · a raw, flickering signal0.33

spellF1 = 2 × matched ÷ (predicted + true). Inventing possessions caps the score before a single one is wrong. The raw baseline lands at 0.05 for exactly this reason.

A perfect answer, with every change late by… · official numbers from EVALUATION.md
1 frame1.0000
3 frames0.9818
8 frames (0.3 s)0.8933
25 frames (1 s)0.6539

A uniform delay keeps every possession's length, so it only breaks the short ones. Losing 11 points to 8 frames means roughly one possession in ten lasts under 1–2 s.

The truth is full of very short possessions. Smoothing harder is not free: the filter that removes a flicker also removes a real two-second possession — and both cost about the same.

That last point is an inference from published numbers, to confirm on the public window in local. And one more warning about that window:

What one possession is worth in spellF1
Public window · 17 possessions≈ 6 pts
Full match · ~350 (extrapolated)≈ 0.3 pts

The public window can tell us the pipeline is wired correctly. It cannot choose between two versions: the challenge's own baselines rank in the wrong order on it.

3 · Spotting a change of possession

The baseline gives the ball to the player nearest to it, every frame. That works while someone has it at their feet, and fails everywhere else:

Four moments the nearest player gets wrong (or right)
①HTruth stays H
nearest player: A

A pass flies past a defender. For a few frames the nearest player is Athletic's: the raw signal flickers to A, the truth never moves.

②ATouch + control = change
the ball stops in his zone

An interception. The ball enters an Athletic player's zone and changes speed and direction. He keeps it: this is a real change → A.

③HTouched, not controlled
deflection

A deflection. Athletic's leg touches the pass but the ball carries on to a Barça player. Not a change: still H.

④HBall unseen · keep H
no ball for 1.4 s?

The ball disappears in a crowded box. No ball is not a dead ball: keep the last owner until someone clearly controls it.

Home (H)Away (A)Ball
signal what it catches where it fails
nearest player who stands by the ball passes, high balls (no height in the tracking), duels
possession zone (0.5–1.5 m) a possible touch the radius must be tuned to our tracking noise
ball changes direction or speed next to a player a real touch: reception, pass, deflection needs a ball speed we trust
ball stays in the zone, or the next touch is a teammate's control — the rule's own word it is only known later: date the change at the first touch, not at the confirmation
team shape: who presses, where the blocks run possession with no ball at all harder; this is what ball-free models learn

4 · Keeping it continuous

Frame-by-frame decisions flicker; possessions are intervals. Here is one toy tracking signal — the nearest player's team, · where the ball is not seen and D where a dead-ball detector fires — run through six ways of making it continuous. Every row below the tracking is computed from it.

Same tracking, six decoders · 1 cell = 0.2 s
H · home in possessionA · away in possessionD · dead ballball not seenpossession recovered (IoU ≥ 0.5)not recovered

Toy numbers: they show how each method fails, not how well it will do on the match. Writing D for "unseen" splits the long Athletic possession; holding without smoothing keeps every flicker; a 1 s minimum duration erases the real 0.8 s interception.

decoder flicker real short possessions boundaries ball unseen knobs
majority vote ±w (baseline) removed if w is large erased if w is large drift becomes D w
median / morphology removed erased below k stable — k per letter
minimum duration removed erased below k stable — k per letter
hysteresis removed kept if the evidence is strong late, unless back-dated holds the state thresholds, k
Viterbi + switch cost removed depends on λ and the evidence where the evidence changes neutral frames λ, asymmetric costs
+ boundary snapping — — to the touch — search window

Our pick: a Viterbi decoder over H, A and D with a switch cost, fed by control events and a dead-ball detector, with neutral frames when the ball is unseen — then snap every boundary to the touch.

The background for the choice: Viterbi finds the cheapest sequence overall, with one knob (λ) for the flicker-versus-short-possession trade-off. A minimum duration can be built into it, and the semi-Markov version models how long each state lasts (Yu 2010).

5 · What others have done

work what it does why it matters to us
Link & Hoernig 2017 possession from 25 Hz tracking; kicks found by ball acceleration (≥ 4 m/s²); a Bayesian network separates control from contact being near the ball is not controlling it
Vidal-Codina et al. 2022 deterministic rules: possession zone 0.5–1 m, duel zone 1 m, a gain when the ball changes direction or speed; dead balls and set-piece types the most complete rule-based recipe
Borghesi et al. 2023 a temporal CNN labels every moment dead / home / away from tracking: 86.2% possession, 89.2% dead-alive accuracy almost exactly our task
Kim et al. 2023 · Ball Radar infers the possessor and the ball's path from the players alone a way to fill the 41%
Kim et al. 2026 · PathCRF a CRF over who passes to whom, impossible transitions masked, Viterbi decoding, no ball needed structured decoding: our P4
Lea et al. 2017 · MS-TCN · ASRF action segmentation: segmental F1 (≈ spellF1), smoothing losses and boundary refinement against over-segmentation the same problem in another field
Sportec Open DFL (paper) 7 Bundesliga matches, CC-BY, with per-frame BallPossession and BallStatus labelled data with our ground truth's meaning

6 · The plan

What we test first, in order
  1. P0
    Instrumentation

    One command that builds, validates and scores; bootstrap intervals; possession counts and durations; a validation bench on degraded DFL data

  2. P1
    Unseen is not dead

    No ball → keep the letter, never D. The cheapest fix we have

  3. P2
    A dead-ball detector

    Ball out, players still, restart shapes, Smart Tagging set pieces. Stoppage edges are possession edges

  4. P3
    Control events

    A touch (zone + change of ball direction or speed) confirmed by control; keep the last team in between

  5. P4
    Viterbi decoding

    H / A / D with a switch cost and neutral frames when the ball is unseen; compared with the vote and hysteresis

  6. P5
    Snap the boundaries

    Move each change to the frame of the touch, the ball going out or the restart

  7. P6
    Fill the gaps

    Interpolate short gaps; team-shape cues or a ball-free model for the long ones

  8. P7
    Smart Tagging as a prior

    Phase and transition tags, with a small weight

  9. P8
    A learned model

    Only if P1–P6 stall: trained on degraded DFL data, decoded with P4

How we keep ourselves honest:

  • The public window checks wiring, never chooses. We read its bootstrap interval, not its third decimal.
  • We choose on other matches. The seven Sportec/DFL matches, with the ball removed in bursts like ours (41%), identities dropped and tracks fragmented.
  • Plateaus, not peaks. Sweep each knob and take the middle of the flat zone.
  • Write the hypothesis before the result, and log every experiment — failures too — with model and version, so it lands on the results chart.

Next

  • Local checks, with the data staying on our machines: which channels the tracking really has, what the ball gaps look like, how many public possessions last under 2 s, and whether a missing ball tends to mean a dead ball.
  • First experiment: P1 on top of the baseline, logged as model: baseline-hold, version: v1.