Traffic Agent Trajectory Prediction Using Social Convolution and Attention Mechanism

Tao Yang, Zhixiong Nan, He Zhang, Shitao Chen, Nanning Zheng

Introduction

Predicting the future trajectories of surrounding traffic agents—including vehicles, pedestrians, and cyclists—is a fundamental requirement for safe and efficient autonomous driving. To navigate complex urban environments, an autonomous vehicle (AV) must not only perceive its surroundings but also anticipate how those surroundings will evolve. However, modeling these interactions is often computationally intensive. This paper presents a novel trajectory prediction framework that leverages a trajectory-based attention mechanism and "social convolution" to achieve high accuracy without sacrificing real-time performance.

The Challenge of Dynamic Traffic Environments

Traffic scenes are inherently dynamic. Agents frequently enter and exit a vehicle's sensor range, and their movements are dictated by a complex web of social interactions. For instance, a driver's path is influenced by a merging vehicle or a pedestrian near a crosswalk.

Existing approaches to this problem often fall into two categories: whole-scene regressions or graph-based networks. While effective, whole-scene models struggle with the variable number of agents in a scene. Conversely, graph networks and 3D point cloud processing often demand significant computational resources, making them difficult to deploy for real-time inference. Furthermore, many models fail to incorporate a key human driving heuristic: drivers prioritize immediate, relevant threats while ignoring distant or irrelevant agents.

Methodology: Social Convolution and Attention

The proposed architecture addresses these challenges through a four-stage pipeline designed for both flexibility and speed.

1. Input Representation and Encoding

The model first discretizes the environment into a spatial grid based on 3D coordinates ($x, y, z$). Historical trajectories for all agents within the grid are processed using a dynamic Long Short-Term Memory (LSTM) encoder. This dynamic approach allows the model to handle a varying number of agents seamlessly as they move through the scene.

2. The Attention Mask and Social Map

The core innovation lies in how the model fuses individual agent data with the broader social context:

  • Social Map: The latent features from the LSTM encoders are placed into their corresponding cells in the spatial grid, creating a "social map" of the environment.
  • Attention Mask: Simultaneously, the model generates an attention mask based on the target agent’s own historical trajectory. This mask functions as a probability map, identifying which areas of the grid (and which neighboring agents) are most likely to influence the target's future path.

3. Social Convolution (SCNN)

By performing an element-wise multiplication of the social map and the attention mask, the model filters out irrelevant information. This fused representation is then processed by a Convolutional Neural Network (CNN). This "social convolution" extracts spatial features that represent the most pertinent interactions, mimicking the way a human driver focuses on a car merging into their lane while ignoring a vehicle several lanes away.

4. Trajectory Decoding

The fused features are passed to an LSTM decoder. The researchers found that using a Gaussian Mixture Model (GMM) loss—which predicts a probability distribution of potential paths—significantly outperformed standard L2 loss (which predicts exact coordinates). The GMM approach allows the model to capture the inherent uncertainty in human movement.

Experimental Evaluation

The model was evaluated using the BLVD dataset, which comprises 654 high-resolution video clips from Changshu, China. The dataset covers diverse conditions, including varying light levels (day/night) and traffic densities.

Performance and Efficiency

The proposed model achieved a 20% reduction in prediction error compared to strong baselines like Conditional Variational Autoencoders (CVAE). Beyond accuracy, the model demonstrated exceptional efficiency. It operates at 32 frames per second (FPS), comfortably meeting the requirements for real-time autonomous systems. Notably, an ablation study revealed that removing the attention mechanism dropped the processing speed to just 12 FPS, highlighting the mechanism's role as a computational optimizer.

Discussion and Limitations

The study revealed that the attention mask naturally forms "strips" of high weight along likely driving routes, validating the hypothesis that trajectory-based attention can effectively prioritize relevant social information.

However, the model faces challenges with "riders" (cyclists and motorcyclists). These agents often exhibit more erratic behavior and less adherence to standard traffic flow compared to vehicles or pedestrians, leading to higher prediction errors. Additionally, like most trajectory models, accuracy tends to decay as the prediction horizon extends further into the future.

Conclusion

By combining dynamic LSTMs with a novel social convolution and attention framework, this research provides a scalable solution for real-time trajectory prediction. The ability to filter social interactions through an attention mask not only improves accuracy by focusing on relevant agents but also provides the computational efficiency necessary for safe autonomous navigation in the real world.

Summary updated

BibTeX
@inproceedings{yang2020traffic,
  author = {Tao Yang and Zhixiong Nan and He Zhang and Shitao Chen and Nanning Zheng},
  title = {{Traffic Agent Trajectory Prediction Using Social Convolution and Attention Mechanism}},
  booktitle = {IV},
  year = {2020},
  doi = {10.1109/iv47402.2020.9304645},
}
Figure