Quantifying Uncertainty in the Presence of Distribution Shifts
Authors: Yuli Slavutsky
David Blei
Venue: NeurIPS 2025 poster ()
Keywords: Uncertainty estimation
distribution shift
variational inference
bayesian learning
out-of-distribution generalization
Primary area: probabilistic_methods
TL;DR: This work proposes a Bayesian framework with variational inference that adapts the prior and posterior to covariate shifts, improving uncertainty estimates by capturing predictive reliability rather than just input dissimilarity.

Abstract: Neural networks make accurate predictions but often fail to provide reliable uncertainty estimates, especially when test-time covariates differ from those seen during training, as occurs with selection bias or shifts over time. To address this, we propose a Bayesian framework for uncertainty estimation that explicitly accounts for covariate shifts. Unlike conventional approaches that rely on fixed priors, a key idea of our method is an adaptive prior, conditioned on both training and new covariates. This prior naturally increases uncertainty for inputs that lie far from the training distribution in regions where predictive performance is likely to degrade. To efficiently approximate the resulting posterior predictive distribution, we employ amortized variational inference. Finally, we construct synthetic environments by drawing small bootstrap samples from the training data, simulating a range of plausible covariate shifts using only the original dataset. We evaluate our method on both synthetic and real-world data, demonstrating that it yields substantially improved uncertainty estimates under distribution shift compared to existing approaches.

Quantifying Uncertainty in the Presence of Distribution Shifts
Yuli Slavutsky Department of Statistics Columbia University
David M. Blei
Departments of Statistics, Computer Science Columbia University
New York, NY 10027, USA yuli lul..ssllattttyyllllbbaaaaa.aa
New York, NY 10027, USA david. www.@coolmbaaa....mmomo edu
Abstract
Neural networks make accurate predictions but often fail to provide reliable un- certainty estimates, especially under covariate distribution shifts between training and testing. To address this problem, propose Bayesian framework for uncer- tainty estimation that explicitly accounts for covariate shifts. While conventional approaches rely fixed priors, the key idea of our method is adaptive prior, conditioned on both training and new covariates. This prior naturally increases uncertainty for inputs that lie far from the training distribution in regions where predictive performance is likely to degrade. To efficiently approximate the result- ing posterior predictive distribution, we employ amortized variational inference. Finally, we construct synthetic environments by drawing small bootstrap samples from the training data, simulating range of plausible covariate shift using only the original dataset. We evaluate our method on both synthetic and real-world data. It yields substantially improved uncertainty estimates under distribution shifts,
Introduction
Neural networks are powerful predictive models, capable of capturing complex relationships from data (Raghu et al., 2017]. Despite this capability, they struggle to provide reliable measures predictive uncertainty. This issue is particularly relevant when the distribution of covariates shifts between training and test data. Such shifts frequently occur in real-world settings, including high-stakes applications like medicine, where inaccurate uncertainty estimates lead to harmful outcomes ('Topol, 2019, Rajkomar et al., 2019].
Consider dataset (x })) and new test point x". In classical Bayesian neural network [Neal, 2012], the posterior predictive distribution is
x= Fi:ns 31:n) = f p(u" x= 1) Fin- Vi.n) ) d8,
ply*
(I)
where p(yl xr, r0) comes from the neural network with weights and p(0 Zinn, Vi:n) is the posterior over those weights. This expression reveals that, in the classical model, predictive uncertainty arises entirely from uncertainty about model parameters 0. But intuitively, if the new covariate vector x* lies far from the training covariates Zi.n. then we should become more uncertain about our prediction.
To capture this intuition, we propose a Bayesian approach that better reflects uncertainty due to covariate shifts. The central idea is adapt the prior distribution to explicitly depend on covariates, i.e., replacing the classical prior p(0) with p(0 Iimn, x*). This leads to a posterior predictive distribution of the form
ply" Fin. VISH) / plu" (="00)p(0 1=, Finn Vi:m) d0.
(2)
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

(8)
(6)
1cl
Train
Test
y-o y=1
Figure 1: (a) In training one covariate is fixed; the data lies on inc-dimensional subspace. All predictors intersecting the fixed axis at the same point are equivalent. (b) At test time, variation along the second dimension reveals that some predictors may fit better the new data, prompting a prior shift. (c) Possible labeling where only the solid line separates the test data.
As we will discuss, conditioning the prior on the test covariates x" allows the posterior to adjust its uncertainty in accordance with the proximity of xx the training distribution. Thus, the model captures the impact of covariate shift on predictive performance, and delivers increased uncertainty for inputs that lie far from the training data.
The intuition behind this prior that predictions become more uncertain at covariates far from the training data because the learned relationship may no longer hold. Consider logistic regression with two covariates, where one covariate varies substantially and the other hardly varies. The classical posterior of the coefficients in the training data it is almost indistinguishable from the intercept. But if the test data includes a previously unseen value of this covariate, our predictive uncertainty should increase. The test data point, even without its response, indicates that the coefficient could differ significantly from what the training data alone suggests. For illustration see Figure 1.
assign both low and high value to the less variable covariate since
Implementing this idea presents three key challenges:
The first challenge is to specify the prior p(0 #imm==*). We propose an energy-based prior that spreads its mass on the plausible values of the weights, given the covariates.
The second challenge is to compute Equation (2), which involves the posterior distribution p(@ x" ,ii, ). Unlike classical posterior distribution, this posterior is located in the context of a prediction about x", which comes into the adaptive prior. To approximate it, we use the idea of amortized variational inference [Kingma al., 2015, Margossian and Blei, 2024]. We learn family of approximate posteriors that take test covariates x" as input and produce an approximate posterior tailored its prediction.
final challenge is that fitting our amortized variational family requires both training data from the training distribution and new data from covariate-shifted distribution. In practice, however, we often only have one training set, without access to data drawn from a shifted distribution. We small bootstrap samples to form synthetic environments (Slavutsky and Benjamini, 2024] and prove that they contain covariate- shiftee distributions able to approximate unseen shifts. We adapt the variational objective match all of these environments.
Together, these ideas form Variational Inference under Distribution Shif (VIDS). On both real and synthetic data, show that VIDS outperforms existing methods in terms of predictive accuracy, calibration of uncertainty, and robustness under covariate shifts. VIDS provides accurate estimates of posterior predictive uncertainty in the face of distribution shift.
Related work. Forming predictions under covariate shift important to many applications. Examples from the medical domain include imaging data from different hospitals [Zech et al., 2018, AlBadawy al., 2018, Perone et al., 2019, Castro et al., 2020], and failure to provide reliable predictions when applied to different cell types. In image classification, cross-dataset generalization remains challenging [TTrralba and Efros, 2011], 1]. including cases where shifts are introduced by variations in cameras [Beery et al., 201 8), or by temporal and geographic differences. Other examples include person re- iddntiffiaation, where the training data often includes biases with respect to to gender [Grother et al., 2019, Klare et al., 2012] age (Bese-Rowden and Jain, 2017, Michalski et al., 2018. Srinivas et al., 2019], and race [Raji and Buolamwini, 2019, Wang et al., 2019]. All of these settings that can benefit benefit from the use of VIDS.
Approaches for uncertainty estimation in neural networks include ensemble- based methods [Laksh- minarayanan et al., 2017, Valdenegro- Toro, 2019], and methods based on noise addition [Dusenberry al., 2020, Maddox et al., 2019, Wen et al., 2020]. A prominent line of work focuses on Bayesian neural networks [Tishby et al., 1989, Denker and LeCun, 1990], which offer principled framework for uncertainty quantification and have been widely adopted for this purpose [Ovadia et al., 2019]. These approaches (e.g.. [Ha et al., 2016, Yoon et al., 2018]) typically place a single prior distribution

---

over the model parameters that is shared across all inputs. In contrast, our method defines a prior that adapts to individual covariates.
Several techniques have been given Bayesian interpretations, including regularization methods such as dropout [Kingma al., 2015, Gal and Ghahramani, 2016], stochastic gradient-based approximations [Welling and Teh, 2011, Dubey et al., 2016, Li et al., 2016], and variational inference methods that approximate the posterior distribution [Graves, 201 I, Neal, 2012, Blundell et al., 2015, Louizos and Welling, 2016, Malinin and Gales, 2018].
A prevalent strategy for handling uncertainty under distribution shift involves distance- methods, which estimate uncertainty based on the distance between new inputs and the training data. These include approaches that rely training data density estimation [Sensoy et al., 2018], often imple- mented via kemne density methods [Ramalho and Miranda, 2020, Van Amersfoort et al., 2020] or Gaussian Processes (GPs) [Williams and Rasmussen, 2006]. More recent examples include Spectral- normalized Neural Gaussian Processes (SNGP) [Liu et al., 2020], which apply spectral normalization stabilize network weights, and Deterministic Uncertainty Estimation (DUE) [Van Amersfoort et al., 2021], which integrates GP with a deep feature extractor trained to preserve distance information in the representation space.
Most relevant to our work are methods that combine Bayesian and distance-based approaches, such as Park and Blei [2024], which incorporate an energy- -base criterion into the training objective to increase predictive uncertainty for inputs that are unlikely under the training distribution.
The key idea behind the aforementioned distance-based approaches is to detect shifts by measuring how far test inputs lie from the training inputs, typically using fixed metrics the input space. But these measures can be misleading because not all shifts affect predictive performance equally. Consider a univariate logistic regression. Suppose there are two types of shifts: (i) training data concentrate near the decision boundary, and (ii) training data appear only at extreme covariate values. At test time, covariates cover the entire range. Under shift (i), predictive performance remains strong because the critical region near the boundary was covered during training. Under shift (ii), performance deteriorates because the model never saw data near the decision boundary.
The important factor is not simply the difference in covariates, but how shifts influence predictive accuracy. Unlike predefined distance measures, the adaptive prior in VIDS essentially learns from data how covariate shifts affect predictive performance. It uses its adaptive prior to directly model the change predictive uncertainty that is induced by newly observed covariates.
2 Predictive uncertainty under distribution shifts
We address uncertainty estimation under covariate shift, where the distribution of test-time inputs x may differ from that of the training data T1.N- To account for such shifts, we extend the classical Bayesian framework by treating covariates as random variables and modeling their dependence on the model parameters This leads to a formulation in which the prior over is conditioned on the newly observed covariate x=, resulting in predictive posterior that explicitly reflects this dependence. Consequently, the predictive uncertainty, defined through this posterior, can adapt to reflect greater uncertainty for covariates x that are unlikely under the training distribution, thereby capturing their potential impact on predictive performance. We begin by revisiting the classical Bayesian model.
2.1 Background on the classical Bayesian model
In the classical Bayesian framework the parameters 0 are treated random variable drawn from prior distribution 0 ~ p(f), while the covariates T1:N are considered fixed. Under the standard conditional independence assumption, each outcome yi is independent of all other pairs (z Vj) given & and z;. The posterior distribution over 0 is
p(0 DINN, (INN.U.N) & p(0) II I(,
New test points xx are likewise treated as fixed. Thus, the introduction of a new test input xx does not alter the posterior, and consequently does not affect the predictive uncertainty. Again, Equation 1.
3

---

2.2 A Bayesian approach to covariate shift
Our goal in this work to explicitly model distributional differences between the training covariates 31,...,2N Pr and predictive performance, the posterior predictive at x should adapt to the observed change in the covariate distribution. To this end, propose model in which the model parameters depend both the training and test covariates, 21:N and x². This dependence is illustrated in the probabilistic graphical model in Figure 2, which indicates the structure of the posterior predictive for x*.
covariate x² ~ Px-. To effectively capture how such shifts impact
As in the classical framework, our model assumes that y² is conditionally independent all other variables given x² and 9. However, by allowing 9 to depend the covariates, the prior p(@ T1:N ,x") can now adjust the plausibility of parameter values based both on training and test inputs, and thus capture distribution shifts. As result, the posterior p(0 Z1:N M1:N, x²) is explicitly dependent x² through the covariate-dependern prior.
Let fo denote the predictive model parametrized by The predictive uncertainty for x" in our model defined through its predictive posterior in Equation 2. which is our primary quantity of interest. Our goal to approximate this predictive uncertainty. Since the likelihood p(y" x²,0) .)) can be evaluated directly by the predictive model fo("") the central challenge lies in accurately estimating the covariate-dependent posterior p p0|1z"". .INNN 1/:NN)
y
In what follows, we first define a concrete adaptive prior p(f|==, F1.N) that conditions on both the ob- served training covariates and the test-time covariate. We then develop variational inference scheme to approximate the posterior under this adaptive prior. Finally, since test-time covariates x² from shifted distribution typically unavailable during training, we approximate this setting by constructing synthetic environments designed to simulate diverse covariate distributions by subsampling the training data. Using these environments, design an algorithm that approximates a posterior capable of anticipating predictive degradation under a range of potential test-time shifts.
Figure 2: Graphical model. Thick red arrows denote additional dependencies introduced by our model. Observed variables shown in gray.
2.3 The adaptive prior
Our prior aims to capture the plausibility of given both the training inputs 21.N and a new test covariate x². We propose adaptive prior conditioned on both FI:N and x", defined by the following energy function
(10UE,,x*)) = - -EM log plylo, 0) + log p0ylo"" dy
(4)
p(0|zı,..") x*)= = Z(0) exp
(5)
where Z(0)= = Sxp (E(0;
is the normalizing factor.'
This formulation allows for a smooth adaptation to test-time shifts. When only a small number of test covariates x" are introduced, or if the inputs are similar to the training data, the prior remains close to a distribution conditioned on the training covariates alone. However, as more test inputs are observed, especially if they differ substantially from the training distribution, the prior adjusts more significantly to reflect the new covariate distribution.
We illustrate this adaptivity in the simple example described in $1. We consider logistic model for y E {0. 1}. where covariates x consist of two features: one of them remains constant in all training examples, but in new examples, both features vary. Figure 3 shows how the prior distribution changes when the shifted examples are introduced. See Appendix A for additional details and an illustration that lightly shifted examples lead to minimal adaptations.
'This definition requires integrability of exp (E((; ,x)) and thus we assume that fimyell-ww 200:21.N:5 -oo with at least linear decay.

---

Ael lane
Figure Changes in the prior due to the introduction of test covariates drawn from shifted distribution x² ~N 1), where both features vary.
2.4 VIDS: Variational inference under distribution shifts
Given this prior, our goal is to estimate the posterior p(O æ1:N, VI:N, æ*), which enables approximate computation of predictive uncertainty for the input x* according Equation (2). For this, fit a variational distribution go (0;)")) z p(0 UI:N, #1,N,="). x*). This variational distribution is an amortized posterior approximation, parametrized
function of x", allowing approximation of the posterior across multiple test-time covariates z².
We model the amortized posterior multivariate Gaussian distribution, parametrized by its mean and diagonal covariance matrix Σ. Let Qa denote the family of d-dimensional Gaussian distributions with diagonal covariance. Thus, seek go (0;0x=") with (je, E.), that minimizes the Kullback- Leibler divergence to the true posterior:
min KL (gs(0;x") (0 II.N.BL.N deEOa
(6)
Specifically, we optimize the evidence lower bound (ELBO) on the log-likelihood [Blei et al., 2017, Kingma and Welling, 2014, Rezende and Mohamed, 2015]
L (d;; x² D) = E.g [logr (yI.N (ZINN, 0)] KI. (00p0===))((((())),===))))))
which is equivalent to solving Equation (6).
We train neural network h, with weights to output ø from x", and optimize rather than ø directly. Given the training
{ y:) and M test covariates { define the following objective to fit our amortized posterior
Co(n) Co())= E (t)))))))))
(8)
Note that evaluation this objective requires estimation prior
p(0)Ti,N,=")
which involves integration over the outcome space y. For discrete the integration is simply summation, and thus can be easily computed. If y is continuous, we apply Monte Carlo integration: we sample r target values uniformly from an integration range [ymin Vmax]] and for each sample compute the log-likelihood under a unit-variance Gaussian centered at each predicted value.
2.5 The variational family and stochastic optimization of the variational objective
To fully describe VIDS, remains to define the amortized variational family and the optimization procedure to maximize Equation 8. So far, the variational posterior has been amortized with respect to x². Now, we will amortize also with respect to the training set, in order to better optimize across multiple environments, described in the next section.

---

Pretrained embedding
g(x1)
g (1 , Fnl)
In
g
g( ann)
Sample from
9 (: D V
h
g(x")
x²
Figure 4: Optimization mechanism for a single test example in single synthetic environment.
The variational family is 2o(0; xi:n) where the parameters 6 come from an inference network. We decompose the inference network into an embedding network RR + R parametrized by &. and a prediction layer parametrized by 0. We assume that g has been pre-trained maximize the likelihood p(y)a, ( 8) = (o( on the training dataset. We focus on the prediction layer 0.
Given the training data Ni:n and test covariate x", define the inference network follows:
1. We compute the embeddings of the training set, ((x1)....., ((xn), and aggregate them into single summary statistic (e.g., the mean)² denoted by F(11,..., T.).
2. We compute the embedding of the test covariate, g(x").
3. The aggregated training embedding and the test embedding are concatenated and passed through network h, 122k 4. which outputs the parameters Φ (H, 2.) of the variational distribution ( I").
In practice. optimize single-sample Monte Carlo estimate of the expectations in Equation 7. To enable differentiable sampling from qs, we use the reparametrization trick [Kingma and Welling, 2014], where sample 0 ~ qs by first sampling from a standard Gaussian and then calculating 0 = + Ec. The full procedure is summarized in Algorithm and illustrated in Figure 4.
2.6 Uncertainty estimation
With training completed using Algorithm 1, we finally estimating predictive uncertainty for new test input x², i.e., from the posterior predictive distribution of Equation (2).
Given the learned parameters f,, we evaluate the representation of the test point 9g(x*) and use it with the combined representation of the training data to compute the variational posterior parameters via I h4 (FI.N..)) We then approximate the posterior predictive by drawing samples 0(S)
93 and calculating the corresponding predictions fec. (gg (a²))")).
3 Posterior estimation across multiple distribution shifts
So far, we have developed a method to approximate the posterior given training data D {(x,, W and set of test covariates 1- drawn from shifted distribution. However, key challenge in real-world settings is that such test covariates are typically unavailable in advance. To address this limitation, similarly to [Slavutsky and Benjamini, 2024], we generate synthetic environments via subsampling from the training data.
Specifically, we construct environments by sampling L pairs of datasets
D = {x11) .1 (,)),,.,((1))) Un (()))
((9) = {(x (f) (11) (..,,..., (o 9m
( (0))
(10)
where each dataset pair is constructed by sampling data pairs (æ;, y:) uniformly at random with replacement from the original training set D. We refer to each resulting pair of datasets as synthetic
"The summary embedding g(21,.... Z.,) is permutation permutation-invaiiant invariant aggregation of learned element wise representations, and thus follows the Deep Sets setting [aheerr et al., 2017].

---

Algorithm 1 Variational posterior
1: Input: Training data D, covariates { pre- pre-trained embedding gę. predictor f(;; 0), itera- tions K, learning rate 77, initialization (0))
2: Compute train embeddings 9g (g(z1).... ((()))).(((NN)))) and test embeddings (g(zt)..... gp(x)))
3: Aggregate train embeddings to obtain (2(1.....,
4: for S - K do
5: for 1 S
M do 6: Compute of (TIg( g
7: Sample and compute 0gh) = 14g +
(k)
(k)
= " (K) for (n) (ng),, ,. - o6.
8: Compute
P(V1NN TI,N 0 = fg (me(
plus 1j 0f for (gg(23)),
p(0) 1I)N,az) (prior: Equation 5), end for
4o, (00%) IIINN
9:
10:
Compute ((k) プド= LD (+)m))
(k)
11:
Update the parameters of by performing a gradient ascent step:
700 c- 7 (- + /V,56
end for Return: ===)(K)
environment, denoted e = (D D( Each such synthetic test set D( is likely to exhibit a different empirical distribution, thereby simulating a potential covariate shift.
The core idea of our approach can viewed as an inverse bootstrap sampling: while bootstrap sampling relies subsamples of the original dataset being highly likely to resemble the population distribution, we instead focus on the low- probability cases where the subsample deviates from the original dataset's distribution. These deviations simulate potential distribution shifts that may arise test time.
In the following proposition we show that drawing enough subsamples guarantees that with high probability, at least one of them will be close to the true unknown test distribution.
Proposition (informal) 3.1. Let and p' be binned distributions of the training data and the unobserved test set, respectively. Assume that supp(p") S supp(p). Then, for any e 0 and 0 s < 1, there exist m. and L such that, with probability at least 1 1 a, the empirical distribution of at least one of L randomly drawn subsamples of size m from the training data satisfies (1 pp S
Appendix B gives formal proposition, the proof, application the case where supp p" & supp p. and analysis of relationships between the number of required synthetic environments to e and a.
While the proposition guarantees that, given enough sampled environments, at least one will approxi- mate the true (unknown) test-time shift, remains unclear which one that is. To address this, we aim to ensure that the learned posterior performs well across all synthetic environments. This motivates the use of environment-leve penalties, inspired by the distriibiitiittionn (OOD) generalization literature [Arjovsky et al., 2019, Wald et al., 2021, Krueger et al., 2021].
Thus, introduce the following cross-environment objective:
c
Σ E'
Cpgo ( (o
(11)
C = El_
C +T Var (C(), C()).
(12)
Here, we set the penalty to the variance across the environments, proposed by Krueger et al. [2021]. Algorithm 2 we summarize the complete procedure of variational posterior estimation with synthetic environments (see Appendix C).
7

---

VIDS (ours)
DUE
SNGP
DUL
Tan
61
RMSE: 0.0679
RMSE: 0.1098
RMSE: 0.4880
RMSE: 0.0811
14
Accuracy: 0.900D
Accuracy: 0, 0.8840
Accuraty: O. 84440
Accuracy: O. 0.9000
ACE: 0.0107
ACE: 0.0348
ACE: 0,0994
ACE: 0.018
Figure 5: Simulation results. Red crosses represent training data, and gray dots test data. Black lines depict predictions, gray shaded area spanning +1 standard deviation. Top: Heteroskedastic linear regression for 0.5; Bottom: Binary classification with missing data for 0.3. VIDS is the only one to capture correct variance structures and thus achieves the best results.
Experiments
We evaluate VIDS on both synthetic and real-world datasets, across classification and regression tasks. We compare the uncertainty estimates produced by VIDS (ours) with previous distance aware methods: SNGP [Liu et al., 2020], DUE [Van Amersfoort et al., 2021], and distance uncertainty layers (DUL) [Park and Blei, 2024] (see $1 for more details). In all experiments, the same neural network architecture is used the prediction model. Hyper-parameten of our and competing methods were optimized via grid search to maximize average performance (accuracy for classification, RMSE for regression) single sample of J 50 synthetic test environments of size = 10, which was discarded from the analysis. For the corresponding values, and additional implementation details see Appendix E.
4.1 Synthetic data
We begin by examining two synthetic examples exhibiting covariate shifts. Each experiment uses N = M = 500 training and test points, and VIDS constructs synthetic environments of size m 20.
All models use a fully connected neural network with one hidden layer of width d 8.
4.1.1 Regression: heteroscedastic linear model We sample ~ U[[0, a], and xt ~ 00, 6] for < b. Outcomes for train and test follow y 3x + c(x) where c(x)) NO ) Results for 0.5, b = and B = are shown in figure 5, and results for additional settings in Appendix D.
VIDS consistently achieves the lowest RMSE and is the only one capture the correct variance structure. DUE exhibits low variance but underestimates uncertainty at higher x values. SNGP overfits, yielding poor test performance and excessive variance. DUL. provides the best posterior mean among competitors, but overestimates uncertainty due to incorrect variance modeling.
Results:
4.1.2 Classification: logistic regression with missing data For both the training and test sets, sample x ~ Beta(1/2 3/2) and compute p(x) = a - 10x) where a denotes the standard sigmoid function. Outcomes then generated according y| Ber(p(z)). However, in the training data, we exclude middle values within the range (f, t). Results for t = 0.3 are shown in Figure 5.
Results:
VIDS achieves the highest accuracy and lowest calibration error. In addition, can be seen Figure 5, VIDS exhibits lowest variance while correctly modeling uncertainty: higher in the unseen middle and lower at the edges. DUE and, to greater extent, DUL predict well but misrepresent uncertainty, increasing variance at the edges, with DUL overestimating variance overall. SNGP estimates higher variance in the middle but consistently under-predicts.

---

0.18
0.33
0.32
0,99
0,99
0.33
10
10
0.0
0.01
0.83
0,82
VBS Juast
Figure 6: Classification accuracy 10 repetitions. Celeb-A titles formatted Target Shift Attr. VIDS achieves highest accuracy in all experiments.
Concrete
Boston
Wine
1.2
1.0
VIDS (ours)
DUE
0.5
SNGP
0.4
0.9
SNGP
Figure 7: RMSE results for three experiments on three UCI regression datasets over 10 repetitions. VIDS achieves lowest comparable RMSE in all experiments.
4.2
Real data
4.2.1
Classification
For the classification experiments we use simple convolutional neural-network with two convolution blocks (see details in Appendix E).
Corrupted CIFAR-10 We evaluate model performance under corruption-induced distribution shifts using the CIFAR- 10-C dataset [Hendrycks and Dietterich, 2019]. We perform experiments on three corruption types: defocus blur, glass blur, and contrast. We construct the training set of 5000 images, 90% clean from the original CIFAR-10 dataset (Krizhevsky et al., 2009] and 10% corrupted images from CIFAR-10-C, while the test set is constructed with 5000 images, 90% corrupted and 10% clean.
Celeb-A For each experiment, choose one annotated attribute as the target, and another attribute A to induce a distribution shift in the CelebA dataset [Liu et al., 2015]. The training set contains 500 images with 90% having A and 10% with 0: the test reverses this ratio: 90% images with A = 0 and 10% with A = 1. We run three such experiments with the following shift-target pairs: (i) Pale Skin + Blond Hair, (ii) Heavy Makeup - Male, and (iii) Gray Hair Blond Hair.
Results: Figure 6 shows that in all 6 classification experiments VIDS achieves better accuracy.
4.2.2 Regression
We conduct experiments three UCI regression Pitasets--osstee Concrete, and Wine. For each, we designate a prediction target and apply K-Means clustering (K = 2) on all numeric covariates. the cluster with the higher average within-cluster Euclidean distance primarily for training (90% of training data), and the lower-distance cluster primarily for testing (90% of test data). In all these experiments we use simple linear regression (one-layer network) as the base model. For additional details see Appendix E.
To simulate non-trivial covariate shift,
Results: Figure 7 shows that VIDS achieves the lowest average RMSE across all three datasets and consistently low variance, while DUE under- performsss on the Concrete and Boston datasets and DUL considerably under-performs on the Wine dataset.

---

Conclusion
We introduced VIDS, Bayesian method for quantifying uncertainty under potential distribution shifts. VIDS leverages two central ideas: incorporating dependencies between network parameters and the test covariates, and balancing performance across synthetic environments simulate co- variate shifts. VIDS consistently outperforms existing methods, particularly when assumptions like homoscedasticity or continuity are violated.
Acknowledgments
We grateful to members of the Blei Lab for fruitful discussions and feedback. In particular, to Sebastian Salazar, Eli N. Weinstein, Andrew Jesson, Nicolas Beltran, and Sweta Karlekar. We thank Andrew Jesson for verifying the DUE implementation. This work is supported by NSF IIS- 2127869, NSF DMS-233 231 108, ONR N000142412243, the Simons Foundation and Dol OUSD) (R&E) under Cooperative Agreement PHY-2229929 (The NSF AI Institute for Artificial and Natural Intelligence). YS supported by Founder's Postdoctoral Fellowship, Department of Statistics, Columbia University.
10

---

References
[1] Ehab A AlBadawy, Ashirbani Saha, and Maciej A Mazurowski. Deep learning for segmentation of brain tumors: Impact of cross-institutions training and testing. Medical Physics, 45(3): 1150-1158, 2018.
[2] Martin Arjovsky, Léon Bottou, Ishaan Guirajani, and David Lopez-Paz. Invariant risk mini- mization, arXiv Preprint arXiv: 02893, 2019.
[3] Sara Beery, Grant Van Horn, and Pietro Perona. Recogmition in terra incognita, Proceedings of the European Conference on Computer Vision (ECCV), pages 456-473, 2018.
[4] Lacey Best-Rowden and Anil K Jain. Longitudinal study of automatic face recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(1):148-16)) 2017.
[5] David M. Blei, Alp Kucukelbir, and Jon McAuliffe. Variational inference: A review for statisticians, Journal of American Statistical Association, 11(518):859--59 2017.
[6] Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural network. In International Conference on Machine Learning, pages 1613-1622. PMLR, 2015.
[7] Daniel C Castro, Ian Walker, and Ben Glocker. Causality matters in medical imaging. Nature Communications, 111):3663, 2020.
[8] John Denker and Yann LeCun. Transforming neural-net output levels to probability distributions. Advances in Neural Information Processing Systems, 3, 1990.
[9] Kumar Avinava Dubey, Sashank J Reddi, Sinead Williamson, Barnabas Poczos, Alexander J Smola, and Eric P Xing. Variance reduction in stochastic gradient langevin dynamics. Advances Neural Information Processing Systems, 29, 2016.
[10] Michael Dusenberry, Ghassen Jerfel, Yeming Wen, Yian Ma, Jasper Snoek, Katherine Heller, Balaji Lakshminarayanan, and Dustin Tran. Efficient and scalable bayesian neural nets with rank-1 factors. In International Conference on Machine Learning, pages 2782-2792. PMLR, 2020.
[11] Yarin Gal and Zoubin Ghahramani. Dropout as bayesian approximation: Representing model uncertainty in deep learning. In International Conference on Machine Learning, pages 1050-1059, PMIRR, 2016.
[12] Alex Graves. Practical variational inference for neural networks. Advances in Neural Informa- tion Processing Systems, 24, 2011.
[13] Patrick Grother, Mei Ngan, Kayee Hanaoka, et al. Ongoing face recognition vendor test (frvt) part 3: Demographic effects. Nat. Inst. Stand, Technol., Gaithersburg, MA, USA, Rep. NISTIR, 8280, 2019.
[14] David Ha, Andrew Dai, and Quoe Le. Hypernetworks. arXiv preprint arXiv: urXiv.1609.09106, 2016.
[15] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. International Conference on Learning Representations (ICLR), 2019.
[16] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. International Confer- ence Learning Representations, 2014.
[17] Durk P Kingma, Tim Salimans, and Max Welling. Variational dropout and the local reparame- terization trick. Advances in Neural Information Processing Systems, 28, 2015.
[18] Brendan F Klare, Mark J Burge, Joshua C Klontz, Richard W Vorder Bruegge, and Anil K Jain. Face recognition performance: Role of demographic information. IEFE Transactions on Information Forensics and Security, 7(6): 1709)117991111 1801, 2012.

---

[19] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
[20] David Krueger, Ethan Caballero, Joern-Henrk Jacobsen, Amy Zhang, Jonathan Binas, Dinghuai Zhang. Remi Le Priol, and Aaron Courville. Out-of-distribution generalization via risk extrap- olation (rex). In International Conference on Machine Learning, pages 5815-5826. PMLR, 2021.
[21] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. Advances in Neural Information Processing Systems, 30, 2017.
[22] Chunyuan Li, Changyou Chen, David Carlson, and Lawrence Carin. Preconditioned stochastic gradient langevin dynamics for deep neural networks, In Proceedings of the AAAI Conference on Artificial Intelligence, volume 30, 2016.
[23] Jeremiah Liu, Zi Lin, Shreyas Padhy, Dustin Tran, Tania Bedrax Weiss, and Balaji Lakshmi- narayanan. Simple and principled uncertainty estimation with deterministic deep learning via distance awareness. Advances in Neural Information Processing Systems, 33:7498-7512, 2020.
[24] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of International Conference Computer Vision (ICCV), December 2015.
[25] Christos Louizos and Max Welling. Structured and efficient variational deep learning with matrix gaussian posteriors. In International Conference on Machine Learning, pages 1708-1716. PMLR, 2016.
[26] Wesley Maddox, Pavel Izmailov, Timur Garipov, Dmitry P Vetrov, and Andrew Gordon Wilson. A simple baseline for bayesian uncertainty in deep learning. Advances in Neural Information Processing Systems, 32, 2019.
[27] Andrey Malinin and Mark Gales. Predictive uncertainty estimation via prior networks. Advances in Neural Information Processing Systems, 31, 2018.
[28] Charles Margossian and David M. Blei. Amortized variational inference: When and why. In Uncertainty in Artificial Intelligence, 2024.
[29] Dana Michalski, Sau Yee Yiu, and Chris Malec. The impact of age and threshold variation on facial recognition algorithm performance using images of children. In 2018 International Conference on Biometrics (ICB), pages 217-224. IEEE, 2018
[30] Radford M Neal. Bayesian Learning for Neural Networks, volume 118. Springer Science & Business Media, 2012.
[31] Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, David Sculley, Sehastian Nowozin, Joshua Dillon, Balaji Lakshminarayanan, and Jasper Snoek. Can you trust your model's uncertainty? evaluating predictive uncertainty under dataset shift. Advances in Neural Information Processing Systems, 32, 2019.
[32] Yookoon Park and David Blei. Density uncertainty layers for reliable uncertainty estimation. In International Conference on Artificial Intelligence and Statistics, pages 163-171. PMLR, 2024.
[33] Christian S Perone, Pedro Ballester, Rodrigo Barros, and Julien Cohen-Adad. Unsupervised domain adaptation for medical imaging segmentation with celf-ensembling Neurolmage, 194: 1-11, 2019.
[34] Maithra Raghu, Ben Poole, Jon Kleinberg, Surya Ganguli, and Jascha Sohl-Dickstein. On the expressive power of deep neural networks. In International Conference on Machine Learning, pages 2847-2854. PMLR, R, 2017.
[35] Inioluwa Deborah Raji and Joy Buolamwini. Actionable auditing: Investigating the impact of publicly naming biased performance results of commercial products. In Proceedings of the 2019 AAAT/ACM Conference on AI, Ethics, and Society, pages 429-435, 2019.
12

---

[36] Alvin Rajkomar, Jeffrey Dean, and Isaac Kohane. Machine learning in medicine. New England Journal of Medicine, 380(14):1347-1338 2019.
[37] Tiago Ramalho and Miguel Miranda. Density estimation in representation space to predict model uncertainty. In Engineering Dependable and Secure Machine Leurning Systems: Third International Workshop, EDSMLS 2020, New York City, NY, USA, February 7, 2020, Revised Selected Papers 3, pages 84-96. Springer. 2020.
[38] Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International Conference Machine Learning, pages 1530-1538. PMLR, 2015.
[39] Murat Sensoy, Lance Kaplan, and Melih Kandemir. Evidential deep learning to quantify classification uncertainty. Advances in Neural Information Processing Systems, 31, 2018.
[40] Yuli Slavutsky and Yuval Benjamini. Class distribution shifts in zero-shot learning: Learning robust representations. Advances in Neural Information Processing Systems, 2024.
[41] Nisha Srinivas, Karl Ricanek, Dana Michalski, David S Bolme, and Michael King. Face recog- nition algorithm bias: Performance differences on images of children and adults. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 0-0, 2019.
[42] Joy A. Thomas Thomas M. Cover. In Elements of Information Theory, pages 347-355. John Wiley & Sons, Ltd, 2005.
[43] Tishby, Levin, and Solla. Consistent inference of probabilities in layered networks: Predictions and generalizations, International 1989 Joint Conference on Neural Networks, pages 403 409. IEEE, 1989.
[44] Eric J Topol. High-performance medicine: The convergence of human and artificial intelligence. Nature Medicine, 25(1):44-56, 2019.
[45] Antonio Torralba and Alexei A Efros. Unbiased look at dataset bias. In CVPR 20/1, pages 1521-1528. IEEE, 2011.
[46] Matias Valdenegro-Toro, Deep sub-ensembles for fast uncertainty estimation in image clas- sification. Bayesian Deep Learning Workshop at Neural Information Processing Systems, 2019.
[47] Joost Van Amersfoort, Lewis Smith, Yee Whye Teh, and Yarin Gal. Uncertainty estimation using a single deep deterministic neural network. In International Conference on Machine Learning, pages 9690 9700. PMLR, 2020.
[48] Joost Van Amersfoort, Lewis Smith, Andrew Jesson, Oscar Key, and Yarin Gal. On feature collapse and deep kernel learning for single forward pass uncertainty. Bayesian Deep Learning Workshop at Neural Information Processing Systems, 2021.
[49] Yoav Wald, Amir Feder, Daniel Greenfeld, and Uri Shalit. On calibration and out-of-domain generalization. Advances in Neural Information Processing Systems, 34:2215-2227, 2021.
[50] Mei Wang, Weihong Deng, Jiani Hu, Xunqiang Tao, and Yaohai Huang. Racial faces in the wild: Reducing racial bias by information maximization adaptation network. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 692-702, 2019.
[51] Max Welling and Yee W Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 681-688 Citeseer, 2011.
[52] Yeming Wen, Dustin Tran, and Jimmy Ba. Batchensemble: An alternative approach to efficient ensemble and lifelong learning. International Conference on Learning Representations, 2020.
[53] Christopher K Williams and Carl Edward Rasmussen. Gaussian processes for machine learning, vol. 2, no. 3. Cambridge, MA, USA: Massachusetts Institute of Technology Publishing, 2006.
13

---

[54] Jaesik Yoon, Taesup Kim, Ousmane Dia, Sungwoong Kim, Yoshua Bengio, and Sungjin Ahn. Bayesian model-agnostic meta-leariing Advances neural information processing systems, 31, 2018.
[55] Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Russ R Salakhutdinov, and Alexander J Smola. Deep sets. Advances in neural information processing systems, 30, 2017.
[56] John R Zech, Marcus A Badgeley, Manway Liu, Anthony B Costa, Joseph J Titano, and Eric Karl Oermann. Variable generalization performance of a deep learning model to detect pneumonia in chest radiographs: A cross sectional study. PLOS Medicine, 15(1 :):e)))e00000 1026683 2018.
14

---

A Example for the adaptive prior
We revisit the simple example from $1, considering binary prediction setting where y E {0, 13 and the covariates I E R consist of features, xx!)) and _x(2), In the training data xx12 remains constant across all examples. However, at test time, new subtypes may be encountered where both features exhibit variability. Assume the following logistic model
( = Bo + 31x(1) + 920 p(ula) a(p(x)) o((()))
(13)
where (xx) = 1/ t and (Bo, ,1, 82)T.
Due to the exchangeability between 3o and 83 in the training data, all combinations with a fixed value of Bo + B3 equally plausible when observing only the training data. However, this symmetry is broken when test data from new subtypes is observed.
As concrete example, assume that for all datapoints (train and test) the first feature is distributed as (11)) ~ M (1, 1). In the training data, 2r = 2 for all S S N; however, for new test examples x² the second feature drawn from N (2. 1). Let 6' = (52, 31, Bo) While for any of the first N datapoints, p(y) xr, 0) = ppyl[( Fr, 0'), this no longer holds for xx" thus leading to changes in the prior distribution upon arrival of new test example x".
Figure illustrates how the prior distribution, which for y E {0, 1} corresponds to
N
N
p(0[ x exp
Σ
log ply- = 0/2,, 0) log = 1 |,, 1122,00
(14)
adapts when new test examples are observed.
For the training data, any combination of Bg and 32 with a fixed sum 8o + 32 results in the same prob- ability. However, as new examples with varying values xx2) are introduced, the prior distribution begins to depend on how the weight is distributed between 30 and B2. Consequently, the equivalence regions concentrate around specific combinations of Bu and 83.
If, instead, the second feature of the test examples x², is drawn from distribution closely aligned
with the training data, N (2: I0 }) i.e., a distribution closely similar to the training data, the resulting changes to the prior are minimal. This is illustrated in Figure 8.
0H-N (9th Iwiins
A.t.8voll 1:00 piims
Asditvall 12 38
AAVRVVN 15 1215 E400S
Attriana 92 20t pwiins
19
18
10-
10-
18-
10-
10-
Figure 8: Changes in the prior due to introduction of test covariates drawn from a distribution similar to the training data, x=" ~ ~N2 10= ). In the top row, Ao is fixed at -1, while in the bottom row, ,3 is fixed at 1.
15

---

B Theoretical analysis of synthetic-environment sampling
The statement of Proposition 3.1 holds for any pair of finite distributions p. p.p" A not just those arising from our specific application-namele binned test distribution. In what follows, we formally state and prove this more general result, and then return to its application in our setting.
the empirical distribution of the training set and the
Proposition B.1. Let BI...., By be a partition of X. Denote the binned empirical distribution of the train set FA,N as p A where p(i) tे D5- [a E B, S k. Similarty, define the binned test distribution induced by the partition as p" (i) J P (x) dx. Assume that suppp' C suppp. Then for any >> O and a E (0. 1), there exist integers m. L E N, such that if independent samples of size m are drawn uccording to p. then with probability least a, at least one sample will induce binned empirical distribution pl satisfying (1 p"ll1 S
Proof. Let 1
-2(k-11 and define q E A follows
p (0)
1 1sisk-1
g(i) =
(15)
IN= Imp"(()) m
=
For < i k have (a(0) -p- and la(k) p" (k)) S
8-1 m
Hence, 1 p-1p S
2(k-1) 1) < 6.
Define
T T= 21mm Ps =
(16)
the set of all samples of size drawn according p. such that their empirical distribution p> q- This is the type-set of q. Denote the probability of drawing a given sample : = 21:m by (z) := (()))) Then, by the method of types (see, e.g., Theorem 11.1.4 in [42]), the probability of drawing sample whose empirical distribution equals is
(T)
Σ (z) 2ET
KL(alpp) =.
(17)
(m + 1)x
Consequently, the probability of drawing L samples of size m according p. such that the empirical distribution of at least one of them is satisfies
(1 - (T)) f 2 21 =)
(18)
Taking L 2
log log(1-E)
completes the proof.
Remark B.2. Using the inequality log(1 - E) -- we have
log a
5 1-5
log 1
(im e kT.(0l m) -1) log
1
(19)
log(1 - 5
5
a
& el (لن-ع 1)) KL(elpp) -1 ( 2(k 11) +2)
1 -- -0
((1)
e log 1
log
a
(20)
revealing the relationship of L to the tolerance and to
Application to our setting We now return to the setting in which p E A denotes the binned empirical distribution of the train set FI:N, induced by the partition of X. Specifically.
p(1)
1a, B,} 1=1
(21)
for sis Similarly, let p* E A denote the binned test distribution induced by the partition, given by
p² (i) Px (xx) dx.
(22)
16

---

If supp p" C supp p. then the conditions of Proposition 3.1 are satisfied, and thus drawing enough subsamples from Ti:N guarantees that, with high probability, in the binned space at least one of them will be close to the test distribution.
However, if there exists bin Bj, such that zj & B, for all S S N but Ss, Pa- (2) dr 0, then if 1Pp-p"li é' c, by discarding any bins B, such that B; E supp and B, & supp p. and re-normalizing the probabilities on the remaining bins to sum to 1, we obtain a reduced distribution for which we can require distance to p" that is at most - Consequently, Proposition 3. can be applied directly to this re-normalized distribution, guaranteeing with high probability that at least one subsample will be close to the test distribution within the reduced tolerance E - é'.
C Multi-environment algorithm
Algorithm 2 Variational posterior with synthetic environments
1: Input: Data D, no. synthetic environments L, train and test environment sizes and m, pre- trained embedding Dg. predictor (() iterations K, learning rate 1/, initialization 7())
2: for S k S K do
3: for 1 $ do
4: Sample synthetic datasets: D( ((x) (0 )) D = ((xg (0)
,,/ (10 )/m
5: Compute and test embeddings: 0e (a) (1) ).
... ge..geee (((a and ge (00) ) ................................ 96 (Im )
(0
Aggregate train embeddings to obtain (g(xl (0) x1?)
6:
7:
for 1 S j S m do (k.E) h(Tg(1 (0)) g6 ((( 110) (k-1)
8:
Compute 0j (k.C) and compute ofh.ee) 11j +
9:
Sample ej
(k.2) sT {j
(k,0) for (1l) (1ghe)) ,5/h.00) (0
10:
Compute:
plyin
(2)
mim: 0 0 (ggen (gE(1) (8) M)
plu; (0) (l)) (fh.f))) (1)(
p(Of 10 xx
(10) (prior; Eq. 5),
games i vin. 22, (10)
(0)
11:
end for
12:
end for
13: Compute (()) 1
E(=1 E ( (k:10)
14: Update the parameters of by gradient ascent: 7()) + -((1-1) + v
15: end for
D Additional experimental results
D.1 Synthetic data
Full results for the synthetic experiments presented in Figure are provided in Table 1.
Table I: Results for synthetic data linear regression and binary classification
Experiment
Metric
VIDS (ours)
DUE
SNGP
DUL.
Linear
RMSE
0.068 (0.002)
0. (0.008)
0.488 (0.004)
0.081 (0.010)
Accuracy
0.900 (0.009)
0,880 (0.001)
0.844 (0.027)
0.900 (0.008)
Logistic
ACE
0.011 (0.003)
0.034 (0.007) 0.099 (0.038)
0.018 (0.000)
In Figure 9 we provide results for the heteroscedastic regression experiment, for additional values of the parameter a, controlling how much the test data shifted with respect to the observed training data, and thus the difficulty of generalization providing accurate uncertainty measures.
17

---

VIDS (ours)
DUE
Irain
Text
33
33
-31
RMSE: 0.0674
RMSE: 0.0630
RMSE: 0.0640
RMSE: 0.0728
14
RMSE: 0.0673
RMSE: 0.3529
RMSE 0,5302
RMSE. 0.3202
10
Figure 9: Simulation results for heteroskedastic regression for 0.25 (top) and 0.75 (bottom). Red crosses represent training data, while gray dots indicate test data. The black line depicts the predictions, with the gray shaded area spanning +1 standard deviation. A single repetition is depicted; RMSE values are averaged over 10 repetitions.
E
Implementation Details
E.1
General implementation details
Code
The code reproduce our results is attached to the submission and upon acceptance link to a permanent repository will be included in the main text.
All the code in this work was implemented in Python 3. We used Numpy 2.0, TensorFlow 2.13 and TensorFlow Addons 0.21 packages. The UCI datasets were loaded through sklearn 1.6. CIFAR-C dataset obtained from Zenodo². CIFAR- 10 and Celeb-A datasets were loaded through torchvision 0.21. All figures were generated using Matplotlib 3.10.
For DUE and DUL implementation was adapted from the source code of the original papers45 For SNGP implementation was adapted from the implementation provided in the source code of DUE.
We ran all synthetic data and UCI experiments on 2 CPUs. Each repetition of these experiments lasted less than 7 minutes. For real data classification experiments (on CIFAR-10 and Celeb-A datasets) we used a single A100 cloud GPU. Each repetition lasted less than 18 minutes.
Hyper-parameters Our setting deals with an unknown covariate shift. Thus, hyperparameters for all methods were chosen via grid-search in single experiment repetition, (excluded from the analysis). Some the hyperparameters are method specific. Our variational method uses environment related parameters: number of environments J, size of each test environment and size of each train environment n.. Below we refer to the KL penalty as "penalty', and to the variance penalty as т. The DUE method employs inducing points to approximate the Gaussian process component. Both DUE and SNGP use GP features, random Fourier features used for approximating the kernel, and scaling of the input features. In DUL the number of steps corresponds epochs. The hyperparameters of all methods are specified in the corresponding tables below.
Normalizing factor For continuous response variables, our implementation approximates the log of the normalizing factor using the log of the mean of exponential logeliikshhoos:: log v = log( 1 exp(v;)) where o are the integrated log likelihoods.
"nttps://zeno:"
http://githab..comooottttttt http:///gttttao.ce///oo/oooo/s/s
18

---

Table 2: Hyperparameters for heteroskedastic linear and logistic regression.
Linear
Logistic
Parameter
VIDS (ours)
DUE
SNGP
DUL
VIDS (ours)
DUE
SNGP
DUL
30
30
m
20
500
500
т
0.001
0.001
Penalty
0.005
0.005
1
Batch size
520
100
64
50
520
100
32
50
Steps
30
1500
7000
500
30
1500
1000
300
Learning rate
10
10-2
10-3
10-3
10
10-2
10
10
n_ L_inducing_poing
20
GP features
128
3
Random features
1024
128
Feature scale
2
2
E.2
Implementation details for synthetic data experiments
The data-related parameters of the synthetic experiments described in the main text. The hyper- parameters used for the heteroskedastic linear regression and logistic regression with missing data are detailed in Table 2.
For VIDS we specify h as a fully-connected neural network with 6 layers of sizes 64d, 32d, 16d, 8d, 4d, 2d and ReLU activation between the layers, for = 8.
E.3 Implementation details for real data classification experiments
For the classification experiments (both for CIFAR and Celeb-A datasets) and all methods, we specify the base model as convolutional neural network with two convolutional blocks, each with 3x3 convolution with 32 filters, followed by ReLU activation and 2x2 max- max-pooling. These are followed by fully connected layer with 64 units, ReLU activation and final fully connected layer of dimension d 16.
We performed grid search for hyperparameters for each method on a single repetition of the experiment on an excluded setting. We chose the "Pixelate" corruption for the search CIFAR, and the Target- - Shift Attribute pair of Male - Blurry for Celeb-A. The resulting hyper-parameters are reported in Table 3.
CIFAR For VIDS, we specify h. as a fully connected neural network with 4 layers of sizes layers of sizes 32d 10, 16d 10, 4d 10, 2d 10 and ReLU activations between them, for d 16.
Celeb-A For VIDS, we specify h, as a fully connected neural network with layers of sizes 32d, 16d, 8d, 4d, 2d and ReLU activations between them, for d = 16.
E.4 Implementation details for real data regression experiments
We use the standard target variables from the UCI datascts: MEDV for Boston, Compressive Strength for Concrete, and Quality for Wine.
To evaluate model performance under distribution shifts, split each dataset into two groups by applying the K-Means algorithm with = 2 on all numerical columns, excluding the target variable. We calculate the average Euclidean within-cluster distance for each cluster the mean distance from each point to its centroid. The cluster with the larger average within-cluster distance designated as the majority in training.
then sample data from both clusters uniformly at random to form the training and test sets. The training set contains 90% of the high- high-variance cluster, while the test set consists of 90% of the
19

---

Table 3: Hyperparameters for classification experiments.
CIFAR
Celeb-A
Parameter
VIDS (ours)
DUE
SNGP
DUL
VIDS (ours)
DUE
SNGP
DUL
J
10
10
m
20
20
5000
1000
т
0.001
0.001
Penalty
0.001
0.005
Batch size
5020
100
100
50
1020
100
100
50
Steps
25
25,000
100,000
500
50
1500
10,000
500
Learning rate
10
10-4
10
10-3
10-3
10
10-3
10-3
L_inducing_poing
100
GP features
64
16
Random features
512
64
Feature scale
2
2
low-variance cluster. Both the training and test features and target variables are standardized using the median and standard deviation of the training
For all experiments we specified the base model as fully connected neural network with layers of sizes 8d, 4d, 2d, 4d, 2d and ReI. activations between them, for d = 32.
The hapeeeparameters for the experiments are detailed in Table 4.
Table 4: Hyperparameters for UCI regression experiments.
Parameter
VIDS (ours)
DUE SNGP DUL
J
10
m
50
1000
0.001
Penalty
0.01
Batch size
520
100
64
50
Steps
150
1000
7000
500
Learning rate
10
10-2
10
10
n L_iinduuing_pone points
20
GP features
16
Random features
Feature scale
E.5
Running times
Our method differs from others that it pre-trains a representation and performs variational inference only the prediction layer. As result, for smaller models (e.g., linear regression), our approach can be more computationally expensive due to per-environment optimization. However, for larger models, method has advantage since competing methods optimize many more parameters. In the following table, we specify the hardware and execution times for all methods across our experiments.
20

---

Table 5: Runtime comparison across methods.
Dataset
Hardware
Unit
Vids
DUE
SNGP
DUL
Linear regression
2 CPUs
seconds
67.160
39.900
54.800
16.400
Logistic regression
2 CPUs
seconds
61,250
40.300
16.500
6.290
Concrete
2 CPUs
minutes
3.237
2.070
0.700
0.400
Boston
2 CPUs
minutes
3.112
2.017
0.717
0.267
Wine
2 CPUs
minutes
2.523
1.583
1.567
0.895
CIFAR-C (max across corruptions)
100 Cloud GPU
minutes
2.516
7.447
3.527
4.040
Celeb-A (max across tasks)
A100 Cloud GPU
minutes
2.420
4.417
4.220
3.318
21

---

NeurIPS Paper Checklist
1. Claims
Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Answer: [Yes]
Justification: The main claims and contributions of the paper are listed in the final paragraph of the Introduction.
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made in the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.
It is fine to include aspirational goals as motivation long is clear that these goals are not attained by the paper.
2. Limitations
Question:
Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Limitations and possible future extensions are discussed at the end of the Conclusion section.
Justification:
Guidelines:
The answer NA means that the paper has limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.
The authors are encouraged to create a separate "Limitations" section in their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (c.g.. independence assumptions, noiseless settings, model sell-speciiiatiinn asymptotic approximations only holding locally). ). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on few datasets or with few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect on the factors that influence the performance of the approach. For example, facial recognition algorithm may perform poorly when image resolution low or images are taken in low lighting. Or speech-to-tex, system might not be used reliably to provide closed captions for online lectures because it fails handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and faimesss.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't 't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an impor- tant role in developing norms that preserve the integrity of the community, Reviewers will be specifically instructed to not penalize honesty concerning limitations.
3. Theory Assumptions and Proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
22

---

Answer:
[Yes]
Justification: Modeling assumptions are explicitly stated in Section 2.2, and proofs in Appendix B.
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross referenced.
All assumptions should be clearly stated or referenced the statement of any theorems.
The proofs can either appear in the main paper or the supplemental material, but they appear in the supplemental material, the authors encouraged provide short proof sketch to provide intuition.
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental Result Reproducibility
Does the paper fully disclose all the information needed to reproduce the main ex- perimental results the paper to the extent that affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?
Question:
Answer: [Yes]
Justification: The algorithms are described Algorithm and 2. Details for all empirical results are provided in Appendix E.
Guidelines:
The answer NA means that the paper does not include experiments.
If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is novel architecture, describing the architecture fully might suffice, or if the contribution a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way accomplish this, but reproducibility instructions for how to replicate the results, access to a hosted model (e.g.. in the case of large language model), releasing of a model checkpoint, other means that appropriate to the research performed.
also be provided via detailed
While NeurIPS does not require releasing code, the conference does require all submis- sions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.
(b) the contribution is primarily new model architecture, the paper should describe the architecture clearly and fully.
(c) If the contribution is a new model (e.g., a large language model), then there should either way to access this model for reproducing the results or way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).
(d) We recognize that reprodueibility may be tricky in some cases, in which authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers have some path reproducing or verifying the results.
5. Open access to data and code
23

---

The authors should provide scripts to reproduce all experimental results for the new reproducible, they Question: Does the paper provide open access to the data and code, with sufficient instruc- tions faithfully reproduce the main experimental results, as described in supplemental material?
Answer: [Yes]
Justification: Source code to reproduce in experimental results provided with the submis- sion, and will be made public upon acceptance.
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurIPS code and data submission guidelines (https://nips.cm ca/
for more details.
While we encourage the release of code and data, understand that this might be possible, so "No" is an accep answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for new open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines (https:
/ //nips. httppsscccppbccccccceccccpcccclt hugggddess des/ CooeeSubmi ssi aesoonooicyy for more details.
The authors should provide instructions data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
proposed method and baselines. only subset of experiments should state which ones are omitted from the script and why.
At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information as possible in supplemental material (appended to the paper) recommended, but including URLs to data and code is permitted.
6. Experimental Setting/Details
Question: Does the paper specify all the training and test details (e.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification: All details specified in Appendix E.
Guidelines:
The answer NA means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper to a level of detail that is necessary appreciate the results and make sense of them.
The full details can provided either with the code, in appendix, or as supplemental material.
7. Experiment Statistical Significance
Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Question:
Answer: [Yes]
Justification: Mean performance and standard deviation across replicates are reported in tables throughout the study. All relevant plots include error bars.
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by error bars, confi- dence intervals, statistical significance tests, least for the experiments that support the main claims of the paper.
The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall with given experimental conditions).

---

The method for calculating the error bars should be explained (closed form formula, call a library function, bootstrap, etc.)
The assumptions made should be given (e.g., Normally distributed errors).
It should be clear whether the error bar is the standard deviation the standard error of the mean.
It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have 96% CI, if the hypothesis of Normality of errors is not verified.
For asymmetric distributions, the authors should be careful not show in figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).
error bars are reported in s or plots, The authors should explain in the text how they were calculated and reference the corresponding figures in the text.
8. Experiments Compute Resources
For each experiment, does the paper provide sufficient information on the puter resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Question:
Answer: [Yes]
Justification: Specified Appendix E.
Guidelines:
The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs as well estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary failed experiments that didn't I make it into the paper).
9. Code Of Ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurlPS Code of Ethics https: ptttps://neee http://eeuuupp.eeeee
Answer: [Yes]
Justification:
The paper conforms with the NeurIPS Code of Ethics.
Guidelines:
The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.
If the authors answer No, they should explain the special cireumstances that require deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g., if there is special consid- cration due to laws or regulations in their jurisdiction).
10. Broader Impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [NA]
Justification: This work not related to any particular application that might have societal impacts.
Guidelines:
The answer NA means that there is no societal impact of the work performed.
If the authors answer NA or No, they should explain why their work has no societal impact why the paper does not address societal impact.
25

---

Examples of negative societal impacts include potential malicious unintended uses (e.g., disinformation, generating fake profiles, surveillance), faireess considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional unintentional) misuse of the technology.
If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).
11. Safeguards
Does the paper describe safeguards that have been put in place for responsible release of data models that have high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
Question:
Answer: [NA]
Justification:
Not applicable for the current study.
Guidelines:
The answer NA means that the paper poses no such risks.
Released models that have high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make best faith effort.
12. Licenses for existing assets
Are the creators or original owners of assets (e.g.. code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Question:
Answer: [Yes]
Justification: Datasets and previous approaches discussed in the paper have all been properly attributed.
Guidelines:
The answer NA means that the paper does not use existing assets.
The authors should cite the original paper that produced the code package or dataset.
The authors should state which version of the asset is used and, if possible, include URL.
The name of the license (e.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.
26

---

If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswi thcode. com datasets has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.
If this information not available online, the authors are encouraged to reach out to the asset's s creators.
13. New Assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer:[Yes]
Justification:
We provide documented source code.
Guidelines:
The answer NA means that the paper does not release new assets.
Researchers should communicate the details of the dataset/code/moode as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent obtained from people whose asset is used.
At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.
14. Crowdsoureing and Research with Human Subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well details about compensation (if any)?
Answer: [NA]
Justification:
The study does not involve crowdsourcing or research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information the supplemental material is fine, but if the main contribu- tion of the paper involves human subjects, then much detail as possible should be included in the main paper.
According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.
15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or equivalent approval/review based the requirements of your country institution) were obtained?
Answer: [NA]
Justification: The study does not involve human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing research with human subjects.
Depending the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
27

---

We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors adhere the NeurIPS Code of Ethics and the guidelines for their institution.
For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.
28


Reviews:
[{"review_id": "RIMoOkZM0C", "reviewer": "Reviewer_5Fqm", "summary": "The paper proposes variational inference under distribution shifts (VIDS). The main idea is a covariate-conditional adaptive prior that increases uncertainty for test data far from the training distribution. The implementation rests on (1) an energy-based prior that has support over training as well as test covariates, (2) an amortized posterior with test covariates as input and (3) a bootstrap sampling scheme to generate synthetic test covariates for fitting the posterior. On synthetic data, VIDS has good predictive performance and captures the correct heteroscedastic variance structure in- as well as out-of-distribution, outperforming baselines (DUE, SNGP, DUL). On small-scale UCI regression and medium-scale image classification datasets (corrupted CIFAR-10, Celeb-A), VIDS achieves the best accuracy under covariate shift.", "questions": "**Runtime**: In appendix E.1 the authors mention run times of ~7 minutes for a UCI experiment, and ~18 minutes for the CIFAR-10 / Celeb-A experiments. Do these run times refer to VIDS, or are those the maxima across all methods? Additionally VIDS appears to involve more hyperparameters than the baselines (predominantly related to the synthetic environments). Does this lead to significantly higher cost during grid search over hyperparameters? More details on tuning complexity would be useful to assess the practical efficiency of VIDS relative to baselines.\n\n**Effectiveness of synthetic environments**: While the use of synthetic environments is theoretically supported (Proposition 3.1), it would strengthen the paper to empirically assess how well the sampled shifts align with actual covariate shifts in test data. If feasible, could the authors include such an analysis, or otherwise discuss limitations of the current simulation strategy?\n\n**Baseline comparisons**: The paper omits some widely used uncertainty estimation methods for neural networks, such as deep ensembles, which may perform well under the studied covariate shifts. Can the authors clarify why such baselines were note included in empirical comparisons?\n\n**Ablations**: The framework integrates several components: the covariate-conditional adaptive prior, amortized inference with specific embedding/predictor architecture, and the environment-level variance penalty. Overall, it is unclear how much each component contributes to performance gains. An ablation study (e.g., disabling the environment-penalty) would help isolate their effects and clarify the drivers of performance. Do the authors have any such results, or plans to include them?\n\n**Minor clarifications**:\n- In Tables 3 and 4, the values of $m$ (test environment size) and $J$ (number of environments) are larger for UCI regression than for image classification. Could the authors clarify why this is the case? Does this reflect a need for fewer synthetic covariates in high-dimensional settings?\n- Algorithm 1 refers to computing the adaptive prior (Eq 5), which involves a normalization constant. Does the implementation actually compute or approximate this constant, or is it ignored during optimization?\n- In Figure 2, it seems the covariate shift is applied only to the second feature. If so, could the authors clarify this in the figure caption?\n- Could the authors explain the reason for the large batch sizes used for VIDS (Tables 3 and 4), particularly in relation to other methods?\n- In Algorithm 1, the use of $m$ and $M$ appears inconsistent, could this be cleaned up for clarity?\n- Typo in line 154: \"define\" should be \"defined\".\n- Typo in line 471", "limitations": "yes", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 4, "significance": 3, "originality": 3, "strengths_and_weaknesses": "### Strengths\n\n**Novelty of adaptive prior**: The paper introduces a covariate-dependent adaptive prior based on an energy objective, an interesting idea in the context of Bayesian neural networks under distribution shift. The concept seems novel, but is related to previous work by Park and Blei (as described in the paper). By conditioning the prior over model parameters on both training and test covariates, the approach improves out-of-distribution uncertainty. The formulation is intuitive and addresses a limitation in current Bayesian neural network models.\n\n**Sound inference scheme**: Sections 2.4 and 2.5 present a rigorous and well-motivated inference scheme for the proposed method. VIDS combines an energy-based adaptive prior with amortized variational inference conditioned on test covariates, allowing posterior uncertainty to adapt dynamically under covariate shift. The variational posterior is parametrized by an inference network that aggregates learned embeddings of the training covariates along with the test covariate, enabling a flexible and scalable approximation. The use of the reparameterization trick, a diagonal Gaussian variational family, and single-sample Monte Carlo estimation together make the optimization procedure computationally tractable.\n\n**Solid empirical results**: VIDS demonstrates consistent empirical performance across synthetic regression and classification problems as well as small- and medium-scale real-world datasets like CIFAR-10-C, Celeb-A, and UCI regressions. VIDS outperforms established baselines from the OOD generalization literature (DUE, SNGP, and DUL) in terms of predictive accuracy on OOD data. The results suggest that the method is practically effective in improving uncertainty estimates under covariate shift.\n\n### Weaknesses\n\n**Runtime**: A potential limitation of the proposed approach may be computational overhead. VIDS requires fitting the variational posterior in each bootstrapped synthetic environment. Within each environment, the method loops over multiple test covariates, computing ELBO objectives and backpropagating through the inference network. While amortization avoids the cost of posterior inference per test point, the nested loop over synthetic environments and test samples introduces substantial computational complexity, particularly for large datasets or when many environments are needed to cover possible covariate shifts. This may limit the scalability of VIDS.\n\n**Effectiveness of synthetic environments**: Another potential limitation lies in the assumption that the distribution of test-time covariates can be approximated at training time. The authors address this via a bootstrapping strategy to simulate covariate shift by constructing synthetic environments, grounded in proposition 3.1 and based on prior work from the OOD generalization literature. While theoretically justified, this approach may not fully capture the nature of real-world distribution shifts.", "was_revised": true, "final_justification": "The rebuttal addressed runtime and hyperparameter concerns with detailed comparisons, clarified the role and limits of synthetic environments, and justified the chosen baselines. The ablation results on the environment penalty provided insight into its contribution to performance. While scalability to very large datasets may remain a practical limitation, the method is novel, well-motivated, and empirically strong under covariate shift. \nRecommendation: Accept.", "rebuttal": "Dear reviewer,\n\nThank you for dedicating the time to write a thorough review. Please see below.\n\n**1. Runtime:**\n\nThe reported run-times were for the entire experiment (all methods). Here is a table summarizing the average running time of each method across all experiments:\n\n| Dataset                               | Hardware         | Unit     | Vids   | DUE    | SNGP   | DUL    |\n|---------------------------------------|------------------|----------|--------|--------|--------|--------|\n| Linear regression                     | 2 CPUs           | seconds  | 67.160 | 39.900 | 54.800 | 16.400 |\n| Logistic regression                   | 2 CPUs           | seconds  | 61.250 | 40.300 | 16.500 | 6.290  |\n| Concrete                              | 2 CPUs           | minutes  | 3.237  | 2.070  | 0.700  | 0.400  |\n| Boston                                | 2 CPUs           | minutes  | 3.112  | 2.017  | 0.717  | 0.267  |\n| Wine                                  | 2 CPUs           | minutes  | 2.523  | 1.583  | 1.567  | 0.895  |\n| CIFAR-C (max across corruptions)      | A100 Cloud GPU   | minutes  | 2.516  | 7.447  | 3.527  | 4.040  |\n| Celeb-A (max across tasks)            | A100 Cloud GPU   | minutes  | 2.420  | 4.417  | 4.220  | 3.318  |\n\nYou are correct that using multiple environments increases computational cost. However, this _overhead is significant only for small models_ with few parameters. For larger models (CIFAR, CelebA experiments), our method is more efficient: it pre-trains a representation using standard likelihood optimization and performs variational inference _only on the final prediction layer_. In contrast, _competing methods involve more complex computations across all layers_.\n\nAs for **hyperparameter tuning**, our method shares the standard set of hyperparameters used by all methods (e.g., batch size, learning rate). The additional hyperparameters relate to environment sampling: the number of environments, their size, and the penalty coefficients. We found that performance was largely insensitive to the number of environments, as long as there are more than a few (we used 10 in the CIFAR experiments). We did observe sensitivity to the penalty coefficient, with consistently better results for smaller values.\n\nWe will include these additional details in the appendix.\n\n**2. Effectiveness of synthetic environments:**\n\nThe main limitation of our strategy lies in the support of the source and target distributions. If the supports overlap sufficiently—or, as in our regression experiments, if learning from a sub-region of the training support suffices—then the method is effective.\n\nTo build intuition, we can consider the linear regression example. Since the noise variance grows with $x$,  the region near $x=a$ is most informative for learning the heteroscedasticity structure. Given that training inputs are uniformly distributed, the probability that a sample falls within an $\\epsilon$--neighborhood of $a$ is $\\frac{\\epsilon}{a}$. The probability $\\rho$ that at least $k$ out of $m$  samples in a single environment fall in that region follows a binomial distribution. To ensure, with confidence at least $1-\\alpha$, that at least one of $J$ sampled environments contains $k$ such points requires $J \\geq \\frac{\\log \\alpha}{\\log 1-\\rho}$.\n_For example, with $\\alpha=0.05, m=20, k=10, a=0.5, \\epsilon=0.1$ this yields a requirement of at least 11 environments._\n\nA similar argument can be developed for all experiments. For example, in the CIFAR-experiments we have a probability of 0.1 of a single sample to be corrupted, and then the same calculation applies only with the corresponding $\\rho$.\n\n**3. Baseline comparisons:**\n\nWe mention ensemble models in the related work section, as they are commonly interpreted as uncertainty estimators. However, their uncertainty estimates arise from averaging predictions across multiple models—effectively _replacing the original prediction model rather than evaluating uncertainty of a given model_. As a result, the quality of the uncertainty estimate depends heavily on the strength of the ensemble, making it an unfair basis for comparison.\n\nMoreover, ensemble methods do not explicitly address distribution shifts, unlike many distance-based approaches. For these reasons, our comparisons focus on methods that are most closely aligned with our approach: those that integrate Bayesian and distance-based components.\n\n**4. Ablation:**\nWe did not include an ablation study since the components of our method are _not designed to function in isolation_. By sampling a sufficiently large number of synthetic environments, we are guaranteed to encounter one that approximates the unseen distribution shift. However, since we don’t know which one, the model must be constrained to perform well across all environments.\n\nThat said, _we did run the proposed ablation_. The results below show that without the penalty across environments, _our method still outperforms competing baselines in most cases, but with a smaller margin_ than the complete version.\n\n| Data                    | Metric (Avg.) | DUE   | SNGP  | DUL   | VIDS  | VIDS - no env penalty |\n|-------------------------|---------------|-------|-------|-------|------------------|-------------------------------|\n| Concrete                | RMSE          | 0.490 | 0.532 | 0.484 | 0.441            | 0.660                         |\n| Linear                  | RMSE          | 0.110 | 0.488 | 0.081 | 0.068            | 0.091                         |\n| CIFAR-C: Defocus        | Accuracy      | 0.286 | 0.426 | 0.210 | 0.499            | 0.391                         |\n| CIFAR-C: Contrast       | Accuracy      | 0.291 | 0.437 | 0.098 | 0.525            | 0.435                         |\n| CIFAR-C: Blur           | Accuracy      | 0.395 | 0.494 | 0.495 | 0.635            | 0.530                         |\n| Celeb-A: Gray Hair      | Accuracy      | 0.896 | 0.896 | 0.943 | 0.946            | 0.926                         |\n| Celeb-A: Pale Skin      | Accuracy      | 0.842 | 0.886 | 0.842 | 0.892            | 0.874                         |\n| Celeb-A: Heavy Makeup   | Accuracy      | 0.875 | 0.878 | 0.875 | 0.939            | 0.921                         |\n| Logistic                | Accuracy      | 0.884 | 0.844 | 0.900 | 0.900            | 0.884                         |\n| Wine                    | RMSE          | 0.763 | 0.807 | 0.914 | 0.782            | 0.764                         |\n| Boston                  | RMSE          | 0.962 | 0.934 | 1.165 | 0.938            | 0.834                         |\n\n**5. Minor clarifications:**\n- **Tables 3 and 4:** The main reason lies in the experimental design. For the classification datasets, we had access to additional annotations: corruption types in CIFAR and attributes in CelebA. This allowed us to define distribution shifts explicitly. In contrast, for the regression datasets, the subtypes were constructed via clustering, making the shifts less clearly defined.\n- **Normalization constant:** Thank you for pointing this out. The implementation approximates the log of the normalizing factor $z$ using the log of the mean of exponential log-likelihoods: $\\log v \\approx  \\log (\\frac{1}{n} \\sum_i exp(v_i))$ where $v_i$ are the integrated log likelihoods. We will add this to the manuscript.\n- **Figure 2:** Yes, the shift is one feature which is constant at training and no longer at test. We will explain this in the legend as suggested (the main text already mentions this). \n- **Batch sizes:** the reported numbers account for the multiple environments.\n- **Notation:** Throughout all the paper $M$ is the number of overall test examples, and $m$ is the number of environment test examples (within a synthetic environment)."}, {"review_id": "n5LMSKcwjA", "reviewer": "Reviewer_bQJ5", "summary": "The authors  introduces an adaptive prior to improve uncertainty estimate.\n\nAdaptive prior is a prior distribution conditioned on input covariates unlike traditional fixed prior.  This was intended to provide a measure the distance ofa test point from the training distribution. To do this, the authors resort to energy model Eq 4.\n\nTo estimate the posterior, the paper employs an amortized variational inference. Hence the name of the proposed scheme is VIDS (Variational Inference under Distribution Shifts). An inference network is trained to output the parameters of an approximate posterior distribution, conditioned on both training and test data.\n\nThe authors adopt synthetic environments for training since t test data from shifted distributions are often unavailable during training.", "questions": "The adaptive prior is conditioned on covariates only but the energy based model incorporates likelihood. It is not clear whether we still call the as prior.\n\nAlso, it would be better to show the sensitivity to hyper-parameters for synthetic environments, which eventually decide the performance of the VIDS.", "limitations": "yes.", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 4, "originality": 4, "strengths_and_weaknesses": "The authors propose a novel idea; adaptive prior, $ p(θ∣x_{1:n}, x^\\star)$. This seems like posterior but does not related with the output (target value). So, it could be considered as a new concept of prior.\n\nUtilizing energy-based model and synthetic environment seems resonable.\n\nAlso, the performance comparison with DUE, SNGP, and DUL  are convincing.\n\nThe manuscript does not include detailed analysis about computation complexity/cost about variational inference in Section 2.4.\n\nThere is limited discussion (including appendix) about the choice of hyper parameters.", "was_revised": true, "final_justification": "This paper is technically solid but the evaluation is still limited. That's why I could not raise the score to \"Accept.\" I'll keep borderline accept.", "rebuttal": "Dear reviewer, \n\nThank you for your review. We address the raised questions below.\n\n1. **The prior is not conditioned on the true outcome $y$. It integrates over all possible values $y$**. For example, in binary classification this would mean $\\log p(\\theta \\vert x, y=0) + \\log p(\\theta \\vert x, y=1)$, regardless of the true unknown $y$.\n\n2. Aside from standard hyperparameters shared across all methods (e.g., batch size, learning rate), the additional **hyperparameters** in our method are for environment sampling: the number of environments, their size, and the penalty coefficients. We found that performance is insensitive to the number of environments, as long as there are more than a few (e.g., we used 10 in the CIFAR experiments). \nWe did observe sensitivity to the penalty coefficient, with consistently better results for smaller values.\nHence, as the tables in the appendix show, for each type of experiment (UCI datasets, 3 corruptions of CIFAR, 3 attributes in Celeb-A) share the same hyper-parameters.\n\n3. Please see the attached **running times**:\n\n| Dataset                               | Hardware         | Unit     | Vids   | DUE    | SNGP   | DUL    |\n|---------------------------------------|------------------|----------|--------|--------|--------|--------|\n| Linear regression                     | 2 CPUs           | seconds  | 67.160 | 39.900 | 54.800 | 16.400 |\n| Logistic regression                   | 2 CPUs           | seconds  | 61.250 | 40.300 | 16.500 | 6.290  |\n| Concrete                              | 2 CPUs           | minutes  | 3.237  | 2.070  | 0.700  | 0.400  |\n| Boston                                | 2 CPUs           | minutes  | 3.112  | 2.017  | 0.717  | 0.267  |\n| Wine                                  | 2 CPUs           | minutes  | 2.523  | 1.583  | 1.567  | 0.895  |\n| CIFAR-C (max across corruptions)      | A100 Cloud GPU   | minutes  | 2.516  | 7.447  | 3.527  | 4.040  |\n| Celeb-A (max across tasks)            | A100 Cloud GPU   | minutes  | 2.420  | 4.417  | 4.220  | 3.318  |\n\nUnlike other methods, our approach first pre-trains a representation and then performs variational inference only on the prediction layer. Thus, for large models, competing methods must optimize the full parameter set, and thus ours has an advantage. This is reflected in the reported times for the CelebA and CIFAR experiments. However, for small models our method is likely to be more computationally intensive due to computations across multiple environments."}, {"review_id": "M4oGCe4Oli", "reviewer": "Reviewer_WREH", "summary": "The authors proposed a modification in the classic variational inference setting by altering the prior by conditional in the training data as well as in a new test point. Then, they compute the posterior via maximizing the ELBO.\n\nIn order to account for the absence of the test point $x^*$, from which the prior is dependent upon, the authors use bootstrap to create a synthetic environment that empirically shows to be similar to a family of unseen shifts. They provide a formal result that states the minimum amount of data needed to ensure these bootstrapping indeed leads to a distribution that is close to the true un-observed one.\n\nFinally for the computing of the posterior, in order to avoid an expensive Montecarlo simulation, using the re-parametrization trick they manage to in a single pass of the data (train and test embedding) compute a the variational distribution from which samples from theta are going to be drawn", "questions": "- Is clear that the classifier using your method has a better accuracy, but there is any application for the UQ that can be computed from variational methods?\n- I really like the linear regression example, but given the size of frontier models, why is the motivation of these type of work still on NN classifiers?", "limitations": "N/A", "rating": 4, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 4, "clarity": 4, "significance": 2, "originality": 3, "strengths_and_weaknesses": "Weaknesses\n- The energy function as a prior are hard to just in the non smooth conditioned marginals of language modeling.\n- Their procedure is probably intractable for the training data and NN architectures used in frontier models.\n- UQ understood as calibration is hard to interpret in classification settings setting where the true distribution is a point mass, say image classification.\nStrengths\n- Is a clear an effective extension of a well knwon technique (variatonal inference)\n- The method provides robustness against distribution shifts\n- They provided a good sample procedure to enable differentiable.", "was_revised": true, "final_justification": "My comments were minor and more related with the motivation of the work rather than about its technical feat. They answered my concerns and thus I decided to maintain my original opinion about the paper (and henceforth my score as well).", "rebuttal": "Dear reviewer,\n\nThank you for your review. We address the raised questions and weaknesses below.\n\n- **Smoothness in language models:** The non-smooth conditional marginals in language models are the conditional distributions of the target (e.g., next word) given the context. However, **our model operates in a continuous latent space where the conditional distributions are of the parameters $\\theta$ (variational)**.\n\n- **Interpretation of calibration for uncertainty and application**: Calibration, accuracy, and other metrics reported in the paper serve to evaluate how well the model captures the true conditional distribution $p(y \\vert x)$. Among these, calibration is often viewed not just as an evaluation metric, but as a goal in itself—reflecting the reliability of the predicted probabilities rather than just the correctness of the most likely label. Intuitively, if for every $\\alpha \\in [0,1]$, for example $\\alpha=0.7$, indeed 70% are positive, it reflects correct uncertainty, that can be used for **decision making, selective prediction, and risk-sensitive applications**. \n\n- **Computation of calibration:** In classification, **calibration is estimated via binning**: predicted probabilities are grouped into discrete intervals (bins), and for each bin, the average predicted probability is compared to the empirical accuracy—that is, the proportion of correctly classified examples within that bin. We follow this standard estimation.\n\n- **NN classifiers vs. regression models:** Our use of regression models was mainly since they allow a simple visualization of the model and the predictive variance. However, the rest of our experiments were on NN architectures (e.g., CIFAR, Celeb-A, UCI datasets). In fact, our method is **agnostic to the architecture and can be applied to any neural network**."}, {"review_id": "AeQdE4tn6e", "reviewer": "Reviewer_xBus", "summary": "The paper proposes a Bayesian approach where the prior distribution is adapted to additionally depend on test covariates. The objective is to enable the model to better capture covariate shift (from training data to test data), thus improving predictive performance and uncertainty calibration. To facilitate application, amortized variational inference and synthetic environments are used. Experiments on classification and regression task are reported.", "questions": "1. As stated above: Is the submission truly the first work to develop the idea of (additionally) conditioning on test covariates, as is suggested? What is the relation to e.g. conditional neural processes (e.g., Garnelo et al. 2018), Bayesian Model-Agnostic Meta-Learning (Yoon et al. 2018) and, e.g., other work on amortized variational inference / variational hypernetworks?\n2. Why was ACE used as evaluation metric instead of, e.g., ECE?\n3. Can you provide some more information on the runtime of the method (elaborating on the information in Appendix E)?\n\nIf question 1 is addressed satisfactorily, I would be open to increasing my evaluation score, especially if question 2 and 3 are also addressed.", "limitations": "yes (although their severity could be elaborated on)", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 2, "significance": 2, "originality": 2, "strengths_and_weaknesses": "Quality: Overall, I think the paper is a quality submission. I did not identify a technical issue within the paper. The code is available, as is a theoretical analysis in the Appendix. While the experiments could be extended (e.g., larger/more complex datasets), results on both classification and regression are presented and implementation details for the experiments are also provided. Discussion on strengths and limitations is included in a brief manner, but could also be extended (e.g., how severe are the currently discussed limitations?).\n\nClarity: The beginning of the paper was quite clear and straightforward to read, with the rationale clearly outlined. I then found the later parts of Section 2 to be quite hard to follow, especially the technicals/math. I suggest to cut some redundancies from the beginning of Section 2, which are already presented in a similar fashion in Section 1, and to provide more explanations on 2.3-2.5, e.g., the energy function, amortized variational inference and the sampling strategies. Some smaller suggestions for clarity: The use of the ACE metric is not justified. “Selection bias” is highlighted in the Abstract, but not really discussed further in the paper. Also, the references to the example in “§1” (i.e., Section 1) are not clear.\n\nSignificance: Quantifying uncertainty in machine learning is undoubtedly of enormous importance. I thus believe that the paper aims at an important contribution, and the results of the experiments are strong enough. That being said, I am unsure about the originality of the work, which also affects its significance (cf. below).\n\nOriginality: Overall, I believe that the justification of the paper’s originality needs improvement. The idea of (additionally) conditioning on test covariates is a good one, but is the submission truly the first work to develop this idea, as is suggested? For example, I am not sure about the relation of the paper to conditional neural processes (e.g., Garnelo et al. 2018): Don’t these effectively also incorporate a conditioning on test inputs? I have similar concerns regarding Bayesian Model-Agnostic Meta-Learning (Yoon et al. 2018) and, e.g., other work on amortized variational inference / variational hypernetworks. The paper must be clearer in this regard, i.e., what truly is novel. Additionally, I found the presentation of related work in the paper to be suboptimal. There is a bolded term “Related work” in Section 1, which, however, partly reads more like a “Background” section (e.g., discussing examples from the medical domain). Why not dedicate a separate section to important related approaches and clarify the contribution and novelty of the paper? Moreover, almost all of the work discussed in the “related work” is from 2017-2021. Has there hardly been any progress since then?\n\nI wish the authors all the best for their work on this interesting topic.\n\nReferences:\nGarnelo, M., Rosenbaum, D., Maddison, C., Ramalho, T., Saxton, D., Shanahan, M., ... & Eslami, S. A. (2018, July). Conditional neural processes. In International conference on machine learning (pp. 1704-1713). PMLR.\n\nYoon, J., Kim, T., Dia, O., Kim, S., Bengio, Y., & Ahn, S. (2018). Bayesian model-agnostic meta-learning. Advances in neural information processing systems, 31.", "was_revised": true, "final_justification": "The quality, clarity and significance of the paper had been strong from the beginning. However, I had been unsure about the originality of the work. The authors’ clarifications during the discussion phase were able to resolve my concerns in this regard. I also find the responses to the other questions to be satisfactory and appreciate the authors’ suggestions to incorporate them into the camera ready version. Thus, I overall recommend to accept the paper.", "rebuttal": "Dear reviewer, \n\nThank you for your thoughtful review and your clarity regarding score reevaluation. Please see our responses.\n\n**Question 1:**\n\nTo the best of our knowledge, this is indeed the first work to introduce a covariate-dependent prior. Below we briefly review the literature you mentioned and highlight key differences from our approach with respect to the prior treatment. We will address these references in the paper as well.\n\n1. _Conditional Neural Processes (Garnelo et al. 2018)_\n\n    This paper addresses the problem of predicting outputs for a new set of inputs (the target set) given a set of input-output pairs (the context set). The model uses an encoder to map each labeled pair $(x_i, y_i)$ in the context set to a representation $r_i$. These representations are then aggregated into a summary vector $r$, which, together with a new target input $x^*$ is passed to the predictor to produce the output.\n\n    _Key difference_ : The proposed model is trained by maximizing the conditional likelihood, following a purely frequentist approach with **no prior**. Conditioning occurs only with respect to training covariates (and labels)  and the model remains fixed afterward. **New covariates are treated as standard inputs** to the prediction function.  In contrast, our model is fully Bayesian and incorporates an **adaptive prior**: not only does it produce a different posterior for each new covariate $x^ * $, but the **prior itself changes** with $x^ * $. This dependence is learned by optimizing a variational objective, where both the prior and posterior are explicitly conditioned on $x^ * $.\n\n2. _Bayesian Model-Agnostic Meta-Learning (Yoon et al. 2018)_\n\n    The paper aims to learn a parameter initialization $\\theta$ such that a few gradient updates on a new task $T_j$ lead to good performance. To capture task-specific dependencies, it places a particle-based prior over the task-specific parameters.\n\n    _Key difference_: The particle-prior is $\\{\\theta_1, … , \\theta_m\\}$, corresponding to tasks  $T_1, …, T_m$.  The prior is not covariate specific. It uses training data for different tasks, but **does not depend on individual covariates**.\n\n3. _Hypernetworks_ have a similar dependence structure: a hyper-network $H$ generates the parameters $\\theta$ of the prediction network $f_\\theta$. Rather than learning a fixed $\\theta$, the model learns a generator $H$ that maps task embeddings $z_j$ to task-specific parameters $\\theta_j = H(z_j)$. This constitutes a form of amortization—task-specific parameters are not learned independently, but inferred via a shared network.\nIn the deterministic case, no sampling is involved and no prior is placed. \nIn the latent-variable formulation  a prior is placed over task embeddings $z_j$, which induces a prior over parameters $p(\\theta) = p(z) {\\vert \\frac{dH(z)}{dz} \\vert}^{-1}$. **This prior captures variability across tasks, but does not condition on individual covariates**.\n\n\n4. In _amortized inference_, we can learn a function that produces different posterior parameters for each input. However, such models (e.g., Variational Auto-Encoders) are **trained with a shared, fixed prior** $p(\\theta)$ across all inputs and only varying posterior $p(\\theta \\vert x)$.\n\n**Question 2**: \n\n**ACE and ECE refer to the same metric**, differing only in whether the expectation is taken over the true data distribution (in the case of ECE) or over a finite test sample (in the case of ACE). In practice, evaluations are based on empirical estimates, and thus ACE is a slightly more precise term. That said, the term ECE is commonly used for both (so we have no objection to changing the name).\n\n**Question 3**: \n\nPlease see the following table summarizing the average running time of each method across all experiments.\n\nOur method differs from others in that it pre-trains a representation and performs variational inference only on the prediction layer. As a result, for smaller models (e.g., linear regression), our approach can be more computationally expensive due to per-environment optimization. However, **for larger models, our method has an advantage** since competing methods must optimize many more parameters (see the reported times for the CelebA and CIFAR experiments).\n\n| Dataset                               | Hardware         | Unit     | Vids   | DUE    | SNGP   | DUL    |\n|---------------------------------------|------------------|----------|--------|--------|--------|--------|\n| Linear regression                     | 2 CPUs           | seconds  | 67.160 | 39.900 | 54.800 | 16.400 |\n| Logistic regression                   | 2 CPUs           | seconds  | 61.250 | 40.300 | 16.500 | 6.290  |\n| Concrete                              | 2 CPUs           | minutes  | 3.237  | 2.070  | 0.700  | 0.400  |\n| Boston                                | 2 CPUs           | minutes  | 3.112  | 2.017  | 0.717  | 0.267  |\n| Wine                                  | 2 CPUs           | minutes  | 2.523  | 1.583  | 1.567  | 0.895  |\n| CIFAR-C (max across corruptions)      | A100 Cloud GPU   | minutes  | 2.516  | 7.447  | 3.527  | 4.040  |\n| Celeb-A (max across tasks)            | A100 Cloud GPU   | minutes  | 2.420  | 4.417  | 4.220  | 3.318  |"}]

Author rebuttal:

Meta-review: This paper considers an uncertainty learning and quantification problem under covariate shift. To this end, the paper proposes a Bayesian framework that leverages an adaptive prior, which is conditioned on both training and new covariates. The paper mainly claims that the proposed adaptive prior is novel, achieving strong empirical results under covariate shift. The following includes discussed strengths and remaining weaknesses:

**Strengths**:
* The proposed adaptive prior is novel.
* The empirical results are stronger than baselines under covariate shift.
* The proposed overall method is sound. 

**Weaknesses**:
* The method has scalability and performance issues on very large and complex datasets.

As the novelty is clear, the effectiveness of the adaptive prior is empirically validated, and all reviewers are satisfied with this paper, I agree to accept this paper.
Decision: Accept (poster)