In traditional reinforcement learning, agents typically estimate the "value" of a state or the "reward" of an action as a continuous scalar. While intuitive, this approach is notoriously fragile. A single high-magnitude reward can produce massive gradients that destabilize the entire network, while tasks with tiny reward scales are often ignored by the optimizer. Recent breakthroughs in scalable world models and meta-RL have converged on a more robust alternative: discrete regression.
By framing value and reward estimation as a classification problem over discrete bins rather than a scalar regression task, researchers are finding they can train larger models across more diverse tasks without the need for per-task hyperparameter tuning.
The Problem with Scalar Regression
Standard reinforcement learning uses Mean Squared Error (MSE) to minimize the distance between a predicted scalar and a target value. This creates two primary issues:
- Scale Sensitivity: If Task A has rewards in the range of $[0, 1]$ and Task B has rewards in $[0, 1000]$, the gradients from Task B will dominate the learning process.
- Optimization Landscape: MSE losses can be "sharp," where small errors in high-value regions lead to disproportionately large updates, causing the training to diverge.
Nicklas Hansen and Hao Su demonstrate in TD-MPC2 that these instabilities are the primary bottleneck preventing RL from following the "scaling laws" seen in Large Language Models.
Transforming Scalars into Distributions
The core idea of discrete regression is to map continuous values into a discrete categorical space. Instead of predicting a single number, the model predicts a probability distribution over a set of fixed "bins."
Log-Transformations and Symlog
To handle the vast range of possible rewards (from tiny fractions to thousands), models often apply a non-linear transformation before binning. Jake Grigsby and Amy Zhang in AMAGO-2 utilize a symlog transform ($f(x) = \text{sign}(x)\ln(|x| + 1)$). This compresses the range of values, ensuring that the difference between 100 and 101 is treated with similar importance to the difference between 1 and 2.
Two-Hot Encoding and HL-Gauss
Once transformed, the value is represented using techniques like two-hot encoding or the HL-Gauss method. In M3, Uri Gadot and Bingyi Kang use these to project a scalar onto the two nearest discrete bins. This allows the model to use Cross-Entropy or KL-Divergence losses, which are naturally bounded and provide smoother gradients.
Why It Works: Smoother Optimization
The shift from regression to classification fundamentally changes the optimization landscape. Ke Sun and Bei Jiang show in How Does Value Distribution... Help Optimization? that categorical representations lead to a significant reduction in sample complexity. By predicting a distribution, the model captures the inherent uncertainty of the return, preventing the "chasing" of noisy mean values that causes instability in classical RL.
In adversarial or sparse-reward settings, such as the Network Security Games studied by Bo An in NSGZero, treating the value as a binary classification of "success" vs "failure" provides a much more stable signal than attempting to regress a precise win probability.
Scaling to Generalist Agents
The ultimate benefit of discrete regression is generality. Because the loss signal is normalized by the categorical distribution, a single agent can learn to solve 100+ different tasks simultaneously. As shown in TD-MPC2 and Simulus, this approach allows RL models to scale to hundreds of millions of parameters, finally enabling the creation of robust, multi-task world models for continuous control.