Gibbs Variational Last Layers for Long-Horizon Dynamics Learning
Organizations: RWTH Aachen University, Aachen, Germany
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.
Figures & tables
| One-step metrics | Multi-step metrics | Training 1 1 1 All baselines were trained on the same HPC cluster, each on a single NVIDIA H100 GPU. | ||||||
| Method | MSE | NLL | CRPS | Final L2 | Cumul. L2 | DTW | Energy dist. | Time [min] |
| s-NLL [ 31 , 7 ] | $$0.005^{0.019}_{0.002} | $$-8.273^{-6.084}_{-8.932} | $$0.328^{0.509}_{0.273} | $$0.371^{0.759}_{0.223} | $$12.690^{20.954}_{8.285} | $$2.194^{3.919}_{1.161} | $$1.909^{2.314}_{1.561} | |
| m-NLL | $$0.005^{0.019}_{0.002} | $$-8.304^{-6.071}_{-8.982} | $$0.340^{0.515}_{0.286} | $$0.403^{0.722}_{0.217} | $$13.350^{22.801}_{7.982} | $$2.228^{3.848}_{1.089} | $$5.181^{8.139}_{2.879} | |
| m-CRPS | $$0.200^{0.259}_{0.131} | $$7.792^{11.838}_{5.540} | $$1.117^{1.582}_{0.767} | $$1.456^{1.931}_{1.148} | ||||
| m-KDE [ 34 ] | $$0.009^{0.034}_{0.003} | $$-8.249^{1.104}_{-11.956} | $$0.352^{0.707}_{0.197} | $$0.026^{0.044}_{0.017} | $$1.076^{1.776}_{0.678} | $$0.087^{0.123}_{0.043} | $$0.236^{0.285}_{0.190} | |
| m-arNLL | $$0.010^{0.039}_{0.003} | $$-8.011^{5.626}_{-11.677} | $$0.363^{0.787}_{0.197} | $$0.031^{0.045}_{0.020} | $$1.111^{1.728}_{0.777} | $$0.089^{0.141}_{0.053} | $$0.223^{0.285}_{0.190} | |
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Mean | Med. | Std | 1st | 2nd | 3rd | 4th | 5th | 6th |
|---|---|---|---|---|---|---|---|---|---|
| m-CRPS | 2.12 | 2 | 1.26 | 85 | 49 | 35 | 16 | 11 | 2 |
| m-NLL | 2.83 | 2 | 1.48 | 46 | 56 | 23 | 33 | 39 | 1 |
| m-arCRPS | 3.24 | 3 | 1.51 | 28 | 50 | 27 | 47 | 32 | 14 |
| s-NLL | 3.78 | 4 | 1.32 | 9 | 17 | 66 | 50 | 29 | 27 |
| m-KDE | 3.83 | 4 | 1.43 | 20 | 20 | 31 | 40 | 77 | 10 |
| m-arNLL | 5.21 | 6 | 1.47 | 10 | 6 | 16 | 12 | 10 | 144 |
| Environment | Metric | s-NLL | m-NLL | m-CRPS | m-arNLL | m-arCRPS | m-KDE |
|---|---|---|---|---|---|---|---|
| Spiral | Final L2 | $$0.325^{+0.236}_{-0.159} | $$0.056^{+0.061}_{-0.031} | $$0.228^{+0.041}_{-0.079} | $$0.122^{+0.020}_{-0.031} | $$0.063^{+0.081}_{-0.047} | |
| Cumul. L2 | $$28.269^{+23.817}_{-19.836} | $$5.732^{+6.806}_{-2.495} | $$13.834^{+3.687}_{-6.170} | $$7.788^{+1.644}_{-2.293} | $$6.926^{+11.042}_{-4.906} | ||
| DTW | $$0.982^{+0.479}_{-0.273} | $$0.580^{+0.345}_{-0.183} | $$0.732^{+0.166}_{-0.221} | $$0.631^{+0.111}_{-0.076} | $$0.546^{+0.387}_{-0.263} | ||
| MMD 2 | $$0.020^{+0.031}_{-0.018} | $$0.001^{+0.003}_{-0.001} | $$0.005^{+0.003}_{-0.003} | $$0.002^{+0.001}_{-0.001} | $$0.003^{+0.010}_{-0.003} | ||
| Energy Dist. | $$2.867^{+3.429}_{-1.998} | $$0.339^{+0.616}_{-0.199} | $$1.123^{+0.478}_{-0.488} | $$0.440^{+0.240}_{-0.220} | 4.519^{+4.034}_{-4.519})\times 10^{8} | ||
| Term. MMD 2 | $$0.041^{+0.063}_{-0.032} | $$0.001^{+0.003}_{-0.001} | $$0.018^{+0.008}_{-0.010} | $$0.005^{+0.003}_{-0.003} | $$0.003^{+0.009}_{-0.003} |
| Environment | Metric | s-NLL | m-NLL | m-CRPS | m-arNLL | m-arCRPS | m-KDE |
| Lorenz | Final L2 | $$11.642^{+20.187}_{-7.280} | $$11.676^{+20.290}_{-7.289} | $$12.378^{+21.322}_{-8.270} | div. | $$11.388^{+15.737}_{-7.501} | |
| Cumul. L2 | $$866.827^{+1,085.481}_{-577.921} | $$865.478^{+1,100.729}_{-592.923} | $$888.891^{+1,070.867}_{-607.088} | div. | $$939.147^{+993.302}_{-664.319} | ||
| DTW | $$101.314^{+176.614}_{-74.273} | $$101.067^{+154.610}_{-75.645} | $$106.475^{+163.943}_{-78.152} | div. | $$96.209^{+183.364}_{-76.473} | ||
| MMD 2 | $$0.018^{+0.034}_{-0.017} | $$0.016^{+0.049}_{-0.016} | div. | $$0.032^{+0.128}_{-0.031} | $$0.060^{+0.163}_{-0.052} | ||
| Energy Dist. | $$32.190^{+41.168}_{-21.357} | $$27.615^{+43.562}_{-19.143} | div. | $$40.672^{+91.551}_{-28.389} | $$66.410^{+87.538}_{-36.004} | ||
| Term. MMD 2 | $$0.052^{+0.181}_{-0.050} | $$0.047^{+0.214}_{-0.046} | div. | $$0.089^{+0.164}_{-0.087} | $$0.138^{+0.335}_{-0.118} |
| Environment | Metric | s-NLL | m-NLL | m-CRPS | m-arNLL | m-arCRPS | m-KDE |
| Dadras | Final L2 | $$0.971^{+1.933}_{-0.808} | $$0.747^{+1.564}_{-0.628} | div. | $$1.658^{+2.602}_{-1.316} | $$1.623^{+2.702}_{-1.391} | |
| Cumul. L2 | $$64.177^{+142.690}_{-48.394} | $$86.223^{+163.618}_{-72.316} | div. | $$165.292^{+242.559}_{-123.316} | $$155.975^{+262.996}_{-132.129} | ||
| DTW | $$7.868^{+16.345}_{-6.798} | $$6.245^{+15.722}_{-5.639} | div. | $$14.775^{+25.840}_{-12.719} | $$14.076^{+27.889}_{-12.537} | ||
| MMD 2 | $$0.003^{+0.006}_{-0.003} | $$0.004^{+0.006}_{-0.004} | div. | $$0.034^{+0.013}_{-0.032} | $$0.021^{+0.128}_{-0.021} | ||
| Energy Dist. | $$5.273^{+8.197}_{-3.674} | $$4.221^{+7.851}_{-3.194} | div. | $$19.186^{+14.491}_{-15.053} | $$14.222^{+40.953}_{-10.325} | ||
| Term. MMD 2 | $$0.012^{+0.030}_{-0.011} | $$0.010^{+0.022}_{-0.009} | div. | $$0.080^{+0.154}_{-0.077} | $$0.050^{+0.181}_{-0.048} |
| Environment | Metric | s-NLL | m-NLL | m-CRPS | m-arNLL | m-arCRPS | m-KDE |
| Nose Hoover | Final L2 | $$0.402^{+0.207}_{-0.321} | $$0.192^{+0.211}_{-0.158} | div. | $$0.193^{+0.149}_{-0.148} | $$0.318^{+0.245}_{-0.284} | |
| Cumul. L2 | $$21.467^{+17.987}_{-16.129} | $$14.180^{+17.436}_{-11.045} | div. | $$14.617^{+18.193}_{-8.045} | $$21.230^{+38.851}_{-15.677} | ||
| DTW | $$2.316^{+1.011}_{-1.992} | $$1.172^{+0.818}_{-0.907} | div. | $$1.205^{+1.479}_{-0.898} | $$1.903^{+2.600}_{-1.626} | ||
| MMD 2 | $$0.005^{+0.004}_{-0.005} | $$0.002^{+0.002}_{-0.002} | div. | $$0.004^{+0.006}_{-0.004} | $$0.007^{+0.016}_{-0.007} | ||
| Energy Dist. | $$1.090^{+1.581}_{-0.890} | $$0.488^{+0.702}_{-0.390} | div. | $$1.148^{+1.264}_{-0.883} | $$1.484^{+3.402}_{-1.184} | ||
| Term. MMD 2 | $$0.017^{+0.025}_{-0.016} | $$0.004^{+0.008}_{-0.004} | div. | $$0.011^{+0.013}_{-0.011} | $$0.017^{+0.044}_{-0.017} |
| Hyperparameter | Value |
|---|---|
| Hidden width | 64 (128 for Glycolytic oscillator) |
| Hidden layers | 3 |
| Feature dimension | 32 (64 for Glycolytic oscillator) |
| Activation | mish |
| Prior scale |
| Loss | Epochs | LR | Batch | Weight decay | Grad. clip | ||
|---|---|---|---|---|---|---|---|
| s-NLL | 300 | 64 H | – | ||||
| m-NLL | 300 | 64 | – | ||||
| m-CRPS | 300 | 64 | 10 | ||||
| m-KDE | 300 | 64 | 10 | ||||
| m-arNLL | 300 | 64 | 10 | ||||
| m-arCRPS | 300 | 64 | 10 |
| Name | Dim. | Norm. | Traj. | Len. | Stride | Eval steps | States | Samples for eval | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Spiral | 2 | no | 300 | 90 | 1 | 40 | 120 | 80 | 100 | ||
| Swimmer | 2 | no | 300 | 90 | 1 | 40 | 120 | 80 | 100 | ||
| Variable-speed limit cycle | 2 | no | 300 | 90 | 1 | 40 | 120 | 80 | 100 | ||
| Bifurcating limit cycle | 2 | no | 300 | 90 | 1 | 40 | 120 | 80 | 100 | ||
| Glycolytic oscillator | 7 | yes | 300 | 90 | 1 | 40 | 120 | 80 | 100 | ||
| Lorenz | 3 | yes | 400 | 90 | 20 | 40 | 120 | 80 | 100 |
| Hyperparameter | Value |
|---|---|
| Hidden width | 128 |
| Hidden layers | 3 |
| Feature dimension | 64 |
| Activation | mish |
| Prior scale |
| Loss | Epochs | LR | Batch | Weight decay | Grad. clip | Stride | |||
|---|---|---|---|---|---|---|---|---|---|
| s-NLL | 400 | 256 | – | – | – | – | |||
| m-NLL | 400 | 256 | 40 | 20 | 10 | 100 | |||
| m-CRPS | 400 | 256 | 40 | 20 | 10 | 100 | |||
| m-KDE | 400 | 256 | 40 | 20 | 10 | 100 | |||
| m-arNLL | 400 | 256 | 40 | 20 | 10 | 100 | |||
| m-arCRPS | 400 | 256 | 40 | 20 | 10 | 100 |
Probabilistic Time Series Forecasting
Probabilistic time series forecasting estimates distributions of future values or trajectories to quantify uncertainty and support risk-aware decisions.
See all 174 papers