Spatial-Temporal Risk-Attentive Prediction
- Spatial-temporal risk-attentive trajectory prediction is a class of methods integrating motion encoding with explicit risk evaluation to forecast future trajectories in autonomous driving.
- The framework employs risk potential fields and cross-attention decoders to fuse collision-relevant behaviors into spatial-temporal features.
- These methodologies improve prediction accuracy in high-risk scenarios and support safe planning by differentiating between subjective and objective risk factors.
Spatial-temporal risk-attentive trajectory prediction denotes a class of autonomous-driving prediction architectures in which spatial-temporal motion encoding is coupled with an explicit notion of safety risk, so that future trajectories are conditioned not only on observed kinematics and social interactions but also on perceived collision-relevant behaviors of nearby agents. In STRAP, the framework incorporates a risk potential field to assess perceived risks arising from behaviors of nearby vehicles, embeds that field into extracted spatial-temporal feature representations through a risk-attentive feature fusion decoder, and uses a risk-scaled loss function to improve prediction accuracy in high-risk scenarios such as short relative spacing (Ning et al., 11 Jul 2025). Closely related formulations extend the same agenda through continuous multi-horizon risk profiling (Ning et al., 30 May 2026), uncertainty-aware neural processes for vehicle prediction (Luo et al., 2024), predictive risk fields for safe planning (Han et al., 30 Jun 2025), offline risk re-weighting of CVAE training (Thuremella et al., 2024), and predictive collision-risk assessment based on trajectory prediction in highway settings (Meng et al., 2023).
1. Problem setting and scope
The framework is situated in the standard autonomous-driving forecasting problem: given a finite history of the ego vehicle and surrounding vehicles, estimate future trajectories over a prediction horizon while preserving sensitivity to interaction structure and safety-critical context. In STRAP, the input for each vehicle at time is a state vector augmented with risk features , where the added channels encode perceived subjective and objective risk. In RHP, the corresponding input is the past $3$ s of states for the ego and neighboring vehicles, including positions, velocities, accelerations, lane IDs, and historical risk signals (Ning et al., 11 Jul 2025, Ning et al., 30 May 2026).
The output space is likewise risk-conditioned. STRAP predicts, for each future step, a 5-parameter bivariate Gaussian after fusing intention and mode-specific risk. RHP predicts multimodal futures by decoding learnable trajectory queries into, for each mode and each future time, a bivariate Gaussian, a velocity vector, and a mode probability . GRANP addresses the same trajectory-prediction problem from the perspective of uncertainty quantification: its decoder outputs diagonal Gaussian parameters per future step so that predicted variances serve directly as per-coordinate uncertainty estimates (Ning et al., 11 Jul 2025, Ning et al., 30 May 2026, Luo et al., 2024).
A central distinction within this literature is that “risk” is not treated as a purely epistemic quantity. In the STRAP and RHP formulations, risk is computed explicitly from relative geometry and anticipated encounter timing; in GRANP, uncertainty is induced through a latent generative model; and in the planning-oriented formulations, risk is propagated into downstream path evaluation and maneuver selection. This separation is important because it prevents conflation of collision-relevant interaction cues with predictive dispersion alone.
2. Risk representations and potential fields
STRAP formalizes instantaneous pairwise risk between a subject vehicle and a neighbor 0 through two complementary fields: Subjective Proximity Risk (S-field) and Objective Collision Risk (O-field). The S-field depends on longitudinal and lateral offsets together with scaling factors and shape exponents, while the O-field depends on predicted minimum future gap 1 and time of closest approach 2, again modulated by distance/time scales and shape exponents. Total subjective and objective risks perceived by vehicle 3 are obtained by summing pairwise terms over all neighbors: 4 These aggregated quantities are then used both as features and as training-time weighting factors (Ning et al., 11 Jul 2025).
RHP generalizes this idea into a continuous, learnable composite potential field 5 for each vehicle pair 6. Its subjective component 7 models spatial proximity through parameters 8; its objective component 9 models temporal hazard through time-to-encounter 0 and minimum separation 1. The total pairwise potential is
2
and the ego’s overall risk at 3 is 4. RHP then computes risk distributions across multiple future horizons for each intention mode, rather than treating risk as a single auxiliary scalar derived only from the past (Ning et al., 30 May 2026).
The planning-oriented framework of predictive risk analysis formulates a spatio-temporal discretized predictive risk field 5 on a 2D grid over future time layers. Dynamic-object risk combines a positional term 6 and a kinematic term 7, static obstacles contribute 8, and the total predictive field is
9
This representation is explicitly designed for path-wise risk aggregation and safe trajectory generation, rather than only for trajectory forecasting (Han et al., 30 Jun 2025).
These formulations collectively show that, in this research line, risk is encoded as a structured field over social configuration, relative motion, and future horizon. A plausible implication is that the field formalism provides a common interface between perception-conditioned forecasting and downstream planning modules, because it can be evaluated both at the feature level and along candidate future paths.
3. Spatial-temporal encoding of motion and interaction
The spatial-temporal encoder in STRAP has three stages. First, each vehicle state 0 and its risk feature 1 are combined through a fully connected motion embedding,
2
and a shared LSTM over vehicles and time produces 3. Second, a spatial encoder applies multi-head self-attention among all vehicles at each time step, followed by Gated Linear Unit, residual connection, and layer normalization. Third, a temporal encoder adds sinusoidal positional encoding and applies multi-head self-attention along the time dimension, again followed by GLU and layer normalization. The spatial and temporal blocks may be stacked 4 times for deeper representations (Ning et al., 11 Jul 2025).
RHP adopts essentially the same encoder template, but places it in an explicitly end-to-end pipeline with a downstream Risk Horizon Profiling module. Its spatial-temporal encoder starts with an MLP 5 LSTM to obtain low-level embeddings, then uses multi-head self-attention + GLU layers for spatial interaction at each time step, and positional-encoded self-attention + GLU for temporal aggregation, stacked 6 times to produce a context tensor
7
This architecture keeps the interaction encoder fully differentiable while preserving explicit channels for risk-conditioned downstream processing (Ning et al., 30 May 2026).
Related work clarifies the broader architectural lineage. GRANP constructs an undirected interaction graph 8 over the ego and neighbors in a 9 ft grid, uses edge weights $3$0 if both vehicles are in the grid, applies stacked Graph Attention Networks, processes the GAT-updated features with a shared LSTM, and then uses a 1D-convolutional and MLP stack to produce fixed-length embeddings for context and target sets. The earlier CSP-GAN-LSTM framework uses a three-channel LSTM encoder-decoder: the target vehicle’s own temporal motion, local spatial interaction via Convolutional Social Pooling, and distant/global interaction via Graph Attention Network. Across these models, the common motif is explicit factorization of temporal memory and social interaction, with risk-attentive frameworks adding a separate risk channel rather than discarding that factorization (Luo et al., 2024, Meng et al., 2023).
4. Risk-attentive decoding, intention modeling, and training objectives
STRAP’s decoder is organized around risk-attentive feature fusion. It first predicts a 2D terminal position and velocity $3$1 for each neighbor by flattening that neighbor’s encoded slice $3$2. It then discretizes target intentions by applying $3$3-means to ground-truth final positions to obtain a codebook $3$4, and for each mode $3$5 it re-evaluates the S-/O-fields between the target’s mode endpoint and each neighbor’s $3$6 to compute mode-specific risk $3$7. The risk-intention pair is embedded into $3$8, passed through $3$9 layers of multi-head cross-attention with the target’s encoded features 0 as key/value, and finally decoded by an LSTM+MLP trajectory generator into a 5-parameter bivariate Gaussian at each future step (Ning et al., 11 Jul 2025).
Its training objective explicitly up-weights high-risk samples. STRAP combines a neighbor goal MSE and a target trajectory loss consisting of MSE + NLL, then multiplies the sum by a risk scaling factor: 1 By construction, 2 grows in high-risk settings, so the model is optimized to improve accuracy precisely where prediction errors are most safety-critical (Ning et al., 11 Jul 2025).
RHP replaces explicit risk scaling with explicit horizon profiling inside the decoder. For each of 3 intention modes and 4 horizons, it computes raw risk 5, embeds these values into 6, and aggregates them through softmax-based cross attention. Using the 1 s risk embedding as query, the horizon-weighted risk feature is
7
The decoder then cross-attends risk features into learnable trajectory queries, cross-attends ego context through a standard transformer decoder block, and predicts Gaussian parameters, velocities, and mode probabilities. The total loss is
8
where 9 supervises auxiliary coarse endpoints and 0 combines best-mode NLL, velocity MSE, and classification loss (Ning et al., 30 May 2026).
GRANP offers a contrasting decoder design. After producing deterministic and latent representations in Neural Processes terminology, it models
1
and predicts a diagonal Gaussian for each future time step. Its negative-ELBO objective contains a reconstruction term and a KL divergence between the posterior and context-conditioned latent distributions. The predicted diagonal variances 2 serve directly as per-coordinate uncertainty estimates. This establishes a useful technical distinction: in GRANP, the decoder’s variance is the uncertainty output; in STRAP and RHP, the principal risk signal is computed from an explicit potential field and then fused into the decoder (Luo et al., 2024).
5. Empirical performance, ablations, and interpretability
The reported quantitative results show that risk-attentive designs are evaluated primarily on NGSIM, highD, SHRP2, and NuScenes, with metrics including RMSE, ADE/FDE, minFDE, most-likely FDE, KDE-NLL, and horizon-importance weight distributions. STRAP uses 3 s history, 4 s forecast, and a 5 train/val/test split; RHP evaluates on highD and SHRP2; the risk-aware Trajectron++ variant of Thuremella et al. follows the Trajectron++ split and augmentation protocol on NuScenes (Ning et al., 11 Jul 2025, Ning et al., 30 May 2026, Thuremella et al., 2024).
| Framework | Dataset(s) | Reported result |
|---|---|---|
| STRAP-R | NGSIM, highD | NGSIM: STDAN 6 m 7 m (8); highD: 9 m 0 m (1) |
| RHP | highD, SHRP2 | 2 reduction in 5 s RMSE on highD; SHRP2 5 s minFDE 3 m 4 m (5) |
| Risk-aware Trajectron++ | NuScenes | Vehicle FDE @ 3 s: baseline 6 m, Location-Risk only 7 m; high-risk-location FDE 8 m 9 m |
STRAP reports additional short-term gains on NGSIM versus STDAN: 1 s horizon 0 m 1 m (2), 2 s 3 m 4 m (5), and 3 s 6 m 7 m (8). In high-risk NGSIM scenarios with a 5 s forecast, it reports collision-within-1 s RMSE 9 m 0 m (1), collision-within-2 s 2 m 3 m (4), collision-within-3 s 5 m 6 m (7), collision-within-5 s 8 m 9 m (00), and non-collision 01 m 02 m (03). Its ablation on average NGSIM RMSE shows 04SE 05 m 06, 07TE 08 m 09, 10RFF 11 m 12, and full STRAP-R 13 m (Ning et al., 11 Jul 2025).
RHP reports a 14 improvement in 1 s minADE on SHRP2, and its ablations isolate the role of horizon profiling: removing auxiliary coarse endpoints yields small/no gains; using only final-step risk helps high-risk but not overall; feeding all horizons uniformly degrades performance; and learned horizon importance improves both crash and non-crash. The best results occur when the query is the 1 s risk. Qualitative analysis shows that crash cases shift attention weight toward 5 s while safe cases shift weight toward 1 s, and in a near-crash sequence the 5 s horizon weight increases as objective risk rises and then recedes after the evasive maneuver. GRANP complements these findings with interpretability tools of a different type: GAT attention coefficients 15 can rank which neighbors the ego vehicle is “listening to,” and predicted 16 can be visualized as a 95% confidence-interval tube around the mean path, with more complex maneuvers such as lane changes yielding higher predicted 17 (Ning et al., 30 May 2026, Luo et al., 2024).
6. Relation to safe planning and conceptual distinctions
A major extension of the framework is its use as an interface between forecasting and downstream motion planning. In predictive risk analysis and safe trajectory planning, a local risk-aware LSTM + self-attention predictor first estimates future trajectories of dynamic agents, after which a spatio-temporal discretized predictive risk field is constructed on a grid over future layers. Candidate ego paths are then scored by cumulative risk,
18
peak risk,
19
and a risk-based feasibility condition that declares a path unsafe if the field exceeds 20. The paper further reports a slice-and-speed implementation with an overall loop time of approximately 21 ms, corresponding to a planning rate greater than 22 Hz in both simulation and real-vehicle tests (Han et al., 30 Jun 2025).
The highway-oriented predictive collision-risk assessment framework uses a different but related coupling. It predicts object-vehicle trajectories with CSP-GAN-LSTM, generates nine candidate autonomous-vehicle trajectories, computes time-to-collision (TTC) and minimal distance margin (MDM) continuously in time between predicted object trajectories and each candidate ego maneuver, and aggregates per-object risk through a no-collision product to form 23. The planner then chooses the trajectory that satisfies comfort/safety constraints and minimizes peak or integrated risk. This formulation makes the risk-attentive connection explicit: future trajectories “attend” the planner through a risk surface over future time and maneuver parameters (Meng et al., 2023).
The literature also shows that risk-attentive prediction does not require a single architectural pattern. Thuremella et al. retain the Trajectron++ CVAE architecture unchanged and instead inject risk by re-weighting the ELBO with offline location-based and speed-based risk factors computed from a 24 scene grid and a stationarity criterion. Their results improve most-likely FDE and KDE-NLL overall, improve performance on high-speed vehicles, and improve accuracy in high-risk locations, while pedestrian results change only marginally (Thuremella et al., 2024). This is significant because it shows that the research area contains both architectural risk fusion methods and objective-level risk re-weighting methods.
A persistent technical distinction, therefore, is between risk-aware prediction, uncertainty-aware prediction, and risk-aware planning. STRAP and RHP encode explicit risk potential fields and use cross-attention or horizon profiling to inject those fields into decoding; GRANP quantifies predictive uncertainty through latent distributions and diagonal variances; predictive risk analysis and collision-risk assessment propagate predicted trajectories into path-level safety costs. This suggests that the “spatial-temporal risk-attentive trajectory prediction framework” is best understood not as a single model family with one canonical implementation, but as a modular research program linking interaction encoding, explicit risk representation, decoder-side fusion, and planning-aware supervision or evaluation (Ning et al., 11 Jul 2025, Ning et al., 30 May 2026, Luo et al., 2024).