TacticAI: an AI assistant for football tactics

Identifying key patterns of tactics implemented by rival teams, and developing effective responses, lies at the heart of modern football. However, doing so algorithmically remains an open research challenge. To address this unmet need, we propose TacticAI, an AI football tactics assistant developed and evaluated in close collaboration with domain experts from Liverpool FC. We focus on analysing corner kicks, as they offer coaches the most direct opportunities for interventions and improvements. TacticAI incorporates both a predictive and a generative component, allowing the coaches to effectively sample and explore alternative player setups for each corner kick routine and to select those with the highest predicted likelihood of success. We validate TacticAI on a number of relevant benchmark tasks: predicting receivers and shot attempts and recommending player position adjustments. The utility of TacticAI is validated by a qualitative study conducted with football domain experts at Liverpool FC. We show that TacticAI’s model suggestions are not only indistinguishable from real tactics, but also favoured over existing tactics 90% of the time, and that TacticAI offers an effective corner kick retrieval system. TacticAI achieves these results despite the limited availability of gold-standard data, achieving data efficiency through geometric deep learning.


Introduction
Association football, or simply football or soccer, is a widely popular and highly professionalised sport, in which two teams compete to score goals against each other.As each football team comprises of up to 11 active players at all times and takes place on a very large pitch (also known as a soccer field), scoring goals tends to require a significant degree of strategic team-play.Under the rules codified in the Laws of the Game [20], this competition has nurtured an evolution of nuanced strategies and tactics, culminating in modern professional football leagues.In today's play, data-driven insights are a key driver in determining the optimal player setups for each game and developing counter-tactics to maximise the chances of success [38].
When competing at the highest level the margins are incredibly tight, and it is increasingly important to be able to capitalise on any opportunity for creating an advantage on the pitch.To that end, top-tier clubs employ diverse teams of coaches, analysts and experts, tasked with studying and devising (counter-)tactics before each game.Several recent methods attempt to improve tactical coaching and player decision-making through artificial intelligence (AI) tools, using a wide variety of data types from videos to tracking sensors and applying diverse algorithms ranging from simple logistic regression to elaborate neural network architectures.Such methods have been employed to help predict shot events from videos [16], forecast off-screen movement from spatio-temporal data [27], determine whether a match is in-play or interrupted [23], or identify player actions [2].
The execution of agreed-upon plans by players on the pitch is highly dynamic and imperfect, depending on numerous factors including player fitness and fatigue, variations in player movement and positioning, weather, the state of the pitch, and the reaction of the opposing team.In contrast, set pieces provide an opportunity to exert more control on the outcome, as the brief interruption in play allows the players to reposition according to one of the practiced and pre-agreed patterns, and make a deliberate attempt towards the goal.Examples of such set pieces include free kicks, corner kicks, goal kicks, throw-ins, and penalties [38].
Among set pieces, corner kicks are of particular importance, as an improvement in corner kick execution may substantially modify game outcomes, and they lend themselves to principled, tactical and detailed analysis.This is because corner kicks tend to occur frequently in football matches (with ∼10 corners on average taking place in each match [33]), they are taken from a fixed, rigid position, and they offer an immediate opportunity for scoring a goal-no other set piece simultaneously satisfies all of the above.In practice, corner kick routines are determined well ahead of each match, taking into account the strengths and weaknesses of the opposing team and their typical tactical deployment.It is for this reason that we focus on corner kick analysis in particular, and propose TacticAI, an AI football assistant for supporting the human expert with set piece analysis, and the development and improvement of corner kick routines.
TacticAI is rooted in learning efficient representations of corner kick tactics from raw, spatiotemporal player tracking data.It makes efficient use of this data by representing each corner kick situation as a graph-a natural representation for modelling relationships between players (Figure 1-A, Table 2), and these player relationships may be of higher importance than the absolute distances between them on the pitch [1].Such a graph input is a natural candidate for graph machine learning models [41], which we employ within TacticAI to obtain high-dimensional latent player representations.
Uniquely, TacticAI takes advantage of geometric deep learning [5] to explicitly produce player representations that respect several symmetries of the football pitch (Figure 1-B).As an illustrative example, we can usually safely assume that under a horizontal or vertical reflection of the pitch state, the game situation is equivalent.Geometric deep learning ensures that TacticAI's player representations will be identically computed under such reflections, such that this symmetry does not have to be learnt from data.This proves to be a valuable addition, as high-quality tracking data is often limited-with only a few hundred matches played each year in every league.We provide an in-depth overview of how we employ geometric deep learning in TacticAI in the Methods section.
From these representations, TacticAI is then able to answer various predictive questions about the outcomes of a corner-for example, which player is most likely to make first contact with the ball, or whether a shot will take place.TacticAI can also be used as a retrieval system-for mining similar corner kick situations based on the similarity of player representations-and a generative recommendation system, suggesting adjustments to player positions and velocities to maximise or minimise estimated shot probability.Through several experiments within a case study with domain expert coaches and analysts from Liverpool FC, the results of which we present in the next section, we obtain clear statistical evidence that TacticAI readily provides useful, realistic and accurate tactical suggestions.

Results and Analysis
To demonstrate the diverse qualities of our approach, we design TacticAI with three distinct predictive and generative components: receiver prediction, shot prediction, and tactic recommendation through guided generation, which also correspond to the benchmark tasks for quantitatively evaluating TacticAI.In addition to providing accurate quantitative insights for corner kick analysis with its predictive components, the interplay between TacticAI's predictive and generative components allows coaches to sample alternative player setups for each routine of interest, and directly evaluate the possible outcomes of such alternatives.
Who makes first contact with the ball?

Shot?
Will a shot be taken? Adjust?
How to position the players to increase/decrease shot probability?
(B) (A) Each player is treated as a node in a graph, with node, edge and graph features extracted as detailed in the main text.Then, a graph neural network operates over this graph by performing message passing; each node's representation is updated using the messages sent to it from its neighbouring nodes.(B), how TacticAI processes a given corner kick.To ensure that TacticAI's answers are robust in the face of horizontal or vertical reflections, all possible combinations of reflections are applied to the input corner, and these four views are then fed to the core TacticAI model, where they are able to interact with each other to compute the final player representations-each "internal blue arrow" corresponds to a single message passing layer from (A).Once player representations are computed, they can be used to predict the corner's receiver, whether a shot has been taken, as well as assistive adjustments to player positions and velocities, which increase or decrease the probability of a shot being taken.

Benchmark Task Graph Learning Task Node Features Edge Features Global Features
Player positions We will first describe our quantitative analysis, which demonstrates that TacticAI's predictive components are accurate at predicting corner kick receivers and shot situations on held-out test corners, and that the proposed player adjustments do not strongly deviate from ground-truth situations.However, such an analysis only gives an indirect insight into how useful TacticAI would be once deployed.We tackle this question of utility head-on, and conduct a comprehensive case study in collaboration with our partners at Liverpool FC-where we directly ask human expert raters to judge the utility of TacticAI's predictions and player adjustments.The following sections expand on the specific results and analysis we have performed.
In what follows, we will describe TacticAI's components at a minimal level necessary to understand our evaluation.We defer detailed descriptions of TacticAI's components to the Methods section.

Benchmarking TacticAI
We evaluate the three components of TacticAI on a relevant benchmark dataset of corner kicks.Our dataset consists of 7, 176 corner kicks from the 2020-2021 Premier League seasons, which we randomly shuffle and split into a training (80%) and a test set (20%).As previously mentioned, TacticAI operates on graphs.Accordingly, we represent each corner kick situation as a graph, where each node corresponds to a player.The features associated with each node encode the movements (velocities and positions) and simple profiles (heights and weights) of on-pitch players at the timestamp when the corresponding corner kick was being taken by the attacking kicker (see the Methods section), and no information of ball movement was encoded.The graphs are fully connected; that is, for every pair of players, we will include the edge connecting them in the graph.Each of these edges encodes a binary feature, indicating whether the two players are on opposing teams or not.For each task, we generated the relevant dataset of node/edge/graph features and corresponding labels (Table 1 and 2, see the Methods section).The components were then trained separately with their corresponding corner kick graphs.In particular, we only employ a minimal set of features to construct the corner kick graphs, without encoding the movements of the ball nor explicitly encoding the distances between players into the graphs.We used a consistent training-test split for all benchmark tasks, as this made it possible to benchmark not only the individual components, but also their interactions.

Accurate receiver and shot prediction through geometric deep learning
One of TacticAI's key predictive models forecasts the receiver out of the 22 on-pitch players.The receiver is defined as the first player touching the ball after the corner was taken.In our evaluation, all methods used the same set of features (see the Receiver Prediction entry in    [4,43], leveraging geometric deep learning [5] through the use of  2 group convolutions [7].We supplement this result with a detailed ablation study, verifying that both our choice of base architecture and group convolution yielded significant improvements on the receiver prediction task (S.Table 2, see the Ablation Study in the Methods section).Considering that corner kick receiver prediction is a highly challenging task with many factors that are unseen by our model-including fatigue and fitness levels, and actual ball trajectorywe consider TacticAI's top-3 accuracy to reflect a high level of predictive power, and keep the base TacticAI architecture fixed for subsequent studies.In addition to this quantitative evaluation with the evaluation dataset, we also evaluate the performance of TacticAI's receiver prediction component in a case study with human raters.Please see the Case Study section for more details.
For shot prediction, we observe that reusing the base TacticAI architecture to directly predict shot events-i.e., directly modelling the unconditional probability ℙ(shot)-proved challenging, only yielding a test F 1 score1 of 0.52±0.03.However, given that we already have a potent receiver predictor, we decided to use its output to give us additional insight into whether or not a shot had been taken.Hence, we opted to decompose the probability of taking a shot as where ℙ(receiver) are the probabilities computed by TacticAI's receiver prediction system, and ℙ(shot|receiver) models the conditional shot probability after a specific player made first contact with the ball.This was implemented through providing an additional global feature to indicate the receiver in the corresponding corner kick (Table 1) while the architecture otherwise remained the same as that of receiver prediction (S.Figure 2, see the Methods section).At training time, we feed the ground-truth receiver as input to the model-at inference time, we attempt every possible receiver, weighing their contributions using the probabilities given by TacticAI's receiver predictor, as per Equation 1.This two-phased approach yielded a final test F 1 score of 0.64 ± 0.02 for shot prediction, which encodes significantly more signal than the unconditional shot predictor, especially considering the many unobservables associated with predicting shot events.
Moreover, we also observe that, even just through predicting the receivers, without explicitly In-or out-swing Figure 2 | Corner kicks represented in the latent space shaped by TacticAI.We visualise the latent representations of attacking and defending teams in 1, 024 corner kicks using -SNE.A latent team embedding in one corner kick sample is the mean of the latent player representations on the same attacking ((A), (B) and (C)) or defending (D) team.Given the reference corner kick sample (A), we retrieve another corner kick sample (B) with respect to the closest distance of their representations in the latent space.We observe that (A) and (B) are both out-swing corner kicks and share similar patterns of their attacking tactics, which are highlighted with rectangles having the same colours, although they bear differences with respect to the absolute positions and velocities of the players.All the while, the latent representation of an in-swing attack (C) is distant from both (A) and (B) in the latent space.The red arrows are only used to demonstrate the difference between in-and out-swing corner kicks, not the actual ball trajectories.
classifying any other salient features of corners, TacticAI learned generalisable representations of the data.Specifically, team setups with similar tactical patterns tend to cluster together in TacticAI's latent space (Figure 2).However, no clear clusters are observed in the raw input space (S.Figure 1).This indicates that TacticAI can be leveraged as a useful corner kick retrieval system, and we will present our evaluation of this hypothesis in the Case Study section.

Controlled tactic refinement using class-conditional generative models
Equipped with components that are able to potently relate corner kicks with their various outcomes (e.g.receivers and shot events), we can explore the use of TacticAI to suggest adjustments of tactics, in order to amplify or reduce the likelihood of certain outcomes.
Specifically, we aim to produce adjustments to the movements of players on one of the two teams, including their positions and velocities, which would maximise or minimise the probability of a shot event, conditioned on the initial corner setup, consisting of the movements of players on both teams, and their heights and weights.In particular, although in real-world scenarios both teams may react simultaneously to the movements of each other, in our study, we focus on moderate adjustments to player movements, which help to detect players that are not responding to a tactic properly.Due to this reason, we simplify the process of tactic refinement through generating the adjustments for only one team while keeping the other fixed.The way we train a model for this task is through an auto-encoding objective: we feed the ground-truth shot outcome (a binary indicator) as an additional graph-level feature to TacticAI's model (Table 1), and then have it learn to reconstruct a probability distribution of the input player coordinates (Figure 1(B), also see Methods).This autoencoder-based generative model is an individual component which separates from TacticAI's predictive systems.All three systems share the encoder architecture (without sharing parameters), but use different decoders (see the Methods section).At inference time, we can instead feed in a desired shot outcome for the given corner setup, and then sample new positions and velocities for players on one team using this probability distribution.This setup, in principle, allows for flexible downstream use, as human coaches can optimise corner kick setups through generating adjustments conditioned on the specific outcomes of their interest-e.g., increasing shot probability for the attacking team, decreasing it for the defending team (Figure 3) or amplifying the chance that a particular striker receives the ball.
We first evaluate the generated adjustments quantitatively, by verifying how distinguishable they are from real corner kicks using a classifier.To do this, we synthesised a dataset consisting of 200 corner kick samples and their corresponding conditionally-generated adjustments.Specifically, for corners without a shot event, we generated adjustments for the attacking team by setting the shot event feature to 1, and vice-versa for the defending team when a shot event did happen.We found that the real and generated samples were not distinguishable by an MLP classifier, with an F 1 score of 0.53±0.05,indicating random chance level accuracy.We also evaluated the realism of the adjustments in a qualitative case study, which we will present in the following section.
In addition, we leveraged our TacticAI shot predictor to estimate whether the proposed adjustments were salient.We did this by analysing 100 corner kick samples in which threatening shots occurred, and then, for each sample, generated one defensive refinement through setting the shot event feature to 0. We observed that the average shot probability significantly decreased, from 0.75 ± 0.14 for ground-truth corners to 0.69 ± 0.16 for adjustments ( = 2.62,  < 0.001).This observation was consistent when testing for attacking team refinements (shot probability increased from 0.18 ± 0.16 to 0.31 ± 0.26 ( = −4.46, < 0.001)).Moving beyond this result, we also asked human raters to assess the utility of TacticAI's proposed adjustments within our case study, which we detail next.

Case study with expert raters
Although quantitative evaluation with well-defined benchmark datasets was critical for the technical development of TacticAI, the ultimate test of TacticAI as a football tactic assistant is its practical downstream utility being recognised by professionals in the industry.To this end, we evaluated TacticAI through a case study with our partners at Liverpool FC (LFC).Specifically, we invited a group of five football experts: three data scientists, one video analyst and one coaching assistant.Each of them completed four tasks in the case study, which evaluated the utility of TacticAI's components from several perspectives.These include: 1) realism of TacticAI's generated adjustments, 2) plausibility of TacticAI's receiver predictions, 3) effectiveness of TacticAI's embeddings for retrieving similar corners, and 4) usefulness of TacticAI's recommended adjustments.We provide an overview of our study's results here, and refer the interested reader to S.Figures 3, 4 and 5 and the supplementary Case Study Design section (S1.2) for additional details.
We first simultaneously evaluated the realism of the adjusted corner kicks generated by TacticAI, and the plausibility of its receiver predictions.Going through a collection of 50 corner kick samples, we first asked the raters to classify whether a given sample was real or generated by TacticAI, then they were asked to identify the most likely receivers in the corner kick sample (S.Figure 3).
On the task of classifying real and generated samples, first we found that the raters' average F 1 score of classifying the real vs.generated samples was only 0.60 ± 0.04, with individual F 1 scores (  1 = 0.54,   1 = 0.64,   1 = 0.65,   1 = 0.62,   1 = 0.56), indicating that the raters were, in many situations, unable to distinguish TacticAI's adjustments from real corners.
The previous evaluation focused on analysing realism detection performance across raters.We also conduct a study which analyses realism detection across samples.Specifically, we assigned ratings for each sample-assigning +1 to a sample if it was identified as real by a human rater, and 0 otherwiseand computed the average rating for each sample across the five raters.Importantly, by studying the distribution of ratings, we found that there was no significant difference between the average ratings assigned to real and generated corners ( = 0.34,  > 0.05) (Figure 4(A)).Hence, the real and generated samples were assigned statistically indistinguishable average ratings by human raters.
For the task of identifying receivers, we rated TacticAI's predictions with respect to a rater as +1 if at least one of the receivers identified by the rater appeared in TacticAI's top-3 predictions, and 0 otherwise.The average top-3 accuracy among the human raters was 0.79 ± 0.18; specifically, 0.82 ± 0.17 for the real samples, and 0.77 ± 0.21 for the generated ones.These scores closely line up with the accuracy of TacticAI on predicting receivers for held-out test corners, validating our quantitative study.Further, after averaging the ratings for receiver prediction sample-wise, we found no statistically significant difference between the average ratings of predicting receivers over the real and generated samples ( = 0.968,  > 0.05) (Figure 4(B)).This indicates that TacticAI was equally performant in predicting the receivers of real corners and TacticAI-generated adjustments, and hence may be leveraged for this purpose even in simulated scenarios.
There is a notably high variance in the average receiver prediction rating of TacticAI.We hypothesise In task 1, we tested the statistical difference between the real corner kick samples and the synthetic ones generated by TacticAI from two aspects.(A) the distributions of the ratings of the two types of samples, and (B) the distributions of the top-3 accuracy of receiver prediction using those samples.No statistical difference was observed in either cases ((A)( = 0.34,  > 0.05), and (B)( = 0.968,  > 0.05)).On the other hand, for task 2 (receiver prediction), we observed a statistically significant difference between the ratings of different raters, with three clear clusters emerging (C).Specifically, Raters A and E had similar ratings ( = 1.41,  > 0.05), and Raters B and D also rated in similar ways ( = 2.53,  > 0.05), while Rater C responded differently from all other raters.This suggests a good level of variety of the human raters with respect to their perceptions of corner kicks.In task 3 of identifying similar corners retrieved in terms of salient strategic setups, there was no significant difference among the distributions of the ratings by different raters (D), suggesting a high level of agreement on the usefulness of TacticAI's capability of retrieving similar corners ( 1,4 = 1.01,  > 0.1).Finally, in task 4, we compared the ratings of the strategic refinements by the human raters (E), and the raters also agreed on the general effectiveness of the refinements recommended by TacticAI ( 1,4 = 0.45,  > 0.05).
that this is due to the fact that different raters may choose to focus on different salient features when evaluating the likely receivers (or even the amount of likely receivers).We set out to validate this hypothesis by testing the pair-wise similarity of the predictions by the human raters through running a one-away analysis of variance (ANOVA), followed by a Tukey's test.We found that the distributions of the five raters' predictions were significantly different ( 1,4 = 14.46,  < 0.001) forming three clusters (Figure 4(C)).This result indicates that different human raters-as suggested by their various titles at LFC-may often use very different leads when suggesting plausible receivers.The fact that TacticAI manages to retain a high top-3 accuracy in such a setting suggests that it was able to capture the salient patterns of corner kick strategies, which broadly align with human raters' preferences.We will further test this hypothesis in the third task-of identifying similar corners.
For the third task, we asked the human raters to judge 50 pairs of corners for their similarity.Each pair consisted of a reference corner and a retrieved corner, where the retrieved corner was chosen either as the nearest-neighbour of the reference in terms of their TacticAI latent space representations, or-as a feature-level heuristic-the cosine similarities of their raw features (S.Figure 4) in our corner kick dataset.We score the raters' judgement of a pair as +1 if they considered the corners presented in the case to be usefully similar, otherwise the pair is scored with 0. We first computed, for each rater, the recall with which they have judged a baseline-or TacticAI-retrieved pair as usefully similar (see Task 3 of the Case Study Design section (S1.2) in the Supplementary Materials).For TacticAI retrievals, the average recall across all raters was 0.63 ± 0.09, and for the baseline system, the recall was 0.33 ± 0.10.Secondly, we assess the statistical difference between the results of the two methods by averaging the ratings for each reference-retrieval pair, finding that the average rating of TacticAI retrievals is significantly higher than the average rating of baseline method retrievals ( = 2.34,  < 0.05).These two results suggest that TacticAI significantly outperforms the feature-space baseline as a method for mining similar corners.This indicates that TacticAI is able to extract salient features from corners which are not trivial to extract from the input data alone, reinforcing it as a potent tool for discovering opposing team tactics from available data.Finally, we observed that this task exhibited a high level of inter-rater agreement for TacticAI-retrieved pairs ( 1,4 = 1.01,  > 0.1) (Figure 4(D)), suggesting that human raters were largely in agreement with respect to their assessment of TacticAI's performance.
Finally, we evaluated TacticAI's player adjustment recommendations for their practical utility.Specifically, each rater was given 50 tactical refinements together with the corresponding real corner kick setups-see S.Figure 5, and the Case Study Design section in the Supplementary Materials S1.2.The raters were then asked to rate each refinement as saliently improving the tactics (+1), saliently making them worse (−1), or offering no salient differences (0).We calculated the average rating assigned by each of the raters (giving us a value in the range [−1, 1] for each rater).The average of these values across all five raters was 0.7 ± 0.1.Further, for 45 of the 50 situations (90%), the human raters found TacticAI's suggestion to be favourable on average (by majority voting).Both of these results indicate that TacticAI's recommendations are salient and useful to a downstream football club practitioner, and we set out to validate this with statistical tests.
We performed statistical significance testing of the observed positive ratings.First, for each of the 50 situations, we averaged its ratings across all five raters, and then ran a -test to assess whether the mean rating was significantly larger than zero.Indeed, the statistical test indicated that the tactical adjustments recommended by TacticAI were constructive overall ( avg 49 = 9.20,  < 0.001).Secondly, we verified that each of the five raters individually found TacticAI's recommendations to be constructive, running a -test on each of their ratings individually.For all of the five raters, their average ratings were found to be above zero with statistical significance (  49 = 5.84,   < 0.001;   49 = 7.30,   < 0.001;   49 = 7.00,   < 0.001;   49 = 6.04,   < 0.001;   49 = 7.88,   < 0.001).In addition, their ratings also shared a high-level of inter-agreement ( 1,4 = 0.45,  > 0.05) (Figure 4(E)), suggesting a level of practical usefulness that is generally recognised by human experts, even though they represent These examples are selected from our case study with human experts, to illustrate the breadth of tactical adjustments that TacticAI suggests to teams defending a corner.The density of the yellow circles coincides with the number of times that the corresponding change is recognised as constructive by the human experts.Instead of optimising the movement of one specific player, TacticAI can recommend the improvements for multiple players in one generation step through suggesting better positions to block the opposing players, or better orientations to track them more efficiently.Some specific comments from expert raters follow.In (A), according to raters, TacticAI suggests more favourable positions for several defenders, and improved tracking runs for several others-further, the goalkeeper is positioned more deeply, which is also beneficial.In (B), TacticAI suggests that the defenders furthest away from the corner make improved covering runs, which was unanimously deemed useful, with several other defenders also positioned more favourably.In (C), TacticAI recommends improved covering runs for a central group of defenders in the penalty box, which was unanimously considered salient by our raters.And in (D), TacticAI suggests substantially better tracking runs for two central defenders, along with a better positioning for two other defenders in the goal area.
different backgrounds.
Taking all of these results together, we find TacticAI to possess strong components for prediction, retrieval, and tactical adjustments on corner kicks.To illustrate the kinds of salient recommendations by TacticAI, in Figure 5 we present four examples with high degree of inter-rater agreement.

Discussion and Conclusions
We have demonstrated an AI assistant for football tactics, and provided statistical evidence of its efficacy through a comprehensive case study with expert human raters from Liverpool FC.First, TacticAI is able to accurately predict the first receiver after a corner kick is taken as well as the probability of a shot as the direct result of the corner.Second, TacticAI has been shown to produce plausible tactical variations that improve outcomes in a salient way, while being indistinguishable from real scenarios by domain experts.And finally, the system's latent player representations are a powerful means to retrieve similar set piece tactics, allowing coaches to analyse relevant tactics and counter-tactics that have been successful in the past.
The broader scope of strategy modelling in football has previously been addressed from various individual angles, such as pass prediction [18,19,30], shot prediction [16] or corner kick tactical classification [33].However, to the best of our knowledge, our work stands out by combining and evaluating predictive and generative modelling of corner kicks for tactic development.It also stands out in its method of applying geometric deep learning, allowing for efficiently incorporating various symmetries of the football pitch for improved data efficiency.Our method incorporates minimal domain knowledge, and does not rely on intricate feature engineering-though its factorised design naturally allows for more intricate feature engineering approaches, when such features are available.
Our methodology requires the position and velocity estimates of all players at the time of execution of the corner and subsequent events.Here, we derive these from high-quality tracking and event data, with data availability from tracking providers limited to top leagues.Player tracking based on broadcast video would increase the reach and training data substantially, but would also likely result in noisier model inputs.While the attention mechanism of GATs would allow us to perform introspection of the most salient factors contributing to the model outcome, our method does not explicitly model exogenous (aleatoric) uncertainty, which would be valuable context for the football analyst.
While the empirical study of our method's efficacy has been focused on corner kicks in association football, it readily generalises to other set pieces (such as throw-ins, which similarly benefit from similarity retrieval, pass and/or shot prediction) and other team sports with suspended play situations.The learned representations and overall framing of TacticAI also lays the ground for future research to integrate a natural language interface that enables domain-grounded conversations with the assistant, with the aim to retrieve particular situations of interest, make predictions for a given tactical variant, compare and contrast, and guide through an interactive process to derive tactical suggestions.It is thus our belief that TacticAI lays the groundwork for the next-generation AI assistant for football.

Methods
We devised TacticAI as a geometric deep learning pipeline, further expanded in this section.We process labelled spatio-temporal football data into graph representations, and train and evaluate on benchmarking tasks cast as classification or regression.These steps are presented in sequence, followed by details on the employed computational architecture.

Raw corner kick data
The raw dataset consisted of 9, 693 corner kicks collected from 2020-2021 Premier League seasons, which was provided by Liverpool FC.This dataset is comprised of four separate data sources: • Spatio-temporal trajectory frames ("tracking data"), which tracked all on-pitch players and the ball, for each match, at 25 frames per second.In addition to player positions, their velocities are derived from position data through filtering.For each corner kick, we only used the frame in which the kick is being taken as input information.• Event stream data, which annotated the events or actions (e.g., passes, shots and goals) that have occurred in the corresponding tracking frames.• Line-up data for the corresponding games, which recorded the players' profiles, including their heights, weights and roles.
• Game data, which contained the game days, stadium information, and pitch length and width in meters.

Graph representation and construction
We assumed that we were provided with an input graph G = (V, E) with a set of nodes V and edges E ⊆ V × V. Within the context of football games, we took V to be the set of twenty-two players currently on the pitch for both teams, and we set E = V × V; that is, we assumed all pairs of players have the potential to interact.Further analyses, leveraging more specific choices of E, would be an interesting avenue for future work.
Additionally, we assume that the graph is appropriately featurised.Specifically, we provide a node feature matrix, X ∈ ℝ | V | × , an edge feature tensor, E ∈ ℝ | V | × | V | × , and a graph feature vector, g ∈ ℝ  .The appropriate entries of these objects provide us with the input features for each node, edge, and the graph.For example, x  ∈ ℝ  would provide attributes of an individual player  ∈ , such as position, height and weight, and e  ∈ ℝ  would provide the attributes of a particular pair of players (, ) ∈ E, such as their distance, and whether they belong to the same team.The graph feature vector, g, can be used to store global attributes of interest to the corner kick, such as the game time, current score, or ball position.For a simplified visualisation of how a graph neural network would process such an input, refer to Figure 1(A).
To construct the input graphs, we first aligned the four data sources with respect to their game IDs and timestamps and filtered out 2, 517 invalid corner kicks, for which the alignment failed due to missing data, e.g., missing tracking frames or event labels.This filtering yielded 7, 176 valid corner kicks for training and evaluation.We summarised the exact information that was used to construct the input graphs in Table 2.In particular, other than player heights (measured in centimeters (cm)) and weights (measured in kilograms (kg)), the players were anonymous in the model.For the cases in which the player profiles were missing, we set their heights and weights to 180cm and 75kg, respectively, as defaults.In total, we had 385 such occurrences out of a total of 213, 246 (= 22×9, 693) during data preprocessing.We downscaled the heights and weights by a factor of 100.Moreover, for each corner kick, we zero-centered the positions of on-pitch players and normalised them onto a 10m × 10m pitch, and their velocities were re-scaled accordingly.For the cases in which the pitch dimensions were missing, we used a standard pitch dimension of 110m × 63m as default.
We summarised the grouping of the features in Table 1.The actual features used in different benchmark tasks may differ, and we will describe this in more details in the next section.To focus on modelling the high-level tactics played by the attacking and defending teams, other than a binary indicator for ball possession, no information of ball movement, neither positions nor velocities, was used to construct the input graphs.
Benchmark tasks construction TacticAI consists of three predictive and generative models, which also corresponded to three benchmark tasks implemented in this study.Specifically, 1) Receiver prediction, 2) Threatening shot prediction, and 3) Guided generation of team positions and velocities (Table 1).The graphs of all the benchmark tasks used the same feature space of nodes and edges, differing only in the global features.
For all three tasks, our models first transform the node features to a latent node feature matrix, H =  G (X, E, g), from which we could answer queries: either about individual players-in which case we learned a relevant classifier or regressor over the h  vectors (the rows of H)-or about the occurrence of a global event (e.g.shot taken)-in which case we classified or regressed over the aggregated player vectors,  h  .In both cases, the classifiers were trained using stochastic gradient descent over an appropriately chosen loss function, such as categorical cross-entropy for classifiers, and mean squared error for regressors.
For different tasks, we extracted the corresponding ground-truth labels from either the event stream data or the tracking data.Specifically, 1) We modelled receiver prediction as a node classification task, and labelled the first player to touch the ball after the the corner was taken as the target node.This player could be either an attacking or defensive player.2) Shot prediction was modelled as graph classification.In particular, we considered a next-ball-touch action by the attacking team as a shot if it was a direct corner, a goal, an aerial, hit on the goalposts, a shot attempt saved by the goalkeeper, or missing target.This yielded 1, 736 corners labelled as a shot being taken, and 5, 440 corners labelled as a shot not being taken.3) For guided generation of player position and velocities, no additional label was needed, as this model relied on a self-supervised reconstruction objective.
The entire dataset was split into training and evaluation sets with a 80 : 20 ratio through random sampling, and the same splits were used for all tasks.
Graph neural networks The central model of TacticAI is the graph neural network (GNN) [41], which computes latent representations on a graph by repeatedly combining them within each node's neighbourhood.Here we define a node's neighbourhood, N  , as the set of all first-order neighbours of node , that is, N  = { | (, ) ∈ E}.A single GNN layer then transforms the node features by passing messages between neighbouring nodes [13], following the notation of related work [5], and the implementation of the CLRS-30 benchmark baselines [42]: where  : ℝ  × ℝ  × ℝ  × ℝ  → ℝ  ′ and  : ℝ  × ℝ  ′ → ℝ  ′ are two learnable functions (e.g.multilayer perceptrons), h ()   are the features of node  after  GNN layers, and is any permutation-invariant aggregator, such as sum, max, or average.By definition, we set h (0)  = x  , and iterate Equation 2 for  steps, where  is a hyperparameter.Then, we let H =  G (X, E, g) = H ( ) be the final node embeddings coming out of the GNN.
It is well known that Equation 2 is remarkably general; it can be used to express popular models such as Transformers [39] as a special case, and it has been argued that all discrete deep learning models can be expressed in this form [40,3].This makes GNNs a perfect framework for benchmarking various approaches to modelling player-player interactions in the context of football.
Different choices of ,  and yield different architectures.In our case, we utilise a message function that factorises into an attentional mechanism,  : , e  , g  h (−1)

𝑣
(3) yielding the graph attention network (GAT) architecture [43].In our work, specifically, we use a two-layer multilayer perceptron for the attentional mechanism, as proposed by GATv2 [4]: , e  , g = softmax where W 1 , W 2 ∈ ℝ ×ℎ , W  ∈ ℝ ×ℎ , W  ∈ ℝ ×ℎ and a ∈ ℝ ℎ are the learnable parameters of the attentional mechanism, and LeakyReLU is the leaky rectified linear activation function.This mechanism computes coefficients of interaction (a single scalar value) for each pair of connected nodes (, ), which are then normalised across all neighbours of  using the softmax function.
Through early-stage experimentation we have ascertained that GATs are capable of matching the performance of more generic choices of  (such as the MPNN [13]) while being more scalable.Hence, we focus our study on the GAT model in this work.More details can be found in the Ablation Study section.

Geometric deep learning
In spite of the power of Equation 2, using it in its full generality is often prone to overfitting, given the large number of parameters contained in  and .This problem is exacerbated in the football analytics domain, where gold-standard data is generally very scarce-for example, in the English Premier League, only a few hundred games are played every season.
In order to tackle this issue, we can exploit the immense regularity of data arising from football games.Strategically equivalent game states are also called transpositions, and symmetries such as arriving at the same chess position through different move sequences have been exploited computationally since the 1960s [17].Similarly, game rotations and reflections may yield equivalent strategic situations [32].Using the blueprint of geometric deep learning (GDL) [5], we can design specialised GNN architectures that exploit this regularity.
That is, geometric deep learning is a generic methodology for deriving mathematical constraints on neural networks, such that they will behave predictably when inputs are transformed in certain ways.In several important cases, these constraints can be directly resolved, directly informing neural network architecture design.For a comprehensive example for point clouds under 3D rotational symmetry, see Fuchs et al. [12].
To elucidate several aspects of the GDL framework on a high level, let us assume that there exists a group of input data transformations (symmetries), , under which the ground-truth label remains unchanged.Specifically, if we let  (X, E, g) be the label given to the graph featurised with X, E, g, then for every transformation  ∈ , the following property holds:  ((X), (E), (g)) =  (X, E, g) (5) This condition is also referred to as -invariance.
It is worth noting that GNNs may also be derived using a GDL perspective, if we set the symmetry group  to  | | , the permutation group of | | objects.Owing to the design of Equation 2, its outputs will not be dependent on the exact permutation of nodes in the input graph.
Frame averaging A simple mechanism to enforce -invariance, given any predictor  G (X, E, g), performs frame averaging across all -transformed inputs: This ensures that all -transformed versions of a particular input (also known as that input's orbit) will have exactly the same output, satisfying Equation 5. A variant of this approach has also been applied in the AlphaGo architecture [36] to encode symmetries of a Go board.
In our specific implementation, we set  =  2 = {id, ↔, ↕, ↔↕}, the dihedral group.Exploiting  2 -invariance allows us to encode quadrant symmetries.Each element of the  2 group encodes the presence of vertical or horizontal reflections of the input football pitch.Under these transformations, the pitch is assumed completely symmetric, and hence many predictions, such as which player receives the corner kick, or takes a shot from it, can be safely assumed unchanged.As an example for how to compute transformed features in Equation 6, ↔ (X) horizontally reflects all positional features of players in X (e.g. the coordinates of the player), and negates the -axis component of their velocity.

Group convolutions
While the frame averaging approach of Equation 6 is a powerful way to restrict GNNs to respect input symmetries, it arguably misses an opportunity for the different -transformed views to interact while their computations are being performed.For small groups such as  2 , a more fine-grained approach can be assumed, operating over a single GNN layer in Equation 2, which we will write shortly as H () =  G (H (−1) , E, g).The condition that we need a symmetry-respecting GNN layer to respect is as follows, for all transformations  ∈ : that is, it does not matter if we apply  to the input or the output of the function  G -the final answer is the same.This condition is also referred to as -equivariance, and it has recently proved to be a potent paradigm for developing powerful GNNs over biochemical data [12,31].
To satisfy  2 -equivariance, we apply the group convolution approach [7].Therein, views of the input are allowed to directly interact with their -transformed variants, in a manner very similar to grid convolutions (which is, indeed, a special case of group convolutions, setting  to be the translation group).We use H ()   to denote the -transformed view of the latent node features at layer .Omitting E and g inputs for brevity, and using our previously designed layer  G as a building block, we can perform a group convolution as follows: Here, ∥ is the concatenation operation, joining the two node feature matrices column-wise;  −1 is the inverse transformation to  (which must exist as  is a group); and  −1  is composition of the two transformations.
Effectively, Equation 8 implies our  2 -equivariant GNN needs to maintain a node feature matrix H ()   for every -transformation of the current input, and these views are recombined by invoking  G on all pairs related together by applying a transformation .Note that all reflections are self-inverses, hence, in  2 ,  =  −1 .
Network architectures While the three benchmark tasks we are performing have minor differences in the global features available to the model, the neural network models designed for them all have the same encoder-decoder architecture.The encoder has the same structure in all tasks, while the decoder model is tailored to produce appropriately-shaped outputs for each benchmark task.
Given an input graph, TacticAI's model first generates all relevant  2 -transformed versions of it, by appropriately reflecting the player coordinates and velocities.We refer to the original input graph as the identity view, and the remaining three  2 -transformed graphs as reflected views.
Once the views are prepared, we apply four group convolutional layers (Equation 8) with a GATv2 base model (Equations 3-4).Each GATv2 layer has eight attention heads, and computes four latent features overall per player.Accordingly, once the four group convolutions are performed, we have a representation of H ∈ ℝ 4×22×4 , where the first dimension corresponds to the four views (H id , H ↔ , H ↕ , H ↔↕ ∈ ℝ 22×4 ), the second dimension corresponds to the players (eleven on each team), and the third corresponds to the 4-dimensional latent vector for each player node in this particular view.How this representation is used by the decoder depends on the specific downstream task: • For receiver prediction, which is a fully invariant function (i.e.reflections do not change the receiver), we perform simple frame averaging across all views, arriving at and then learn a node-wise classifier over the rows of H node ∈ ℝ 22×4 .We further decode H node into a logit vector O ∈ ℝ 22 with a linear layer before computing the corresponding softmax cross entropy loss.• For shot prediction, which is once again fully invariant (i.e.reflections do not change the probability of a shot), we can further average the frame-averaged features across all players to get a global graph representation: and then learn a binary classifier over h graph ∈ ℝ 4 .Specifically, we decode the hidden vector into a single logit with a linear layer, and the compute the sigmoid binary cross entropy loss with the corresponding label.• For guided generation (position/velocity adjustments), we generate the player positions and velocities with respect to a particular outcome of interest for the human coaches, predicted over the rows of the hidden feature matrix.For example, the model may adjust the defensive setup to decrease the shot probability by the attacking team.The model output is now equivariant rather than invariant-reflecting the pitch appropriately reflects the predicted positions and velocity vectors.As such, we cannot perform frame averaging, and take only the identity view's features, H id ∈ ℝ 22×4 .From this latent feature matrix, we can then learn a conditional distribution from each row, which models the positions or velocities of the corresponding player.To do this, we extend the backbone encoder with a Variational Autoencoder (VAE [22]).Specifically, for the -th row of H id , h  , we first map its latent embedding to the parameters of a twodimensional Gaussian distribution N (  |  ), and then sample the coordinates and velocities from this distribution.At training time, we can efficiently propagate gradients through this sampling operation using the reparameterisation trick [22]: sample a random value   ∼ N (0, 1) for each player from the unit Gaussian distribution, and then treat   +     as the sample for this player.In what follows, we omit edge features for brevity.For each corner kick sample X with the corresponding outcome o (e.g. a binary value indicating a shot event), we extend the standard VAE loss [22] to our case of outcome-conditional guided generation as where h  is the player embedding corresponding to the -th row of H id , and  is Kullback-Leibler (KL) divergence.Specifically, the first term is the generation loss between the real player input x  and the reconstructed sample decoded from h  with the decoder   .Using the KL term, the distribution of the latent embedding h  is regularised towards (h  |o), which is a multivariate Gaussian in our case.
A complete high-level summary of the generic encoder-decoder equivariant architecture employed by TacticAI can be summarised in S.Figure 2. In the following section, we will provide empirical evidence for justifying these architectural decisions.This will be done through targeted ablation studies on our predictive benchmarks (receiver prediction and shot prediction).
Ablation Study As described briefly in the Results and Analysis section, we leveraged the receiver prediction task as a way to evaluate various base model architectures, and directly quantitatively assess the contributions of geometric deep learning in this context.We already see that the raw corner kick data can be better represented through geometric deep learning, yielding separable clusters in the latent space which could correspond to different attacking or defending tactics (Figure 2).In addition, we hypothesise that these representations can also yield better performance on the task of receiver prediction.Accordingly, we ablate several design choices using deep learning on this task: • Does a factorised graph representation help?To assess this, we compare against a convolutional neural network (CNN [9]) baseline, which does not leverage a graph representation.• Does a graph structure help?To assess this, we compare against a Deep Sets [44] baseline, which only models each node in isolation without considering adjacency information-equivalently, setting each neighbourhood N  to a singleton set {}.• Are attentional GNNs a good strategy?To assess this, we compare against a message passing neural network [14,MPNN] baseline, which uses the fully potent GNN layer from Equation 2instead of the GATv2.• Does accounting for symmetries help?To assess this, we compare our geometric GATv2 baseline against one which does not utilise  2 group convolutions but utilises  2 frame averaging, and one which does not explicitly utilise any aspect of  2 symmetries at all.
Each of these models have been trained for a fixed budget of 50, 000 training steps.The test top- receiver prediction accuracies of the trained models are provided in S.Table 2. As already discussed in Results and Analysis, there is a clear advantage to using a full graph structure, as well as directly accounting for reflection symmetry.Further, the usage of the MPNN layer leads to slight overfitting compared to the GATv2, illustrating how attentional GNNs strike a good balance of expressivity and data efficiency for this task.Our analysis highlights the quantitative benefits of both graph representation learning and geometric deep learning for football analytics from tracking data.We also provide a brief ablation study for the shot prediction task in S.Table 3.

Training Details
We train each of TacticAI's models in isolation, using NVIDIA Tesla P100 GPUs.To minimise overfitting, each model's learning objective is regularised with an  2 norm penalty with respect to the network parameters.During training, we use the Adam stochastic gradient descent optimiser [21] over the regularised loss.We summarise the hyperparameters of each TacticAI model in S.Table 1.

S1.1. Literature Review
In the following, we summarise the closest state of the art that pursues the same objective of football corner kick tactics or pass prediction, or which more broadly devises team-sport strategy modelling techniques that could be transferred to the setting considered in this work.Sports analytics research that addresses player transfers and match statistics is out of scope, as we here focus on methods for in-game tactics.
Earlier work has generated a significant body of research on identifying key properties of a game given diverse sources of data, and on using these to provide tactical analysis and suggestions [8,10,15,25,28,29].One recent example is a system for determining whether a match is in-play or interrupted, called "in-game status", by applying random forests and AdaBoost to process timecontinuous spatio-temporal data such as player positions [23], with similar methods having been proposed for American football [26].
Other methods leverage game data to characterize players behaviour, such as their passing style [6].Such information can later feed downstream applications that may take as input a representation of a player's historical behaviour.Similarly, pass prediction systems may use game data to predict the probability of a pass in a given game state [18].
A more closely related research line analyzes soccer videos to determine shoot event probabilities, which may serve as a proxy for player performance, by examining spatio-temporal relations and prediction uncertainty [16].The method processes videos using a graph convolutional recurrent neural network to capture latent features, and leverages Bayesian neural networks to predict the shoot probabilities.Similar other methods apply machine learning and explainable AI techniques for tactical analysis and for predicting the success of defensive play [11].
Accurately identifying the salient patterns of corner kick tactics from player trajectories is the key prerequisite for downstream tasks in football analytics, including evaluating the effectiveness of the tactics, improving their performance and designing counter-tactics.Through leveraging deep learning, previous research demonstrated that the outcomes of in-game events, including shots [37] and passes [9,19], are predictable using the spatio-temporal tracking data of player trajectories.Moreover, the patterns of effective defensive tactics can also be recovered from tracking data [37].Nevertheless, tracking data could be quite noisy because of the randomness and complex dynamics in football games, rendering mining the tactic patterns from it challenging.
There are also other examples of learning techniques for modelling team sports.The Generative Relational Inference Network (GRIN) [24] also follows the VAE framework to learn disentangled representations for each agent in the scene.It encodes each entity into a latent representation, comprising an intra-agent intention and an inter-agent relation, through a graph convolution network (GCN).The inter-agent relations under go message passing through graph attention layers, the result of which is combined with intra-agent intention to form the reconstruction.Although there is no group-invariant layers, experiments show that this method could discover disentangled factors from basketball players, and interventions on these factors produced interpretable variations in the predicted player trajectories.
Using NBA games spacio-temporal tracking data, DeepHoops [34] presents a Deep Learning architecture that estimates the impact of all micro-actions in on the outcome of Basket Ball plays.In particular, it allows to evaluate the contribution of individual off-ball events to the success of a possession.
In [35] a tree-search method (Kernel Regression UCT) has been applied to discover curling strategies in self-play.The authors show that counterfactual justifications of actions taken by the model can be used to teach humans non-trivial concepts of curling as demonstrated in a user-study.

S1.2. Case Study Design
As previously described in the Results section, we designed an in-depth case study to evaluate the benefits of TacticAI's predictive and generative capabilities.We designed four specific tasks which we offered to five experts affiliated with Liverpool FC.To avoid biasing our raters, we have kept all details of these tasks strictly hidden from them prior to conducting the case study.Further, for all corner situations shown we did not reveal the team or player identities-only the players' positions and velocities at the moment the corner kick was taken, and whether they are on the attacking or defensive team.
Task 1: Does TacticAI generate realistic tactical adjustments?To answer this question, we started from a dataset of 50 corners from the Premier League, which have been held-out from TacticAI's training set (S.Figure 3).For a subset of those corners, we have applied TacticAI's generative head to propose alternate tactics for either minimising or maximising shot probability, and used TacticAI's suggestion in place of the original corner.We then asked our raters to judge whether each of these corners was real or generated.Through discussions with the raters after the task was done, and observing their comments, we noted a variety of strategies were employed to detect realism: • Most raters chose to decide realism based on detecting whether there was something markedly unusual in the setup, for example a strategy that left opposing players in clear space.• An alternate strategy, employed by one rater, was to decide realism based on whether the situation could have plausibly happened, even if it had a clearly suboptimal tactical setup.This approach ended up tagging most of the examples as real.• Raters who specialise in corner kick analysis preferred a "retrieval" based strategy, wherein they would rate a corner as real if they were able to recall from memory that exact setup.
In spite of this variety of approaches, and as discussed in the Results section, all of the raters were generally confused as to which samples were real, and they unanimously highlighted how challenging they found this task.
Task 2: Does TacticAI predict plausible receivers?To answer this question, we reused the same 50 corners leveraged for Task 1, and simultaneously asked our raters which of the attacking team's players were most likely to make first contact with the ball (S.Figure 3).The raters were allowed to provide as little or as many players as they wanted to-and we cross-referenced their proposals with TacticAI's top three suggested receivers.Generally, we found significant variability in the amount of players proposed by different raters-some opted to suggest 3-5 receivers on almost all situations studied, whereas others did not want to suggest more than one receiver on most occasions.As discussed in the Results section, in spite of this diversity of approach, the top-3 predictions made by TacticAI largely agreed with the rater estimates, and there was no significant difference between TacticAI's accuracy over real and generated setups, indicating that TacticAI could be robustly used to predictively analyse both real and simulated corner kicks.And, as highlighted by several of the raters, such a system would prove useful to a football analyst: a receiver predictor can be used to indicate which players may need to be especially targeted defensively, as well as to evaluate whether corners in already-played games have unfolded in a manner which is expected.
Task 3: Can TacticAI be used to retrieve usefully similar corners?To answer this question, we leveraged 50 reference corners from the Premier League, held-out from TacticAI's training set (S.Figure 4).For each of these corners, we retrieved one other Premier League corner that was closest to it-either in TacticAI's graph-level embedding space, or in terms of the distance of the raw player features in the input space.This decision allowed us to not only measure whether TacticAI's embeddings can be used to mine for similar corners, but also to assess whether they provide an edge over a simpler mining heuristic which is purely position based.We asked our raters whether they find the retrieved corner to be usefully similar to the reference corner; that is, whether showing these two corners side by side would be judged as useful.The raters once again assumed a diverse set of approaches for deciding which features of the two corners were salient enough to be useful.Some of the common considerations mentioned by the raters included: whether the corner is inor out-swinging, existence of a short corner option, zonal vs. man-marking approach, counting the number of players in the 18-yard box, positioning of the goalkeeper, and assessing whether the two corners likely had the same attacking or defending team, or had come from the same game.Similarly as for the previous tasks-from the discussion in the Results section we can conclude that, despite the wide variety of salient features considered, the raters generally found TacticAI's retrievals to be superior to the positional heuristic.They also highlighted the high utility of such a retrieval system: it can be used by analysts and coaches to discover and prepare for other teams' common routines, as well as to discover new ideas and variations on a particular corner that they might otherwise have overlooked.It has also been stressed that the "top-1" retrieval study employed here is likely too strict.While it was necessary to restrict attention to only one retrieved corner here in order to keep the raters' workload manageable, in practice, an analyst may wish to analyse up to 10-20 retrieved corners for every reference corner.Given that TacticAI already has a favourable score in the top-1 regime, we anticipate its utility to only compound if deployed for real-world use.

Task 4: Does TacticAI generate useful tactical adjustments?
To answer this question, we once again gathered a dataset of 50 held-out corners from the Premier League (S.Figure 5).For each of them, we have used TacticAI's guided generative model to propose adjustments to the defending team's player positions and velocities-leaving the attacking team unchanged-such that the predicted shot probability is reduced.We chose to focus on the defending team to match a real-world workload: typically, a corner setup is dictated by the attacking team, after which the defensive team needs to respond to this setup in an optimal way.For each of these corners, we showed the raters the two versions (original and TacticAI-adjusted) side-by-side.We stated that the corner on the left-hand side is a reference corner, asking the raters to judge which of the defending team's players are in a better or worse position, considering the adjustments on the right-hand side.We also asked the raters to judge whether the right-hand side corner is, overall, a better or worse situation than the left-hand side for the defensive team.To control for bias, we randomly select a subset of corner setups for which we reverse the two versions, making the TacticAI suggestion the reference corner.The raters focused on a variety of salient features in the suggestions, including but not limited to: whether defenders are better at tracking an attacker's run, whether it is better for them to move or stand still, and the positioning of the goalkeeper.There have been two situations where an adjustment was judged as "possibly useful", depending on the adjusted player's profile.For example, certain runs were only deemed likely to succeed if performed by defenders of high physical capability or fitness.
As the TacticAI variant we trained here did not have access to player features beyond height and weight, such nuances were out of scope for this study, and we did not consider them to be salient observations.Overall, as outlined in the Results section, the raters were overwhelmingly in favour of TacticAI's suggestions, demonstrating a high degree of inter-rater agreement.We illustrate four of the most salient situations where TacticAI's suggestions were deemed significant in Figure 5; in one of these situations, ten defensive players were considered usefully adjusted, which is nearly the entire defending team!Further, this kind of position-adjustment system has been deemed a highly useful tool for an analyst or coach to leverage by all of our raters.Even the opportunity to view such suggestions side-by-side with a reference corner was considered to be useful, as it prompted the rater to immediately consider strategic variations.Since the guided generation system was deliberately designed to offer subtle modifications to player coordinates and velocities, the raters deemed such a system most useful to help detect players that have likely not been following the instructions of their coaches, and neglected the tactical play.This can then lead to targeted interventions by the coaches-either to exploit a weakness posed by an opposing player that tends to ignore instructions, or to improve coaching of the team's player if they are found to be neglecting the determined tactics.
Coupled with the positive outcome of Task 1, and the finding that the suggested adjustments are generally hard to distinguish from real corner situations, we conclude Task 4's question to be answered in the affirmative.

Figure 1 |
Figure 1 | A "bird's eye" overview of TacticAI.(A), how corner kick situations are converted to a graph representation.Each player is treated as a node in a graph, with node, edge and graph features extracted as detailed in the main text.Then, a graph neural network operates over this graph by performing message passing; each node's representation is updated using the messages sent to it from its neighbouring nodes.(B), how TacticAI processes a given corner kick.To ensure that TacticAI's answers are robust in the face of horizontal or vertical reflections, all possible combinations of reflections are applied to the input corner, and these four views are then fed to the core TacticAI model, where they are able to interact with each other to compute the final player representations-each "internal blue arrow" corresponds to a single message passing layer from (A).Once player representations are computed, they can be used to predict the corner's receiver, whether a shot has been taken, as well as assistive adjustments to player positions and velocities, which increase or decrease the probability of a shot being taken.
Setups for similar out-swing attacksSetups for an in-swing attack A defending setup for an out-

Figure 3 |
Figure3| Example of refining a corner kick tactic with TacticAI.TacticAI makes it possible for human coaches to redesign corner kick tactics in ways that help maximise the probability of a positive outcome for either the attacking or the defending team by identifying key players, as well as by providing temporally coordinated tactic recommendations which take all players into consideration.As demonstrated in this example, for a corner kick in which there was a shot attempt in reality, TacticAI can generate a tactically-adjusted setting in which the shot probability has been reduced, by adjusting the positioning of the defenders.The suggested defender positions result in reduced receiver probability for attacking players 2-5 (see bottom row), while the receiver probability of Attacker 1, who is distant from the goalpost, has been increased.The model is capable of generating multiple such scenarios.Coaches can inspect the different options visually and additionally consult TacticAI's quantitative analysis of the presented tactics.

Figure 4 |
Figure4| Statistical analysis for the case study tasks.In task 1, we tested the statistical difference between the real corner kick samples and the synthetic ones generated by TacticAI from two aspects.(A) the distributions of the ratings of the two types of samples, and (B) the distributions of the top-3 accuracy of receiver prediction using those samples.No statistical difference was observed in either cases ((A)( = 0.34,  > 0.05), and (B)( = 0.968,  > 0.05)).On the other hand, for task 2 (receiver prediction), we observed a statistically significant difference between the ratings of different raters, with three clear clusters emerging (C).Specifically, Raters A and E had similar ratings ( = 1.41,  > 0.05), and Raters B and D also rated in similar ways ( = 2.53,  > 0.05), while Rater C responded differently from all other raters.This suggests a good level of variety of the human raters with respect to their perceptions of corner kicks.In task 3 of identifying similar corners retrieved in terms of salient strategic setups, there was no significant difference among the distributions of the ratings by different raters (D), suggesting a high level of agreement on the usefulness of TacticAI's capability of retrieving similar corners ( 1,4 = 1.01,  > 0.1).Finally, in task 4, we compared the ratings of the strategic refinements by the human raters (E), and the raters also agreed on the general effectiveness of the refinements recommended by TacticAI ( 1,4 = 0.45,  > 0.05).

Figure 5 |
Figure5| Examples of the tactic refinements recommended by TacticAI.These examples are selected from our case study with human experts, to illustrate the breadth of tactical adjustments that TacticAI suggests to teams defending a corner.The density of the yellow circles coincides with the number of times that the corresponding change is recognised as constructive by the human experts.Instead of optimising the movement of one specific player, TacticAI can recommend the improvements for multiple players in one generation step through suggesting better positions to block the opposing players, or better orientations to track them more efficiently.Some specific comments from expert raters follow.In (A), according to raters, TacticAI suggests more favourable positions for several defenders, and improved tracking runs for several others-further, the goalkeeper is positioned more deeply, which is also beneficial.In (B), TacticAI suggests that the defenders furthest away from the corner make improved covering runs, which was unanimously deemed useful, with several other defenders also positioned more favourably.In (C), TacticAI recommends improved covering runs for a central group of defenders in the penalty box, which was unanimously considered salient by our raters.And in (D), TacticAI suggests substantially better tracking runs for two central defenders, along with a better positioning for two other defenders in the goal area.

Table
1 and the Methods section).We leveraged the receiver prediction task to benchmark several different TacticAI base

Table 2 | Summary of the details of the features used to construct graphs.
models.Our best performing model-achieving 0.782 ± 0.039 in top-3 test accuracy after 50, 000 training steps-was a deep graph attention network