Understanding the evolving interactions within multi-agent systems—from physical particles to athletes on a field—is a fundamental challenge in trajectory analysis. While existing models like Neural Relational Inference (NRI) can uncover hidden interaction graphs, they often rely on a "static" assumption, where relationships are fixed throughout the observation. This limitation prevents them from capturing the fluid nature of real-world systems, such as basketball players switching defensive assignments or particles interacting only upon proximity.
DYARI (DYnamic multi-Agent Relational Inference) addresses this by introducing a deep generative model capable of inferring time-varying hidden structures purely from raw movement data in an unsupervised manner.
The DYARI Architecture
DYARI is structured as a Variational Auto-Encoder (VAE) optimized for sequences of graphs. Its design focuses on capturing temporal dependencies at multiple scales to accurately map how relationships evolve.
- Encoder: To identify relationship shifts that occur at varying speeds, the encoder utilizes a 1D temporal CNN equipped with pyramid pooling. This allows the model to analyze trajectories through multiple temporal "lenses" simultaneously, facilitating the pinpointing of exact moments when interactions change.
- Latent Representation: The model infers a sequence of categorical latent variables $z_t^{(ij)}$, representing discrete interaction types (e.g., "attracting," "repelling," or "none") between agents $i$ and $j$ at each time step $t$.
- Decoder: A combination of a Graph Neural Network (GNN) and a Recurrent Neural Network (GRU) serves as the decoder. It uses the inferred dynamic relations to reconstruct and predict future agent positions, ensuring the inferred graph sequence is physically plausible.
Experimental Evaluation
The model was evaluated on two distinct types of data to test its robustness and interpretability:
- Modified Spring System: A physics simulation where particles are connected by invisible springs. Dynamics were modified to be periodic (fixed intervals) or additive (variable intervals) to test the model's temporal flexibility.
- NBA Basketball Trajectories: Real-world data involving 10 players. This noisy environment tests the model's ability to extract interpretable human patterns like coordination (teammates) and competition (defensive guarding).
Key Insights and Results
A critical finding of this work is the "pathological" failure of static models on short sequences. When static models are forced to operate on short windows to approximate dynamic changes, their accuracy drops significantly (from ~99% down to ~54% in some tests). DYARI avoids this by maintaining temporal context across the entire sequence.
Furthermore, the choice of training regime is vital for dynamic tasks. Auto-regressive training—where the model predicts the next state based on its own previous predictions—significantly outperforms "teacher forcing." This approach compels the model to learn the underlying system dynamics rather than simply memorizing coordinate sequences.
In periodic simulations, DYARI achieved 92% interaction accuracy, nearly doubling the performance of the static NRI baseline (52%). It also demonstrated robustness in unpredictable "additive" scenarios, maintaining 87% accuracy. On real-world basketball data, the model successfully visualized complex defensive switches, tracking how a defender's inferred relation shifted in response to player movement.
Limitations and Future Directions
Despite its success, DYARI's performance is sensitive to the "inference period" hyperparameter, which defines how often the model updates its relational inference. Future work aims to automate the learning of this period. Additionally, scaling the model to systems with hundreds of agents and incorporating physical priors (e.g., gravitational attraction) remain open areas for optimization.
Summary updated