In this paper, we propose energy-based sample adaptation at test time for domain generalization. Where previous works adapt their models to target domains, we adapt the unseen target samples to source-trained models. To this end, we design a discriminative energy-based model, which is trained on source domains to jointly model the conditional distribution for classification and data distribution for sample adaptation. The model is optimized to simultaneously learn a classifier and an energy function. To adapt target samples to source distributions, we iteratively update the samples by energy minimization with stochastic gradient Langevin dynamics. Moreover, to preserve the categorical information in the sample during adaptation, we introduce a categorical latent variable into the energy-based model. The latent variable is learned from the original sample before adaptation by variational inference and fixed as a condition to guide the sample update. Experiments on six benchmarks for classification of images and microblog threads demonstrate the effectiveness of our proposal.
翻译:在本文中,我们提议在测试时对基于能源的样本进行适应,以便进行区域概括化。如果先前的工作使模型适应目标领域,我们将看不见的目标样本调整为源培训模型。为此,我们设计了一种基于能源的歧视性模型,在源域方面进行了培训,以共同模拟分类和数据分配的有条件分配,供样本适应。模型的优化是为了同时学习分类器和能量功能。为了使目标样本适应源分布,我们用随机梯度兰格文动态来反复更新样本。此外,为了在适应过程中保存样本中的绝对信息,我们在基于能源的模型中引入了绝对潜伏变量。在适应之前,通过变式推断从原始样本中学习潜在变量,并将其作为指导样本更新的一个条件。关于图像和微博客线索分类的六个基准的实验证明了我们提案的有效性。