Research
PathCRF: Ball-Free Soccer Event Detection via Possession Path Inference from Player Trajectories
PathCRF: Ball-Free Soccer Event Detection via Possession Path Inference from Player Trajectories Overview Research area: Sports analytics, multi-agent trajectory modeling, sequence labeling, and struc
- arXiv
- 2602.12080
- Published
- 2026-02-12
- Authors
- Hyunsung Kim, Kunhee Lee, Sangwoo Seo, Sang-Ki Ko, Jinsung Yoon, Chanyoung Park
AI summary
PathCRF: Ball-Free Soccer Event Detection via Possession Path Inference from Player TrajectoriesOverview
Research area: Sports analytics, multi-agent trajectory modeling, sequence labeling, and structured probabilistic inference (Conditional Random Fields applied to a new domain).
Technical level: Intermediate. Familiarity with neural sequence models, graph attention, and basic probabilistic graphical models helps, but the paper's core idea can be understood without it.
Scope (one sentence): The paper introduces PathCRF, a framework that detects on-ball soccer events (controls, kicks, out-of-play) using only player tracking data, by inferring a logically consistent "possession path" over a fully connected dynamic graph with a Dynamic Masked Conditional Random Field.
What This Paper Is About
Complete soccer event data (passes, dribbles, shots with timestamps, locations, and players) is still collected largely by human annotators, and existing automatic approaches depend on ball tracking, which is expensive and hard to scale because the ball is small, fast, and frequently occluded. This confines rich event-and-tracking datasets to top-tier competitions and limits data-driven analysis in lower and youth divisions.
PathCRF's goal is to remove the ball from the equation: instead of estimating ball positions or ball states, the model infers who possesses the ball and how it moves between players directly from player trajectories, and then reads off discrete events whenever that inferred possession state changes.
Key Contributions
- A new problem formulation: Soccer event detection is cast as a sequential edge selection problem over a fully connected dynamic graph, where each time step selects exactly one edge representing the possession state (a self-loop for a player in control, or a directed sender-to-receiver edge for a ball in flight).
- Neural CRF sequence inference for sports: A Dynamic Masked Conditional Random Field is introduced to sports analytics, enforcing domain-specific physical constraints by masking logically impossible edge-to-edge transitions with a large negative score (e.g., -10^4), ensuring the inferred possession sequence is globally consistent.
- Downstream analytics without manual annotation: The paper demonstrates that key event-based analytics — spatial event heatmaps, team possession statistics, and pass networks — can be closely approximated from detected events, with a discussion of how the framework can support semi-automated event data collection.
- Public code and reproducible data: Source code is released at https://github.com/hyunsungkim-ds/pathcrf.git using publicly available tracking data (the Sportec Open DFL Dataset), so results can be reproduced.
Main Findings
- Edge selection accuracy: PathCRF identifies the correct possession edge among 26² = 676 candidate edges with an accuracy of 69.64%, and achieves an F1-score of 75.69% in event detection.
- Violations eliminated: The Dynamic Masked CRF reaches a 0.00% violation rate (the percentage of illegal transitions in the predicted edge sequence), compared to 2.80% for the Non-CRF baseline, 2.18% for the Static Dense CRF, and 2.28% for the Dynamic Dense CRF.
- Structured inference matters more than edge accuracy: All edge-based methods share the same backbone and have similar edge-level accuracies (except Ball TP), yet event-level performance varies substantially — the Non-CRF baseline reaches only 58.77% event precision and 65.34% event F1, while Dynamic Masked CRF reaches 73.18% precision and 75.69% F1.
- Ball trajectory postprocessing underperforms: Ball TP (Ball Radar-style two-stage ball regression plus rule-based possession heuristics) achieves 47.01% edge accuracy, 44.64% event precision, 52.81% recall, and 48.39% F1, despite predicting ball trajectories with a localization error of 2.74 m. This motivates the edge inference formulation.
- Constrained decoding gives a large gain: Applying constraints only at inference eliminates all violations and raises event precision by more than 10 percentage points — from 58.77% to 68.81% for Greedy Constrained Decoding and to 69.50% for Viterbi Constrained Decoding (event F1 of 70.90% and 73.14%, respectively).
- Viterbi beats greedy: Viterbi Constrained Decoding (69.68% edge accuracy, 69.50% precision) slightly outperforms Greedy Constrained Decoding (66.34% edge accuracy, 68.81% precision), indicating the advantage of globally optimizing the sequence under constraints.
- Masking and dynamic transitions both matter: Static Masked CRF reaches 73.83% event F1, while Static Dense CRF drops to 68.78% and Dynamic Dense CRF to 67.82%. Dynamic Masked CRF improves event precision to 73.18% over Static Masked CRF's 68.57%.
- Dynamic transition scoring controls event volume: Static Masked CRF predicts 2,135 events versus 1,831 ground-truth events, while Dynamic Masked CRF produces 1,961 events, closer to the true count, explaining its higher F1.
- Backbone ablation: Replacing TranSPORTmer's SAB-based social module with Ball Radar's PPE-FPE module improves substantially — TranSPORTmer backbone (SAB & PE-SABs) with Dynamic MCRF reaches 62.97% edge accuracy and 68.19% event F1, versus 69.64% edge accuracy and 75.69% event F1 for the hybrid PPE-FPE & PE-SABs backbone. Once PPE-FPE is used, the temporal module choice between Bi-LSTM (70.39% edge accuracy, 75.24% event F1) and PE-SABs (69.64%, 75.69%) has only marginal impact.
- Runtime is practical: On a single NVIDIA GeForce RTX 4090 GPU (24 GB), all variants process a full 90-minute match in under one minute. At 5 FPS, Dynamic Masked CRF requires 565.41 ± 4.19 seconds per training epoch, with episode latency of 0.2399 ± 0.0009 s and match latency of 22.88 ± 0.08 s.
- Downsampling trade-off: Moving from 5 FPS to full 25 FPS improves event F1 from 75.69% to 77.21%, but increases training time per epoch from 565.41 to 6726.95 seconds — more than ten times — so 5 FPS is adopted as the default.
Methodology in Plain English
Graph formulation. Each snapshot of a match is treated as a fully connected directed graph over 26 nodes: 22 players (|V| = 22 in standard matches without red cards) plus 4 "outside" nodes representing the ball leaving the pitch through the left, right, top, or bottom boundary (|V~| = 26 in most cases). A player self-loop (u, u) means player u controls the ball; a directed edge (u, v) with u ≠ v means the ball is traveling from sender u to receiver v. The model's job is to pick one edge per time step.
Backbone. An encoder design inspired by ROLAND combines a social module (multi-agent interactions) with a temporal module (sequential dependencies), and two such encoders are stacked following TranSPORTmer to refine context from coarse to fine. The social module splits into a partially permutation-equivariant (PPE) network that processes each group (each team and the outside nodes) separately using an Induced Set Attention Block, and a fully permutation-equivariant (FPE) network that processes all nodes through a single ISAB to capture global inter-group context; outputs are concatenated. The temporal module uses positional encoding with stacked Set Attention Blocks. Node embeddings are converted to edge embeddings by concatenating sender and receiver embeddings and passing them through an MLP.
Intermediate supervision. The first (coarse) encoder's node embeddings are projected into a sender logit and a receiver logit, softmax-normalized across nodes, and trained with cross-entropy against ground-truth sender/receiver labels.
CRF layer. The model scores whole edge sequences, not independent per-step labels. A sequence score sums emission scores (from an MLP on edge embeddings) and transition scores computed dynamically by concatenating the previous and current edge embeddings and passing them through a shared MLP — allowing transition likelihoods to adapt as, for example, a long pass progresses toward reception. Allowed transitions are restricted to four families: staying in the same state; a player releasing the ball to a receiver; a receiver gaining control or making a one-touch kick; and the ball going out of play. Everything else is masked with a large negative score. Training minimizes the negative log-likelihood of the ground-truth edge sequence, with the partition function computed by the forward algorithm, plus weighted auxiliary terms for the coarse classification loss and the emission classification loss. Inference uses Viterbi decoding.
Event extraction. Events are read off deterministically wherever the selected edge changes between adjacent time steps. The new edge's topology determines the category: a transition to a player self-loop is a control, a transition to (u, v) with u ≠ v is a kick, and a transition to an outside-node self-loop is out-of-play.
Data preparation. Experiments use only the Sportec Open DFL Dataset (seven German Bundesliga 1 and 2 matches). Event timestamps are synchronized with ELASTIC, missed ball touches are recovered by detecting abrupt directional changes in ball trajectories with the Ramer–Douglas–Peucker algorithm, and these are aligned to synchronized events via Needleman–Wunsch, with unmatched points inserted as extra ball-touch events. Training and inference are restricted to in-play "episodes," with 10-second sliding windows and a stride of 5 frames; tracking data is downsampled from 25 FPS to 5 FPS, giving 50 time steps per window, and predictions are upsampled back to 25 FPS for downstream analysis. Splits: 5 training matches (379 episodes, 8,792 events, 364,003 frames, 54,683 windows), 1 validation match (71 episodes, 1,902 events, 80,076 frames, 12,620 windows), and 1 test match (91 episodes, 1,831 events, 85,304 frames).
Evaluation. Edge-level metrics are sender accuracy, receiver accuracy, edge accuracy, and violation rate. Event-level metrics are precision, recall, and F1, computed by aligning detected and ground-truth events with Needleman–Wunsch and counting a match only if event type, acting player, and a temporal difference within one second all agree. Fine-grained SPADL ground-truth event types are mapped into three simplified categories (control, kick, out-of-play) for matching.
Why This Matters
Research impact. The paper shows that a structured, constraint-based sequence model can replace ball tracking for event detection, and it imports neural CRF techniques — mostly associated with NLP — into sports analytics, enforcing physical domain constraints that independent per-frame classification cannot. It also argues that because the governing constraints are simple and models can be trained from scratch, CRF-based training is feasible here, unlike the constrained-decoding workarounds common in NLP.
Real-world applications:
- Event heatmaps: The paper compares kernel density estimation heatmaps computed from true and detected events, for both teams and the most event-involved player from each team, showing predicted heatmaps closely align with ground truth.
- Team possession statistics: Detected events are used to approximate team-level possession metrics.
- Pass networks: Passing patterns are reconstructed from detected events.
- Semi-automated annotation: Where fully accurate event data is still needed for fine-grained scene analysis, the framework can substantially reduce human workload in event data collection.
Industry relevance. Because PathCRF requires no ball-tracking hardware (dense multi-camera setups, in-ball sensors, stadium-wide infrastructure) and no labor-intensive manual annotation, it lowers the cost barrier that currently confines comprehensive event-and-tracking data to top-tier competitions. This is directly relevant to clubs, leagues, and data providers operating in lower or youth divisions, and the released code makes the approach reproducible.
Future Directions
- Finer-grained event taxonomy: Ground-truth SPADL events were collapsed into three simplified categories (control, kick, out-of-play) for matching; extending the framework to distinguish richer event types is an open question the paper's setup leaves unaddressed.
- Resolution versus cost: The 25 FPS setting improves event F1 from 75.69% to 77.21% but multiplies training time per epoch from 565.41 to 6726.95 seconds. The paper notes this gap would grow with larger training data, leaving the resolution–efficiency trade-off open.
- Scaling beyond a small public dataset: The public experiments use only five training matches from the Sportec Open DFL Dataset; the paper reports verifying robustness and generalizability on an additional non-public dataset in Appendix B, so behavior under much larger, more diverse data is not established in the main text.
- Performance headroom: Edge accuracy of 69.64% among 676 candidates leaves room for improvement, particularly in sender and receiver attributes, which the paper identifies as sources of mislabeled events (highlighted in yellow in its qualitative comparison).
Target Audience
Researchers and practitioners in sports analytics and computer vision for sports, machine learning engineers working on multi-agent trajectory modeling and structured prediction, and data providers or clubs interested in low-cost automated event data collection. It is also relevant to NLP-adjacent researchers interested in how masked CRF training transfers to a new constrained-sequence domain.
Note: The provided paper content is truncated during Section 4.1, so the full details of the remaining practical applications (sections 4.2–4.4) and the appendices (A.1, A.2, B) are not available for this summary.
Authors’ abstract
Despite recent advances in AI, event data collection in soccer still relies heavily on labor-intensive manual annotation. Although prior work has explored automatic event detection using player and ball trajectories, ball tracking also remains difficult to scale due to high infrastructural and operational costs. As a result, comprehensive data collection in soccer is largely confined to top-tier competitions, limiting the broader adoption of data-driven analysis in this domain. To address this challenge, this paper proposes PathCRF, a framework for detecting on-ball soccer events using only player tracking data. We model player trajectories as a fully connected dynamic graph and formulate event detection as the problem of selecting exactly one edge corresponding to the current possession state at each time step. To ensure logical consistency of the resulting edge sequence, we employ a Conditional Random Field (CRF) that forbids impossible transitions between consecutive edges, where emission and transition scores are dynamically computed from edge embeddings produced by a socio-temporal backbone architecture. During inference, the most probable edge sequence is obtained via Viterbi decoding, and events such as ball controls or passes are detected whenever the selected edge changes between adjacent time steps. Experiments show that PathCRF produces accurate, logically consistent possession paths, enabling reliable downstream analyses while substantially reducing the need for manual event annotation. The source code is available at https://github.com/hyunsungkim-ds/pathcrf.git.