Poly-Autoregressive Prediction for Modeling Interactions

Neerja Thakkar, Tara Sadjadpour, Jathushan Rajasegaran, Shiry Ginosar, Jitendra Malik

TL;DR

The paper introduces Poly-Autoregressive (PAR) modeling, a simple yet unified framework that adapts the next-token prediction paradigm of Large Language Models (LLMs) to multi-agent physical interactions. By restructuring the sequence to predict an agent's next timestep rather than the next token in a flattened sequence, PAR successfully forecasts complex behaviors across social action, autonomous driving, and hand-object manipulation using a single, lightweight transformer backbone.

What Problem Does This Paper Address?

Standard autoregressive (AR) models, like the ones powering modern LLMs, excel at predicting the next token in a unidimensional sequence (e.g., text). However, the physical world is inherently multi-agent and multidimensional. In scenarios like driving or human social interaction, multiple entities act simultaneously, influenced by both the laws of physics and unobserved internal motivations.

If you try to apply standard AR models to multi-agent settings by simply flattening the states of all agents into a single sequence, the model gets confused. Standard AR training forces the model to predict the state of Agent B at time $t$ given Agent A at time $t$. But in reality, we want to predict how Agent A moves from time $t$ to time $t+1$, while conditioning on what Agent B did in the past. This paper addresses this gap by proposing a framework designed specifically for simultaneous, interacting sequences.

Methods

The authors propose the Poly-Autoregressive (PAR) framework, which treats the states of all agents over time as a sequence of tokens.

Figure 1. Inference for (a) autoregressive (AR) models and (b) our proposed poly-autoregressive (PAR) model. Solid indicates ground-truth tokens which represent a tracked data modality such as action or 6DOF pose; striped represents predicted output tokens. Color denotes agent identity. Compared to AR models, the PAR model takes other agents’ tokens as inputs when making a prediction for the next timestep.

The core components of the method include:

  1. Same-Agent Next-Timestep Prediction: Instead of predicting the next token in the flattened sequence (which corresponds to a different agent at the same timestep), PAR shifts the prediction target by $N$ (the number of agents). This forces the model to predict the next temporal state of the same agent.
  2. Learned Agent Identity Embedding: To help the transformer distinguish between different entities, a learned agent ID embedding is added to each token's representation.
  3. Flexible Tokenization & Joint Training: The framework supports both discrete tokens (e.g., action classes or binned acceleration) and continuous tokens (e.g., 3D coordinates), mapping them to a hidden dimension via simple projection layers. The model is trained jointly to maximize the prediction accuracy for all agents simultaneously.

The entire framework is implemented using a modest, proof-of-concept Llama-style transformer decoder backbone with only 8 layers and roughly 4.4 million parameters.

Datasets

The versatility of PAR was evaluated across three distinct real-world interaction domains:

  • AVA (Atomic Visual Actions): Used for human social action forecasting (predicting a 60-dimensional action probability vector over time).
  • nuScenes: Used for multi-agent vehicle trajectory prediction (forecasting future $x,y$ coordinates based on discrete acceleration tokens).
  • DexYCB: Used for 6DoF object pose forecasting during hand-object interactions (predicting 3D translations and rotations).

Key Insights and Ideas

  • The "Next-Token" Trap: Simply feeding multi-agent data into a standard language model architecture fails because the objective function is misaligned. Shifting the loss function to predict the next timestep rather than the next token is the crucial modification that unlocks multi-agent reasoning.
  • A Unified Architecture for Diverse Modalities: Remarkably, the exact same 4.4M parameter transformer backbone was used for all three tasks. The framework cleanly separates domain-specific data processing (tokenization and loss functions) from the core multi-agent learning mechanism.
  • Identity Matters: The learned agent ID embedding is vital. It acts as a semantic anchor, allowing the transformer to understand that a token representing a "hand" behaves differently than a token representing an "object," even when processed within the same sequence.

Key Results

Across all three case studies, PAR consistently outperformed standard single-agent autoregressive baselines:

  • Social Action (AVA): PAR achieved a +1.9 absolute mAP gain over the AR baseline overall, and a +3.5 mAP gain specifically on complex 2-person interaction classes (like listening to, kissing, or fighting).
  • Autonomous Driving (nuScenes): PAR reduced the Average Displacement Error (ADE) by 6.3% and Final Displacement Error (FDE) by 6.4% compared to AR, demonstrating better collision avoidance and adherence to drivable areas without using explicit map data.
  • Hand-Object Interaction (DexYCB): Treating the hand and the object as two interacting agents led to a 8.9% relative improvement in object rotation forecasting and a massive 41.0% improvement in translation forecasting.

Limitations and Future Work

While PAR shows strong proof-of-concept results, the authors note several limitations:

  • Tracking Dependency: The model assumes high-quality, pre-extracted agent tracks and detections at every frame. Integrating raw pixel patches or end-to-end tracking remains future work.
  • Lack of Environmental Context: The model currently only reasons about agent-to-agent interactions. Incorporating static environmental context (like road maps or scene geometry) would likely improve trajectory and pose predictions.
  • Uniform Attention: PAR treats all neighboring agents equally. Implementing a dynamic attention mechanism to let the model automatically determine which neighboring agents are most influential is a promising next step.

Summary updated

BibTeX
@inproceedings{thakkar2025poly,
  author = {Neerja Thakkar and Tara Sadjadpour and Jathushan Rajasegaran and Shiry Ginosar and Jitendra Malik},
  title = {{Poly-Autoregressive Prediction for Modeling Interactions}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01157},
}
Figure