All models

SGAN

LSTM encoder-decoder GAN that samples plausible future pedestrian trajectories from observed paths.

Time series · 109 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (59 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
11.4K
Operations
109
Framework
PyTorch
Recurrent
Yes
Published
CVPR 2018
Cited by
2,468 (as of 28 October 2026)
Authors
Agrim Gupta, Justin Johnson, Li Fei-Fei and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m20029
Graph hash
4e572cc23f0b93df580adf6c18fa555f39e1a0fecab01736a9ea01db6d1bebdd
Skeleton hash
d69ec4e0655f61e83ea7f17e39eac037dea32547c82fde230f0b81effb43f6dc
Architecture hash
e315b760e36bc738b4c3d11e8c8022e7e073adf515ba734a9e29448449c4228a
Diagram SHA-256
a3601e17d2baabd98bafb658c5831b4a63da2ea82413d9a0e8224f39260dd67d
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Social GAN, or SGAN, predicts where the people in a scene will walk next: a recurrent sequence-to-sequence model observes their motion histories and outputs future paths. The paper starts from the observation that human motion is multimodal, so that one observed history has many socially plausible continuations. It therefore trains the predictor adversarially against a recurrent discriminator and adds a variety loss that encourages diverse predictions.

The generator is an LSTM encoder-decoder with a hidden state of 16 dimensions in the encoder and 32 in the decoder. The paper's pooling module computes each person's relative positions to all other people, joins them with the hidden states, passes them through an MLP and pools the result elementwise into one vector. For the variety loss, k predictions are generated per scene from random noise and the one that is best in the L2 sense is taken as the prediction.

In the paper's naming scheme SGAN-kVP-N, kV marks training with the variety loss and P marks use of the pooling module. This model has the SGAN-20V-20 configuration, one of the two for which the repository releases pretrained weights, and so runs without the pooling module. On the ETH and UCY datasets the paper reports that SGAN-20V-20 outperformed all the other models it compared. The full model with pooling scored slightly worse, though the authors show that pooling helps predict more socially plausible paths.

Key idea. Social GAN combines an LSTM encoder-decoder generator, a pooling mechanism that aggregates information across all people in a scene, and a variety loss to generate diverse, socially plausible trajectories.

  • Social GAN
  • SGAN
  • Social-GAN
  • trajectory prediction
  • pedestrian trajectory forecasting
  • human motion prediction
  • socially acceptable trajectories
  • variety loss
  • crowd motion

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{gupta2018socialgansociallyacceptable,
      title={Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks}, 
      author={Agrim Gupta and Justin Johnson and Li Fei-Fei and Silvio Savarese and Alexandre Alahi},
      year={2018},
      eprint={1803.10892},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1803.10892}, 
}