Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Trainable Projected Gradient Method for Robust Fine-tuning

About

Recent studies on transfer learning have shown that selectively fine-tuning a subset of layers or customizing different learning rates for each layer can greatly improve robustness to out-of-distribution (OOD) data and retain generalization capability in the pre-trained models. However, most of these methods employ manually crafted heuristics or expensive hyper-parameter searches, which prevent them from scaling up to large datasets and neural networks. To solve this problem, we propose Trainable Projected Gradient Method (TPGM) to automatically learn the constraint imposed for each layer for a fine-grained fine-tuning regularization. This is motivated by formulating fine-tuning as a bi-level constrained optimization problem. Specifically, TPGM maintains a set of projection radii, i.e., distance constraints between the fine-tuned model and the pre-trained model, for each layer, and enforces them through weight projections. To learn the constraints, we propose a bi-level optimization to automatically learn the best set of projection radii in an end-to-end manner. Theoretically, we show that the bi-level optimization formulation could explain the regularization capability of TPGM. Empirically, with little hyper-parameter search cost, TPGM outperforms existing fine-tuning methods in OOD performance while matching the best in-distribution (ID) performance. For example, when fine-tuned on DomainNet-Real and ImageNet, compared to vanilla fine-tuning, TPGM shows $22\%$ and $10\%$ relative OOD improvement respectively on their sketch counterparts. Code is available at \url{https://github.com/PotatoTian/TPGM}.

Junjiao Tian, Xiaoliang Dai, Chih-Yao Ma, Zecheng He, Yen-Cheng Liu, Zsolt Kira• 2023

Related benchmarks

TaskDatasetResultRank
Image ClassificationImageNet 1k (test)
Top-1 Accuracy87
798
Image ClassificationImageNet Robustness Suite
Top-1 Accuracy (ImageNet-A)36.79
42
Image ClassificationDomainNet Source: Real 100% data (test)
Accuracy (Real)83.64
15
Semantic segmentationPascal Semantic Segmentation ID Clean (test)
mIoU (Clean)72.56
9
Semantic segmentationPascal Semantic Segmentation OOD Corrupted (test)
mIoU (Fog)0.6951
9
Human Parts SegmentationPASCAL Human Parts OOD Corruptions (test)
Fog Acc60.16
8
Image ClassificationDomainNet 1.0 (test)
Accuracy (Real)0.8266
8
Human Parts SegmentationPASCAL Human Parts ID Clean (test)
mIoU63.29
8
Semantic segmentationPASCAL-Context (Clean)
mIoU72.56
8
Semantic segmentationPASCAL-Context (OOD)
mIoU (Fog)69.51
8
Showing 10 of 15 rows

Other info

Code

Follow for update