A Multi-Loss Strategy for Vehicle Trajectory Prediction: Combining Off-Road, Diversity, and Directional Consistency Losses
Ahmad Rahimi, Alexandre Alahi
TL;DR
This work tackles the safety and diversity gaps in multimodal vehicle trajectory prediction by replacing the standard winner-takes-all objective with three differentiable, all-mode losses: Offroad Loss, Road Direction Consistency, and Mode Diversity. These losses enforce drivable-area adherence, correct heading alignment with road centerlines, and diverse yet feasible trajectory futures, and are compatible with any prediction model within the UniTraj framework. Empirical results on nuScenes and Argoverse 2 using Wayformer and AutoBots show substantial reductions in off-road predictions and improved robustness to scene perturbations, with a notable 47% reduction on original scenes and 37% on attacked scenes reported in the abstract. The approach offers a scalable, architecture-agnostic means to enhance realism and safety in autonomous driving predictions and provides a basis for future extensions, including additional differentiable losses and adaptive weighting.
Abstract
Trajectory prediction is essential for the safety and efficiency of planning in autonomous vehicles. However, current models often fail to fully capture complex traffic rules and the complete range of potential vehicle movements. Addressing these limitations, this study introduces three novel loss functions: Offroad Loss, Direction Consistency Error, and Diversity Loss. These functions are designed to keep predicted paths within driving area boundaries, aligned with traffic directions, and cover a wider variety of plausible driving scenarios. As all prediction modes should adhere to road rules and conditions, this work overcomes the shortcomings of traditional "winner takes all" training methods by applying the loss functions to all prediction modes. These loss functions not only improve model training but can also serve as metrics for evaluating the realism and diversity of trajectory predictions. Extensive validation on the nuScenes and Argoverse 2 datasets with leading baseline models demonstrates that our approach not only maintains accuracy but significantly improves safety and robustness, reducing offroad errors on average by 47% on original and by 37% on attacked scenes. This work sets a new benchmark for trajectory prediction in autonomous driving, offering substantial improvements in navigating complex environments. Our code is available at https://github.com/vita-epfl/stay-on-track .
