Conditional Generative Adversarial Networks for Speed Control in Trajectory Simulation

Sahib Julka, Vishal Sowrirajan, Jörg Schlötterer, Michael Granitzer

Abstract

Motion behaviour is driven by several factors -- goals, presence and actions of neighbouring agents, social relations, physical and social norms, the environment with its variable characteristics, and further. Most factors are not directly observable and must be modelled from context. Trajectory prediction, is thus a hard problem, and has seen increasing attention from researchers in the recent years. Prediction of motion, in application, must be realistic, diverse and controllable. In spite of increasing focus on multimodal trajectory generation, most methods still lack means for explicitly controlling different modes of the data generation. Further, most endeavours invest heavily in designing special mechanisms to learn the interactions in latent space. We present Conditional Speed GAN (CSG), that allows controlled generation of diverse and socially acceptable trajectories, based on user controlled speed. During prediction, CSG forecasts future speed from latent space and conditions its generation based on it. CSG is comparable to state-of-the-art GAN methods in terms of the benchmark distance metrics, while being simple and useful for simulation and data augmentation for different contexts such as fast or slow paced environments. Additionally, we compare the effect of different aggregation mechanisms and show that a naive approach of concatenation works comparable to its attention and pooling alternatives.

Introduction

Predicting the movement of humans and vehicles is a fundamental challenge in autonomous driving and robotics. While deep learning has advanced the field from deterministic "best guess" paths to multimodal predictions that capture various possible futures, a critical element remains elusive: explicit control. Most state-of-the-art trajectory predictors function as "black boxes" regarding specific behavioral attributes. For instance, it is difficult to instruct a model to simulate a pedestrian suddenly running or a vehicle slowing down in a specific context.

In this work, we introduce the Conditional Speed GAN (CSG), a framework designed not only to predict where an agent might go but to allow users to explicitly dictate their speed. This capability is vital for realistic urban simulations and data augmentation, where models must adapt to diverse environments—ranging from quiet pedestrian zones to frantic city streets.

Methodology

The CSG architecture is built upon a Generative Adversarial Network (GAN) framework, consisting of a Generator ($G$) and a Discriminator ($D$).

The Conditional Speed GAN (CSG) architecture, illustrating the flow from feature extraction through the speed forecasting module to the conditioned decoder.

The model operates through four primary stages:

  1. Feature Extraction: LSTMs encode past trajectories, relative positions, and speeds of all agents in a scene.
  2. Speed Forecasting Module: This module is the core innovation. In prediction mode, it forecasts the next-step speed from the latent space. In simulation mode, this can be overridden by a user-defined speed.
  3. Aggregation: To model social interactions, we evaluated three mechanisms: Social Pooling, Soft Attention, and a simple Concatenation of the hidden states of the $N$ nearest neighbors.
  4. Decoder: The decoder generates future coordinates conditioned on the latent trajectory embedding, the agent's semantic label (e.g., car vs. pedestrian), and the target speed.

The Discriminator ensures that generated paths are both physically realistic and conform to the specified speed and agent type.

Experimental Setup

We evaluated CSG on three major benchmarks:

  • ETH & UCY: The standard for pedestrian trajectory prediction, featuring complex social interactions like group walking and collision avoidance.
  • Argoverse: A large-scale dataset for testing heterogeneous agents (autonomous vehicles and other road users) in urban environments.

Results and Discussion

Our experiments yielded several key insights:

Speed as a Control Knob: By treating speed as a conditional variable, CSG gains the ability to extrapolate. It can be trained on standard data but generate physically plausible "fast" or "slow" trajectories when prompted, making it highly versatile for simulation.

The Power of Simplicity: Surprisingly, naive concatenation of neighbor states performed as well as more complex attention or pooling mechanisms. This suggests that for mid-range forecasting, the raw state of nearby agents provides sufficient context for learning social norms.

Social Awareness and Accuracy: CSG achieved competitive results on ETH/UCY benchmarks. For example, on the ZARA2 dataset, CSG reached a best-in-class Average Displacement Error (ADE) of 0.28 and a Final Displacement Error (FDE) of 0.57. Furthermore, the model naturally learns the link between speed and social interaction, maintaining group behaviors and avoiding stationary obstacles even when simulated at varying speeds.

Qualitative evaluation of CSG showing its ability to preserve social dynamics and minimize avoidable collisions in complex scenarios.

As shown in Figure 4, the concatenation variant (CSG-C) demonstrated a superior ability to preserve social dynamics, resulting in fewer avoidable collisions compared to other aggregation methods.

Conclusion

Conditional Speed GAN (CSG) provides a simple yet effective method for controllable trajectory simulation. While highly effective at handling agent-to-agent interactions, future work will focus on integrating static scene context (e.g., semantic maps of buildings and curbs) to further enhance realism. Additionally, exploring automated context discovery could allow the model to learn subtle behavioral variations without manual labeling.

Summary updated

Abstract

Motion behaviour is driven by several factors -- goals, presence and actions of neighbouring agents, social relations, physical and social norms, the environment with its variable characteristics, and further. Most factors are not directly observable and must be modelled from context. Trajectory prediction, is thus a hard problem, and has seen increasing attention from researchers in the recent years. Prediction of motion, in application, must be realistic, diverse and controllable. In spite of increasing focus on multimodal trajectory generation, most methods still lack means for explicitly controlling different modes of the data generation. Further, most endeavours invest heavily in designing special mechanisms to learn the interactions in latent space. We present Conditional Speed GAN (CSG), that allows controlled generation of diverse and socially acceptable trajectories, based on user controlled speed. During prediction, CSG forecasts future speed from latent space and conditions its generation based on it. CSG is comparable to state-of-the-art GAN methods in terms of the benchmark distance metrics, while being simple and useful for simulation and data augmentation for different contexts such as fast or slow paced environments. Additionally, we compare the effect of different aggregation mechanisms and show that a naive approach of concatenation works comparable to its attention and pooling alternatives.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
ETH/UCY · AVG · ETH and UCY datasetsCSG (Conditional Speed GAN)ADE0.47K=20 · runs=20 · selection=best of 20 samples · aggregation=average · prediction-horizon=12 timesteps (4.8 seconds)
Source quote
L323: 0.47/0.93
ETH/UCY · AVG · ETH and UCY datasetsCSG (Conditional Speed GAN)FDE0.93K=20 · runs=20 · selection=best of 20 samples · aggregation=average · prediction-horizon=12 timesteps (4.8 seconds)
Source quote
L323: 0.47/0.93
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
ZARA2GoalGAN baselineADE0.32K=20 · selection=best of 20 samples · prediction-horizon=12 timesteps (4.8 seconds)
Source quote
L319: ZARA2 │ 0.42/0.84 │ 0.38/0.78 │ 0.51/0.92 │ 0.36/0.75 │ 0.35/0.71 │ 0.32/0.65
ZARA2GoalGAN baselineFDE0.65K=20 · selection=best of 20 samples · prediction-horizon=12 timesteps (4.8 seconds)
Source quote
L319: ZARA2 │ 0.42/0.84 │ 0.38/0.78 │ 0.51/0.92 │ 0.36/0.75 │ 0.35/0.71 │ 0.32/0.65
BibTeX
@inproceedings{julka2021conditional,
  author = {Sahib Julka and Vishal Sowrirajan and Jörg Schlötterer and Michael Granitzer},
  title = {{Conditional Generative Adversarial Networks for Speed Control in Trajectory Simulation}},
  booktitle = {LOD},
  year = {2021},
  url = {https://openreview.net/forum?id=rzMWKchHJW5},
}
Figure