πŸ€– Predictive World Models (2StepAhead & MASPM)

PROPOSED MODEL
COMPLETED β€’ PUBLISHED

2023 β€’ Aston University β€’ UKCI 2023 Publication

Table of Contents


1. Overview

Anticipating Social Navigation Futures

I developed three predictive world models that give a Dueling DQN agent prediction in SocNavGym. 2StepAhead, MASPM, and the combined 2StepAhead-MASPM predict upcoming latent states so the policy can choose safer, more efficient actions before the robot moves. This page summarises the thesis chapter and the UKCI 2023 paper where I reported these methods.

Chart
0.67 Reward
Peak value with 2StepAhead-MASPM
Time
3,200 Episodes
2StepAhead solves SocNavGym
Handshake
0.83 Compliance
Slightly below RVO2's 0.88 (Pareto trade-off)
Training reward curves for predictive world models

Training reward progression for baseline Dueling DQN and the three predictive world models (see Results & Evaluation section).


2. Research Motivation

Why Predictive World Models?

Reinforcement learning agents in social navigation lag whenever they only react to the current state. By the time a collision is imminent, it is often too late. My thesis Chapter 5 shows that giving the agent a short predictive horizon improves anticipation, reduces human collisions, and raises success rates.

Problem Definition


3. Methods at a Glance

2StepAhead

Predicts a latent state two steps ahead for the current action. Offers early foresight while keeping computation lightweight.

MASPM

Generates one-step latent predictions for every possible action to show the policy what would happen if it picked each option.

2StepAhead-MASPM

Combines both ideas by producing two-step forecasts for all actions. This hybrid achieved the best overall performance.

Each method feeds the resulting latent forecasts into the same Dueling DQN backbone, ensuring a fair comparison against the baselines (see Comparison with Baselines section).


4. Architecture Deep Dive

Shared Components

2StepAhead Workflow

  1. Encode the current observation into latent state (z) and hidden state (h).
  2. Roll the LSTM once to obtain (z’) and (h’) for the current action.
  3. Roll again to forecast (z’’) and (h’’).
  4. Provide (z) and (h’’) to the Dueling DQN to choose the next action.

This method was validated in the thesis instead of testing longer horizons because predicting four or more steps degraded performance while increasing runtime.

2StepAhead predictive world model architecture
Figure: 2StepAhead pipeline the VAE-LSTM world model forecasts two latent steps for the currently selected action.

MASPM Workflow

  1. For each discrete action (a_i), feed (z) and (a_i) into the LSTM.
  2. Collect the four predicted latent states (z’_0, z’_1, z’_2, z’_3).
  3. Concatenate (z) and the four forecasts, then pass them to the Dueling DQN.

MASPM gives the policy a snapshot of β€œwhat if” scenarios before it commits to any action.

MASPM predictive world model architecture
Figure: MASPM pipeline each discrete action branches through an LSTM to provide the Dueling DQN with one-step forecasts for all actions.

2StepAhead-MASPM Workflow

  1. For each action, roll the LSTM twice to produce two-step forecasts.
  2. Concatenate the resulting latent states and hidden states.
  3. Pass the full set to the Dueling DQN.

This hybrid provides depth (two steps) and breadth (all actions), which explains its superior results in Figure Results & Evaluation section.

2StepAhead-MASPM predictive world model architecture
Figure: 2StepAhead-MASPM pipeline combines MASPM's action branching with two-step rollouts to give the policy the richest horizon.

5. Training Setup

The training loop remains identical across methods; only the latent forecasting module changes. See the pseudocode in the Implementation & Usage section for the integration pattern.


6. Results & Evaluation

Training Performance

Testing Metrics (500 episodes per policy)

Quantitatively, the 500-episode evaluation logs recorded:

Metric 2StepAhead-MASPM Vanilla Dueling DQN
Success rate 92.6% (463 / 500) 86.2% (431 / 500)
Collision episodes 38 74
Personal space compliance 0.83 0.88 (SFM baseline)
Histogram comparison of metrics across baselines and predictive world models
Figure: Episode metrics across classical baselines (RVO2, SFM) and the Dueling DQN variants. The purple bars (2StepAhead-MASPM) show lower collision frequency and higher reward than the baselines.
Histogram comparison of MASPM, 2StepAhead-MASPM and 2StepAhead variants
Figure: Focused comparison of the three predictive variants. The hybrid retains the highest success counts while sharing idle-time and compliance distributions with MASPM and 2StepAhead.

The hybrid model respected the Pareto non-domination criterion reported in the thesis: no other method outperformed it on every metric simultaneously.


7. Comparison with Baselines

Model Peak Reward Success Trend Collision Trend Notes
Vanilla Dueling DQN 0.52 Slow Higher Baseline without forecasting
Dueling DQN + Hidden State 0.61 Steady Reduced Adds latent memory only
MASPM (proposed) 0.64 Improved Lower Predicts all actions one step ahead
2StepAhead (proposed) 0.65 Fast Lower Two-step foresight for the chosen action
2StepAhead-MASPM (proposed) 0.67 Highest Lowest Best balance across all metrics

8. Implementation & Usage

Training Loop Pseudocode

# Simplified structure showing where the predictive model plugs in
encoder = VAEEncoder()
dynamics = LSTMDynamics()
policy = DuelingDQN()

obs = env.reset()
for episode in range(num_episodes):
    latent_z, hidden_h = encoder.encode(obs)

    if model_type == "2StepAhead":
        forecast = dynamics.roll_two_steps(latent_z, hidden_h, action)
        q_values = policy.forward(latent_z, forecast)
    elif model_type == "MASPM":
        forecasts = dynamics.roll_all_actions(latent_z)
        q_values = policy.forward_with_branches(latent_z, forecasts)
    elif model_type == "2StepAhead-MASPM":
        forecasts = dynamics.roll_all_actions_two_steps(latent_z)
        q_values = policy.forward_with_branches(latent_z, forecasts)

    action = select_action(q_values)
    obs, reward, done, info = env.step(action)
    update_replay_buffer()
    optimise_models()
    if done:
        obs = env.reset()

Practical Guidance


9. Research Impact


10. Limitations & Next Steps


11. Resources & Citation

Technologies: Python β€’ PyTorch β€’ Gymnasium β€’ Variational Autoencoder β€’ LSTM β€’ Dueling DQN

Key Links:

Citation (BibTeX)

@inproceedings{oguzie2023predictive,
  title={Predictive World Models for Social Navigation},
  author={Oguzie, Goodluck},
  booktitle={UK Conference on Intelligent Systems (UKCI 2023)},
  year={2023},
  organization={Aston University}
}
← Back to Research Portfolio