TL;DR
BinaryPPO reframes binary classification for Large Language Models (LLMs) as an offline reinforcement learning problem rather than standard supervised learning. By optimizing a confidence-weighted reward function via a variant of Proximal Policy Optimization (PPO), it achieves massive accuracy gains (40–60 percentage points) over supervised baselines on noisy or imbalanced datasets without requiring online environment interaction.
What Problem Does This Paper Address?
Supervised Fine-Tuning (SFT) is the default choice for training LLMs on binary classification tasks like toxicity detection, fact-checking, and sentiment analysis. However, SFT implicitly assumes that training labels are flawless ground truths. In reality, real-world datasets are frequently plagued by label noise, class imbalance, and subjective ambiguity.
Because standard SFT lacks an explicit mechanism to reason under uncertainty or incorporate model confidence, models often overfit to spurious patterns or exhibit brittle performance under distribution shifts. This is particularly dangerous in AI safety applications (e.g., content moderation), where misclassifying a toxic or misleading response can lead to critical downstream failures.
Methods
The authors introduce BinaryPPO, an offline reinforcement learning framework that treats binary classification as a decision-making problem under uncertainty. Instead of minimizing a static cross-entropy loss, BinaryPPO optimizes a policy against a continuous, confidence-weighted reward function:
$$r(x, a, y) = \kappa \cdot s(a, y) \cdot \log(\pi_{\theta_{\text{old}}}(a | x))$$
Where:
- $s(a, y)$ encodes the polarity of correctness (positive for correct predictions, negative for incorrect ones).
- $\log(\pi_{\theta_{\text{old}}}(a | x))$ scales the reward based on the model's confidence.
- $\kappa$ is a tunable scaling constant.
Crucially, BinaryPPO operates entirely offline on static datasets, bypassing the need for online environment interactions. The total optimization objective balances the PPO clip loss, value function regression, a supervised cross-entropy regularization term, and an entropy term to encourage robust exploration and prevent policy collapse.
Datasets
The framework was evaluated across eight diverse, publicly available binary classification benchmarks:
- CLadder: Causal reasoning from explicit causal graphs.
- SciRIFF: Scientific literature instruction-following and verification.
- BoolQ: Natural yes/no reading comprehension questions.
- FEVER: Fact verification.
- IMDB: Movie review sentiment classification.
- OpenAI Moderation: Content moderation for safety.
- Detect-Jailbreak (DJ) & JailbreakBench (JB): Adversarial prompt and safety bypass detection.
To evaluate out-of-distribution (OOD) generalization, the authors also independently reconstructed a clean validation split of 17k examples for the CLadder dataset to prevent test-set contamination.
Key Insights and Ideas
- The Power of Uncertainty: Penalizing uncertain but correct answers alongside outright incorrect answers forces the model to develop highly calibrated, confident decision boundaries.
- The Critical Role of Entropy: Ablation studies revealed that removing entropy regularization causes catastrophic training collapse. For example, Qwen's accuracy on IMDB plummeted from 98.26% to 7.74% without it. Entropy keeps the policy from becoming prematurely degenerate or overconfident.
- Peak Learning at Intermediate Confidence: Advantage curves reveal that the learning signal peaks when the model is moderately confident (0.6–0.8). This means BinaryPPO focuses its optimization power exactly where the model is most unsure, acting as a dynamic error-correction mechanism.
Key Results
- Massive Performance Leap: Across both Qwen-2.5-3B and Gemma-2-2B architectures, BinaryPPO outperformed SFT baselines by a staggering 40 to 60 percentage points, frequently pushing accuracy from near-chance (~50%) up to 97–99%.
- Out-of-Distribution Robustness: When evaluated on OOD splits, the models retained high accuracy (e.g., Gemma 2-2B achieved 87.46% on CLadder OOD), proving that BinaryPPO learns actual task dynamics rather than dataset-specific heuristics.
- Preserving Normative Safety: Normative evaluations on TruthfulQA, Toxigen, and Winogender confirmed that optimizing for binary classification did not degrade the models' baseline safety, truthfulness, or fairness metrics.
Limitations and Future Work
- Discrete Action Spaces: The current formulation is strictly limited to binary decision tasks. Extending it to multi-class or structured outputs remains an open challenge.
- Model Scale: The study evaluated small-to-mid-sized open-weight models (2B and 3B parameters); its efficacy on frontier-scale models (e.g., 70B+ parameters) has yet to be tested.
- Hyperparameter Sensitivity: Achieving optimal performance requires modest, task-specific tuning of reward shaping and entropy regularization parameters.
Summary updated