arXiv:2506.04349cs.LGcs.CV2025-06

一次训练搞定损失权重优化,避免反复调参

You Only Train Once

  • 将损失权重当作可学习参数,用梯度法一键优化
  • 在3D估计和语义分割任务中,性能超越网格搜索最佳结果
  • 适合需要快速调参的计算机视觉研究者和工程师

本文提出 You Only Train Once (YOTO) 方法,通过标准梯度优化,一次性自动调整模型损失权重超参数。该方法将损失权重视为网络常规参数进行联合训练,利用复合损失函数的可微性,设计基于softmax的参数化层以满足权重正性约束并避免梯度退化。同时引入新型正则化损失,对齐各损失项的均匀性先验,并保证最优解有界。在多个前沿视觉模型上验证,针对3D估计与语义分割任务,YOTO在未见测试数据上持续优于经网格搜索选出的最佳模型。代码将公开。

原文摘要 · Abstract (English)

The title of this paper is perhaps an overclaim. Of course, the process of creating and optimizing a learned model inevitably involves multiple training runs which potentially feature different architectural designs, input and output encodings, and losses. However, our method, You Only Train Once (YOTO), indeed contributes to limiting training to one shot for the latter aspect of losses selection and weighting. We achieve this by automatically optimizing loss weight hyperparameters of learned models in one shot via standard gradient-based optimization, treating these hyperparameters as regular parameters of the networks and learning them. To this end, we leverage the differentiability of the composite loss formulation which is widely used for optimizing multiple empirical losses simultaneously and model it as a novel layer which is parameterized with a softmax operation that satisfies the inherent positivity constraints on loss hyperparameters while avoiding degenerate empirical gradients. We complete our joint end-to-end optimization scheme by defining a novel regularization loss on the learned hyperparameters, which models a uniformity prior among the employed losses while ensuring boundedness of the identified optima. We evidence the efficacy of YOTO in jointly optimizing loss hyperparameters and regular model parameters in one shot by comparing it to the commonly used brute-force grid search across state-of-the-art networks solving two key problems in computer vision, i.e. 3D estimation and semantic segmentation, and showing that it consistently outperforms the best grid-search model on unseen test data. Code will be made publicly available.

损失优化端到端训练计算机视觉自动化调参

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。