BinaryPPO: Efficient Policy Optimization for Binary Classification
Punya Syon Pandey, Zhijing Jin
TL;DR
BinaryPPO introduces an offline reinforcement learning framework that reframes binary classification as a confidence-aware decision problem for LLMs. It defines a probabilistic reward $r(x,a,y)=\kappa \cdot s(a,y) \cdot f(π_{θ_{old}}(a|x))$ with $f(p)=\log(p)$ and optimizes a PPO-style objective with a learned value function to stabilize training. Across eight benchmarks and two base models, BinaryPPO achieves substantial gains over SFT and PPO baselines, with high in-domain accuracy (up to $\approx 99\%$) and meaningful out-of-distribution generalization, while preserving safety-related normative properties. The approach demonstrates that confidence-weighted reward design can be a robust alternative to supervised fine-tuning for noisy, imbalanced binary tasks and suggests extensions to multi-class settings.
Abstract
Supervised fine-tuning (SFT) is the standard approach for binary classification tasks such as toxicity detection, factuality verification, and causal inference. However, SFT often performs poorly in real-world settings with label noise, class imbalance, or sparse supervision. We introduce BinaryPPO, an offline reinforcement learning large language model (LLM) framework that reformulates binary classification as a reward maximization problem. Our method leverages a variant of Proximal Policy Optimization (PPO) with a confidence-weighted reward function that penalizes uncertain or incorrect predictions, enabling the model to learn robust decision policies from static datasets without online interaction. Across eight domain-specific benchmarks and multiple models with differing architectures, BinaryPPO improves accuracy by 40-60 percentage points, reaching up to 99%, substantially outperforming supervised baselines. We provide an in-depth analysis of the role of reward shaping, advantage scaling, and policy stability in enabling this improvement. Overall, we demonstrate that confidence-based reward design provides a robust alternative to SFT for binary classification. Our code is available at https://github.com/psyonp/BinaryPPO.
