Trajectory-Constrained Deep Latent Visual Attention for Improved Local Planning in Presence of Heterogeneous Terrain

Stefan Wapnick, Travis Manderson, David Meger, Gregory Dudek · DOI

Introduction

Navigating unstructured, off-road environments presents a significant challenge for autonomous systems. Unlike structured urban environments, off-road terrains are characterized by diverse surfaces such as mud, grass, and rock, often masking hidden obstacles and providing varying levels of traction. While deep learning models have shown promise in capturing these complex dynamics, they often suffer from a lack of transparency, susceptibility to spurious correlations (e.g., associating background trees with traversable ground), and high data requirements.

To address these issues, this work introduces a "trajectory-constrained" visual attention mechanism. By grounding the neural network's focus specifically on the path the vehicle is intended to traverse, the system improves generalization and data efficiency in heterogeneous terrains.

Visualizing trajectory-constrained attention: The model evaluates multiple potential paths, focusing on the immediate terrain to predict outcomes like collisions (red) or safe passage (green).

Methodology

The proposed architecture is a reward-predictive, model-based system that operates in two primary stages: latent visual attention and event prediction.

Latent Visual Attention

Rather than applying attention directly to high-dimensional raw pixels, the model operates on latent feature maps. A Convolutional Neural Network (CNN) encodes the input observation $o_t$ into a feature map $\mathcal{F}_t$. Simultaneously, an LSTM-based Attention-Prediction Net predicts the vehicle's future spatial coordinates based on a sequence of control actions $a_t$. These coordinates are transformed into a Gaussian attention mask $M_{t+i}$, which filters the latent feature maps to focus only on relevant terrain features.

Trajectory-Constraint Loss

A key innovation is the trajectory-constraint loss applied during training. The model is penalized if the predicted attention mask deviates from the ground-truth path taken by the vehicle. This ensures the attention mechanism remains physically grounded in the vehicle's motion, preventing the model from overfitting to irrelevant background "distractor" features.

The full model architecture, featuring the Observation Encoder, the Attention-Prediction Net for generating trajectory-based masks, and the Event-Prediction Net for forecasting navigation outcomes.

Event Prediction and Planning

The filtered latent features are passed to an Event-Prediction Net (another LSTM), which forecasts future events such as collisions, turbulence, or progress toward a goal. For real-time navigation, the system employs the Cross Entropy Method (CEM) to simulate thousands of potential action sequences, selecting the trajectory with the highest predicted reward.

Experimental Evaluation

The model was evaluated across diverse environments, including Unreal Engine 4 (UE4) simulations and real-world buggy data.

  • Toy Correlated Scenery: Designed to test robustness against spurious correlations by swapping terrain types and background scenery between training and testing.
  • Procedural Off-Road Simulation: A large-scale environment with multiple terrain classes and obstacles.
  • Real-World Data: 12,000 labeled samples from a 1:5 scale electric buggy in a 0.25 $km^2$ off-road area.
  • Icy Hill Climbing: A high-difficulty simulation requiring precise control on slippery slopes.

Key Results

The trajectory-constrained model demonstrated superior performance across several metrics:

  • Generalization: In novel simulated environments, the method achieved an episodic return of 444.8, significantly higher than the no-attention baseline (380.9).
  • Safety: The system completed 90.8% of test routes without collision, outperforming both no-attention (87.3%) and standard self-attention (87.9%) variants.
  • Data Efficiency: By focusing on causally relevant features, the model reached high accuracy with fewer training samples.
  • Robustness: In the "Toy Experiment," the model maintained 87% accuracy when background scenery was swapped, whereas standard self-attention models dropped to 58%, proving that unconstrained attention often focuses on irrelevant environmental cues.

Discussion and Limitations

Grounding attention in physics by tying it to future coordinates forces the model to learn the causal relationship between ground texture and vehicle dynamics. This approach enables real-time local planning by running the heavy CNN encoder only once per frame, then evaluating hundreds of "what-if" trajectories using lightweight LSTMs.

However, the approach currently depends on reliable state estimation (e.g., GPS) for ground-truth trajectory labels during training. Additionally, while the attention follows the planned path, it does not yet explicitly account for dynamic obstacles that might enter the path after the initial observation. Future work will focus on extending live testing in diverse real-world conditions and integrating dynamic obstacle avoidance.

Summary updated

BibTeX
@inproceedings{wapnick2021trajectory,
  author = {Stefan Wapnick and Travis Manderson and David Meger and Gregory Dudek},
  title = {{Trajectory-Constrained Deep Latent Visual Attention for Improved Local Planning in Presence of Heterogeneous Terrain}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2021},
  doi = {10.1109/iros51168.2021.9636422},
}
Figure