Manuscript Offprint

arXiv:2609.40360

Semifactual Credit-Augmented Policy Optimization

Junshu Pan, Zhizhang Fu, Shulin Huang, Yiran Ding, Zifan Cheng, Wenqi Shao, Qiaosheng Zhang, Yue Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Reinforcement learning with verifiable rewards (RLVR) has improved the reasoning capabilities of large language models (LLMs), yet their predictions remain sensitive to task-irrelevant prompt features. We investigate this sensitivity through semifactual prompt interventions that preserve the underlying problem and its answer. Our analysis reveals substantial variation in token-level sensitivity and shows that suppressing high-drift token candidates during decoding improves reasoning accuracy without updating model weights. These findings highlight a limitation of Group Relative Policy Optimization (GRPO), which assigns the same outcome-derived advantage to every response token and may reinforce potential spurious dependence alongside useful reasoning. Motivated by this observation, we introduce Semifactual Credit-Augmented Policy Optimization (SCAPO), a causally inspired variant of GRPO that incorporates semifactual stability into token-level credit assignment. SCAPO measures token probability drift for fixed responses under semifactual interventions and uses normalized stability scores to reduce advantages for relatively unstable tokens during early training, while granting no additional credit for stability alone. On Qwen3-4B-Base and Qwen3-1.7B-Base, SCAPO improves AIME 2024–2026 accuracy over GRPO by 5.63 and 4.17 percentage points, respectively. At both model scales, SCAPO achieves the best results on most evaluated mathematics benchmarks and all evaluated out-of-distribution benchmarks among the compared methods. These results suggest that semifactual stability provides an effective training signal for improving reasoning and generalization through finer-grained credit assignment in RLVR. The code is available at https://github.com/DtYXs/SCAPO.

(a) Qwen3-4B-Base

Figure

(b) Qwen3-1.7B-Base

Figure

Figure 1: SCAPO achieves the highest AIME accuracy on the two Qwen3 base models. Aggregate AIME 2024–2026 accuracy for SCAPO, GRPO, and FIPO. SCAPO reaches GRPO's final accuracy in fewer than half as many policy optimization steps and achieves higher final accuracy than baselines at both model scales. Shaded regions mark SCAPO's semifactual credit augmentation phase.

∗^{*}Corresponding author.

1 INTRODUCTION

Reinforcement learning with verifiable rewards (RLVR) has advanced the development of large language models (LLMs) with strong reasoning capabilities, such as OpenAI o1 (OpenAI, 2024) and DeepSeek-R1 (Guo et al., 2025). Group Relative Policy Optimization (GRPO) (Shao et al., 2024), a representative RLVR method, optimizes automatically checkable outcomes without process-level supervision. Recent evidence suggests that RLVR can diminish dependence on spurious correlations and improve generalization under distribution shifts (Fu et al., 2026). However, robustness evaluations still reveal sensitivity to irrelevant information and input perturbations (Mirzadeh et al., 2025; Huang et al., 2025). Understanding how training factors affect generalization in RLVR and how to further improve it remains underexplored.

We study spurious dependence in RLVR at the token level. Building on prior studies of spurious feature reliance (Wang et al., 2022; Fu et al., 2026), we probe causal invariance (Peters et al., 2016; Arjovsky et al., 2019) in LLM inference through semifactual prompt interventions (Goodman, 1947; Lu et al., 2022). Specifically, we alter task-irrelevant prompt features while preserving the mathematical problem and its answer, using drift in the token probabilities of a fixed response as a proxy for potential spurious dependence. We find that suppressing high-drift token candidates during decoding improves the accuracy of Qwen3-4B-Base (Yang et al., 2025) from 15.8% to 30.0% on a 1,000-question mathematical diagnostic panel without updating model weights (see Section 2). The above results suggest that LLMs are highly sensitive to token-level spurious features. However, GRPO assigns the same outcome-derived advantage to every valid token in a response, without directly accounting for this token-level sensitivity. As a result, positive outcome credit may reinforce potential spurious dependence alongside useful reasoning.

To address the above problem, one intuitive way is to change the RL training process, incorporating semifactual sensitivity into token-level credit assignment. In this paper, we introduce Semifactual Credit-Augmented Policy Optimization (SCAPO), a causally inspired variant of GRPO that aims to turn semifactual stability into a token-level credit signal during training. This signal reveals differences in token sensitivity that final-answer correctness alone cannot distinguish. Verifiable rewards provide response-level supervision, while semifactual stability refines token-level credit assignment.

In particular, SCAPO uses the rollout policy to teacher-force each sampled response under the original prompt and its semifactual perturbations, measuring the probability drifts of each response token. After aggregating and normalizing these drifts within each prompt group, it adds only the negative part of the resulting stability score to the GRPO advantage as a detached token-level credit augmentation. Consequently, relatively unstable tokens receive lower advantages, while stability alone earns no additional credit, since stability does not imply correctness. We apply this credit augmentation during the early phase of training to shape trajectory selection, then continue optimizing the resulting policy with standard GRPO.

SCAPO improves AIME 2024–2026 accuracy (Mathematical Association of America, 2026) over GRPO by +5.63 and +4.17 points on Qwen3-4B-Base and Qwen3-1.7B-Base (Yang et al., 2025), respectively. As shown in Figure 1, SCAPO reaches GRPO's final AIME accuracy in fewer than half as many policy optimization steps. Moreover, across both model scales, SCAPO outperforms GRPO on all evaluated benchmarks and achieves the best performance on most of the competition-level mathematics benchmarks among all the compared RLVR methods. SCAPO also achieves the highest accuracy on out-of-distribution benchmarks at both model scales. In addition, our ablations further support the value of aligning credit corrections with semifactual sensitivity and selectively reducing credit for relatively unstable tokens. These results suggest that semifactual stability complements outcome rewards with an effective signal for finer-grained credit assignment in RLVR.

Our contributions can be summarized as:

• We study token-level spurious dependence in LLM inference through semifactual prompt interventions, revealing heterogeneous sensitivity and showing that suppressing high-drift tokens during decoding can improve reasoning accuracy without weight updates. (Sec. 2)

• We introduce SCAPO, an approach to token-level credit augmentation in GRPO using detached negative-only corrections derived from fixed-response semifactual stability, without requiring process supervision or an external reward model. (Sec. 3)

Figure

Figure 2: Semifactual instability varies across tokens. (a) Probability transitions under semifactual prompt interventions. (b) Distribution of mean token drift. (c) Relative category mean drift normalized by the overall mean, with reflection markers and discourse connectives showing higher sensitivity. Results use frozen Qwen3-4B-Base before RL.

• We empirically demonstrate SCAPO’s effectiveness on Qwen3-4B-Base and Qwen3-1.7B-Base, achieving the best results on most benchmarks among the compared RLVR methods. These results show that semifactual stability can serve as an effective training-time signal for token-level credit assignment in RLVR. (Sec. 4)

References (70)

  • Invariant risk minimization (opens arXiv in a new tab)
  • The entropy mechanism of reinforcement learning for reasoning language models (opens arXiv in a new tab)
  • Process reinforcement through implicit rewards
  • Constructing a lexicon of english discourse connectives
  • Correlation or causation: Analyzing the causal structures of llm and lrm reasoning process
  • Omni-math: A universal olympiad level mathematic benchmark for large language models
  • Soft adaptive policy optimization (opens arXiv in a new tab)
  • Olympiadbench: A challenging benchmark for promoting agi with olympiad-level bilingual multimodal scientific problems
  • Thinkbench: Dynamic out-of-distribution evaluation for robust llm reasoning
  • VinePPO: Refining credit assignment in RL training of LLMs
  • On generating plausible counterfactual and semi-factual explanations for deep learning
  • Beyond uniform credit: Causal credit assignment for policy optimization (opens arXiv in a new tab)
  • Solving quantitative reasoning problems with language models
  • Outcome-grounded advantage reshaping for fine-grained credit assignment in mathematical reasoning
  • Let's verify step by step
  • Understanding R1-Zero-like training: A critical perspective
  • A rationale-centric framework for human-in-the-loop machine learning
  • FIPO: Eliciting deep reasoning with future-KL influenced policy optimization
  • Gsm-symbolic: Understanding the limitations of mathematical reasoning in large language models
  • Beyond uniform credit assignment: Selective eligibility traces for rlvr (opens arXiv in a new tab)
  • Causal inference by using invariant prediction: identification and confidence intervals
  • GPQA: A graduate-level google-proof q&a benchmark
  • Enhancing large language model reasoning via selective critical token fine-tuning (opens arXiv in a new tab)
  • DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
  • Wait, we don’t need to" wait"! removing thinking tokens improves reasoning efficiency
  • Math-shepherd: Verify and reinforce llms step-by-step without human annotations
  • Beyond the 80/20 rule: High-entropy minority tokens drive effective reinforcement learning for llm reasoning
  • Identifying and mitigating spurious correlations for improving robustness in nlp models
  • ARLArena: A unified framework for stable agentic reinforcement learning
  • Unlocking exploration in rlvr: Uncertainty-aware advantage shaping for deeper reasoning
  • Learning to reason under off-policy guidance
  • Qwen3 Technical Report
  • Dapo: An open-source llm reinforcement learning system at scale
  • Does reinforcement learning really incentivize reasoning capacity in llms beyond the base model? Advances in Neural Information Processing Systems, 38:57654–57689, 2025
  • SimpleRL-Zoo: Investigating and taming zero reinforcement learning for open base models in the wild
  • Group Sequence Policy Optimization
  • Although GPQA-Diamond provides evidence of transfer to scientific reasoning, the effectiveness of SCAPO at larger model and data scales and with broader training domains remains to be evaluated
  • Never output doubled LaTeX commands like \sin, and never output raw control characters such as tab or form feed
  • The chosen word must NOT be math, LaTeX, a variable, a number, a unit, a proper name, a label, or a mathematical keyword such as "mean", "median", "integer", "prime", "even", "odd"
  • sensor kit
  • At a school craft booth, [original problem]
  • During a budgeting exercise, [original problem]
  • While tracking a reading plan, [original problem]
  • [Original first sentence] This is part of a classroom activity. [remaining original problem]
  • [Original problem] This was recorded in a simple daily log
  • [Original problem] The setting is an ordinary after-school situation
  • and true is true
  • 5XeflW1ZJc
  • [tag: mx93q]
  • for practice
  • We then teacher-force the same response tokens under the original prompt and all four perturbed prompts
  • Share is the percentage of the 870,586 response token positions assigned to each category
  • Response tokens are shaded by their mean probability drift across the four prompt perturbations, with darker shading indicating greater sensitivity
  • What is the least integer number of months after which Kimberly will owe more than twice as much as she borrowed?
  • What is the smallest integer number of months after which Kimberly will owe more than twice as much as she borrowed?
  • What is the least integer number of months after which Kimberly will owe more than twice as much as she borrowed? qPzmXaRt
  • What is the value of b?
  • Both base sampling and $d$-filtered decoding use the same prompt template, temperature of 1.0, top-$p = 1.0$, and a maximum response length of 8,192 tokens
  • We sort all token candidates by decreasing drift
  • Otherwise, we reject it and resample from the distribution renormalized over unmasked tokens
  • On average, 50.58 token proposals are rejected and resampled per filtered response (4.58% of decoding steps), with at least one such rejection in each of the 1,000 filtered responses
  • The lower block reports question counts for the four combinations of baseline and filtered answer correctness
  • Replacing $A$ by $A-\lambda c$ therefore changes the group gradient by at most $\lambda RB\langle c\rangle \le \lambda H$
  • A rule-based verifier assigns reward 1 to a correct boxed answer and 0 otherwise, and no separate format reward is used
  • Batch sizes count prompts unless stated otherwise
  • Thus, $N_{0}=120/200$ policy optimization steps correspond to 60/100 rollout steps for 4B/1.7B
  • Slash-separated problem counts follow the listed years
  • We evaluate the final checkpoints using identical prompts and sample counts across methods, with temperature 0.7, top-p = 0.9, and a maximum response length of 16,384 tokens
  • Figure 1 presents the corresponding accuracy curves
  • We estimate the curves from 128 responses per problem using the standard unbiased estimator, with the same sampling and scoring settings as the main evaluation