Technical Report · Self-Guided Reinforcement Learning for Mathematical Reasoning

FORGE Forging Obstacles into Reasoning via Guided Exploration

Turning all-incorrect reasoning failures into self-generated subgoals—using a single shared policy and standard verifiable (q, a*) supervision, with zero reference solutions and zero test-time overhead.

Shuyang Jiang1,2,* Wei Liu2,* Peixian Chen2 Weibo Gu2 Xing Sun2 Qiang Lin2 Ya Zhang3,† Yanfeng Wang3 Yu Wang3,†
1Fudan University · 2Tencent Youtu Lab · 3Shanghai Jiao Tong University
*Equal contribution · †Corresponding authors: {ya_zhang, yuwangsjtu}@sjtu.edu.cn
58.37% +5.05 pp
Micro Avg@32 (Pass@1)
Surpasses official Qwen3.5-4B across 7 competition, Olympiad & research math suites
83.33% +12.18 pp
Micro Pass@32 Coverage
Reaches 91.99% at Pass@512 with zero crossover against Base across all \(k \in [1, 512]\)
89.1% 71.6% midway
Extractable Bottlenecks
Audited failed prefixes expose concrete subproblems; 69.2% solved unassisted by Epoch 3
<20K · 500 0 ref traces
Open-Source Data & Steps
Trained directly from Qwen3.5-4B-Base with verifiable (q, a*) only
01 · Core Insight

All-Incorrect Does Not Mean No Progress

In critic-free RLVR (GRPO), any prompt where all \(G\) sampled attempts fail yields zero relative advantage (\(\hat{A}_{i,t} = 0\)) and zero policy gradient. Standard remedies either discard these frontier problems (DAPO) or rely on privileged reference solutions (HATCH, SAGE). We ask: do the failed attempts themselves already contain the structure needed to unlock learning?

FORGE turns reasoning impasses into learning signals and stronger unassisted performance
Figure 1. FORGE turns reasoning impasses into learning signals and stronger unassisted performance. (a) A real failed rollout on a cookie-passing problem exposes an intermediate subgoal that unlocks \(1/16\) correct guided attempts on a \(0/16\) problem. (b) Source-blinded audit reveals extractable bottlenecks in 89.1% of failed prefixes (71.6% midway impasses); during training, guided unlocking more than doubles and 69.2% (2,432/3,513) of Epoch-1 all-incorrect problems are solved unassisted by Epoch 3. (c) Downstream validation trajectory on BeyondAIME, scaled Pass@1 & Pass@32, and consistent accuracy gains across every response-length regime up to 80K tokens.
01

Recoverable Reasoning Impasses

Our source-blinded audit of 250 failed prefixes demonstrates that 91.9% establish valid setups and 89.1% reach concrete intermediate bottlenecks—exposing actionable subproblems without ever touching a reference solution.

02

Single-Policy Self-Guided RL

FORGE unites reference-free subgoal generation, policy-driven semantic clustering & selection, and a uniform unlocking reward to co-train Hinter and Solver roles inside one shared policy \(\pi_\theta\).

03

Accuracy & Exploration Breadth

Under matched 350-step budgets, FORGE beats GRPO, DAPO, HATCH, and SAGE; with 500-step context scaling (<20K open data), it surpasses official Qwen3.5-4B in both Pass@1 (+5.05 pp) and Pass@32 (+12.18 pp), preserving exploration up to Pass@512.

02 · Method & Theory

The FORGE Single-Policy Paradigm

A single shared policy \(\pi_\theta\) alternates between solving problems (Solver) and turning its own failed reasoning prefixes into question-only subgoals (Hinter). Both roles are verified exclusively against the original ground-truth answer \(a^\star\) and updated in a single joint step. At test time, FORGE performs standard unhinted solving with zero extra overhead.

Overview of FORGE training paradigm
Figure 2. Overview of the FORGE training paradigm. Natural rollouts retain mixed groups, discard all-correct groups, and route all-incorrect (\(0/G\)) problems to reference-free subgoal extraction. Valid subgoals are semantically clustered and used to sample guided solver rollouts on \(q_j + \hat{z}_{j,k}\). Distinct semantic clusters are prioritized for the solver batch, while hinter outputs receive \(+\alpha\) (mixed guided group) or \(-\alpha\) (uniform/invalid) for the joint policy gradient update.

Eliminating Answer Shortcuts at the Source

Whenever a natural group finishes all-incorrect (\(p_{\mathrm{nat}}(q)=0\)), the live policy acts as a Hinter conditioned only on the original question \(q\) and each failed thinking prefix \(\tau_i = \operatorname{think}(o_i)\)—strictly withholding both reference solutions and the ground-truth answer \(a^\star\).

  • Why answer anchoring fails: Exposing \(a^\star\) lets the hinter craft trivial answer-proxy shortcuts or superficial restatements to harvest positive rewards without genuine decomposition.
  • Why online leakage judges degrade: As reasoning chains lengthen during training, an online LLM judge increasingly hits token-budget truncation, eroding filtering precision back down to 81.9% constructive guidance.
  • Reference-free advantage: By withholding \(a^\star\) altogether, FORGE climbs to 90.4% constructive subgoals with zero auxiliary judge overhead.
90.4% Constructive subgoal quality under reference-free joint RL
11.8 Avg. distinct semantic clusters per all-incorrect problem (vs. 1 path in SAGE)
41.1% → 84.3% More than 2× rescue coverage when retaining all semantic clusters
Subgoal design analysis
Figure 3. (a) Reference-free joint RL maintains superior constructive quality over solver-only updates and answer-anchored extraction (even with an online leakage judge). (b) Problem-adaptive semantic cluster breadth vs. single-path SAGE. (c) Retaining all clusters more than doubles mixed-group rescue probability.

Semantic Clustering & Layer Round-Robin Selection

Failed rollouts often discover genuinely distinct mathematical entry points—while other rollouts merely paraphrase the same subproblem. The live policy groups candidate subgoals into semantic clusters \(\{\mathcal{C}_1, \dots, \mathcal{C}_M\}\) (merging only mathematically equivalent questions under identical assumptions).

  • Inline guided rollouts: Each surviving subgoal appends a lightweight scaffold (Hint: Try to solve the following subproblem first; ...) and runs \(G=16\) solver rollouts directly in the training step—eliminating separate probing phases.
  • Coverage before repeats: When backfilling remaining solver slots \(B_{\mathrm{rem}} = B - |\mathcal{G}_{\mathrm{nat}}^{\mathrm{mix}}|\), FORGE selects the lowest-pass-rate mixed group from every distinct semantic cluster across source problems before admitting any cluster's second group.
  • Controlled A/B gain: Starting from the identical mid-training checkpoint, semantic selection leaves fewer natural groups all-incorrect online and improves held-out unassisted micro Pass@1 by +1.4 pp and Pass@k by +1.9 pp.
+1.4 pp Held-out 32K micro Pass@1 gain over cluster-agnostic selection
+1.9 pp Held-out 32K micro Pass@k coverage gain from complementary entry points
99.53% Effective solver batch utilization (σr > 0) without 3× prompt oversampling
Semantic selection controlled ablation
Figure 4. Controlled A/B comparison of semantic selection. Prioritizing distinct semantic clusters reduces online all-incorrect groups (a) and widens unassisted Pass@1 (b) and Pass@k (c) leads under identical batch budgets.

Uniform Unlocking Reward & Sequence-Weighted Joint Update

Both Solver and Hinter are trained by the exact same original-answer verifier \(r^{\mathrm{solve}}(q, o) = \mathbb{I}(\operatorname{Verify}(o, a^\star) = 1)\). A subgoal earns full positive credit as soon as it restores a learnable mixed group (\(0 < p_{\mathrm{guide}} < 1\)):

$$r^{\mathrm{hint}}(u) = \begin{cases} +\alpha, & \text{if } 0 < p_{\mathrm{guide}}(q, \hat{z}_{q,k}) < 1, \\ -\alpha, & \text{if invalid format or } p_{\mathrm{guide}}(q, \hat{z}_{q,k}) \in \{0, 1\}. \end{cases}$$

Hinter advantages use a batch-centered REINFORCE++ baseline without std normalization (\(\hat{A}^{\mathrm{hint}}_{m,t} = r^{\mathrm{hint}}(u_m) - \bar{r}^{\mathrm{hint}}\)), preserving \(\alpha=0.3\) as an explicit gradient scale. Solver and Hinter objectives are token-averaged within each pool and combined by sequence count:

$$\mathcal{J}_{\mathrm{Joint}}(\theta) = \frac{N_{\mathrm{solve}}}{N_{\mathrm{solve}} + N_{\mathrm{hint}}}\,\mathcal{J}_{\mathrm{solve}}(\theta) + \frac{N_{\mathrm{hint}}}{N_{\mathrm{solve}} + N_{\mathrm{hint}}}\,\mathcal{J}_{\mathrm{hint}}(\theta).$$
88.0% Constructive share of 1/16 frontier breakthroughs—matching 2–6/16 and beating 7–15/16!
+1.22 / +2.88 pp Micro Avg@32 / Pass@32 gain of direct Hinter RL (α=0.3) over Solver-only (α=0)
+10.2 pp ArXivMath 0626 Pass@32 boost from direct Hinter RL
Hinter RL ablation and uniform reward audit
Figure 5. Direct Hinter RL ablation and pass-rate-stratified audit. (a, b) Default \(\alpha=0.3\) outperforms \(\alpha=0.1\) and solver-only \(\alpha=0\), with largest coverage gains on Olympiad & research suites. (c) \(1/16\) frontier breakthroughs match moderate pass rates in quality while outperforming high pass-rate groups, justifying uniform \(+\alpha\) credit.

Theorem 1: Mode-Crowding under Natural Backfilling vs. Single-Sample Rescue

Both DAPO and FORGE fill remaining solver batch slots with mixed-outcome groups (\(\sigma_r > 0\)). Why does FORGE's rescued backfilling unlock hard problems while DAPO's natural backfilling stagnates? Consider a shared softmax policy over three reasoning modes: erroneous (\(a\)), shallow (\(b\)) (solves easy \(q_E\) only), and deep (\(c\)) (solves both \(q_E\) and hard \(q_H\)).

Natural Backfilling (DAPO on \(q_E\))

Crowds Out Deep Reasoning Mode \(c\)

Because binary verification on easy prompts \(q_E\) rewards shallow \(b\) and deep \(c\) identically, when \(c\) is scarce (\(n_c=0\)), positive credit flows predominantly to \(z_b\), expanding the softmax normalizer faster than \(e^{z_c}\):

$$\nabla_z p_c^\top \hat{g}_{q_E} = -\lambda_{n_b}\, p_c (p_b - p_a) < 0$$

Even in expectation over mixed groups, natural backfilling can strictly shrink \(p_c\) and increase the dataset-wide all-incorrect rate \(F_G(z)\).

Rescued Backfilling (FORGE on \(\tilde{q}_H\))

Single-Sample Rescue Flips Gradient Unconditionally

On a subgoal-guided hard prompt \(\tilde{q}_H\), binary verification assigns \(r=0\) (negative advantage) to shallow mode \(b\) and \(r=1\) exclusively to deep mode \(c\). Sampling \(c\) even once (\(k=1\)) reverses the update direction:

$$\nabla_z p_c^\top \hat{g}_{\tilde{q}_H} \ge \lambda_k\, p_c(1 - p_c) > 0, \qquad \nabla_z F_G^\top \hat{g}_{\tilde{q}_H} < 0$$

Every realized mixed guided group (\(1 \le k \le G-1\)) strictly grows \(p_c\), improves expected dataset reward \(J(z)\), and lowers \(F_G(z)\)—the theoretical basis for rewarding \(1/G\) breakthroughs uniformly.

03 · Empirical Results

Stronger Controlled RL & Surpassing Official Qwen3.5-4B

Evaluated across 7 challenging benchmarks (312 problems) spanning AIME 25/26, HMMT Feb 25/26, BeyondAIME, and uncontaminated May/June 2026 ArXivMath research problems under an 81,920-token budget (\(K=32\) rollouts, EvalScope).

Stage-2 Scaling: FORGE-4B vs. Official Qwen3.5-4B & Base

Problem-level Avg@32 (Pass@1, %) across all seven benchmarks and Micro Average

Complete Main Results (Table 2)

81,920-token budget · \(K=32\) rollouts · Micro Average weights all 312 problems equally · Bold = overall best, underline = Stage-1 best
Model / Method AIME 25 AIME 26 HMMT Feb25 HMMT Feb26 BeyondAIME ArXivMath 0526 ArXivMath 0626 Micro Average
Avg@32P@32 Avg@32P@32 Avg@32P@32 Avg@32P@32 Avg@32P@32 Avg@32P@32 Avg@32P@32 Avg@32P@32
Reference Models
Qwen3.5-4B-Base 81.3596.67 82.5096.67 74.27100.00 68.4787.88 56.6685.00 24.8462.50 10.9155.10 53.2081.41
Qwen3.5-4B (Official) 85.0090.00 84.1793.33 76.4690.00 62.2284.85 56.3174.00 24.0650.00 12.6336.73 53.3271.15
Stage 1: Controlled RL Comparison on Qwen3.5-4B-Base (350 Steps, 16K → 32K Context)
GRPO 56.2586.67 64.4886.67 41.1573.33 41.1084.85 39.6667.00 18.7547.50 9.2548.98 36.4867.95
DAPO 54.7986.67 67.0890.00 42.2970.00 46.1281.82 40.5968.00 20.3150.00 8.7436.73 37.6566.35
HATCH 58.5483.33 66.8890.00 38.4470.00 46.1278.79 40.7571.00 20.6347.50 9.2542.86 37.7967.31
SAGE 79.0693.33 82.6096.67 66.0486.67 60.6190.91 51.4478.00 27.3467.50 13.3348.98 50.3977.56
FORGE (Stage 1) 80.3196.67 82.7196.67 65.5293.33 62.8887.88 53.3884.00 28.7570.00 13.9063.27 51.6082.69
Stage 2: Long-Horizon Context Scaling on Qwen3.5-4B-Base (500 Steps, 48K → 64K Context)
FORGE (Stage 2) 86.7796.67 89.4896.67 78.3393.33 69.7090.91 59.5987.00 34.9267.50 18.7561.22 58.3783.33
Statistically significant accuracy gains across all seven benchmarks
Figure 6. Accuracy gains across all seven benchmarks after context scaling. FORGE improves Avg@32 over both Qwen3.5-4B-Base and official Qwen3.5-4B on every benchmark, with statistically significant paired-permutation gains on six of seven benchmarks—including both research-level ArXivMath suites.
04 · Deep-Dive Diagnostics

Training Dynamics, Exploration Scaling & Data Efficiency

Beyond headline scores, FORGE preserves lexical diversity during RL, achieves near-100% effective batch utilization without prompt oversampling, and sustains test-time scaling all the way to Pass@512.

11.33% natural all-incorrect ratio at 32K (-40% to -44% vs. DAPO & GRPO)
99.53% effective solver batch utilization using 128 prompts (vs. DAPO's 384)
-17.3% lower BPE 4-gram overlap across unassisted rollouts vs. DAPO
Training dynamics and trajectory overlap
Figure 7. Training dynamics and natural trajectory overlap across 350 RL steps. (a) FORGE drives the natural all-incorrect ratio down to 11.33%, breaking through frontier problems where GRPO, DAPO, and HATCH plateau near 20%. (b) FORGE achieves 99.53% non-zero-variance batch utilization without 3× oversampling. (c, d) Reference-free subgoals and semantic clustering avoid target-anchored homogenization, maintaining markedly lower trajectory overlap than DAPO and answer-anchored extraction.
Zero Crossover vs. Base across every budget \(k \in \{1, 2, \dots, 512\}\)
91.99% overall coverage (33/33 HMMT Feb26 · 98/100 BeyondAIME)
2× Sampling Efficiency on ArXivMath: FORGE @ k=256 matches Base @ k=512
High-budget test-time Pass@k scaling up to k=512
Figure 8. Test-time Pass@k exploration scaling from \(k=1\) to \(k=512\). Whereas conventional post-training (Qwen3.5-4B) trails Base by 10.26 pp at Pass@32, FORGE lifts single-sample accuracy by +5.17 pp while staying above Base through \(k=512\) (90.09% pooled coverage across the 222 unsaturated Olympiad & research problems).
Stage 1 · Steps 0–349 (16K → 32K)

14,809 Verifiable Math Prompts

Curated from 6 public open-source pools after solvability verification, difficulty filtering (removing 8/8 saturated items), and holding out 1,747 frontier (0/8) problems:

  • NemotronRL-math-stack_overflow5,148 (34.8%)
  • Big-Math-RL-Verified4,243 (28.7%)
  • NemotronRL-math-OpenMathReasoning2,651 (17.9%)
  • RLVR-Linearity1,401 (9.5%)
  • MATH959 (6.5%)
  • mAceReason-Math407 (2.8%)
Stage 2 · Steps 350–499 (48K → 64K)

16,803 Refreshed Frontier Prompts

Prunes mastered Stage-1 items and injects strictly deduplicated (cos < 0.93) & benchmark-decontaminated (cos < 0.60) frontier math problems:

  • Retained Unsaturated Stage-112,156 (72.3%)
  • Re-introduced Held-out Frontier (0/8)1,747 (10.4%)
  • ArXivMath-Train1,099 (6.5%)
  • QuestA944 (5.6%)
  • NemotronRL-Math-v2857 (5.1%)
05 · Qualitative Case Studies

Inside FORGE: How Failed Rollouts Become Breakthroughs

Real training trajectories from our online RL logs and source-blinded audits illustrating multi-entry complementarity and why reference-free extraction prevents answer leakage.

Frontier Training Problem (Step 309 · Natural Rollouts: 0/16 Correct)

How many ways can a \(4 \times 4\) board be filled with nonnegative integers such that the sum of the numbers in each row and each column is \(3\)? Ground Truth: \(a^\star = 2008\)

SAGE (Level-3 Reference Hint) · 0 / 16

“Think about using the stars and bars method to first count the row configurations, then consider how the column sums constrain the choices for subsequent rows...”

Anchoring all 16 guided rollouts to one stars-and-bars path causes severe branching over asymmetric column-sum residuals; every guided attempt fails.

FORGE (9 Semantic Clusters → Cluster 6) · 2 / 16 Unlocked

“How many ways can a \(2 \times 2\) board be filled with nonnegative integers such that the sum of the numbers in each row and each column is \(3\)?”

While 8 other clusters (including stars-and-bars and \(3\times 3\) boards) score 0/16, Cluster 6's \(2\times 2\) subgoal prompts the solver to split the \(4\times 4\) board into top & bottom \(2\times 4\) halves by column-sum profile \(\mathbf{c}\), cleanly summing \(96 + 864 + 224 + 224 + 600 = \mathbf{2008}\).

C0: Binary {0,1} 4×4 · 0/16 C1: Single-row stars & bars · 0/16 C2: Permutation triples · 0/16 C3: 2×2 sum=2 · 0/16 C6: 2×2 sum=3 · 2/16 UNLOCKED C7: {0,1,2} 4×4 · 0/16 C8: {0,1,2} 3×3 · 0/16 C12: Perfect matchings \(K_{4,4}\) · 0/16 C14: 3×3 sum=3 · 0/16
Circular Inequality Extremal Count (Step 219)

Around a circle, 100 integers are written; each is greater than the sum of the next two clockwise. Find the maximum number of positive integers. \(a^\star = 49\)

w/ \(a^\star\) · Answer Proxy (16/16, 0 GRPO grad)

“Prove that there are at least 51 negative integers among the 100 written numbers...”

Encodes \(100 - 49 = 51\) directly into the prompt, collapsing all 16 rollouts to 49.
FORGE (Reference-Free) · Useful Subgoal (1/16 Unlocked)

“What constraints must be satisfied if two consecutive integers are positive?”

Isolates the exact structural propagation lemma while leaving the alternating case & construction to the solver.
Induced Subgraphs in Acyclic Graphs (Step 219)

In every acyclic graph with 2022 vertices we can choose \(k\) vertices such that each chosen vertex has at most 2 edges to chosen vertices. Find max \(k\). \(a^\star = 1517\)

w/ \(a^\star\) · Answer Proxy (16/16, 0 GRPO grad)

“Show that in any acyclic graph with \(n\) vertices, there exists a set of at least \(\lceil \frac{3}{4}n \rceil\) vertices...”

Hands over the exact formula \(\lceil 6066/4 \rceil = 1517\), bypassing the extremal analysis.
FORGE (Reference-Free) · Useful Subgoal (1/16 Unlocked)

“In a forest where every internal vertex has exactly two pendant leaves, what is the maximum number of vertices that can be chosen?”

Proposes a concrete extremal tree family directly from the failed prefix without leaking the bound.
06 · Open-Source Release

Code, Models & Datasets — Ready to Reproduce

We open-source the complete minimal FORGE training codebase (built on THUDM/slime), both Stage-1 and Stage-2 checkpoints, and the curated two-stage mathematical RL datasets.

# 1. Clone FORGE and download base model + datasets
git clone https://github.com/pixas/FORGE.git && cd FORGE
hf download Qwen/Qwen3.5-4B-Base --local-dir ./models/Qwen3.5-4B-Base
bash scripts/download_data.sh ./data/FORGE-Math-RL

# 2. Stage 1 (16K -> 32K, 350 steps -> FORGE-4B-Stage1)
export HF_MODEL_DIR=./models/Qwen3.5-4B-Base
export MEGATRON_MODEL_DIR=/path/to/Qwen3.5-4B-Base_torch_dist
export MEGATRON_CODE_DIR=/path/to/Megatron-LM
bash scripts/train_stage1_16k.sh
INIT_CKPT_DIR=./outputs/forge_stage1_16k/ckpt INIT_CKPT_STEP=219 bash scripts/train_stage1_32k.sh

# 3. Stage 2 (48K -> 64K, 500 steps -> FORGE-4B)
INIT_CKPT_DIR=./outputs/forge_stage1_32k/ckpt INIT_CKPT_STEP=349 bash scripts/train_stage2_48k.sh
INIT_CKPT_DIR=./outputs/forge_stage2_48k/ckpt INIT_CKPT_STEP=449 bash scripts/train_stage2_64k.sh
# 1. Serve FORGE-4B (or pixas/FORGE-4B-Stage1) via SGLang
python3 -m sglang.launch_server \
    --model-path pixas/FORGE-4B \
    --port 8000 \
    --context-length 98304

# 2. Evaluate across competition & Olympiad suites via EvalScope (80K budget, K=32)
MODEL_ID=pixas/FORGE-4B API_URL=http://127.0.0.1:8000/v1 \
    bash scripts/eval_evalscope.sh
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "pixas/FORGE-4B"  # or "pixas/FORGE-4B-Stage1"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")

messages = [{"role": "user", "content": "Solve step by step and put your final answer in \\boxed{}."}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([prompt], return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=32768, temperature=1.0, top_p=0.95, top_k=20, do_sample=True)
print(tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
07 · Citation

BibTeX

If you find FORGE useful in your research, please cite our technical report:
@article{jiang2026forge,
  title   = {FORGE: Forging Obstacles into Reasoning via Guided Exploration},
  author  = {Jiang, Shuyang and Liu, Wei and Chen, Peixian and Gu, Weibo and Sun, Xing and Lin, Qiang and Zhang, Ya and Wang, Yanfeng and Wang, Yu},
  year    = {2026}
}