Goal-GAN for Trajectory Prediction
- Goal-GAN is a goal-conditioned, interpretable model that decomposes pedestrian trajectory forecasting into destination estimation and routing.
- It leverages a discrete goal module with Gumbel-Softmax sampling to capture multimodal destination distributions and encode scene semantics.
- The routing module employs attention over local visual patches to generate plausible, physically compliant trajectories reacting to real-world constraints.
Goal-GAN is an interpretable and end-to-end trainable model for human trajectory prediction that treats forecasting as a goal-conditioned generative process. Rather than predicting future motion as a monolithic sequence problem, it separates intention inference—where a pedestrian wants to go—from path planning—how that pedestrian reaches the destination through the scene. The model therefore decomposes trajectory prediction into goal estimation and routing, learns an explicit multimodal distribution over end-goal positions, and generates feasible trajectories conditioned on sampled goals while reacting to physical constraints in the visual scene (Dendorfer et al., 2020).
1. Problem formulation and probabilistic structure
Goal-GAN operates on pedestrian motion observed in ground-plane coordinates. For each agent , the past trajectory is
the future trajectory is
and the end goal is a 2D coordinate . The visual context is a top-down image or semantic map of size , rectified with homography to real-world coordinates.
The central modeling assumption is a two-stage probabilistic decomposition:
Here, is a multimodal goal estimator over possible end positions, and is a goal-conditioned routing distribution that generates plausible trajectories toward .
This factorization makes the model explicitly interpretable. The first stage estimates a distribution over destinations, and the second stage generates trajectories that are directed toward sampled destinations. The paper characterizes this as an operationalization of prediction in two intuitive steps: first estimate the goal distribution, then condition the trajectory generator on a sampled goal. This suggests that multimodality is modeled primarily at the destination level rather than being delegated entirely to trajectory noise.
2. Goal estimation and multimodal spatial support
The Goal Module models destinations on a discrete 2D grid aligned with the bird’s-eye image. It outputs a score map
0
where 1, and normalizes it with a softmax:
2
Because support is spatially discrete, distinct scene-driven modes appear as spatially separated peaks. The paper gives examples such as sidewalk branches at a crossroads and broad support over an open plaza.
The module combines motion history and scene context. Past motion is encoded by a Motion Encoder, where relative displacements 3 are embedded by an MLP and processed by an LSTM:
4
The scene image 5 is processed by a U-Net-like encoder-decoder CNN with skip connections. In the bottleneck, scene features are fused with 6, and decoding yields the score map:
7
8
Training requires sampling goals while retaining differentiability. Goal-GAN uses the Gumbel-Softmax reparameterization:
9
where 0, 1 is a temperature, and 2 is a relaxed one-hot over grid cells. The relaxed sample is mapped to a 2D coordinate 3, for example the cell center in world coordinates.
At inference time, the learned goal distribution is sampled directly:
4
The model then generates 5 trajectories conditioned on the sampled goals. The explicit goal distribution is therefore the primary source of multimodal forecasting.
3. Goal-conditioned routing and physical compliance
The Routing Module generates trajectories toward a sampled goal while reacting to local scene constraints. Its hidden state is initialized from motion and goal embeddings:
6
where 7 is an MLP embedding of the sampled goal.
At each future step, routing is driven by the current predicted position, the remaining displacement to the goal, and the timestep:
8
9
Local traversability is estimated through soft attention over an image patch centered at the current predicted position:
0
1
The architecture distinguishes between global and local physical feasibility. Global feasibility is handled by the Goal Module, which concentrates probability mass on semantically plausible destinations and suppresses obstacles such as roads with cars or trees and grass. Local feasibility is handled by the Routing Module’s attention over patches around 2, steering predicted steps toward traversable regions and around obstacles.
The paper emphasizes that both mechanisms are differentiable and that there is no hard constraint or explicit cost map term. Physical compliance is learned implicitly from visual features and is further encouraged by adversarial training. This suggests that the model does not impose symbolic navigability constraints; instead, scene semantics are absorbed into the learned goal and routing distributions.
4. Objectives, adversarial learning, and inference protocol
Goal-GAN is trained end-to-end with trajectory, goal, and adversarial objectives. The trajectory accuracy term is a best-of-many loss over 3 samples:
4
This is paired with a goal achievement loss that aligns the last predicted point with the sampled goal:
5
and a goal cross-entropy loss over the discrete goal grid:
6
Realism and scene compliance are promoted with Least-Squares GAN losses. The discriminator receives the observed prefix 7, the full trajectory 8 or 9, and visual features from the scene around the evolving position. Its losses are
0
1
The total generator loss is
2
During inference, the procedure is explicitly two-stage. First, sample 3 goals from 4. Second, for each sampled goal, initialize the routing LSTM and roll out a trajectory using the remaining-goal vector 5 together with local visual attention.
Evaluation follows the standard variety protocol:
6
7
The training and evaluation regimen is fixed at observing 8 steps, corresponding to 8, and predicting 12 steps, corresponding to 9. The paper also notes that Least Squares GAN is used to avoid vanishing gradients present in sigmoid cross-entropy GANs.
5. Benchmarks, metrics, and reported performance
The model is evaluated on ETH and UCY, using 5 sequences across 4 scenarios with leave-one-out training and testing and positions at 0 intervals, and on the Stanford Drone Dataset, using 20 outdoor scenes and the standard TrajNet split with a focus on pedestrians (Dendorfer et al., 2020). Predictions are reported in world coordinates on ETH/UCY and in pixels on SDD.
The reported ETH/UCY results use 1 samples and ADE/FDE in meters.
| Dataset | ADE | FDE |
|---|---|---|
| ETH | 0.59 | 1.18 |
| HOTEL | 0.19 | 0.35 |
| UNIV | 0.60 | 1.19 |
| ZARA1 | 0.43 | 0.87 |
| ZARA2 | 0.32 | 0.65 |
The paper states that Goal-GAN achieves state-of-the-art on these benchmarks, with roughly 15% error reduction compared to Social-BiGAT and CGNS, and a 2 FDE improvement over the prior best.
On SDD, with 3, the reported ADE/FDE in pixels are as follows.
| Method | ADE | FDE |
|---|---|---|
| Goal-GAN | 12.2 | 22.1 |
| SoPhie | 16.3 | 29.4 |
| CF-VAE | 12.6 | 22.3 |
| P2TIRL | 12.6 | 22.1 |
The paper attributes these gains to explicit goals, stating that they substantially improve over non-goal conditioned baselines and that Goal-GAN matches or extends other goal-conditioned approaches without costly IRL training.
A synthetic multimodality study further isolates the behavior of the full system. Using Social Force Model trajectories and a 2-class semantic map, the full model attains ADE/FDE 4, feasibility 5, mode coverage 6, and 7, outperforming vanilla GAN baselines and Goal-GAN variants missing components.
6. Interpretability, ablations, limitations, and implementation
Interpretability is centered on the Goal Module’s heatmap. Because the model produces a spatial probability map over destinations, its belief over plausible goals can be inspected directly. The paper describes peaks at sidewalk exits and low mass on obstacles such as roads with parked cars and trees. Routing toward sampled peaks produces human-understandable plans.
The ablation results on the synthetic dataset clarify the role of each component. Removing the 8 trajectory loss raises ADE to 9, although mode coverage remains high at 0, which the paper interprets as evidence that 1 is crucial for accurate paths. Removing Gumbel-Softmax leads to degraded performance, with ADE 2, FDE 3, feasibility 4, and mode coverage 5, indicating that differentiable goal sampling is essential for stable training and effective use of the goal distribution. Adding visual attention improves feasibility and mode coverage versus GAN baselines that rely only on noise and attention.
The paper identifies several failure modes. Ambiguous scenes with many equally plausible destinations can yield broad goal distributions and scattered samples; routing may then produce diverse speeds and routes that challenge precise ADE and FDE. Rapid intention changes after 6, such as sudden U-turns, and occlusions not reflected in the static top-down image can reduce goal estimation accuracy. Proposed mitigations include sampling more goals with larger 7, leveraging broader distributions to hedge uncertainty, and incorporating additional context such as dynamic scene cues or social interactions in future extensions.
Implementation is fully end-to-end. The Motion Encoder, Goal Module, Routing Module, and GAN discriminator are optimized jointly. Visual input is a single top-down image, and coordinates are transformed to world space via homography. The model uses a CNN encoder-decoder fused with 8, a goal-conditioned LSTM with soft attention, Gumbel-Softmax for differentiable goal sampling, and an LSGAN discriminator. The authors publicly released code at https://github.com/dendorferpatrick/GoalGAN.
Taken together, these components make the explicit learned goal distribution the linchpin of Goal-GAN’s multimodal and interpretable forecasts. Goals are modeled discretely over the scene, trained with cross-entropy against ground-truth end positions, sampled differentiably during training, and injected into a recurrent routing policy that reacts to local obstacles through attention. The result is a model that combines destination-level multimodality, scene-aware physical compliance, and competitive benchmark accuracy within a single probabilistic framework (Dendorfer et al., 2020).