GCRL

Generative causal representation learning: a model that separates what stays the same across environments from what changes, so pedestrian motion forecasts hold up in places the model has never seen.

ICML 2023Causal inferenceDomain generalizationVariational inference
ICML2023 main conference
2latent factors: invariant and variant
do(X)causal effect, not correlation
OODforecasting in unseen domains
01 · Problem

When the scene changes

The question

Can a model that forecasts where pedestrians will walk keep working in a place it has never seen, by learning what stays the same everywhere?

Two places, one rule

Place 1 · quiet campus

Few people · walking slowly

Place 2 · busy station

Many people · walking fast

Arrow length = walking speed

Speed and crowding change from place to place; avoiding each other does not. GCRL keeps the rule and adapts only the place-specific features.

How: trained in one place, GCRL learns both parts. In a new place, the rule stays fixed and only the place-specific part is fine-tuned.

Background

Motion forecasting models learn from pedestrian trajectories recorded in particular places. Move them to a new environment, with different crowds, layouts or walking styles, and their predictions often break down, because they have learned correlations that were specific to the training data.

Some factors that shape motion hold everywhere, such as physical laws, traffic rules and social norms. Others change from place to place, such as the motion styles of the people there. A model that keeps these apart can carry what is universal into new domains.

Causality in brief

Structural causal models

Directed acyclic graphs where an edge X → Y means changing X can change Y, but not the reverse.

Confounders

Variables that influence both cause and effect, creating misleading associations.

Backdoor criterion

A set of variables that, controlled for, blocks confounding paths so p(Y | do(X)) can be estimated.

Causal representation learning

Learning latent variables that capture causal structure, not only correlations.

02 · Proposed solution · Method

Separating the invariant from the variant

GCRL is a generative model built on a causal graph. It learns two hidden factors from past paths: one that stays the same everywhere, and one that depends on the place.

ESZXY
  • E
    EnvironmentWhich place the data comes from. It sets the style of that place.
  • S
    Variant features, latentWhat changes from place to place, such as walking style.
  • Z
    Invariant features, latentWhat holds everywhere: physical laws, traffic rules, social norms.
  • X
    Past pathThe observed trajectory so far.
  • Y
    Future pathThe trajectory to predict.

Filled circles are observed; dashed circles are hidden and learned by the model.

Both Z and S influence the past and the future, so they confound the link between X and Y. Using the backdoor criterion, the model estimates the true causal effect p(Y | do(X)) rather than a correlation that may not transfer.

How it works

  1. 1EncodeRead the past path of each pedestrian.
  2. 2SeparateInfer the invariant part Z and the variant part S.
  3. 3PredictGenerate the future path from the past, Z and S.
  4. 4AdaptIn a new place, keep Z and tune only S.

One objective, five goals

  1. Accurate forecasts, by maximizing the likelihood of the true future trajectories.
  2. No confounding, by estimating the causal effect of X on Y, p(y | do(x)).
  3. Faithful encoding, by reconstructing the past trajectories from the latents.
  4. Invariant representations, by pulling the posterior of Z towards its prior.
  5. Variant representations, by matching the posterior of S to its environment-specific prior.
03 · Findings

Steady under shift

Tested on real crowds (ETH-UCY: 1,536 pedestrians in five scenes) and on synthetic crowds in eight domains, GCRL holds up where other forecasters break down.

01 · Robust to noise
GCRL
0.97
Baseline
2.68
0.97

average error at every noise level, from 8 up to 64

2.68baseline at 64

The baseline STGAT forecaster more than triples its error as noise grows

02 · Generalizes
3 training domainsGCRL8 test domains
8.8%

lower average error than the invariant baseline on unseen domains

8synthetic domains

Trained on three, tested on all eight

03 · Adapts fast
Z keptS tuned
34.3%

better average error than the invariant baseline in a new domain

≤ 6batches

Only a few batches of 64 samples from the new place are needed

Average displacement error (ADE): how far predicted positions land from the true ones, on average; lower is better.

The variant features S are identifiable, while the invariant features Z cannot be recovered from trajectories alone; still, a model using only Z performs on par with the full model across domains, supporting that Z is invariant.

04 · My role

What I contributed

  1. Mentored a PhD student throughout the project, from experimental design to model development.
  2. Guided methodology and technical implementation.
  3. Collaborated with academic partners to shape research directions and integrate feedback.
  4. Supported writing and revision through to the peer-reviewed ICML publication.
  5. Co-authored the paper and contributed to its dissemination and presentation.
05 · Tools

Built with

PythonPyTorchVariational autoencodersCoupling layersStructural causal modelsDo-calculus
06 · Resources

Code and papers

Contact

Let's Connect.

For professional opportunities, collaborations, research, consulting, or general inquiries, feel free to get in touch.

zahra.gharaee@gmail.com