We introduce Tune without Validation (Twin), a simple and effective pipeline for tuning learning rate and weight decay of homogeneous classifiers without validation sets, eliminating the need to hold out data and avoiding the two-step process. Twin leverages the margin-maximization dynamics of homogeneous networks and an empirical scaling law that links training and test losses across hyper-parameter configurations. This mathematical modeling yields a regime-dependent, validation-free selection rule: in the non-separable regime, training loss is monotonic in test loss and therefore predictive of generalization, whereas in the separable regime, the parameters' norm becomes a reliable indicator of generalization due to margin maximization. Across 37 dataset-architecture configurations for image classification, we demonstrate that Twin achieves a mean absolute error of 1.28% compared to an Oracle baseline that selects HPs using test accuracy. We demonstrate Twin's benefits in scenarios where validation data is scarce, such as small-data regimes, or difficult and costly to collect, as in medical imaging. Code available at https://github.com/lorenzobrigato/twin.
翻译:我们提出Tune without Validation (Twin)——一种无需验证集即可调优同质分类器学习率与权重衰减的简洁高效方法,消除了数据预留需求并避免了两步式流程。Twin方法利用同质网络的边距最大化动力学特性,以及一个将跨超参数配置训练损失与测试损失关联的经验标度律。基于数学建模,该方法推导出依赖状态且无需验证集的选择准则:在不可分状态下,训练损失相对于测试损失具有单调性,因此可预测泛化能力;而在可分状态下,由于边距最大化效应,参数范数成为泛化能力的可靠指标。在37种图像分类数据集与架构组合的实验中,与基于测试准确率选择超参数的Oracle基线相比,Twin方法的平均绝对误差仅为1.28%。我们展示了Twin在验证数据稀缺场景(如小样本数据)或数据采集困难且成本高昂场景(如医学影像)中的优势。代码开源于https://github.com/lorenzobrigato/twin。