Skip to content

Sentient-Sports/EvaluatingDefensiveInfluenceUsingGATs

Repository files navigation

Evaluating Defensive Influence in Multi-Agent Systems Using Graph Attention Networks

Written by Gregory Everett.

Email: gae1g17@soton.ac.uk

Website: https://geverett.co.uk/

LinkedIn: https://www.linkedin.com/in/greg-everett-064136200/

Table of contents

  • Paper Description
  • Ball Reception Prediction
  • Defensive Metrics
  • Potential Use Cases
  • Model & Training
  • Code workflow
  • Data
  • How to cite / contact

Paper Description

GAPP (Graph Attention for Pass Probabilities) is a graph-attention model that predicts player pass-reception probabilities in football and provides interpretable off‑ball defensive metrics (Defender Influence — DI, and Defender Performance — DP). Trained on 306 EPL matches (359,040 on‑ball events), GAPP reduces binary cross‑entropy (BCE) loss by ~6.4% ± 1.5% compared to baseline models and yields actionable, explainable defensive insights for coaching, scouting and research. The paper for this work was accepted for publication at IEEE DSAA 2025 and will be released soon.

Ball Reception Prediction

This paper uses a Graph Attention Network model to predict the probability of each attacker receiving the ball at the next event by modelling the game setup as a graph. We show an example plot below of the pass reception predictions.

Reception_Prediction

Predicted pass-reception probabilities for all players at a single event. The highest value shows the model's most likely receiver.

Defensive Metrics

The attention mechanism of the GAPP model is used to extract two new defensive metrics for evaluating off-ball defending in football. These metrics are called the Defender Influence and Defender Performance metrics. We provide example plots below of these metrics and explain each of these metrics in the plot description.

DI DP
Left — Defensive Influence (DI): the change in an attacker's reception probability when a specific defender's attention is masked. Positive DI indicates the defender reduces the attacker's chance to receive the ball. Right — Defensive Performance (DP): the DI values aggregated and weighted by each attacker's xT (attacking threat). DP quantifies a defender's overall off‑ball positional value in reducing dangerous reception opportunities.

Potential Use cases

  • Post‑match tactical analysis: Visualise event‑by‑event DI/DP to identify moments where defender positioning prevented high‑threat receptions.
  • Scouting & recruitment: Rank and compare defenders by normalized season DP to identify players who consistently limit high‑xT receivers.
  • Player development & coaching: Provide targeted feedback on off‑ball positioning (which attacker matchups a defender influences most).
  • Match preparation / opposition scouting: Identify attackers a defender is particularly effective (or weak) against and adapt marking strategies.
  • Research & transfer to other domains: Framework generalises to other multi‑agent systems (e.g., security games or other team sports) where agent influence can be framed via attention.

Model Architecture

The architecture of the Graph Attention Network model is provided in the image below.

ModelDiagram (2)

Model Details

  • Graph construction: fully connected, directed graph with a special ball node (V = players ∪ {ball}).
  • Node features: position, velocity, acceleration, distances to goals, distance/angle to ball, on-attacking-team/on‑ball flags.
  • Edge features: relative distances, edge angle, difference in node angles to the ball, same‑team flag.
  • GAT specifics: 2 GAT layers, 16 attention heads, skip connection + concatenation to encoders.

Model Hyperparameters and Training

  • Batch size: 64; epochs: 200.
  • Node hidden size: 32; edge hidden size: 16.
  • Loss: Binary cross‑entropy (attacking players masked to compute loss only where relevant).
  • Optimiser: Adam, initial LR = 0.003.
  • Dataset used: 306 EPL matches (2023/24) → ~359,040 on‑ball events.

Code Workflow

  • Begin by converting the raw tracking data into dataframes for the ball, players and events. Code to complete these tasks is in convert_tracking.py. Store these dataframes in the Data folder.
  • Run the RunGATModel notebook to convert the data into graphs and train the GAT model.
  • Run the Visualisation notebook to see an interactive visualisation of the model and DI/DP metrics using the trained GAT model.
  • Run player_eval.py to run the model and store metrics on defenders across a game, as well as to test the attention mechanism of the model (as done in the paper experiments).
  • Run the Experiments notebook to go through the experiments and case studies that were given in the paper. These include player performance comparisons, analysis of the model and how it links to defensive actions, attacker influence and more.
  • Note: Some of the code includes pre-loaded models and scaled graphs. We recommend storing the generated graphs (and scaled graphs) from the RunGATModel notebook so they can be loaded back as we do in some of these notebooks.

Data

The English Premier League Events and Tracking Data was supplied by Gradient Sports, who supported this work. For enquiries about this or similar datasets to test this work, please visit: https://www.gradientsports.com/.

How to cite / contact

If you use this work, please cite:

“Evaluating Defensive Influence in Multi-Agent Systems Using Graph Attention Networks”. Gregory Everett, Ryan J. Beal, Tim Matthews, Timothy J. Norman, and Sarvapali D. Ramchurn (2025). In: 2025 IEEE 12th International Conference on Data Science and Advanced Analytics.

Contact: gae1g17@soton.ac.uk

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors