Digital-Twin Losses for Lane-Compliant Trajectory Prediction at Urban Intersections
Authors: Kuo-Yi Chao, Erik Leo Haß, Melina Gegg, Jiajie Zhang, Ralph Raßhofer, Alois Christian Knoll
Organizations: * Chair of Robotics, Artificial Intelligence and Real-Time Systems Technical University of Munich, Munich, Germany · † BMW Group, Munich, Germany
Accurate and safety-conscious trajectory prediction is a key technology for intelligent transportation systems, especially in V2X-enabled urban environments with complex multi-agent interactions. In this paper, we created a digital twin-driven V2X trajectory prediction pipeline that jointly leverages cooperative perception from vehicles and infrastructure to forecast multi-agent motion at signalized intersections. The proposed model combines a Bi-LSTM-based generator with a structured training objective consisting of a standard mean squared error (MSE) loss and a novel twin loss. The twin loss encodes infrastructure constraints, collision avoidance, diversity across predicted modes, and rule-based priors derived from the digital twin. While the MSE term ensures point-wise accuracy, the twin loss penalizes traffic rule violations, predicted collisions, and mode collapse, guiding the model toward scene-consistent and safety-compliant predictions. We train and evaluate our approach on real-world V2X data sent from the intersection to the vehicle and collected in urban corridors. In addition to standard trajectory metrics (ADE, FDE), we introduce ITS-relevant safety indicators, including infrastructure and rule violation rates. Experimental results demonstrate that the proposed training scheme significantly reduces critical violations while maintaining comparable prediction accuracy and real-time performance, highlighting the potential of digital twin-driven multi-loss learning for V2X-enabled intelligent transportation systems.
Figures & tables
Fig. 1: TUM intersection scene: OpenDRIVE lane map (grey, 2,233 segments) overlaid with recorded agent trajectories (946 objects, coloured by class) from the first 30,000 frames. The lane geometry serves as the infrastructure prior for the proposed twin-consistency loss.
Split
Objects
1s
2s
3s
5s
Train
15 843
971 668
921 277
876 418
797 690
Val
3 395
227 450
216 105
205 976
188 287
Test
3 396
187 587
176 715
166 958
149 939
Total
22 634
1 386 705
1 314 097
1 249 352
1 135 916
TABLE I: Dataset statistics per split and prediction horizon (sliding-window samples), with a 70%/15%/15% split for training, validation, and testing.
Quantity
Range
Notes
History dx/dy (input)
−30 … 0 m
2 s × 50 km/h max
Future dx/dy (1 s)
0 … 14 m
cumulative position
Future dx/dy (5 s)
0 … 70 m
cumulative position
vx , vy
−15 … +15 m/s
not normalised
Lane distance / 100
0 … 0.5
Lane heading / π
−1 … +1
TABLE II: Typical value ranges after anchor-relative normalisation.
Fig. 2: LSTM encoder-decoder architecture. The dashed orange region highlights where MC-Dropout is active during inference for uncertainty estimation.
Variant
Extra losses
Description
Baseline
—
MSE only
Map_Loss
Linfra
Lane proximity
Collision_Loss
Lcoll
Batch repulsion
Twin_All
Linfra+Lcoll
Both digital-twin losses
CV
(no training)
Constant velocity
KF-CA
(no training)
Kalman–Singer
TABLE III: Model variants and their loss compositions.
Model
ADE ↓
FDE ↓
RMSE ↓
NL-ADE ↓
CV
0.931
1.957
1.111
1.098
KF-CA
1.001
2.286
1.217
1.169
Baseline
0.548
1.107
0.643
0.642
Map_Loss
0.716
1.268
0.803
0.760
Collision_Loss
0.778
1.255
0.859
0.797
Twin_All
0.936
1.484
1.021
0.917
TABLE IV: Results at 2 s horizon ( ↓ = lower is better).
Digital twins (DTs) for urban transportation systems have gained increasing attention; however, their systematic evaluation in safety-critical scenarios remains limited. This paper presents a multi-pedestrian safety warning system at urban intersections enabled by a tightly coupled physical-digital twin framework. Built upon the COSMOS city-scale wireless testbed in New York City, the proposed system integrates camera and ultra-wideband (UWB), edge-cloud computing, predictive trajectory modeling, and MQTT-based communication to deliver real-time safety alerts to vulnerable road users (VRUs). The system is evaluated through both field deployment and virtual reality (VR) experiments. Results demonstrate high warning generation accuracy, localization accuracy, efficient end-to-end latency under different model configurations, and significant reductions in user response time when warnings are issued. The proposed DT framework provides a scalable, modular, and generalizable solution for real-time multi-pedestrian safety enhancement at complex urban intersections.
Yongjie Fu, Qi Gao, Mahshid Ghasemi Dehkordi +2
Department of Civil Engineering and Engineering Mechanics at Columbia University, New York. · Mahshid Ghasemi Dehkordi and Gil Zussman are with the Department of Electrical Engineering at Columbia University, New York. · Yongjie Fu, Qi Gao, and Xuan Di are with the Department of Civil Engineering and Engineering Mechanics at Columbia University, New York. +1
Intelligent Transportation Systems (ITS) demand real-time collision prediction to ensure road safety and reduce accident severity. Conventional approaches rely on transmitting raw video or high-dimensional sensory data from roadside units (RSUs) to vehicles, which is impractical under vehicular communication bandwidth and latency constraints. In this work, we propose a semantic V2X framework in which RSU-mounted cameras generate spatiotemporal semantic embeddings of future frames using the Video Joint Embedding Predictive Architecture (V-JEPA). To evaluate the system, we construct a digital twin of an urban traffic environment enabling the generation of d verse traffic scenarios with both safe and collision events. These embeddings of the future frame, extracted from V-JEPA, capture task-relevant traffic dynamics and are transmitted via V2X links to vehicles, where a lightweight attentive probe and classifier decode them to predict imminent collisions. By transmitting only semantic embeddings instead of raw frames, the proposed system significantly reduces communication overhead while maintaining predictive accuracy. Experimental results demonstrate that the framework with an appropriate processing method achieves a 10% F1-score improvement for collision prediction while reducing transmission requirements by four orders of magnitude compared to raw video. This validates the potential of semantic V2X communication to enable cooperative, real-time collision prediction in ITS.
Murat Arda Onsu, Poonam Lohan, Burak Kantarci +3
School of Electrical Engineering and Computer Science, University of Ottawa, Ottawa, ON, Canada. · Nokia Bell Labs, 600 March Road, Kanata, ON K2K 2E6, Canada.
Accurate pedestrian trajectory prediction is important for proactive road-safety applications, particularly at urban intersections where pedestrian motion is shaped by both vehicle interactions and crossing context. This study presents a safety-oriented trajectory-prediction framework that combines pedestrian motion history with Time-to-Collision (TTC) information and crossing-zone indicators. Using naturalistic trajectories from one urban intersection in the inD (Intersection Drone) dataset, several neural architectures were evaluated with 1.6 s observation and 2.4 s prediction horizons. A pooled Long Short-Term Memory (LSTM) separately encodes TTC histories and crossing-zone context before integrating them with pedestrian positions. In addition to conventional Average Displacement Error (ADE) and Final Displacement Error (FDE), prediction performance was assessed using the frequency and magnitude of errors exceeding a study-defined 1 m tolerance. A weighted loss was also introduced to place greater training emphasis on large coordinate-wise errors. Applying this loss to the position-only LSTM reduced ADE from 0.210 to 0.190 m and FDE from 0.550 to 0.503 m, while reducing ADE and FDE exceedance counts by 34.8% and 19.8%, respectively. The final pooled configuration incorporating TTC and crossing-zone information achieved an ADE of 0.184 m and FDE of 0.491 m, with further reductions of 33.5% and 6.3% in ADE and FDE exceedance counts relative to the safety-oriented position-only LSTM. The results indicate that safety-oriented training and structured integration of interaction and contextual information can reduce large trajectory-prediction errors, although broader validation across pedestrians, sites, and datasets is required.
Erel Avineri, Yftach Gil, Yehudit Aperstein
Energy and Power Systems Engineering, Afeka Academic College of Engineering, Tel Aviv, Israel · Intelligent Systems, Afeka Academic College of Engineering, Tel Aviv, Israel