You Down with t-SNE?

By Eliot McKinley(@etmckinley) and Cheuk Hei Ho (@tacticsplatform)

We all know that some teams play a certain style, Red Bulls play with high pressure and direct attacks, Vancouver crosses the ball, Columbus possesses the ball from the back. Although we know these things intuitively, we can use analytical methods to group teams as well. Doing so seems unnecessary when we have all these descriptors like press-resistance, overload, trequartista-shadow striker hybrid, gegenthrowins, mobile regista, releasing, Colorado Countercounter gambits...etc (we actually don’t know what some of these terms mean and may have made some up, but the real ones are popular so just google them yourself). Those terms are nice, but no qualitative descriptor can tell us how the styles of New York City and Columbus differ from each other. We need to measure, compare, and model two teams’ playing styles and efficiencies. If we are able to do these things we may be in a position to answer what style really is.

Here, we use a technique known a t-distributed Stochastic Neighbor Embedding, tSNE. t-SNE is a way to visualize multidimensional data in a form that the human mind can comprehend. It’s like when they took Avatar and converted it from a 4-dimensional IMAX (3D video + time) to a 2D BluRay, or how maps represent the 3D globe in 2D, but on a 1970s bodybuilder amount of mathematical steroids. t-SNE tries to represent data points that are close to each other in multidimensional space by putting them close to each other when projected onto a flat surface. However, there can be times when a t-SNE projection can be a bit off, similar to how maps are not good at representing areas near the poles, so results still need to be carefully interpreted. t-SNE is routinely used in biomedical research (writer’s note: I’ve used t-SNE to study intestinal tuft cells), and has other been used in a wide array of other applications. One thing to note with t-SNE maps is that the clustering of dots matter, but the actual coordinates don’t (it’s complicated and there is a lot of math) so we don’t even label the axes.

We used t-SNE in two situations to group teams by playing style in MLS from 2016-2018:

  1. Possession characteristics and pass types

  2. Passing networks

Since we are separating each team by season, you’d expect teams that have a consistent style to group close to each other over time (e.g. New York’s pressing, SKC’s possession) while those that maybe have had coaching changes to play differently year to year. Many organizations in MLS try hard to maintain consistency due to high player turnover volume either by focusing on a defined style of soccer (the Red Bulls or NYCFC) or sticking with the same coach over the years (the Crew or the Sporting KC). The former model is often more flexible with the formation than the latter since most coaches have their preferred formations. We used to have no quantitative method to determine which one is a better model to maintain consistency. t-SNE offers us an unbiased way to help answer that question.

Possession characteristics and pass types

We collected 138 variables derived from the ASA database for the 2016-2018 MLS seasons. These variables comprised of multiple possession characteristics, such as the number an success rate of short/long passes, headers, dribbles, opponent's defensive action faced, and expected Possession Goals (xPG) variants. These attributes specify how a team plays and at what efficiency. These descriptors give each style a quantitative combination that can be used to differentiate, for example, a possession-heavy team that relies on short passes and dribbles to break down the defense from one that focuses on long passes to bypass the opponent’s confrontational line.

We also included spatial touch distribution in the traditional 18 zones to approximate how a team utilizes space offensively and defensively. These data allow us to describe whether one team likes to attack through the center or the flank; or whether it prefers to hold a high-pressing line or retreats to its own box to draw opponents out.

Finally, we included descriptors of passing types as classified using k-means clustering. Each pass is given a “type” based upon where and how the pass was made. For example, long passes on the right side of the defensive third will be grouped together, whereas short passes in the middle of the offensive third will be a separate group. This data provides additional information to the clustering algorithm supportive of the possession and spatial characteristics.

We specifically did not include scoring statistics, such as expected goals, to see if possession and passing could capture these independently. Each dot is a team season, the color of each dot represents the variable’s value for each team, and the dot labels are colored for each team for all seasons. Dots close to each other indicate similar teams, while dots far away from each other generally indicate dissimilar teams.

Fig 1.

When looking at the t-SNE map, the first things to notice is that teams that have maintained a consistent playing style from 2016-2018 have all their seasons grouped close together. Towards the bottom of the plot, NYCFC and Columbus, which have consistently played a high possession style, position in the same region for all three seasons. These teams also have high levels of short passing and tidiness (Mistake xPG/Risk xPG). There are also organizations that have maintained a certain style guided by the same coach such as the Red Bulls under Jesse Marsch, Houston Dynamo under Wilmer Cabrera, and Seattle Sounders under Brian Schmetzer (who has been the head coach for a full season since 2017).


Fig. 2

Some other clusters are more difficult to resolve. For example, the bottom left cluster with four 2018 teams who seems to use a more technical approach, and the upper central cluster of L.A.  Galaxy (2016 & 2018) and Portland (2016). Additionally, there is a cluster of teams on the right side of the plot that were generally not good, as shown by their below average xGD, including Colorado for the last couple of seasons and Minnesota’s inaugural campaign in 2017 (they are still bad in 2018.) We can’t identify one single characteristic that defines all these clusters, but that problem is also the strength of t-SNE: it maximizes the differences in the individual variables to orientate each data point. Interestingly, Kansas City, while generally in the lower half of the map, does not cluster tightly, despite playing arguably similar styles with the same coach.

Although our collection of variables comprises most of the possession characteristics that we can currently define, we don’t know how much they interact with an important intuitive definition of play style, formation. We want to compare our possession characteristics and pass type t-SNE with one that is built on the formation. Doing so let us answer one important question: do you need to play a fixed formation to achieve one play style?

Passing networks

We used t-SNE to group teams based on how they distribute passes amongst the 11 players on the field. Pass networks were generated, and the number of passes between each player position on the field was calculated and normalized for an entire season. These networks are visualized below. Each dot is the average passing location for each position with the size representing the number of total passes and the thickness of the lines denotes the volume of passes between each position. Looking at 2016, you can clearly see that in the case of Columbus and Kansas City pass at higher rates between their center backs than New York did.

Fig. 3

For the t-SNE, we ignored the spatial information, and just used the number of passes between each position. When doing this we see similar, but slightly different, results to the previous clustering. Again, Columbus’ season group tightly together, with 2016 being a bit displaced from 2017 and 2018, perhaps due to the lower involvement of the left fullback in the 2017 season.

Fig 4.

Kansas City and New York show interesting patterns, where one season of the last three deviates from the other two. For Kansas City, 2017 and 2018 are located alone on the right of the t-SNE plot, whereas 2016 is in a central position. Looking at the pass networks,  2017 and 2018 are almost identical, while 2016 shows lower passing frequency amongst most positions as well as lower connectivity and a different shape, especially amongst the attacking three positions. In New York’s case, 2016 and 2018 are very close in the t-SNE map whereas 2017 is displaced. This could be due to New York primarily employing a 4-2-3-1 formation in most games in 2016 and 2018, whereas in 2017 Marsch deployed many different formations, disrupting the passing networks.

Other clusters of coaching stability are shown including Toronto’s three seasons at the top of the map (curiously with Colorado’s dismal 2018 squad) and FC Dallas under Oscar Pareja.  New England’s seasons group together despite Brad Friedel attempting to implement a pressing style in 2018. Whereas other teams, such as San Jose and Orlando City are all over the map.

Conclusion

We’ve shown here in two different ways that t-SNE can be used to generally classify teams into groups based on possession and passing characteristics. We were able to segregate teams with bad xGD by these metrics without having any direct scoring inputs into our clustering model, demonstrating the potential power of this method. t-SNE, however, has limitations. Each run is stochastic (it’s in the name), such that two runs on the same data can give different results, especially in sparse data sets such as these. Furthermore, global distances in t-SNE space are non-linear and are generally not very meaningful except for points very close to each other. So if data points are far from each other, it doesn’t necessarily mean they are extremely dissimilar. Lastly, it is not entirely clear that we are using proper inputs, especially for the passing network data. Using passing frequencies between players aggregated over an entire season may not be analytically supportable, we’ll have to see.

t-SNE using the possession characteristics and the pass types vs. t-SNE with pass networks tell us that style can be loosely defined; the Red Bulls fiddled with the formation in 2017 but the overall team’s possession and pass characteristic in 2017 is much closer to 2018’s than 2016’s. Even though Marsch was experimenting different formations his team still played largely the same way. The same isn’t true for Kansas City even though it is guided by the same head coach. Its formations in 2017 and 2018 look almost the same but its possession and pass characteristic are far apart. Other discrepancies can be found in New England, L.A. Galaxy, Dallas, and Toronto. The play style seems like a subjective cherry-picked descriptor.

We are just starting to scratch the surface with what we can do with machine learning-based algorithms such as t-SNE. This is a first step and has shown us some things that we may expect (Columbus is pretty stable year-to-year under Berhalter) as well as some things to follow-up on (Colorado clusters with Toronto, WTF?). We envision that similar methods can be used to look at individual players and we’ll keep you updated as we move forward.