Abstract
Swap-agnostic learning strengthens classical agnostic learning by allowing the comparator to select a different hypothesis on each level set of the learner's predictions. This benchmark captures prediction-dependent postprocessing, but appears to require solving a separate agnostic-learning problem for every possible prediction value. We show that, for proper losses, these prediction-level comparisons can instead be controlled jointly. Our main result is an offline swap-agnostic learner for any fixed proper loss. For a finite hypothesis class and any fixed smooth proper loss, the excess risk from i.i.d. samples is , with a corresponding online swap-regret bound of . We also give algorithms whose predictions are simultaneously swap-agnostic for entire families of losses. For all proper losses bounded in , we obtain online and offline rates of and , respectively. For convex, -Lipschitz proper losses, these rates improve to online and offline. These bounds are tight up to logarithmic factors and improve upon the rate implied by the swap-omniprediction guarantee of Luo et al. (2025). Our main technical contribution is a reduction from swap-agnostic learning to a second-order form of multicalibration, obtained via Blackwell approachability with a Bernstein-style variance correction.