LoRD: Adapting Differentiable Driving Policies to Distribution Shifts
Christopher Diehl1, Peter Karkus2, Sushant Veer2, Marco Pavone2,3, and Torsten Bertram1,
1 TU Dortmund University, 2 NVIDIA Research, 3 Stanford University
International Conference on Robotics and Automation (ICRA), 2025
Distribution shifts between operational domains can severely affect the performance of learned models in self-driving vehicles (SDVs). While this is a well-established problem, prior work has mostly explored naive solutions such as fine-tuning, focusing on the motion prediction task. In this work, we explore novel adaptation strategies for differentiable autonomy stacks (structured policy) consisting of prediction, planning, and control, perform evaluation in closed-loop, and investigate the often-overlooked issue of catastrophic forgetting. Specifically, we introduce two simple yet effective techniques: a low-rank residual decoder (LoRD) and multi-task fine-tuning. Through experiments across three models conducted on two real-world autonomous driving datasets (nuPlan, exiD), we demonstrate the effectiveness of our methods and highlight a significant performance gap between open-loop and closed-loop evaluation in prior approaches. Our approach improves forgetting by up to 23.33% and the closed-loop out-of-distribution driving score by 9.93% in comparison to standard fine-tuning. \
This repository includes the code for the nuPlan transfer experiments using the DTPP model.
To install LoRD, please follow these steps:
- setup the nuPlan dataset (described here) and install the nuPlan devkit (v.1.1, see here)
- download LoRD and move inside the folder
git clone https://github.com/rst-tu-dortmund/LoRD.git && cd LoRD
- make sure the environment you created when installing the nuplan-devkit is activated
conda activate nuplan
- install LoRD (based on tuplan_garage) as a pip package
pip install -e .
- add the following environment variable to your
~/.bashrc
export NUPLAN_EXP_ROOT="YOUR_PATH/nuplan/exp"
export NUPLAN_MAPS_ROOT="YOUR_PATH/nuplan/dataset/maps"
export NUPLAN_DATA_ROOT="YOUR_PATH/nuplan/dataset"
export NUPLAN_DEVKIT_ROOT="YOUR_PATH/nuplan/nuplan-devkit"
- create a new subfolder under
{oc.env:NUPLAN_DATA_ROOT}/nuplan-v1.1/boston_pittsburgh_singapore
and copy all db files from the Boston, Pittsburgh and Singapore data into it. We only use those files from the nuPlan Train Split for our work. In nuplan.yaml of the nuplan-devkit change:
data_root: ${oc.env:NUPLAN_DATA_ROOT}/nuplan-v1.1/trainval
to
data_root: ${oc.env:NUPLAN_DATA_ROOT}/nuplan-v1.1/boston_pittsburgh_singapore
We utilize the data pre-processing of the original DTPP repo.
-
Preprocess the data using
dtpp/data_processing/data_process.py
-
We provide the used data splits for training/ fine-tuning and evaluation in
dtpp/data_processing/boston_pittsburgh_splits.json
(USA, ID) anddtpp/data_processing/singapore_splits.json (Singapore, OOD)
-
Create the splits with
dtpp/data_processing/create_splits.py
using the jsons of step 2.
Set the correct pathes (either via console args or default args in the python script).
This project uses hydra for the configs and wandb for logging. Please add the required information for wandb login in a config from dtpp/config/logging_config
.
To train a base model on Boston and Pittsburgh (ID) data:
python train.py
A already trained base model is located in dtpp/models/base/base.pth
For fine-tuning with data from Singapore (OOD) use
python finetune.py hydra.job.config_name=CONFIGNAME.yaml
- Normal fine-tuning: CONFIGNAME=config_finetune.yaml
- Fine-tuning with LoRD and closed-loop regularization: CONFIGNAME=config_finetune_lord_closed_loop_regularization.yaml
You can find further trained models here.
Evaluate a model open-loop on both the ID and OOD test split
python evaluate_iid_ood.py
This project provides a bash script (scripts/simulation/sim_dtpp_multiple_models.sh
) that automates the evaluation of different models across multiple evaluation protocols.
You can customize the evaluation by modifying the SPLITS
variable to specify different test scenarios, the CHECKPOINT_PATHS
array to select model checkpoints, and the CHALLENGES
variable to define the types of evaluation challenges to run.
You can find further exemplary shells scripts from tu_garage in /scripts/simulation/.
This project provides pre-trained models from the publication for the fine-tuning baseline dtpp/models/finetuning/finetuning.pth and our best LoRD model with (closed-loop regularization) dtpp/models/LoRD_closed_loop_reg/lord_cl_reg.pth.
Please refer to results
If you have any questions or suggestions, please feel free to open an issue or contact us ([email protected]).
If you find LoRD useful, please consider giving us a star 🌟 and citing our paper with the following BibTeX entry.
@InProceedings{DiehlICRA2025,
title={LoRD: Adapting Differentiable Driving Policies to Distribution Shifts},
author={Diehl, Christopher and Karkus, Peter and Veer, Sushant and Pavone, Marco and Bertram, Torsten},
booktitle={International Conference on Robotics and Automation},
year={2025}
}
LoRD includes code from Motional's nuplan-devkit. We are not affiliated with Motional, and the repository is not published, maintained or otherwise related to Motional.
We build heavily on prior open-source work. For simulation, we use tu_garage and an extension from interPlan. Most of the modeling and data preprocessing code is adapted from DTPP. This README is also inspired by those of tu_garage and EPO. We thank the authors for open-sourcing their work.