Fine-Grained Retrieval of Sports Plays using Tree-Based Alignment of Trajectories

Long Sha, Patrick Lucey, Stephan Zheng, Taehwan Kim, Yisong Yue, Sridha SridharanarXiv 2017

Introduction

Retrieving specific sports plays from spatiotemporal tracking data—such as optical tracking or GPS—presents a significant technical challenge. Unlike text-based search, sports data is "fine-grained," meaning the precise coordinates and relative movements of multiple agents are critical to the play's identity. A primary obstacle in this domain is the permutational alignment problem: in dynamic games like basketball, players frequently swap roles and positions. Comparing trajectories based on fixed roles (e.g., "Point Guard") often leads to incorrect matches because the players' actual behaviors have shifted. While exhaustive permutation matching is mathematically prohibitive, this paper proposes a hierarchical, tree-based alignment method to enable accurate and efficient retrieval.

Hierarchical Tree-Based Alignment

To address the non-linear nature of team sports, the authors introduce a Tree-Based Alignment approach that moves from coarse to fine-grained representations of game states. Instead of a single global template, the system constructs a tree where each node represents a specific spatial template of a game state.

The Alignment Process

For any given play, the system employs an Expectation-Maximization (EM) style approach to align player trajectories to the template. It calculates a cost matrix of Euclidean distances between the observed players and the template's roles, then utilizes the Hungarian Algorithm to determine the optimal permutation—identifying which player is fulfilling which role at that specific moment.

Tree Construction and Hashing

The tree is grown by partitioning data using K-means clustering at each node, with the optimal number of clusters ($K$) determined by a modified Silhouette analysis. As the tree deepens, templates in child nodes are aligned to their parents to maintain consistency. This hierarchy serves as an indexing mechanism: plays are passed through the tree and assigned a "hash key" based on their leaf node, allowing for rapid retrieval from specific "buckets" during a query.

Figure 1: Visualization of trajectory alignment and user-centric retrieval. Panel (a) shows the full set of trajectories, while panel (b) demonstrates the system's ability to focus on specific player subsets.

User-Centric Retrieval and Insights

A key advantage of this method is its support for interactive retrieval. Users can select a subset of players (e.g., focusing only on a pick-and-roll involving two specific trajectories) rather than the entire team. Because the tree correctly aligns all players to roles, the system can effectively ignore the "noise" of the other eight players and rank candidates based on the similarity of the selected subset.

Mathematically, the authors demonstrate that better alignment leads to superior data compressibility. By correctly aligning players to roles, the variance in the data decreases, making the tree-based method superior to raw "identity-based" or single-template alignment strategies.

Experimental Results

The framework was evaluated using the STATS SportVU basketball dataset, comprising 1,300 professional games. A user study involving 10 basketball experts utilized Team-Draft Interleaving to compare the tree-based method against a baseline focused primarily on ball trajectories.

  • Accuracy: In specific queries involving only two selected players, the tree-based method achieved a Mean Average Precision (mAP) of 0.70, vastly outperforming the baseline's 0.12.
  • Expert Preference: The method achieved a 75/5 win/loss ratio in head-to-head comparisons across various query types.
  • Efficiency: Despite the hierarchical complexity, the system maintains retrieval times of less than one second, making it suitable for real-time professional applications.

Conclusion and Future Work

The tree-based hierarchical alignment provides a robust solution to the permutational challenges of multi-agent tracking. While currently utilizing Euclidean distance, future iterations could incorporate "Inverse Document Frequency" (IDF) for trajectories to weight rare, descriptive movements more heavily. Additionally, applying machine learning to derive a sports-specific distance metric could further refine retrieval precision across different team sports like soccer or hockey.

Summary updated

BibTeX
@misc{sha2017fine,
  author = {Long Sha and Patrick Lucey and Stephan Zheng and Taehwan Kim and Yisong Yue and Sridha Sridharan},
  title = {{Fine-Grained Retrieval of Sports Plays using Tree-Based Alignment of Trajectories}},
  year = {2017},
  eprint = {1710.02255},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1710.02255},
}
Figure