Importance sampling (IS) is an efficient stand-in for model refitting in performing (LOO) cross-validation (CV) on a Bayesian model. IS inverts the Bayesian update for a single observation by reweighting posterior samples. The so-called importance weights have high variance -- we resolve this issue through adaptation by transformation. We observe that removing a single observation perturbs the posterior by $\mathcal{O}(1/n)$, motivating bijective transformations of the form $T(θ)=θ+ h Q(θ)$ for $0<h\ll 1.$ We introduce several such transformations: partial moment matching, which generalizes prior work on affine moment-matching with a tunable step size; log-likelihood descent, which partially invert the Bayesian update for an observation; and gradient flow steps that minimize the KL divergence or IS variance. The gradient flow and likelihood descent transformations require Jacobian determinants, which are available via auto-differentiation; we additionally derive closed-form expressions for logistic regression and shallow ReLU networks. We tested the methodology on classification ($n\ll p$), count regression (Poisson and zero-inflated negative binomial), and survival analysis problems, finding that no single transformation dominates but their combination nearly eliminates the need to refit.
翻译:论文摘要:重要性采样(IS)是贝叶斯模型留一法交叉验证(LOO-CV)中高效替代模型重拟合的方法。通过重新加权后验样本,IS实现了单观测贝叶斯更新的逆变换。然而,所谓的重要性权重存在高方差问题——本文通过变换自适应技术解决这一难题。我们观察到移除单个观测会使后验产生$\mathcal{O}(1/n)$量级的扰动,这启发我们采用形式为$T(θ)=θ+ h Q(θ)$(其中$0<h\ll1$)的双射变换。我们引入多种此类变换:部分矩匹配(扩展了先前基于可调步长仿射矩匹配的工作)、对数似然下降(部分逆推单观测的贝叶斯更新),以及最小化KL散度或IS方差的梯度流步骤。梯度流与似然下降变换需计算雅可比行列式,可通过自动微分实现;此外我们推导了逻辑回归与浅层ReLU网络的闭式表达式。在分类问题($n\ll p$)、计数回归(泊松与零膨胀负二项模型)及生存分析任务中验证该方法,结果表明:虽无单一变换具有绝对优势,但其组合近乎消除了重拟合需求。