Reinforcement learning on math and logic problems with pass/fail rewards gives no signal on problems the model never solves. A popular fix adds an intrinsic reward, a bonus for visiting reasoning paths the model has rarely produced. A weight $\beta$ sets how much that bonus counts against the real task reward. Two problems sit underneath this fix. First, the bonus counts novelty only relative to what the model has produced during reinforcement learning, not relative to what it absorbed in pretraining. A problem whose solution the model memorized from the web therefore looks just as "new" as a problem it must actually work out. Second, recent audits show that much of the reported progress on static math benchmarks is retrieval of leaked test items rather than reasoning. As a result, nobody knows how much of the reported gain from exploration bonuses is real.
This note proposes to set the exploration weight separately for each training problem, based on where that problem sits relative to the model's knowledge boundary. The boundary is estimated with a probe that can tell memorized problems apart from mastered ones. We test this in a setting where contamination is injected on purpose, so we know exactly which items are memorized. In two sentences: give the curiosity bonus only to problems the model can neither solve nor recite from memory, and check on problems generated fresh by a program, never seen before, whether this widens the set of problems the model can solve. The same testbed also measures, for the first time, how much contamination inflates the reported gains of exploration-bonus methods.
Core Claim
Count Counts (MERCI) attaches a small "coin-flipping network" to the model's last hidden layer. It learns to predict random coin flips for each state it sees, and its prediction variance serves as an approximate count of how often a state has been visited during training. MERCI turns this into a novelty bonus and shows that it differs from policy entropy, the randomness of token choice. The counter starts at zero when reinforcement learning begins, so it cannot see pretraining.
Reasoning or Memorization? shows the scale of that blind spot. Qwen2.5-Math-7B reaches nearly 40% accuracy on MATH-500 when shown only the first 40% of each problem, while Llama3.1-8B scores near zero. The same paper shows that reinforcement learning with random rewards still raises contaminated scores, but destabilizes training on clean arithmetic.
We claim three things:
- A single global $\beta$ spends exploration pressure in the wrong places on a contaminated training mix. Some goes to memorized items, whose bonus is spurious. Some goes to mastered items, where the bonus pushes the model away from correct solutions.
- Gating $\beta$ per problem with a memorization-aware boundary estimate restores gains on clean items.
- It also enlarges the set of problems solvable with many attempts, measured by Pass@k at large $k$ (the fraction of problems solved at least once in $k$ samples).
The Reasoning Boundary Paradox found that standard reinforcement learning shrinks this solvable set. That finding motivates our choice of large-$k$ Pass@k as the central metric.
Research Program
The gate. For each training problem $x$, we draw $k$ rollouts on the full problem and record the pass rate $\hat p(x)$. We draw another $k$ rollouts on the problem truncated to its first 40%, the audit from Reasoning or Memorization?, and record the pass rate $m(x)$. In programmatically generated problems, truncation deletes required graph nodes, so $m(x)$ above chance can only come from memory. The per-problem reward is
$$r(x,y) = r_e(x,y) + \beta_0\,(1-m(x))\,(1-\hat p(x))\, r_i(y),$$
where:
- $r_e$ is the verifier's 0/1 reward for answer $y$;
- $r_i$ is MERCI's pseudo-count bonus, kept with its budget control;
- $\beta_0$ is a single tuned scale.
The gate is near zero on memorized items ($m\approx 1$) and on mastered items ($\hat p\approx 1$). It is largest where the model fails and cannot recite an answer. These are the items where reinforcement learning otherwise receives no gradient at all.
The two estimates are refreshed every few hundred steps, because the boundary moves as the policy improves. Gap 3 in the file identifies this movement as the failure of fixed reward tiers. A variant replaces truncation with the probe-gated audit from Spurious Rewards Paradox. That paper finds Qwen2.5's layers 18–20 acting as "anchors" that switch from reasoning to rote retrieval. Resetting those layers drops leaked MATH-500 accuracy from 98% to 86% while leaving LiveMathBench untouched. The probe is cheaper than truncation but specific to one model family.
The testbed. We build it on DyVal, which generates arithmetic, logic and graph-reachability problems from random directed acyclic graphs at four difficulty levels, D1–D4. DyVal found that models strong on static benchmarks, such as phi-1.5 and WizardMath-13B, score near zero on its problems. We also use RandomCalculation from Reasoning or Memorization?.
Starting from Llama3.1-8B, chosen as the less-contaminated base in the file, we continue pretraining on ordinary text mixed with worked solutions for a fraction $\rho$ of generated problems. This gives known contamination. The reinforcement-learning pool then contains three kinds of item:
- the contaminated problems themselves;
- near-variants of them, with the same graph but changed values or the description given in reversed order (DyVal reports a 13.6% drop for GPT-4 on reachability under reversed order);
- fresh problems.
Near-variants are the hard case. The model recalls the memorized template and gets a wrong answer, so these items look like ordinary frontier problems by pass rate. Yet they are exactly the items where learning to read the problem matters.
Natural replication. We then repeat the comparison on naturally contaminated Qwen2.5-Math-7B. Training uses the DeepScaleR problems from The Reasoning Boundary Paradox. We evaluate on MATH-500 and AIME as suspected-contaminated sets, and on LiveMathBench, OlymMATH and OmniMATH as the clean controls used by Spurious Rewards Paradox.
Where knowledge-boundary work fits. It supplies both the measurement and a constraint. BARREL estimates "known vs. unknown" by repeated sampling and warns that a lucky correct guess gets labeled as known. Our truncation term is a direct check against the analogous error, where memorized recall gets labeled as known. BARREL also shows that on factual questions beyond the boundary, longer reasoning is harmful: wrong answers from QwQ-32B are 136.5% longer than right ones. We therefore restrict the method to verifiable formal reasoning, where longer exploration can pay off. We track length on wrong versus right answers to catch any drift toward the overthinking BARREL describes.
Baselines
Plain group-relative training (GRPO). The do-nothing reference is GRPO with outcome reward only and no bonus. It is run on the same pool, model, rollout count and number of steps. It anchors whether any exploration helps at all on clean items.
MERCI with a global, tuned $\beta$. This is Count Counts, the strongest existing method on the exact question of exploration bonuses for reasoning. It uses the same coin-flipping network, budget control and filtering as our method, and differs only in having a constant weight. We give it the same tuning budget over $\beta_0$, and we give it the extra rollouts our gate spends on probing as additional training rollouts, so total generation compute matches. No reported result was found on Lacuna for MERCI on any benchmark, including DyVal, so we reproduce it ourselves. Beating it means higher accuracy at D3–D4 and higher Pass@k at large $k$ on fresh items, with the gap growing as $\rho$ increases.
Difficulty-aware allocation. DALSA routes each sample to supervised training, reinforcement learning or discard based on difficulty statistics, and reports 54.3% top accuracy on challenging math, +8.4 points over its strongest reinforcement-learning baseline. SELF keeps low-likelihood problems and adds forward-KL regularization. Both reweight by difficulty but are blind to memorization, so they are the right test of whether our truncation term adds anything beyond difficulty. We run both on our pool under the same compute budget.
HERO-style variance reweighting. HERO upweights prompts where scores vary most. It reports an average of 66.3 on hard-to-verify math with a Qwen-4B backbone, versus 57.1 for verifier-only training. Here we use it as a per-prompt weighting rule applied to the novelty bonus, which tests whether "high variance" alone recovers our gate.
Ablations isolating the key ingredient. Gate with $(1-\hat p)$ only, dropping the memorization term. Gate with $(1-m)$ only. And "drop memorized items, then global $\beta$."
Why not just…?
Why not just add an entropy bonus or raise sampling temperature? MERCI reports that entropy regularization produces shallow token-level noise, and that state novelty is uncorrelated with entropy. Large Language Models Explore by Latent Distilling likewise finds that stochastic sampling yields lexical rather than semantic variety. We still include an entropy-bonus run at matched compute, because neither result was obtained under controlled contamination.
Why not just decontaminate the pool, or drop items flagged as memorized, and keep a global $\beta$? This is the real threat. Exact n-gram matching misses the semantic memorization revealed by truncation in Reasoning or Memorization?, so plain decontamination is weak. "Drop by truncation probe" is much stronger, and it is one of our ablations. We expect it to lose on near-variants. A hard drop either discards them and loses their training value, or keeps them under the same global weight as mastered items. If drop-plus-global matches the gate across the $\rho$ sweep, we report that the contribution is the memorization filter, not per-problem weighting. That outcome still answers the open question of how much exploration-bonus gains are inflated by contamination.
Why not just use difficulty curricula like DALSA or SELF? Both treat a memorized item exactly like a mastered one, or treat a recalled-but-wrong near-variant like any hard item. The $(1-\hat p)$-only ablation is effectively this baseline plus a bonus. A null difference between it and the full gate at high $\rho$ would show that the memorization term is unnecessary.
Why not just teach the boundary with "I don't know" supervision? BARREL shows that supervised refusal training makes models over-refuse. More importantly, abstention does not expand what the model can solve, and expanding that set is our target.
Proposed Experiments and Decisive Checks
The central experiment crosses the contamination fraction $\rho \in \{0, 0.1, 0.3, 0.5\}$ with every baseline. We report accuracy per DyVal difficulty level and Pass@k for $k$ up to 256, separately for contaminated, near-variant and fresh items. We also log the share of total bonus mass that lands on each item type over training.
Three results would settle the claim:
- Misallocation exists. Under global $\beta$, the bonus share landing on memorized items rises with $\rho$.
- Gains are inflated. Global-$\beta$ MERCI's advantage over GRPO on contaminated items grows with $\rho$, while its advantage on fresh items shrinks.
- The gate fixes it. The gated method's fresh-item Pass@k at large $k$ stays flat in $\rho$ and exceeds every baseline. Most of the margin should come from near-variants.
If the first result fails, the blind spot is not practically important, and the proposal reduces to a negative audit.
On Qwen2.5-Math-7B, the decisive check is the gap between suspected-contaminated benchmarks (MATH-500, AIME) and clean ones (LiveMathBench, OlymMATH). We expect the gate to narrow this gap by raising clean scores, not by lowering contaminated ones. We also check that the ratio of wrong-answer length to right-answer length does not grow. Growth would mean the bonus is buying the overthinking that BARREL describes.
References
- Count Counts: Motivating Exploration in LLM Reasoning with Count-based Intrinsic Rewards
- Reasoning or Memorization? Unreliable Results of Reinforcement Learning Due to Data Contamination
- The Reasoning Boundary Paradox: How Reinforcement Learning Constrains Language Models
- Spurious Rewards Paradox: Mechanistically Understanding How RLVR Activates Memorization Shortcuts in LLMs
- DyVal: Dynamic Evaluation of Large Language Models for Reasoning Tasks
- BARREL: Boundary-Aware Reasoning for Factual and Reliable LRMs
- Tailoring the Training: Difficulty-Aware Learning Strategy Allocation for Large Language Models
- Hybrid Reinforcement: when reward is sparse, better to be dense
- Large Language Models Explore by Latent Distilling