Clear Sky Science · en

Deep learning for dynamic tactical formation recognition in professional football

· Back to index

Reading the Game with AI

When fans watch a football match, they often talk about formations like 4-4-2 or 4-3-3. But on the pitch, those shapes are constantly bending, stretching, and morphing as players sprint, press, and fall back. This paper shows how modern artificial intelligence can track those ever‑shifting patterns in real time, turning raw movement data into a detailed picture of how teams actually play, second by second.

Figure 1
Figure 1.

Why Formations Are More Than Numbers

A team’s formation is more than a line of numbers on a tactics board. It is the blueprint that organizes where players stand, how they move together, and how they switch between attacking and defending. Traditional analysis relied on coaches watching video and making notes—a slow, subjective process that struggles to capture subtle shifts. Even earlier computer methods usually froze the action into static snapshots, labeling each one with a single formation and ignoring the continuous flow of the game. As a result, they missed key features of modern football: players swapping roles on the fly, lines moving in unison, and strategies unfolding over different time scales, from a quick press to a long‑term tactical adjustment.

From Raw Movement to Tactical Insight

The authors propose a new AI model, the Hierarchical Dual‑Stream Spatiotemporal Graph Transformer (HDS‑SGT), built specifically to follow these complex movements. It takes as input the tracking data now common in elite football: the two‑dimensional locations of all outfield players, sampled ten times per second, plus information derived from those positions such as speed, acceleration, and distances between teammates. Before any learning begins, the system cleans and standardizes the data—recentering it on the team, smoothing noisy measurements, and adding features that capture how tightly grouped or spread out the players are. This makes it possible to recognize the same formation whether a team is defending deep or pressing high up the pitch.

Two Ways of Seeing Space and Time

HDS‑SGT analyzes the match through two complementary lenses. One stream treats the team as a network: each player is a point, and connections form between players who are close enough on the pitch to affect each other. This graph‑based view helps the model learn patterns like compact defensive lines or triangles in midfield. At the same time, a second stream focuses on how the team’s overall shape evolves over longer stretches of time. It compresses the movement of all players into team‑level signals and uses an attention mechanism—originally developed for language translation—to discover which moments in the past matter most for understanding the present. Crucially, this second stream works at several time scales at once, from fast shifts over a couple of seconds to slower reorganization over a full minute of play.

Figure 2
Figure 2.

Following Roles Rather Than Shirt Numbers

A particularly challenging aspect of modern football is that players frequently exchange duties: a fullback surges forward like a winger, a midfielder drops into the defensive line, or a striker leads the press in midfield. Fixed labels tied to shirt numbers cannot keep up with this fluidity. To address this, the model includes a Dynamic Role Assignment Module. Instead of assuming that a given player is always, say, a left‑back, it learns flexible “role templates” based on how players behave. At every moment, it compares each player’s current movement and position to these templates and assigns them a blend of roles that can smoothly change over time. A built‑in penalty discourages unrealistically sudden role jumps, mirroring the fact that true tactical changes usually unfold over several seconds rather than in a single instant.

What the Model Achieved on Real Matches

The researchers tested their system on tracking data from 847 professional matches across several competitions, covering more than 1,200 hours of play. Expert coaches provided detailed labels, marking not only which formation was being used but also when teams were in the process of changing shape. Compared to a wide range of existing methods—from classic statistical models to modern deep‑learning architectures—HDS‑SGT proved substantially more accurate. It identified formations correctly in about 95% of time frames and detected tactical transitions with a high F1‑score, a balanced measure of precision and recall. These gains were particularly strong for rare or more unusual formations and for complex moments when many players change positions at once. Importantly, after training, the model can run fast enough on a standard graphics card to keep up with live play, analyzing more than twenty frames of tracking data per second.

From Lab Tool to Sideline Assistant

To a layperson, the key takeaway is that this work turns the vague idea of “shape” into something a computer can follow in real time. By combining a network view of how players relate to one another, a multi‑scale view of how tactics unfold over time, and a flexible notion of player roles, the system can spot not just which formation a team is using, but also when that formation is starting to change. While the study focuses on elite tracking data and specific hardware, the approach points toward future tools that could support coaches, analysts, and even broadcasters—offering live, objective insight into the hidden tactical story playing out beneath the surface of every match.

Citation: Wang, Y., ShangGuan, Q., Chen, G. et al. Deep learning for dynamic tactical formation recognition in professional football. Sci Rep 16, 13846 (2026). https://doi.org/10.1038/s41598-026-41383-9

Keywords: football tactics, formation analysis, sports analytics, deep learning, player tracking data