Manuscript Offprint

arXiv:2611.04611

CAPSkip: Cancellation-Aware Prefix Skipping for Selective Backpropagation

Heejin Choi

Abstract

Per-step selective back-propagation forwards every example of a mini-batch but back-propagates only some of them. Most rules rank examples by loss or gradient magnitude, but such scalar scores ignore cancellation between per-example gradients: the gradient removed by a set can be much smaller than its individual magnitudes suggest. We introduce CAPSkip (Cancellation-Aware Prefix Skipping). Among the examples the model already classifies correctly, CAPSkip skips the longest prefix, in increasing order of last-layer gradient norm, whose vector sum stays within a relative budget bb of the batch's last-layer gradient. In exact arithmetic this bounds the change of the raw final-layer gradient, using rank-one contributions already available from the forward pass; the bound does not extend to deeper layers, optimizer updates, or the training trajectory. Because the cumulative distortion is not monotone in the prefix length, CAPSkip scans all prefixes; a factorised Gram matrix makes the scan cheap and keeps it on the device. With activation reuse and selected-row backward, CAPSkip fine-tunes DeiT-S on CIFAR-100 for 103 epochs in 0.576×0.576\times the time of 103-epoch dense training, and is +0.25+0.25 pp [+0.08,+0.42][+0.08, +0.42] above an approximately time-matched 59-epoch dense run (n=3n=3).

1 Introduction

A common way to cut the cost of training is to spend less computation on examples that contribute little to the update. Per-step methods decide inside each mini-batch: they forward all BB rows, score them, and back-propagate only a subset [9, 10, 13]. Per-epoch methods such as InfoBatch [19] and KAKURENBO [16] decide before the forward, from scores stored in earlier epochs, and save both passes. Common rules in both families score examples individually by loss or gradient magnitude. The quantity that matters for the update, however, is the sum of the skipped gradients. Per-example gradients of correctly classified examples can be small without being aligned, and their sum can be much smaller than the sum of their norms, so a magnitude-based score misjudges how much of the update is actually removed.

This paper studies a selection rule that measures the skipped gradient directly, in the one place where it is exactly and cheaply available: the final affine layer. For cross-entropy, the gradient of example ii's loss with respect to the final layer's weights and bias is the outer product of the logit residual hih_i and the augmented penultimate feature [ϕi,1][\phi_i, 1]. Both factors are by-products of the forward pass. We sort the currently-correct examples by the norm of this outer product and skip the largest number k∗k^* of them whose summed contribution has relative norm at most bb. Because summed vectors cancel, the relative distortion of a prefix is not monotone in its length; stopping at the first prefix that violates the budget under-selects, and magnitude-sum budgets are only conservative sufficient conditions.

References (24)