Distributionally Robust Post-hoc Classifiers under Prior Shifts
This work addresses robustness to prior shifts for machine learning practitioners, offering a practical solution with theoretical backing, though it is incremental as it builds on existing distributional robustness concepts.
The paper tackles the problem of machine learning models degrading under test distribution shifts, particularly due to changes in class or group priors, by proposing a lightweight post-hoc method that adjusts predictions to minimize a distributionally robust loss, achieving provable guarantees and strong empirical performance.
The generalization ability of machine learning models degrades significantly when the test distribution shifts away from the training distribution. We investigate the problem of training models that are robust to shifts caused by changes in the distribution of class-priors or group-priors. The presence of skewed training priors can often lead to the models overfitting to spurious features. Unlike existing methods, which optimize for either the worst or the average performance over classes or groups, our work is motivated by the need for finer control over the robustness properties of the model. We present an extremely lightweight post-hoc approach that performs scaling adjustments to predictions from a pre-trained model, with the goal of minimizing a distributionally robust loss around a chosen target distribution. These adjustments are computed by solving a constrained optimization problem on a validation set and applied to the model during test time. Our constrained optimization objective is inspired by a natural notion of robustness to controlled distribution shifts. Our method comes with provable guarantees and empirically makes a strong case for distributional robust post-hoc classifiers. An empirical implementation is available at https://github.com/weijiaheng/Drops.