Accepted at the International Joint Conference on Artificial Intelligence (IJCAI 2026) – Robotics Track
This repository contains the official implementation of GRALP. This repository contains a research implementation. The code is organized to reproduce the results described in the accompanying paper included in this repository.
datasets/– data loading, preprocessing and normalization utilities for D4RL datasetsmodels/– neural network and diffusion model definitionstraining/– training scripts for autoencoder, IQL and evaluationutils/– helper modules for logging, video rendering and miscellaneous utilities
The codebase targets Python 3.8+. Install dependencies using the provided requirements.txt:
pip install -r requirements.txtmujoco-py and 'robosim' requires the MuJoCo physics engine and an available OpenGL context. Please follow the MuJoCo installation guide to set up the required libraries.
- Clone the repository
git clone <repository-url>
cd GRALP- Install dependencies
pip install -r requirements.txt- Run the training pipeline
The full pipeline consists of four stages: training the diffusion autoencoder, creating an encoded dataset for Planning, training the latent planning Transformer agent and finally evaluating the agent.
Example for a HalfCheetah environment:
# Train the diffusion autoencoder
python training/train_AE_main.py --env_name antmaze-medium-diverse-v2
# Collect an encoded dataset
python training/prepare_transformer_data.py --env_name antmaze-medium-diverse-v2
# Train the IQL policy
python training/train_transformer_main.py --env_name antmaze-medium-diverse-v2
# Evaluate the trained agent
python training/eval.py --env_name antmaze-medium-diverse-v2Command line arguments in each script allow further customisation (batch sizes, seed values, number of timesteps, etc.). Refer to the source code for a full list of options.
This code accompanies the paper submission:
GRALP: Support-Preserving Latent Planning for Long-Horizon Offline Robotic Control
GRALP consists of four components: a trajectory encoder, a state-conditional latent prior, a diffusion-based action decoder, and a latent-space planner trained with conservative value estimation.
Trajectory Encoder and Prior
The encoder is a 2-layer GRU with hidden size 256. The final forward and backward hidden states are concatenated and passed through linear heads to predict: Mean:
Diffusion Action Decoder
The decoder models using a temporal U-Net with FiLM conditioning. At each diffusion step
Latent Critics
We train two Q-functions
Transformer Planner The planner predicts a Gaussian distribution over the next latent skil. These are processed by a causal Transformer with: Layers: 8, Attention heads: 8, Embedding dimension: 256.
This section summarizes the hyperparameters used in GRALP. Unless otherwise specified, all hyperparameters are held fixed across environments, with only task-dependent parameters (e.g., CQL strength, RTG targets, and skill horizons) tuned using standard validation protocols. Tables are organized by training stage and evaluation usage. All ablations and comparisons use the same hyperparameters as the full GRALP model unless stated otherwise.
Stage 1: Latent Skill Model
Stage 1 trains the diffusion-based latent skill model described in Section III-B.
| Parameter | Value |
|---|---|
| Latent dimension |
16 |
| GRU hidden size | 256 |
| Diffusion schedule | Linear |
| Batch size | 256 |
| Learning rate (encoder, prior) | |
| Learning rate (decoder) | |
| KL weight |
|
| Z-Force weight |
0.01 |
| State dropout probability | |
| Optimizer | AdamW |
| Gradient clipping | 1.0 |
Stage 2: Planner and Critics
Stage 2 operates entirely in the pre-encoded latent space, training conservative critics and a Transformer-based planner as described in Section III-C.
| Parameter | Value |
|---|---|
| Critic hidden width | 256 |
| Expectile |
0.8 |
| CQL coefficient |
0.5–5.0 (domain-specific) |
| Planner learning rate | |
| Critic learning rate | |
| AWR temperature |
2.0 |
| Transformer layers / heads | 8 / 8 |
| Context length | 12–16 |
| Batch size | 256 |
| Optimizer | AdamW |
Return-to-Go (RTG) Targets
For evaluation, GRALP conditions the planner on fixed return-to-go (RTG) targets, following standard practice in return-conditioned sequence models.
| Environment | Normalized Target RTG |
|---|---|
| Kitchen | 3–4 |
| Antmaze | 5 |
| Maze2D | 2 |
| Locomotion | 2–5 |
| Adroit | 3–6 |
| Robosim | 3 |
Skill Horizons
The skill horizon
| Environment | Horizon |
|---|---|
| Kitchen | 12 |
| Antmaze | 8 |
| Maze2D | 12 |
| Locomotion | 12 |
| Adroit | 8 |
| Robosim | 8 |
Compute and Reproducibility
All experiments are conducted on NVIDIA RTX 3090 or A100 GPUs, using a single GPU per run. Training is fully offline and does not require environment interaction. For each task, GRALP is trained independently with fixed hyperparameters, and performance is evaluated using 10 random seeds, reporting mean ± standard deviation following the standard D4RL protocol.
Evaluation is performed using deterministic latent planning and deterministic DDIM decoding (
To ensure reproducibility, all random number generators (PyTorch, NumPy, and environment seeds) are explicitly controlled, and all experiments are run with fixed training schedules and evaluation protocols. Training scripts, configuration files, and pretrained model checkpoints will be released upon publication.
Table: Unified D4RL results across Navigation, Sequential Manipulation, Dexterous Manipulation, and Locomotion.
GRALP achieves the highest average performance on Navigation, Sequential (Kitchen), and Adroit domains, while remaining competitive on Locomotion.
We additionally evaluate GRALP on RoboSuite manipulation tasks using offline teleoperation data.
- Success Rate: 94.6% ± 2.1%
- 10 seeds, 25 rollouts per seed
- Success Rate: 92.3% ± 3.4%
- 10 seeds, 25 rollouts per seed
Note: Videos Renderring speed might varies due to third party anonymous gitub server. For better quality view, try to download the videos from Videos/ folder
![]() 📹 Maze [Navigation] |
![]() 📹 Kitchen [Sequential] |
![]() 📹 Lift rollout |
![]() 📹 Pick-and-Place rollout |
![]() 📹 Pen Manipulation [Adroit] |
![]() 📹 Door [Adroit] |
If you use this code in your research, please cite the accompanying paper:
@inproceedings{zaidi2026gralp,
title={GRALP: Generative Representation for Action Refinement and Latent Planning},
author={Zaidi, Talha and Munir, Arslan and Abbas, Sardar Ali},
booktitle={Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI)},
year={2026}
}







