首页 > AI前沿 > Learning from Failures: When Contrastive Post-Training Beats Success Conditioning

Learning from Failures: When Contrastive Post-Training Beats Success Conditioning

arXiv机器学习 2026-11-29 15:17 7 阅读 查看原文

Post-training a language model from rollouts with binary outcomes has two standard recipes: supervised fine-tuning (SFT) on the successful rollouts (success conditioning), and pairwise contrastive learning on success--failure pairs. In practice contrastive and SFT losses are combined, and the combination is often reported to work best, but there is little theory of when and why. We analyze the combined family: a margin-based contrastive term plus a weighted success conditioning term on successful rollouts using a contextual bandit setup with binary rewards. We characterize when adding the contrastive term improves on success conditioning, from expected reward to ranking-based metrics (commonly used in generative retrieval). We study both unweighted and DPO-style reference-reweighted variants of contrastive losses, and characterize how the base policy's alignment with action rewards determines their relative performance. We validate our theoretical results via synthetic experiments and also in the real-world context of generative retrieval.