Cheap Strategy Detection for Multi-Solution Reasoning Data

Small reasoning models learn more from datasets that show several genuinely different ways to solve each problem than from datasets that show one. The catch is cost. To build such a dataset you sample many long solutions per problem, then have a second large model read every pair and judge whether they use different strategies. Most of that work is wasted: in one widely used math corpus, 58% of problems turn out to have only one strategy among their sampled solutions. We propose to replace the expensive judge with the student model itself. We would convert its attention to bidirectional (so every token can see the whole trace), strip out template phrasing, and train it briefly to reproduce the judge's verdicts. The central question is whether this encoder can recognize a repeated strategy from the first part of a solution. If it can, the generator can abandon redundant rollouts before paying for them, and the savings reach generation cost, not only filtering cost.

In short, the claim is that a bidirectional, boilerplate-masked encoder derived from the student can make multi-solution datasets as good as those curated with a large-model judge, at a fraction of the curation compute and with substantially fewer generated tokens, because redundant strategies can be detected early in a trace. The reader should be able to test this with one curve: downstream pass@k versus total tokens spent building the dataset.

What exists and what is missing

Three papers establish that diversity of solution paths matters, and they motivate this work. Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving measures divergence with string edit distance across correct solutions. It shows that this measure correlates with accuracy and that fine-tuning on high-divergence data raises Pass@10 by an average of 6.2%. However, edit distance rewards renamed variables and rephrasing as much as real changes of method. Reasoning Path Divergence fixes that problem with a metric called RPD. A Qwen3-14B model extracts 3–5 core steps from each chain-of-thought (the written-out reasoning before the answer), and steps are then matched asymmetrically across solutions. Curating "one problem, multiple solutions" data from OpenThought3 with RPD gives +4.99% pass@16 on AIME24 and +6.47% on HumanEval over one-solution-per-problem training. RPD is the method we aim to match, and its cost is the problem we attack. It requires 16 long completions per problem plus 14B-model step extraction. Symbolic Chain-of-Thought Distillation reaches the same conclusion from the distillation side, with 30 sampled rationales from a 175B teacher. Beyond Quantity shows for code agents that steering synthesis toward diverse trajectories beats raw volume. Its steering depends on multi-agent generation and hand-designed entropy signals, not on a learned strategy detector.

Two papers supply the method. LLM2Vec shows that a decoder can become a strong text encoder in about 1,000 unsupervised steps: remove the causal mask, train with masked next-token prediction, then apply light contrastive learning. It reports an unsupervised MTEB score of 56.8 for Mistral-7B. Generative Representational Instruction Tuning shows that one model can switch between bidirectional embedding and causal generation without losing either ability. Neither paper applies conversion to reasoning traces or to curation. Disentangling Reasoning Tokens and Boilerplate Tokens supplies the second ingredient. Its shuffle test (SHAD) labels a token as boilerplate if a reference model predicts it just as well when the response is paired with the wrong prompt. Emphasizing only the remaining tokens during fine-tuning doubled held-out Nexus accuracy, from 14.0% to 27.8%. We reuse the shuffle test for a different purpose: deciding which tokens should count when comparing strategies.

One finding constrains the design. SFT or RL? reports that supervised fine-tuning can instill rigid formats that hurt later reinforcement learning. We therefore report RL-after-SFT results rather than assuming that better curated data automatically helps downstream training.

Research Program

We build a strategy encoder from the student's own base model (Qwen3-4B-Base, matching the RPD setting) in three stages.

In the first stage we convert the model LLM2Vec-style. We remove the causal mask and train with masked next-token prediction on reasoning traces from OpenThought3 rather than on Wikipedia.

In the second stage we run the SHAD shuffle test once over a small slice of traces to label boilerplate tokens. Examples include phrases like "Let me check," step headers, and restatements of the question. A trace's embedding is the mean of the bidirectional hidden states over non-boilerplate tokens only.

In the third stage we distill RPD. We pay the full RPD cost once, on a few thousand problems. Pairwise RPD scores on those problems become targets for a contrastive loss: pairs RPD judges to share a strategy are pulled together, and divergent pairs are pushed apart. Variable-renamed copies of the same trace are added as free positives. The key training choice is to compute pair targets from full traces while feeding the encoder random prefixes (10–60% of tokens). The encoder is thus explicitly trained to predict the eventual strategy early.

Curation then runs online. For each problem the generator samples solutions one at a time. After every fixed chunk of tokens, the encoder embeds the partial trace and compares it with the traces already accepted for that problem. The rollout is aborted if its similarity to an accepted trace exceeds a threshold calibrated on held-out RPD pairs. Completed correct traces are kept, up to a per-problem budget.

We are testing two separable claims. The first is that the encoder reproduces RPD judgements on full traces, which saves curation cost. The second is that it does so on prefixes, which saves generation cost. The second claim is the novel and risky one.

Baselines

The naive reference is one-problem-one-solution fine-tuning on OpenThought3. This is the anchor against which RPD reports its +4.99% AIME24 pass@16 and +6.47% HumanEval pass@16. A second naive reference is random multi-solution selection with the same number of solutions per problem, which separates "more solutions" from "different solutions."

The strongest competitor is RPD curation itself, run exactly as described in the RPD paper: 16 completions per problem, Qwen3-14B step extraction, asymmetric matching. RPD is the strongest competitor because it is the only method in the file that explicitly targets strategy-level rather than lexical divergence and reports gains on these benchmarks. The file gives only relative gains over one-solution training; no absolute pass@k for RPD-curated models was found in the Lacuna file. We therefore reproduce RPD ourselves and compare against our own reproduction. For fairness, all methods fine-tune the same Qwen3-4B-Base with identical steps, learning rate, and final dataset size, and they are evaluated with identical sampling settings. The comparison is made at matched final dataset size and also along a curve of total curation-plus-generation tokens. Beating RPD means matching its pass@16 on AIME24 and HumanEval within seed noise while using clearly less total compute. Alternatively, it means exceeding RPD at equal compute, where RPD must subsample fewer completions per problem.

The cheap-metric baselines are edit-distance divergence from the solution-divergence paper and cosine similarity from an off-the-shelf embedding model. The RPD paper argues that cosine conflates style with logic; we test that argument rather than assume it.

The ablations isolate our ingredients. The first keeps the causal mask and embeds with the last token, which tests whether bidirectional conversion matters. The second pools over all tokens, which tests SHAD masking. The third trains only on full traces, which tests prefix training. The fourth is a GritLM-style dual-mode version that shares weights with the generator, which tests whether the encoder can live inside the generator at no extra memory cost.

Why not just…?

Why not just use an off-the-shelf sentence embedder? This is the most serious threat. General embedders are cheap, and they may already separate strategies well enough. RPD's authors argue that cosine similarity over dense embeddings tracks phrasing, not logic, but that is an argument about full traces. It says nothing about the prefix setting, where we expect a general embedder to fail because early text is dominated by restating the problem. We will measure rank agreement with RPD for the off-the-shelf embedder and for our encoder, on full traces and on prefixes. If the off-the-shelf model matches ours on both, the contribution reduces to early aborting with any embedder, and we will report it that way.

Why not just run RPD with a smaller extractor model? A 1–3B step extractor would cut curation cost. It still needs complete traces, though, because steps cannot be extracted from a solution that has not been written. It therefore saves nothing on generation, which is the larger bill when completions run to thousands of tokens. We include a small-extractor RPD variant on the compute curve to show where it lands.

Why not just sample fewer completions per problem? Sampling 4 instead of 16 reduces cost linearly. With 58% of problems strategically uniform, most such problems would yield duplicate strategies, and the problems that do admit diverse strategies would be under-covered. Random low-budget sampling is a point on our compute curve. The early-abort method must dominate it there, not just at the high-budget end.

Why not just skip curated SFT and use diversity-rewarding RL? Outcome-based Exploration for LLM Reasoning keeps diversity alive during RL by rewarding novel final answers. Among correct solutions to one problem, however, the final answer is identical by construction. Answer-level novelty therefore cannot distinguish two correct strategies, and that distinction is exactly what multi-solution data needs. The two approaches are complementary. Our RL-after-SFT check tests whether data built with our encoder remains a good starting point for RL, given the SFT or RL? warning about rigid formats.

Decisive Experiments

The first check is cheap and comes before any fine-tuning. On held-out OpenThought3 problems, we compute rank correlation with full-trace RPD for each metric as a function of the prefix fraction the encoder sees. Because OpenThought3 already contains 16 completions per problem, early aborting can be simulated by truncating stored traces and counting the tokens after each abort point as saved. If our encoder's agreement with RPD only becomes useful past roughly 80% of the trace, strategies diverge too late for early aborting to help. In that case the project falls back to the smaller claim of cheap full-trace curation.

The second check is downstream. We fine-tune Qwen3-4B-Base on datasets of equal size built by each method and report pass@1 and pass@16 on AIME24, MATH-500 and Olympiad Bench, plus HumanEval and LiveCodeBench for transfer to code. We plot every method against total tokens spent on generation plus curation. We then validate the simulated savings with live generation on a subset of problems.

The third check follows up with a short GRPO run from each fine-tuned model. It tracks pass@k and the number of unique answers during training, to see whether starting diversity survives RL.

The ablations then decide which ingredient carries the result. If causal last-token pooling matches the bidirectional encoder, attention conversion is unnecessary here. If all-token pooling matches the SHAD-masked encoder, the boilerplate argument does not transfer from loss weighting to similarity measurement.