Retrieving Against the Draft: Counter-Attractor Retrieval for Expert Reasoning

When a language model reasons step by step through a hard technical problem, its first instinct usually reaches for the most familiar method: the textbook formula, the obvious loop, the standard procedure. On many expert problems that instinct is the trap. The right answer needs a less obvious principle, such as a different theorem or a mathematical shortcut that avoids brute force. Current retrieval-augmented reasoning, in which a model pulls documents from an external library while it thinks, makes this worse. It searches with the model's own draft as the query, so it fetches more material about the method the model has already chosen. We propose the reverse. At each decision point, retrieve principles that fit the problem's stated conditions but are deliberately unlike the principle the draft is using. Then force the model to work one of those alternatives out explicitly, condition by condition, before a checker decides which line of reasoning to keep.

In two sentences: retrieval should be used to argue with the model's default approach, not to support it. We test whether "retrieving against the draft" fixes the specific cases where a model is consistently and confidently wrong. Those are the cases that sampling more chains of thought cannot fix, because the majority answer is itself wrong.

Core Claim

The claim is narrow and falsifiable. On expert benchmarks where failure comes from choosing the wrong principle rather than from arithmetic slips, retrieval scored to be relevant to the problem but dissimilar to the draft's current principle will raise accuracy on "attractor items" more than any of the following, at matched compute: retrieval keyed to the draft, retrieval keyed to the problem alone, or extra diverse sampling. Attractor items are questions where the model's default chain of thought is wrong and stays wrong across samples. The claim fails if a branch seeded by plain similarity-ranked retrieval matches the contrastive version. If that happens, the contribution reduces to "branch on retrieved principles," and we would report it as such.

The motivating evidence comes from two places. TheoremQA built 800 questions grounded in 350 STEM theorems and found two things: GPT-4 with program-of-thought prompting reaches only 51.0%, and prepending the relevant theorem definitions "did not provide a significant boost." The authors attribute this to models failing to map definitions onto problem conditions. MHPP shows GPT-4o falling from 91.0% on HumanEval to 51.1% on hard Python problems, and to 36.2% on its "Shortcut" category, where naive solutions time out. Together these results say that the knowledge is often available and the model still applies it wrongly. Our design therefore has two parts. The first is a retrieval step that finds the unfamiliar principle. The second is a binding step that forces the model to apply it.

Relation to Prior Work

Three lines of work combine stepwise reasoning with retrieval. All three are convergent by design. RAT drafts a zero-shot chain of thought and then revises each step using a retrieval query built from the step itself; it reports large relative gains on math and planning. Because its query comes from the draft, it inherits the draft's framing, and that framing is exactly the behavior we target. TG-RAG interrupts a reasoning model at structural tags and injects steps from a hand-built expert procedure graph, which keeps the model on the prescribed workflow. Its stated goal is to keep reasoning from drifting off the prescribed procedure. We are after the opposite: leaving the default procedure when it is the problem. Retrieval-Augmented Chain-of-Thought in Semi-structured Domains shows that structure-aware retrieval helps on legal and financial questions, but it retrieves once, before reasoning begins. We borrow from these papers the mechanics of retrieving in the middle of reasoning and injecting text into the reasoning trace. We change what the query is and what the injected text is meant to do.

A second group tries to break reasoning ruts without retrieval. Metacognitive Prompting structures reasoning into three stages: spotting traps, initial reasoning, and reflection. It lifts GPT-4 to 98.33% and 98.96% on the two BRAINTEASER splits, but it uses only the model's own knowledge and reports two failure modes. In "overthinking," reflection discards correct first answers. In "misdirection," the model is pulled off course by distractors in the question. Thought Space Explorer recombines key steps of a chain to open unexplored branches, again from the model's own knowledge. Diffusion Chain of Lateral Thought replaces left-to-right decoding with diffusion models trained by reinforcement learning, which lets the model revise its whole reasoning in parallel rather than only extending it; it reaches 96.2% on 4x4 Sudoku against 71.5% for standard chain of thought, but it requires verifiable rewards and retraining. These papers motivate our approach: they establish that left-to-right reasoning locks in early commitments. They also constrain it. Metacognitive Prompting's overthinking result means any pivot mechanism must be measured on how often it flips correct answers to wrong ones. Our contrast with all of them is that the alternative direction comes from an external library of domain principles, which the model may never volunteer on its own.

Finally, METRAG argues that semantic similarity is a poor proxy for usefulness. It trains a small model to score documents by how much they actually help answer the question, and evaluates on open-domain factual QA. We take its premise that similarity is not utility into a setting it did not study: the useful document is useful precisely because it does not resemble what the model is already thinking.

Research Program

The system has four parts. Each can be ablated separately.

Principle library. For TheoremQA, the library is the 350 theorems that accompany the dataset. Each theorem is rewritten into a short entry with three fields: its applicability conditions, the quantities it relates, and a one-line usage example. For MHPP, we will assemble a comparable library of algorithmic and mathematical techniques, such as closed forms, modular tricks, and dynamic-programming patterns, written in the same format and checked for overlap with test solutions.

Counter-attractor scoring. From the problem we extract a condition summary $c$, meaning the given quantities and constraints. From the current draft we extract the principle it invokes, $\hat{p}$. Each library entry $d$ is then scored as

$$s(d) = \cos(e(d), e(c)) - \lambda \cos(e(d), e(\hat{p})),$$

where $e(\cdot)$ is a fixed text embedding and $\lambda \ge 0$ controls how strongly entries resembling the draft's principle are pushed down. Setting $\lambda = 0$ recovers ordinary problem-similarity retrieval. Using $\hat{p}$ as the only query, with no condition term, recovers draft-keyed retrieval in the style of RAT. The single parameter $\lambda$ therefore spans both main baselines, which makes the central ablation clean.

Forced binding branch. For each of the top-$k$ entries, the model starts a new branch with a fixed preamble: "Suppose principle $d$ applies." It must then state, for each applicability condition, which given quantity satisfies it, or declare a mismatch. Only then may it derive an answer. This step targets the definition-to-condition mapping failure that TheoremQA identified. It differs from Metacognitive Prompting's reflection because the alternative being checked comes from outside the model.

Arbitration that defaults to the original. The default chain is always kept as one branch. On MHPP, branches are compared by executing them on the example tests in the prompt, with timeouts; scoring uses the hidden tests. On TheoremQA there is no executable check. Instead, a pivot branch can replace the default only if it completes the binding with no declared mismatch and its answer survives a units and range check. Ties go to the default. This conservative rule is our direct answer to the overthinking result.

We run everything on open-weight reasoning models already used in this literature: Qwen3-4B and Qwen3-8B, which Thought Space Explorer used, and R1-Distill-14B, which TG-RAG used. All results hold total generated tokens fixed across conditions.

Baselines

The naive reference point is plain chain-of-thought prompting with greedy decoding on the same model. It anchors every gain and defines the attractor subset. For context, the strongest number reported in the file on TheoremQA is GPT-4 with program-of-thought at 51.0% accuracy, and open-source models are reported "below 15%" (TheoremQA). On MHPP, GPT-4o reaches 51.1% pass@1 overall and 36.2% on Shortcut (MHPP). These are frontier-model reference points, not same-model comparisons. We will rerun plain chain of thought on our models rather than compare against these figures.

The strongest existing method is RAT, run with our principle library as its corpus, the same models, and the same token budget. We found no reported result on Lacuna for RAT on TheoremQA or MHPP. Its reported gains are relative improvements on GSM8K, GSM-Hard, and Minecraft planning, so we will measure it ourselves. To beat RAT, our method must show higher overall accuracy and, more decisively, higher accuracy on the attractor subset, with bootstrap intervals that exclude zero. TG-RAG cannot be run faithfully, because no expert procedure graph exists for these benchmarks. Its injection pattern, retrieving at boundary tags and writing the result into the reasoning trace, is covered by running RAT with injection placed in the trace.

The upfront-knowledge baselines are TheoremQA-style theorem augmentation, using both retrieved theorems and the gold theorem as an oracle, and Metacognitive Prompting with the same retrieved principles prepended. The pure-diversity baseline is self-consistency, which samples many chains and takes a majority vote, with as many samples as the token budget allows. Thought Space Explorer is the parametric branching competitor. All prompted baselines get the same number of prompt-tuning iterations on a shared development split.

The ablations isolate the key ingredients. Setting $\lambda = 0$ removes the push away from the draft's principle and leaves similarity-ranked branching. Dropping the binding preamble leaves branching without forced application of conditions. Inserting the gold theorem into a binding branch, instead of prepending it, separates "finding the principle" from "applying it."

Why not just…?

Why not just sample more chains and vote? Self-consistency adds diversity for free, and on problems where the model is uncertain it may match us. By construction, though, it cannot fix attractor items: if most samples share the wrong principle, the vote returns it. We report results separately on items where the default is wrong and the sample majority agrees with it. If self-consistency matches us there, our claim is refuted.

Why not just prepend the retrieved principles, perhaps with Metacognitive Prompting? TheoremQA already reports that prepending theorems gives no significant boost, and Metacognitive Prompting documents misdirection caused by extra material in the prompt. That evidence is suggestive but was gathered on different models. The gold-theorem comparison, prepended versus placed in a binding branch, settles it directly. If prepending matches binding, the binding step is unnecessary.

Why not just retrieve by problem similarity and branch on each result? This is the real threat. It is the $\lambda = 0$ ablation. If the gold theorem is usually already among the top-$k$ results by similarity, the contrastive term adds nothing. We will measure gold-theorem recall@k under both scorings on TheoremQA, broken down by whether the default chain used the gold theorem. The prediction is that the push away from the draft's principle matters only on items where the draft picked the wrong theorem. If it does not matter there either, we drop the claim and report branching on retrieved principles as the finding.

Why not let the model name its own alternatives without retrieval? Thought Space Explorer and Metacognitive Prompting do this. They are run as baselines, and a variant of our method that generates the alternative principle without retrieval isolates the contribution of the external library.

Proposed Experiments and Decisive Checks

The main experiments use TheoremQA and MHPP, and we report the MHPP Shortcut and Redefinition categories separately. Before any method is run, we fix the attractor subset for each model. An item enters the subset if greedy chain of thought is wrong and at least 70% of 16 samples agree with the greedy answer. We report four quantities: overall accuracy (exact match for TheoremQA, pass@1 for MHPP), accuracy on the attractor subset, the overthinking rate (the fraction of correct default answers flipped to wrong), and gold-theorem recall@k. Two secondary checks follow. BRAINTEASER, run with a smaller model because GPT-4 with Metacognitive Prompting is near ceiling, tests whether the mechanism transfers to riddles when the library is a set of trick-pattern descriptions. SciAux tests the obvious risk that a retriever built to push away from the model's view also makes it gullible to misleading auxiliary information.

The decisive results are three. First, our method must beat both $\lambda = 0$ branching and self-consistency on attractor items at matched tokens. Second, its overthinking rate must be no worse than Metacognitive Prompting's. Third, the gold-theorem comparison must show that binding beats prepending. If the first check fails, the approach is not worth pursuing. If only the third holds, the contribution narrows to the binding step, which is still a useful answer to TheoremQA's knowledge-application gap.