Manuscript Offprint

arXiv:2610.03667

Planning to Learn

Ian Osband

Abstract

Policy-gradient methods are central to modern reinforcement learning, including LLM post-training. When they struggle, the usual suspects are exploration, credit assignment and action-sampling noise. Classification has none of them. A classifier is a policy whose expected reward, its expected accuracy, is the probability it assigns to the correct label, and because that label is known, the policy gradient is exact and smooth. Yet exact policy gradient loses to cross-entropy, even on expected accuracy. The exact gradient is myopic: it values an update only by what it buys now, but each update also sets where the next one starts, so an update's value depends on how much learning remains. Viewed this way, cross-entropy is patient accuracy, the total error an example would pay if its log-odds rose at unit speed forever, while exact policy gradient is the zero-horizon limit. Truncating this total at the learning that remains yields the horizon loss, a one-line change that moves from cross-entropy toward exact policy gradient as training runs out. In a simple allocation model, it provably escapes the trap that catches each endpoint. On MNIST and on ImageNet with ResNet-50, ResNet-101 and ViT-S/16, the horizon loss improves top-1 accuracy over cross-entropy at a flat learning rate, and the gain grows with label noise.

1 Introduction

Reinforcement learning has become a central stage of training frontier language models, whose post-training for reasoning runs on policy-gradient updates [21, 7, 27]. It is also harder to get right than supervised pretraining, and when it struggles, the usual suspects are what reinforcement learning adds: exploration, credit assignment and action-sampling noise [30]. Classification has none of them. A classifier is a policy that samples a label and earns reward one when it is correct, so its expected reward is its expected accuracy, the same expected-reward form used in policy-gradient post-training. Every example is observed, the reward is immediate, and every label can be summed over, so the policy gradient of expected accuracy can be computed exactly [33, 31]. Yet following the exact gradient of expected accuracy loses to cross-entropy, even on expected accuracy (Figure 1). On ImageNet with a ResNet-50 at a shared learning rate, exact policy gradient reaches 4.2% expected accuracy and cross-entropy reaches 62%. The policy gradient struggles here with every usual reinforcement-learning difficulty removed.

Why does the exact gradient of accuracy lose to a surrogate? A gradient answers a question about one update: which infinitesimal change most improves expected accuracy now. Training makes many updates, and each one changes the state from which the next is made. Consider two examples whose correct labels have probability 0.9 and 0.01, and suppose learning can raise the log-odds of either at the same cost. The gradient favors the first, because a small step in log-odds raises its probability about nine times as much (0.9×0.1=0.09(0.9 \times 0.1 = 0.09 against 0.01×0.99≈0.01)0.01 \times 0.99 \approx 0.01). With little training left, that is the right call, since only the first can gain much in time. With plenty left, the budget is better spent on the second, which gains almost nothing at first but has far more to gain before training ends. The best update depends on how much training remains, and the gradient cannot see it (Section 2).

Preprint.

Figure

Figure 1: Expected test error (log scale) over training at a shared flat learning rate, MNIST (MLP) | ImageNet (ResNet-50). Exact policy gradient, computed by summing over labels, falls far behind cross-entropy even on expected test accuracy. The horizon loss (Section 3.1) pulls ahead of cross-entropy late in training.

Our central proposal is to treat learning itself as a sequential resource-allocation problem. Every loss divides learning across examples, and in doing so trades accuracy now against accuracy later, much as a reinforcement-learning agent trades immediate against future reward. Exact policy gradient weights each example by p(1−p)p(1 - p), the rate at which its accuracy improves now. Up to positive scale, this is also the negative gradient of categorical mean absolute error, which Zhang and Sabuncu [39] found trains poorly. Cross-entropy weights each example by 1−p1 - p, the accuracy it could still gain with unlimited learning. This weight comes from patient accuracy: cross-entropy equals the total error an example would pay if all future learning went to it, raising its log-odds at unit speed (Section 3). The allocation model explains how this patience helps, and when it wastes budget. Cross-entropy spends most on the examples furthest from success, including those the remaining run cannot fix. The horizon loss weights each example by the accuracy it could gain with only the learning that remains, which we estimate as the sum of the learning rates still to come, times a calibration constant κ\kappa. With a long horizon it approaches cross-entropy, and as the budget runs out, exact policy gradient.

This view makes three predictions. The horizon loss should help most late in training, when little budget remains. Its gain should grow with the number of examples that cannot be fixed in time. And the gain should require a horizon that shrinks over training. On MNIST and on ImageNet with ResNet-50, ResNet-101 and ViT-S/16, the horizon loss improves top-1 accuracy over cross-entropy at a flat learning rate, by 1.0–2.4 points on ImageNet, and the gain arrives late (Section 4.1). The gain grows with label noise (Section 4.2), and constant, growing and fixed horizons do not reproduce it (Section 4.3). Planning cross-entropy the same way lowers ImageNet test NLL from 1.467 to 1.364 (Section 4.4).

References (33)