VertiFormer : A Data-Efficient Multi-Task Transformer for Off-Road Robot Mobility Mohammad Nazeri 1 , Anuj Pokhrel 1 , Alexandyr Card 1 , Aniket Datar 1 , Garrett Warnell 2 3 and Xuesu Xiao 1 Abstract Sophisticated learning architectures, e.g., Transformers, present a unique opportunity for robots to understand complex vehicle-terrain kinodynamic interactions for off-road mobility. While internet-scale data are available for Natural Language Processing (NLP) and Computer Vision (CV) tasks to train Transformers, real-world mobility data are difficult to acquire with physical robots navigating off-road terrain. Furthermore, training techniques specifically designed to process text and image data in NLP and CV may not apply to robot mobility. In this paper, we propose VertiFormer , a novel data-efficient multi-task Transformer model trained with only one hour of data to address such challenges of applying Transformer architectures for robot mobility on extremely rugged, vertically challenging, off-road terrain. Specifically, VertiFormer employs a new learnable masked modeling and next token prediction paradigm to predict the next pose, action, and terrain patch to enable a variety of off-road mobility tasks simultaneously, e.g., forward and inverse kinodynamics modeling. The non-autoregressive design mitigates computational bottlenecks and error propagation associated with autoregressive models. VertiFormer ’s unified modality representation also enhances learning of diverse temporal mappings and state representations, which, combined with multiple objective functions, further improves model generalization. Our experiments offer insights into effectively utilizing Transformers for off-road robot mobility with limited data and demonstrate our efficiently trained Transformer can facilitate multiple off-road mobility tasks onboard a physical mobile robot 1 1 1 https://github.com/mhnazeri/VertiFormer . . I Introduction Autonomous mobile robots deployed in off-road environments face significant challenges posed by the underlying terrain. For example, irregular terrain topographies featuring vertical protrusions from the ground pose extensive risks of vehicle rollover and immobilization [ 9 , 47 , 20 ] . Off-road mobility challenges thus manifest in several critical ways: compromised stability, leading to potential rollover; increased wheel slippage, resulting in reduced traction and impaired locomotion; and the potential for mechanical damage to robots’ chassis or drive systems. Precisely understanding the vehicle-terrain kinodynamic interactions is the key to mitigating such mobility challenges posed by off-road terrain. Although data-driven approaches have shown promises in enabling off-road mobility in relatively flat environments [ 61 , 64 , 90 , 80 , 28 , 43 , 91 , 9 , 18 , 83 , 77 , 13 , 68 , 12 ] , the intricate relationships between the robot chassis and vertically challenging terrain, e.g., suspension travel, tire deformation, changing normal and friction forces, and vehicle weight distribution and momentum, motivate the adoption of more sophisticated learning architectures to fully capture and represent the nuanced off-road kinodynamics [ 20 ] . Transformers are the preferred architectures to understand complex relationships, which show promises in Natural Language Processing (NLP) [ 70 , 22 , 71 , 10 ] and Computer Vision (CV) [ 34 , 29 , 32 , 60 , 44 , 65 ] with self-supervised pre-training emerging as a dominant methodology. This trend is now extending to robotics, impacting areas such as manipulation [ 62 , 27 , 75 , 76 , 38 ] and autonomous driving [ 36 , 53 , 37 , 5 , 89 , 54 , 1 ] . In addition to the advent of the well-studied Transformer architecture [ 84 , 25 ] , this progress is largely attributable to the availability of large-scale datasets [ 62 , 82 , 11 ] as well as various Transformer training techniques including two primary pre-training paradigms: (i) Masked Modeling (MM) and (ii) autoregressive Next-Token Prediction (NTP) [ 14 ] . However, such benefits are not available nor suitable for off-road robot mobility yet. The application of these paradigms to robotics is particularly limited due to the inherent challenges associated with acquiring large-scale robotics datasets, especially when outdoor, off-road environments are involved for mobility tasks. Consequently, the effective utilization of data-intensive Transformer models to enable off-road mobility remains an open research question [ 30 ] . Further research is also required to investigate the adaptability of existing NLP and CV training paradigms to better suit the unique characteristics of off-road mobility data and tasks. Motivated by these research gaps, this work presents VertiFormer , a novel data-efficient multi-task Transformer model for robot mobility on extremely rugged, vertically challenging, off-road terrain. Most notable among all of VertiFormer ’s unique features, the novel unified latent representation of robot exteroception, proprioception, and action provides a stronger inductive bias and facilitates more effective learning from only one hour of data, compared to the existing practices of separate tokenization of different modalities and sole reliance on the self-attention mechanism to learn inter-modal correlations in NLP and CV with massive datasets. Furthermore, the non-autoregressive nature of VertiFormer avoids error propagation from earlier to later prediction steps and makes VertiFormer faster at inference because it does not require iterative queries for each step. Additionally, VertiFormer ’s learnable mask enables various off-road mobility tasks within one model simultaneously without the need to retrain separate downstream tasks and mitigates the impact of missing modalities at inference time. VertiFormer outperforms the navigation performance achieved by state-of-the-art kinodynamic modeling approaches specifically designed for vertically challenging terrain [ 19 ] , providing empirical evidence supporting the feasibility of training Transformer models on limited robotic datasets using effective training strategies. We also investigate optimal methodologies for employing Transformers, encompassing both TransformerEncoder and TransformerDecoder parts, to facilitate effective learning from limited off-road mobility data. Our contributions can be summarized as follows: • a Transformer architecture, VertiFormer , whose unified latent representation, learnable masked modeling, and non-autoregressive nature simultaneously enable multiple off-road mobility tasks with one hour of data; • a comprehensive evaluation of different Transformer designs, including MM, NTP, Encoder only, and Decoder only, for off-road kinodynamic representation; and • physical on-robot experiments for different off-road mobility tasks on vertically challenging terrain. II Related Work Transformers, initially proposed for language translation task, have demonstrated remarkable versatility across a spectrum of domains, including CV and robotics. This section provides an overview of key advancements in each of these areas, as well as existing work in data-driven off-road mobility. II-A Transformers in NLP and CV. The Transformer architecture originated from the seminal work of Vaswani et al. 2017 in machine translation. Subsequent research has explored the effects of different Transformer parts, including using only the TransformerEncoder (BERT [ 22 ] ) or TransformerDecoder (GPT series [ 70 , 71 , 10 ] ). Other works explored optimization techniques such as adopting a warm-up phase for training Transformers [ 92 ] , specific initialization and optimization methods to train deep Transformers with limited data [ 93 ] , as well as normalization techniques [ 51 ] . Early explorations of Transformers in CV include iGPT [ 16 ] . A significant breakthrough came with the introduction of Vision Transformers (ViT) by Dosovitskiy et al. 2021 . Subsequent research focused on refining training methodologies and enhancing performance, such as incorporating auxiliary tasks [ 49 ] for spatial understanding, two-stage training (self-supervised view prediction followed by supervised label prediction) [ 31 ] , different token representations [ 52 ] , architectural modifications [ 94 ] , working in embedding space by JEPA family [ 2 , 6 , 7 ] , data augmentation and regularization [ 81 ] , and Masked Autoencoders [ 34 ] with random patch encoding for training stabilization [ 17 ] . Similar to the autoregressive nature of NLP tasks, Rajasegaran et al. 2025 provided empirical guidelines to train Transformers on large-scale video data autoregressively. Despite the plethora of NLP and CV Transformers trained with internet-scale datasets, existing common training practices may not apply to robot learning with small real-world data, especially for off-road robot mobility. II-B Transformers in Robotics. Recent years have witnessed a surge in the application of Transformers to robotics, encompassing both perception and planning: Generalist robot policies based on Transformers, e.g., Octo [ 59 ] and CrossFormer [ 24 ] , with multi-modal sensory input [ 42 ] and action tokenization [ 67 ] aim to handle diverse tasks such as manipulation and navigation; Studies in target-driven [ 26 , 85 , 57 , 39 ] and image-goal navigation [ 66 , 48 ] show that Transformers significantly outperform traditional behavior cloning baselines [ 69 , 8 , 58 ] ; Reinforcement learning has been significantly enhanced by integrating the Transformer architecture, providing improved sequence modeling [ 96 ] and decision-making capabilities [ 15 ] ; Transformers have also been used in motion planning to guide long-horizon navigation tasks [ 46 ] and reduce the search space for sampling-based motion planners [ 41 ] ; In Unmanned Surface Vehicles (USV), MarineFormer [ 45 ] utilizes Transformers to learn the flow dynamics around a USV and then learns a navigation policy resulting in better path length and completion rate. A common characteristic of these models is their treatment of each sensor modality (e.g., vision, touch, and audio) as a distinct token, relying on the Transformer to learn the inter-modal correlations and their temporal dynamics. While this approach allows for flexible integration of diverse sensory information, it necessitates substantial amounts of training data to compensate for the lack of inductive bias inherent in Transformers [ 25 ] . This data dependency poses a significant challenge, particularly in off-road robot mobility, where real-world, outdoor data acquisition can be expensive and time-consuming. Consequently, there remains a critical need for research focused on refining training methodologies and exploring architectural modifications specifically tailored to address the data scarcity often encountered in robotics. II-C Learning Off-Road Mobility. While most learning approaches for off-road autonomy focus on perception tasks [ 91 , 87 , 40 ] , researchers have recently investigated off-road mobility to account for vehicle stability [ 4 , 47 , 21 , 68 ] , wheel slippage [ 78 , 79 , 77 ] , and terrain traversability [ 28 , 83 , 13 , 74 , 12 ] . A relevant work by Xiao et al. 2024 aims to use Transformers to enable a universal forward kinodynamics model that can drive different ground vehicles. Most of these approaches adopted specific techniques designed to address one particular off-road mobility task with non-Transformer architectures. Focusing on kinodynamic representation for off-road mobility, our non-autoregressive VertiFormer employs a novel variation of MM and NTP paradigms and a unified modality latent representation to predict the next pose, action, and terrain patch in order to simultaneously enable a variety of off-road mobility tasks, e.g., forward and inverse kinodynamics modeling, behavior cloning, and terrain patch reconstruction, without a specific training procedure for each. III VertiFormer We introduce VertiFormer , a data-efficient multi-task Transformer model for kinodynamic representation and navigation on complex, vertically challenging, off-road terrain. We propose an efficient training methodology for training VertiFormer utilizing limited (one hour) robotics data, including unified multi-modal latent representation, learnable masking, and non-autoregressive training to improve data efficiency by enabling multi-task learning. Fig. 0 : VertiFormer Architecture . VertiFormer employs a TransformerEncoder (left) to receive a history of terrain patches, actions, and poses along with multiple context tokens. To predict future states, the model computes cross-attention between these context tokens and the masked upcoming actions or poses. Causal masking is implemented during this cross-attention computation to ensure that predictions are conditioned only on past and present information, preventing information leakage from future time steps. III-A VertiFormer Training III-A 1 Unified Multi-Modal Latent Representation VertiFormer consists of both TransformerEncoder ( VertiEncoder ) and TransformerDecoder ( VertiDecoder ), as illustrated in Fig. 0 left and right, respectively. Consistent with established practices [ 19 , 56 ] , VertiFormer receives a multi-modal sequence of actions \mathbf{a_{\text{0:T}}} , robot poses \mathbf{p_{\text{0:T}}} , and the underlying terrain patches \mathbf{i_{\text{0:T}}} . The VertiEncoder first applies an independent linear mapping to each modality. Specifically, action commands \mathbf{a_{\text{0:T}}} are projected into an embedding space via a linear function f_{a} , yielding \mathbf{\hat{a}_{\text{0:T}}} . Analogously, robot poses \mathbf{p_{\text{0:T}}} and terrain patches \mathbf{i_{\text{0:T}}} are transformed using linear mappings f_{p} and f_{i} respectively, producing a sequence of embeddings \mathbf{\hat{p}_{\text{0:T}}} and \mathbf{\hat{i}_{\text{0:T}}} . This initial linear mapping can be formally expressed as: \displaystyle\hat{a}_{\text{t}} \displaystyle=f_{a}(a_{\text{t}})=W_{a}a_{\text{t}}+b_{a},a_{\text{t}}\in\mathbf{a_{\text{0:T}}}, (1) \displaystyle\hat{p}_{\text{t}} \displaystyle=f_{p}(p_{\text{t}})=W_{p}p_{\text{t}}+b_{p},p_{\text{t}}\in\mathbf{p_{\text{0:T}}}, (2) \displaystyle\hat{i}_{\text{t}} \displaystyle=f_{i}(i_{\text{t}})=W_{i}i_{\text{t}}+b_{i},i_{\text{t}}\in\mathbf{i_{\text{0:T}}}, (3) where W_{a} , W_{p} , and W_{i} represent the weight matrices, and b_{a} , b_{p} , and b_{i} denote the bias vectors for each respective modality. To facilitate effective cross-modal interaction within VertiFormer , it is crucial to establish a consistent distributional characteristic across the modality-specific embeddings. Therefore, a subsequent linear transformation, denoted by f_{s} , is applied to the concatenation ( \cdot ) of embeddings: \displaystyle z_{\text{t}} \displaystyle=f_{s}(\hat{a}_{\text{t}},\hat{p}_{\text{t}},\hat{i}_{\text{t}})=W_{s}(\hat{a}_{\text{t}}\cdot\hat{p}_{\text{t}}\cdot\hat{i}_{\text{t}})+b_{s},t\in[0:T], (4) with W_{s} and b_{s} denoting the weight matrix and bias vector for f_{s} , respectively. This shared linear mapping f_{s} aims to project all embeddings into a unified latent space, minimizing potential discrepancies in statistical properties. The resulting unified tokens, \mathbf{z_{\text{0:T}}} , are then passed as input to the VertiEncoder (Fig. 0 top left). This procedure ensures a homogeneous input representation for the subsequent encoding layers, crucial for effective multi-modal fusion of robotic data. Empirical results (Fig. 3 ) supporting the importance of such a unified representation, in contrast to the conventional individual modality representations, will be presented in Section IV . III-A 2 Learnable Masking for Multi-Task Learning Combined with our unified representation, we also propose a stochastic learnable MM technique (Fig. 0 top right) to allow VertiFormer to perform multiple predictive tasks, including next pose prediction, action prediction, behavior cloning, and terrain patch prediction (Fig. 0 bottom right). This multi-task learning paradigm is hypothesized to enhance data efficiency by leveraging shared latent representations across related tasks, thereby mitigating the challenges associated with restricted data availability. During training, we first warm up the model for a few epochs with all modalities, then two distinct data masking methods are applied with equal probability (Fig. 0 top right): • Action-Conditioned Pose Prediction: In 50% of the training instances, actions generated by human demonstration \tau steps into the future, denoted as \mathbf{a_{\text{T+1:T}+\tau}} , are provided as input. Concurrently, the corresponding future poses, \mathbf{p_{\text{T+1:T}+\tau}} , are replaced with a learnable mask. This configuration compels the model to predict future poses conditioned on the provided future actions and the preceding historical context, similar to the Forward Kinodynamic Modeling (FKD) task in off-road mobility. • Pose-Conditioned Action Prediction: In the remaining 50% of instances, the inverse scenario is implemented. Future poses, \mathbf{p_{\text{T+1:T}+\tau}} , are provided as input, while the corresponding future actions, \mathbf{a_{\text{T+1:T}+\tau}} , are masked using another learnable mask. This prompts the model to predict future actions conditioned on the provided future poses and the historical context, similar to the Inverse Kinodynamic Modeling (IKD) task in off-road mobility. This alternating masking strategy along with our unified representation promotes the learning of a joint representation that is capable of decoding both action and pose information. The utilization of this novel learnable mask allows the model to dynamically adapt the masking pattern. The learnable mask can be conceptualized as a learnable gating mechanism that selectively filters information flow during training. Furthermore, by extending this masking strategy to mask both future actions, \mathbf{a_{\text{T+1:T}+\tau}} , and future poses, \mathbf{p_{\text{T+1:T}+\tau}} , simultaneously, VertiFormer is able to perform Behavior Cloning (BC) in a zero-shot manner. In this configuration, the model predicts both actions and poses solely based on the historical context, effectively mimicking the demonstrated behavior without requiring explicit information about future actions and poses from a planner. III-A 3 Non-Autoregressive Training Building upon the works by Octo Model Team et al. 2024 and Doshi et al. 2024 , VertiFormer employs multiple context tokens to represent a distribution of plausible future states. These context tokens serve to inform VertiDecoder in predicting both the future ego state and the evolution of the environment. Having multiple context tokens allows VertiFormer to predict the future non-autoregressively. The non-autoregressive nature of the proposed architecture is motivated by the potential computational bottlenecks inherent in autoregressive models, which require querying the model multiple times and are subject to drifting due to error propagation from earlier steps. By learning multi-context representations, the non-autoregressive approach aims to improve both training efficiency and inference speed—a critical consideration for real-time robotic control applications. We train VertiFormer by minimizing the Mean Squared Error (MSE) between the model’s predictions and the corresponding ground truth values. Model evaluation is performed by calculating the error rate between the model’s predictions and the ground truth values on a held-out, unseen dataset. III-B VertiFormer Inference During FKD inference, VertiEncoder receives the same historical input as training. VertiDecoder receives sampled actions from an external sampling-based planner (e.g., MPPI [ 88 ] ) while masking the corresponding poses, compelling the model to predict future poses based solely on the sampled actions (and the context tokens) so that the planner can choose the optimal trajectory to minimize a cost function. For IKD, a global planner generates desired future poses, and by masking the actions we encourage the model to predict future actions to achieve these globally planned poses. By masking both actions and poses, VertiFormer can perform zero-shot BC. As a reference, we examine the average error rate of VertiFormer ’s pose predictions across \tau=3 future time steps in one second (3 Hz). We focus on the average error rate across the three pose components, \mathbf{X} , \mathbf{Y} , and \mathbf{Z} . The performance of VertiFormer is compared against two baseline models: tal [ 19 ] and Nazeri et al. 2024a . Notice that tal is a highly accurate forward kinodynamic model specifically designed for vertically challenging terrain, and Nazeri et al. 2024a only employs a TransformerEncoder with random masking. † † nicematrix-placeholder: NiceTabular (nicematrix) We provide VertiFormer ’s architecture parameters in Appendix A and qualitative samples of FKD in Fig. 8 of Appendix C . The implementation details along with the one-hour dataset description are provided in Appendix B . IV Training VertiFormer with One Hour of Data We conduct extensive experiments to demonstrate the efficacy of various features of VertiFormer to allow it to be trained with only one hour of data. We also present our findings in a way that highlights VertiFormer ’s differences compared to common practices in NLP and CV, where Transformer training practices have been extensively studied [ 92 , 93 , 51 , 17 , 49 , 31 , 81 ] . Therefore, our experiment results also serve as a guideline on how to optimize Transformer training for robotics, particularly in off-road navigation and mobility tasks with complex vehicle-terrain interactions under data-scarce conditions. VertiFormer ’s one hour of training data comes from human-teleoperated demonstration of driving an open-source four-wheeled ground vehicle [ 20 ] on a custom-built off-road testbed composed of hundreds of rocks and boulders. The demonstrator mostly aims to drive the robot to safely and stably traverse the vertically challenging terrain, but still occasionally encounters dangerous situations such as large roll angles and getting stuck between rocks. Fortunately, those situations serve as explorations for VertiFormer to understand a wider range of kinodynamic interactions. Direct application of standard Transformer training methodologies in NLP and CV to such a small robotics dataset proves challenging due to the inherent lack of inductive bias in Transformers [ 25 ] , which necessitates substantial amounts of data for effective training. However, our experiments suggest that VertiFormer ’s judicious modifications to established MM and NTP training paradigms can facilitate effective Transformer training even with limited robotics data. We conduct our experiments based on three perspectives: Section IV-A provides an analysis of basic factors to train Transformers in general; Section IV-B analyzes the best practices to train Transformers when dealing with off-road robot mobility data; Finally, Sec. IV-C evaluates the effectiveness of each off-road mobility learning objective and compares TransformerEncoder, TransformerDecoder, and non-Transformer end-to-end model performances. For fairness, all experiments are conducted with the same hyper-parameters. IV-A Experiment Results of Basic Transformer Factors Fig. 1 : Positional Encoding: Sinusoidal positional encoding achieves better model accuracy than learnable encoding for predicting \mathbf{X} , \mathbf{Y} , and \mathbf{Z} components of the robot pose. Positional encoding is crucial for addressing the permutation equivariance of Transformers, which, by design, lacks inherent sensitivity to input sequence order. This characteristic necessitates the explicit provision of positional information to enable the model to effectively process sequential data. Learnable positional encodings, typically implemented as trainable vectors added to input embeddings, have found favor in CV applications [ 34 ] . Conversely, non-learnable encodings, such as the sinusoidal functions introduced in the seminal work by Vaswani et al. 2017 , have demonstrated efficacy in NLP tasks. This divergence in methodological preference may stem from inherent differences in the statistical properties of data modalities. CV tasks often involve spatially structured data where absolute positional information may be less critical than relative relationships between local features. In such contexts, learnable encodings may offer greater flexibility in adapting to task-specific positional dependencies. Conversely, NLP tasks frequently rely on precise word order and long-range dependencies, where the fixed nature of non-learnable encodings may provide a beneficial inductive bias [ 86 ] . To empirically investigate the relative merits of these approaches on robot mobility tasks, we conduct a comparative analysis of learnable positional encodings against sinusoidal encodings as shown in Fig. 1 . Our findings indicate that while both methods achieve comparable asymptotic performance levels, sinusoidal positional encodings exhibit a slight performance advantage. Fig. 2 : Normalizing Output: Normalizing the Transformer output before passing the embeddings to the task decoder improves model performance. Normalization layers , such as LayerNorm [ 3 ] or RMSNorm [ 95 ] , have been shown to play a crucial role in stabilizing the training of Large Language Models (LLMs) [ 51 ] . By normalizing the activations of hidden units, these layers help to address issues such as vanishing/exploding gradients and improve the overall stability of the training process [ 92 ] . In this study, we investigate the impact of applying RMSNorm layer immediately before the task head. Our experiment results, depicted in Fig. 2 , demonstrate an advantage for a model incorporating RMSNorm layer before the task head. This configuration consistently exhibits improved generalization performance and enhanced training stability compared to a model without the final RMSNorm. This finding suggests that normalizing the final embedding vector before passing it to the task head can benefit model performance, potentially by facilitating more effective gradient flow and thus improving the robustness of the model’s predictions. IV-B Experiment Results from a Robotics Perspective Fig. 3 : Kinodynamics Understanding: Without unified latent representation the model cannot capture temporal dependencies and understand kinodynamic transitions, resulting in an almost flat learning curve. Unified latent space representation offers a significant advantage in simultaneously addressing FKD, IKD, and BC. This unified approach facilitates a more holistic understanding of the robot’s state and its interaction with the environment. To evaluate the efficacy of this unified representation, we perform a targeted ablation study. We train VertiEncoder based on the objectives outlined by Nazeri et al. 2024a and augment them with additional objectives specifically designed to probe the model’s capacity of kinodynamics understanding. A key component of this ablation involves the introduction of a sequence order prediction objective. This objective aims to assess whether the model can effectively discern the temporal evolution of robot and environment dynamics. During training, the model is presented with input sequences in two configurations: (1) 50% of the time, the input sequence is presented in its natural temporal order; (2) the remaining 50% of the time, the input sequence is randomly shuffled, disrupting the temporal coherence. The model is then tasked to classify whether an unseen sequence is presented in its original order or is shuffled, testing the model’s ability to capture temporal dependencies and understand kinodynamic transitions. As illustrated in Fig. 3 , our findings demonstrate a clear distinction in model performance based on the input representation. When the model is provided with separate, non-unified tokens, it exhibits a limited capacity of understanding the underlying kinodynamics and the learning loss barely drops. This suggests that processing information in a fragmented manner hinders the model’s ability to capture temporal relationships and kinodynamic evolution, which is aligned with the findings by Zhou et al. 2024 . It may be possible to compensate by training with a larger dataset, which, however, is not always available in robotics. Conversely, the utilization of a unified latent space representation significantly enhances the model’s ability to discern temporal order and, consequently, understand the dynamics of the system. By consolidating relevant information into a single, cohesive representation, the model can effectively capture the interdependencies among different modalities and their evolution over time. This highlights the importance of a unified latent space representation in enabling robotic models to effectively learn and reason about complex dynamic systems when trained on limited data, in contrast to NLP and CV tasks where the data acquisition is easier. Fig. 4 : Prediction Horizon: VertiFormer is capable of predicting a longer horizon without losing much accuracy due to its non-autoregressive nature. Prediction horizon is a critical factor in navigation planning. While longer prediction horizons can potentially lead to better planning by considering long-term effects, they also introduce greater uncertainty. This is because errors in early predictions can accumulate and lead to significant deviations in subsequent predictions. This issue is particularly relevant for autoregressive models such as the VertiDecoder part of VertiFormer , where each prediction is based on the previous one. In such models, even a small error in the initial steps can propagate and amplify over time, causing the predicted trajectory to drift further away from the true path. To evaluate the impact of prediction horizon, we compare the performance of the autoregressive VertiDecoder with the non-autoregressive VertiFormer , specifically focusing on their ability to maintain accuracy over long horizons. The results, shown in Fig. 4 , demonstrate that VertiFormer is capable of predicting a longer horizon (two seconds) with less drift compared to its autoregressive counterpart even with a shorter horizon (one second). This highlights the advantage of non-autoregressive models in tasks requiring long-term prediction, as they are less susceptible to error accumulation. IV-C Experiment Results of Robotic Objective Functions Fig. 5 : Patch Prediction Head: The inclusion of a patch reconstruction head results in a degradation of overall model performance. This counterintuitive result can be attributed to the inherent difficulty in accurately predicting the detailed structure of off-road terrain topography. Patch prediction head , as an auxiliary head to learn environment kinodynamics, was first introduced by Nazeri et al. 2024a . However, we find that the high complexity of off-road terrain topography and the potential presence of noise or occlusion within the input data create a challenging reconstruction task (see Fig. ). Consequently, the patch prediction head often generates inaccurate reconstructions, introducing noise into the learning process and negatively impacting the performance of the primary tasks, i.e., FKD, IKD, and BC. This suggests that the auxiliary task of patch reconstruction, in this specific domain, may introduce a conflicting learning signal that hinders the model’s ability to effectively learn the desired representations for the main objectives (Fig. 5 ). MM vs NTP vs End-to-End (End2End) are currently the prominent approaches in CV, NLP, and robotics respectively. However, it is unclear what is the best approach for robot learning, especially learning off-road mobility. We present a comparative analysis of model performance utilizing the MM paradigm within an encoder architecture ( VertiEncoder , Fig. 0 left trained alone with MM), a decoder employing autoregressive NTP ( VertiDecoder , Fig. 0 right trained alone without cross-attention), and a non-Transformer-based End2End approach. We then further contrast these approaches with VertiFormer , which adopts a non-autoregressive approach to NTP and MM (Fig. 0 , trained end-to-end). Fig. 6 : MM vs NTP vs End2End: VertiFormer achieves best accuracy across FKD, IKD, and BC compared to VertiEncoder (MM), VertiDecoder (NTP), and End2End. To be specific, an encoder model leverages the principles of MM, wherein portions of the input sequence (poses, actions, and terrain patches) are masked, and the model is trained to reconstruct the masked elements. This approach has demonstrated success in capturing contextual dependencies and learning robust representations [ 56 ] ; A decoder model employs NTP, a prevalent technique in autoregressive sequence generation. In this paradigm, the model predicts the subsequent element in a sequence conditioned on the preceding elements. For both encoder and decoder models, we use the same unified latent space representation presented in Sec. III-A1 . The specialized non-Transformer-based End2End approach uses Resnet-18 [ 33 ] as a patch encoder and fully connected layers as the task heads. While more complex models might offer higher accuracy, we choose ResNet-18 to balance performance with the computational constraints of our robotic platform, making it well-suited for deployment on robots with limited on-board processing capabilities, compared to deeper networks like ResNet-50 or ResNet-101. More information about End2End model architecture is provided in Appendix A . As illustrated in Fig. 6 , our findings indicate that VertiFormer , a non-autoregressive Transformer, exhibits superior performance across various evaluation metrics, including FKD, IKD, and BC error rates, in the context of one-second prediction horizon. Compared to VertiDecoder , VertiFormer predicts multiple future states simultaneously (i.e., non-autoregressively), which contributes to its better accuracy. These results suggest that the enhanced contextual awareness afforded by the non-autoregressive approach contributes to improved predictive accuracy. Note that VertiDecoder cannot perform BC directly, as it has access to both action and pose at each step. Unlike VertiEncoder [ 56 ] , VertiFormer does not train different downstream heads separately each time and all tasks contribute to the performance of each other all together, which results in VertiFormer ’s lowest error rate in most cases (except for \mathbf{Z} prediction). Across all kinodynamics tasks, End2End achieves the highest error rate, which shows the benefits of using Transformers for kinodynamic representation and understanding during off-road mobility tasks. Beyond the observed performance gains and training stability, VertiFormer demonstrates the capacity of concurrent execution of multiple tasks, not only during training but also during inference. This is particularly relevant in robotics, where real-time control is required and sometimes some modalities may not be available during inference. For example, without a global planner, action sampler, or in the presence of sensor degradation, the robot may not always have access to desired future robot poses, candidate actions, or future terrain patches, respectively. Furthermore, the usage of a learned mask within the decoder part of VertiFormer is posited to capture salient distributional characteristics of the data, effectively serving as a condensed representation during inference. This learned representation facilitates adaptation to new tasks where action or pose is missing. V Robot Experiments We implement VertiFormer ’s FKD, IKD, and BC on an open-source Verti-4-Wheeler (V4W) ground robot platform. The experiments are carried out on a 4 m \times 2.5 m testbed made of rocks/boulders, wooden planks, AstroTurf with crumpled cardboard boxes underneath, and modular 0.8 m \times 0.75 m expanding foam to represent different types of vertically challenging terrain with different friction coefficients and varying deformability (Fig. 7 ). The modular foam and rocks/boulders do not deform, while the rocks may shift positions under the weight of the robot. On the other hand, the wooden planks and AstroTurf are completely deformable and change the terrain topography during wheel-terrain interactions. The one-hour training dataset used (see details of the dataset in Appendix B ) only consists of robot teleoperation on the rigid rock/boulder testbed and hence the experiment testbed is an unseen environment, posing generalization challenges for VertiFormer . Fig. 7 : Unseen Test Environments with Rocks/Boulders, Wooden Planks, AstroTurf, and Expanding Foam. V-A Implementation and Metrics V-A 1 FKD VertiFormer ’s FKD task is integrated with the MPPI planner [ 88 ] with 1000 samples and a horizon of 18 steps. We sample across a range of control sequences centered around the last optimal control sequence selected by the robot. The first three actions in a sampled control sequence are passed to VertiFormer along with six past poses, actions, and terrain patches at 3 Hz consisting of one second. The model is repeated six times and outputs 18 future poses of the robot, which are combined to create one candidate trajectory. All 1000 candidate trajectories are then evaluated by a cost function, which calculates the cost of each trajectory based on the Euclidean distance to the goal and roll and pitch angles of the robot. Higher distance, roll, and pitch values are penalized with higher cost. Based on the cost function, MPPI outputs the best control sequence moving the robot forward at 3 Hz. The V4W executes the first action and replans. V-A 2 IKD We integrate VertiFormer ’s IKD task with a global planner based on Dijkstra’s algorithm [ 23 ] , which minimizes traversability cost on a traversability map [ 63 ] . The global planner generates three desired future poses with the lowest cost and passes them to VertiFormer , which also has access to six past poses, actions, and terrain patches. VertiFormer then produces three future actions to drive the robot to the three desired future poses. Similarly to FKD, the V4W executes the first action and then replans at 3 Hz. V-A 3 BC We implement VertiFormer ’s BC by passing in six past poses, actions, and terrain patches to VertiFormer . The model outputs three future actions to take. Similarly to FKD and IKD, the first action is executed by V4W and the replanning of BC runs at 3 Hz. TABLE I : Robot experiments with VertiFormer , VertiEncoder , VertiDecoder , and tal . † † nicematrix-placeholder: NiceTabular (nicematrix) For FKD and IKD, a trial is deemed successful if the robot reaches the defined goal without rolling over or getting stuck. For BC without explicit goal information, a trial is considered successful if the robot successfully traverses the entire testbed. V-B Results and Discussions The results of the three methods are then compared to MPPI using TAL [ 19 ] , a highly accurate forward kinodynamic model specifically designed for vertically challenging terrain. We report the success rate, average traversal time, and mean roll and pitch angles in Table I . Our observations reveal a nuanced performance difference between VertiEncoder and VertiFormer , particularly concerning BC and IKD. VertiEncoder excels in BC due to its specialized BC task head, a dedicated component trained specifically for this task. This specialized training allows VertiEncoder to effectively leverage the provided data for imitation learning. In contrast, VertiFormer approaches BC in a zero-shot manner. It is not explicitly trained on BC, relying instead on its modality masking strategy. This masking effectively handles missing modalities by replacing them with a trained mask, enabling the model to infer behavior without direct BC training. While this approach allows VertiFormer to perform BC without specialized training, it also explains why VertiEncoder , with its dedicated head, achieves a higher success rate. A similar trend is observed with IKD. VertiEncoder benefits from a specialized IKD head, again trained explicitly for this task. And VertiDecoder has access to both predicted and actual actions and poses at each time step, providing richer guidance for the IKD process. This richer information stream in VertiDecoder is the reason for achieving a higher success rate, especially considering the inherent difficulty of IKD compared to FKD. VertiFormer , however, faces a challenge in IKD and takes longer to finish the traversal. The masking strategy, while effective for missing modality, is not as accurate as the actual modality. Regarding FKD, the architectural difference between VertiFormer and VertiEncoder causes different navigation behaviors. VertiEncoder ’s specialized task head for FKD treats each future step independently without any attention weights between steps. While this approach facilitates faster MPPI initial convergence due to a lack of cross attention, it can also lead to drift, causing inconsistencies between predicted steps and ultimately resulting in a larger traversal time standard deviation across trials. While VertiEncoder ’s MPPI converges quickly, it struggles with long-term consistency. VertiFormer takes a different approach. By employing attention and cross-attention mechanisms between historical and future steps, it dynamically incorporates past information into future predictions. This allows VertiFormer to consider the historical context through cross-attention and causal masking when predicting future states, leading to more coherent and consistent predictions. Consequently, although MPPI might require more time to converge on a path with VertiFormer , once it does, the resulting behavior is more robust and less variable across trials, reflected in a smaller traversal time standard deviation. The attention mechanism allows VertiFormer to learn more complex temporal dependencies, which are crucial for accurate long-term prediction in FKD. VI Limitations Although VertiFormer can capture long-range dependencies through additional context tokens, it requires re-training if we want to change the prediction horizon, while autoregressive models can predict any number of steps into the future without re-training. As illustrated in Fig. 8 of Appendix C , our model demonstrates a deficiency in accurately executing a turning maneuver. Such failures stem from long-horizon (1 second), non-autoregressive predictions in one step accentuated by the inaccuracy of terrain reconstruction caused by the high degree of complexity present in off-road topographical formations. This also reflects on the accuracy of predicting \mathbf{Z} . A further limitation stems from the use of a mask in place of true modality data. While this approach empowers the model with multi-task capability and to handle missing information, it nonetheless falls short of leveraging the full potential of the actual modalities. It is crucial to acknowledge that our observations are primarily associated with the challenges inherent in wheeled locomotion on complex, vertically challenging, off-road terrain and do not necessarily generalize to other robotic domains such as visual navigation or manipulation. In visual navigation, the robot typically relies on visual cues and image processing to perceive its environment and plan its path. In manipulation tasks, the focus is on interacting with objects rather than negotiating through complex terrain. Further investigation is required for general visual navigation and manipulation. VII Conclusions In this work, we introduce VertiFormer , a novel data-efficient multi-task Transformer designed for learning kinodynamic representations on vertically challenging, off-road terrain. VertiFormer demonstrates the capacity to simultaneously address forward kinodynamics learning, inverse kinodynamics learning, and behavior cloning tasks, only using one hour of training data. Key contributions include a unified latent space representation enhancing temporal understanding, multi-context tokens enabling multi-step prediction without autoregressive feedback, and a learned masked representation facilitating multiple off-road mobility tasks simultaneously and acting as a proxy for missing modalities during inference. All three contributions improve robustness and generalization of VertiFormer to out-of-distribution environments. We provide extensive experiment results and empirical guidelines for training Transformers under extreme data scarcity. Our evaluations across all three downstream tasks demonstrate that VertiFormer outperforms baseline models, including tal [ 19 ] , VertiEncoder [ 56 ] , VertiDecoder , and end-to-end approaches, while exhibiting reduced overfitting and improved generalization and highlighting the efficacy of the proposed architecture and training methodology for learning kinodynamic representations in data-constrained settings. Physical experiments also demonstrate that VertiFormer can enable superior off-road robot mobility on vertically challenging terrain. Appendix A Model Architecture TABLE II : VertiFormer Architecture Parameters. VertiEncoder Layers 6 Normalization RMSNorm [ 95 ] Hidden size D 512 Heads 8 MLP size 512 Dropout 0.3 Activation GELU [ 35 ] Pre-Norm True PositionalEncoding Sinusoidal VertiDecoder Layers 4 Normalization RMSNorm [ 95 ] Hidden size D 512 Heads 8 MLP size 512 Dropout 0.3 Activation GELU [ 35 ] Pre-Norm True PositionalEncoding Sinusoidal TABLE III : End2End Architecture Parameters. End2End Patch Encoder Resnet-18 Normalization batch norm [ 73 ] Hidden Layer 1 256 Hidden Layer 2 512 Hidden Layer 3 64 Activation Tanh Dropout 0.2 Appendix B Implementation Details We use an open-source V4W robotic platform, as detailed by Datar et al. 2024b , for physical evaluation. The V4W platform is equipped with a Microsoft Azure Kinect RGB-D camera to build elevation maps [ 55 ] and an NVIDIA Jetson Xavier processor for onboard computation. The proposed VertiFormer model is implemented using PyTorch and trained on a single NVIDIA A5000 GPU with 24GB of memory, demonstrating efficient memory utilization with a peak memory footprint of only 2GB. Optimization: we use the AdamW optimizer [ 50 ] with learning rate of 5e^{-4} and weight decay of 0.08 . We train VertiFormer for 200 epochs with a batch size of 512. Dataset: We utilize the dataset introduced by tal [ 19 ] , which was collected on a 3.1 m \times 1.3 m modular rock testbed with a maximum height of 0.6 m. The dataset includes 30 minutes of data from both a planar surface and the rock testbed, capturing a diverse range of 6-DoF vehicle states. These states encompass scenarios such as vehicle rollovers and instances of the vehicle getting stuck, all recorded during manual teleoperation over the reconfigurable rock testbed. The dataset comprises visual-inertial odometry for vehicle state estimation, elevation maps derived from depth images, and teleoperation control data, including throttle and steering commands, to provide a holistic view of vehicle dynamics. Appendix C Qualitative Results (a) Successful 3-step predictions. (b) Failed 3-step predictions. (c) Successful 6-step predictions. (d) Failed 6-step predictions. Fig. 8 : Qualitative Results of 3-Step and 6-Step Successful and Failed Trajectory Prediction over One and Two Second(s). (a) VertiFormer maintains accuracy for longer horizons due to non-autoregressive predictions. (b) VertiDecoder drifts from the ground truth due to accumulation of error in autoregressive predictions. Fig. 9 : Qualitative Comparison of Drifting between Non-Autoregressive VertiFormer and Autoregressive VertiDecoder . Fig. 10 : Visualization of VertiFormer Predictions in green and Ground Truth in blue .