动态场景下无需微调,实时生成模型参数应对分布变化
GeneralizeFormer: Layer-Adaptive Model Generation across Test-Time Distribution Shifts
- 用轻量元学习变换器实时生成各层参数,不依赖微调
- 在6个数据集上实现高效适应多种分布偏移,避免遗忘源域特征
- 仅更新BN层和分类器参数,显著降低计算开销
我们研究测试时域泛化问题:模型在多个源域上训练后,需在训练中未见过的目标域上调整。不同于常规方法通过在线微调或调整分类器参数,本文提出一种轻量级元学习变换器——GeneralizeFormer,可在推理时动态生成多层参数。每批目标数据独立生成层参数,无需微调或在线调整。该方法在存在多个目标分布的动态场景中更有效,并避免遗忘源域关键特征。通过考虑层间梯度,方法能自适应各类分布偏移。为降低计算与时间成本,固定卷积参数,仅生成批归一化层和线性分类器的参数。在六个常用域泛化数据集上的实验表明,该方法能高效处理多种分布偏移,具备良好泛化能力且无遗忘问题。
原文摘要 · Abstract (English)
We consider the problem of test-time domain generalization, where a model is trained on several source domains and adjusted on target domains never seen during training. Different from the common methods that fine-tune the model or adjust the classifier parameters online, we propose to generate multiple layer parameters on the fly during inference by a lightweight meta-learned transformer, which we call \textit{GeneralizeFormer}. The layer-wise parameters are generated per target batch without fine-tuning or online adjustment. By doing so, our method is more effective in dynamic scenarios with multiple target distributions and also avoids forgetting valuable source distribution characteristics. Moreover, by considering layer-wise gradients, the proposed method adapts itself to various distribution shifts. To reduce the computational and time cost, we fix the convolutional parameters while only generating parameters of the Batch Normalization layers and the linear classifier. Experiments on six widely used domain generalization datasets demonstrate the benefits and abilities of the proposed method to efficiently handle various distribution shifts, generalize in dynamic scenarios, and avoid forgetting.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。