arXiv:2611.02891cs.LGNov 2026

Manuscript Offprint

arXiv:2611.02891

Gibbs Variational Last Layers for Long-Horizon Dynamics Learning

Paul Brunzema, Henrik Hose, Sebastian Trimpe

Abstract

Accurate long-horizon probabilistic predictions of dynamical systems are a prerequisite for model-based decision-making. Variational Bayesian last layers (VBLLs) are an attractive model class for this setting, offering tractable uncertainty at near-deterministic cost, yet they are trained exclusively with single-step likelihood objectives that may be insufficient for reliable multi-step rollouts. We revisit VBLLs through the lens of Gibbs variational inference, which decouples posterior inference from the choice of training loss. Building on this perspective, we introduce a family of multi-step training losses that progressively incorporate long-horizon structure, robustness via continuous ranked probability scores (CRPS), and training on full autoregressive rollouts. Our approach retains the simplicity of VBLLs while directly optimizing for multi-step predictive quality. Across illustrative synthetic environments, a diverse suite of chaotic dynamical systems, and real-world data, we show that multi-step, CRPS-based objectives substantially improve long-horizon accuracy and distributional fit, consistently outperforming single-step likelihood training.

1 Introduction

Learned probabilistic dynamics models underpin a growing range of decision-making systems, from sampling-based control [44, 10] to uncertainty-aware policy search [13, 37, 35, 19]. In all of these settings, the model is rolled out autoregressively over extended horizons, so predictive accuracy and well-calibrated uncertainty are not just desirable but prerequisite: small local errors compound step by step and can render predictions unreliable [41]. Improving the quality of these long-horizon predictions is therefore a foundational challenge, independent of the downstream application. Variational Bayesian last layers (VBLLs) [31], a specific instance of Bayesian last-layer models [56, 52, 61, 18], offer a compelling architecture for this purpose, combining tractable predictive inference with the efficiency of deterministic feature extractors. By restricting uncertainty over parameters to a Gaussian posterior over the final layer, they yield good predictive distributions at computational cost close to that of standard neural networks, and have been successfully deployed [45, 6, 44, 11, 7]. Rather than arguing that VBLLs are the best probabilistic dynamics model in general, we ask how this increasingly used model class should be trained when deployed autoregressively.

In practice, VBLLs are trained using single-step likelihood objectives, scoring predictions on isolated transitions under a Gaussian log-likelihood. While this objective is convenient, it implicitly fixes two design choices that are in fact independent of the variational last-layer construction itself. First, the model is evaluated only on isolated transitions, so the learned features are shaped by single-step mini-batches rather than trajectory structure, and the model is never exposed to the compounding errors that arise in autoregressive rollouts at deployment. Second, the data-fit term is restricted to a Gaussian log-likelihood, whose quadratic tails can be sensitive to outliers [55]. Crucially, these are limitations of the training objective, not the model: the Gaussian posterior over the last layer and the

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure

Figure 1: Overview of the developed loss functions for VBLLs under the Gibbs VI framework. We extend existing single-step (s-NLL) to a multi-step (m-NLL), robust (m-CRPS), autoregressive loss (m-arCRPS).

scoring mechanism are mathematically independent, and the VBLL architecture is compatible with a much broader class of training losses.

We develop this perspective by revisiting VBLLs through the lens of Gibbs variational inference (Gibbs VI) [2, 5, 36], which generalizes standard variational Bayes by replacing the log-likelihood with an arbitrary loss. Applied to last-layer models, this yields what we call Gibbs variational last layers: a framework in which the training objective becomes a design choice that can encode multi-step structure, robust scoring rules, and exposure to autoregressive errors (Fig. 1)—all without modifying the model architecture, the posterior family, or the tractability of predictive inference. Within this framework, we develop a family of multi-step training objectives that improve autoregressive performance across diverse metrics, including mean rollout approximation, distributional match, and coverage of true rollouts. Across a wide range of systems, we find that task-aligned training consistently improves long-horizon accuracy and uncertainty estimation, while retaining the simplicity and predictive tractability of VBLLs.

Contributions In summary, our core contributions are as follows:

C1 We introduce and formalize Gibbs variational last layers, showing that Gibbs VI strictly generalizes the standard VBLL objective and provides a principled framework for incorporating task-aligned losses into (variational) Bayesian last-layer models.

C2 We derive a hierarchy of multi-step training objectives within Gibbs VI that progressively introduces multi-step structure, robustness to outliers, and exposure to autoregressive errors.

C3 We confirm the superior performance across 18 dynamical systems and demonstrate on data from a real-world unstable robotic system that a task-aligned objective is essential when idealized assumptions break. Further, in an illustrative example, we isolate a sampling-bias failure mode of single-step likelihood training that multi-step objectives mitigate.

References (57)