BoolMin-RLVR

Training Qwen3-4B to minimize Boolean circuits, then checking whether the result transferred to graduate-level science reasoning.

Ryan Clark · April 2026

TL;DR

I trained Qwen3-4B-Instruct with GRPO on Boolean circuit minimization from truth tables, using Espresso (via PyEDA) as the reference solver. GPQA Diamond climbed +3.5pp (48.0% → 51.5%): graduate-level science reasoning that has nothing to do with Boolean logic. n=1 seed, but the gain grew monotonically with training (+1.5 at step 50 → +3.5 at step 250), which is the strongest evidence I have that the effect is real rather than sampling noise; a second seed is in flight. MATH-500 was unaffected (-0.6pp, noise), IFEval showed a small alignment tax (-0.4pp). A matched-budget companion run on RNA inverse folding produced strong in-domain learning but degraded GPQA by 4.1 points. Algorithm, base model, and training scale match across both runs; only the task changes. The choice of task seems to matter more than the existence of a verifier.

BenchmarkBaseBoolMin-trainedRNA-trained
GPQA Diamond48.0%51.5% (+3.5)43.9% (−4.1)
MATH-50091.0%90.4% (−0.6)91.2% (+0.2)
IFEval (strict)84.5%84.1% (−0.4)83.0% (−1.5)
IFEval (loose)87.8%87.2% (−0.6)87.1% (−0.7)

Matched-pair zero-shot evaluation. Same base model (Qwen3-4B-Instruct-2507), same algorithm (GRPO via Tinker), same hyperparameters, matched training budget (~250 / ~150 steps; ~$11–15 each). Only the training task varies. n=1 seed per condition; see the limitations section.

The question

The recent RLVR-for-reasoning literature has a soft assumption running through it: that any task with a fast verifier produces transfer to general reasoning, because the structural properties of the training signal (correctness feedback, exploration through rollouts) are what matter. NP-Engine reported +4.1 on GPQA from training on classical NP problems (TSP, knapsack, graph coloring). If the assumption holds, training on any inverse-design task with similar structure should produce similar transfer.

I wanted to actually test that assumption, both with a positive case (does a different NP-complete inverse-design task work?) and a stress test (does an inverse-design task in an unrelated domain work?). The two experiments share an algorithm, a model, a training budget, and an evaluation suite; the only thing that varies is what the model is trained on.

This post is the positive case. The negative case, RNA inverse folding, is written up separately.

Why Boolean minimization

Boolean circuit minimization from a truth table (given the 2^n output bits, find a minimal sum-of-products expression) has three properties that make it a clean RLVR target:

The task is structurally close to NP-Engine's targets (combinatorial search with verifiable answers) but in a domain (Boolean algebra) that's distinct enough to make memorization implausible.

Task and reward

The model receives an n-input truth table as text and produces a sum-of-products expression using &, |, ~:

A B C D | Y
0 0 0 0 | 0
0 0 0 1 | 0
0 0 1 0 | 1
... (16 rows)

Output:  Y = (A & ~B) | (C & D)

The reward is two-tiered:

  1. Correctness (binary). Parse the expression, evaluate against all 2^n truth-table rows. Any mismatch → reward 0.
  2. Quality (continuous, only if correct). min(reference_gate_count / model_gate_count, 1.0), where gate count is the AST node count and the reference is Espresso's output via PyEDA.

Default weights (correctness=1.0, quality=0.5, format=0.1) place most of the signal on correctness. A correct expression matching Espresso's gate count earns ~1.0; a correct-but-bloated expression earns proportionally less.

Difficulty tiers

TierInputsTruth table sizeNotes
Easy3–48–16 rowsSolvable by inspection
Medium5–632–64 rowsKarnaugh maps still work
Hard7–8128–256 rowsBeyond manual minimization
Expert5–6, 2–3 outputsShared-subexpression optimization

The eval set freezes 500 instances (125 per tier). For the main training run, I trained on easy-tier-only: partly to keep the budget down, partly because the question was whether transfer could come from a single difficulty tier rather than requiring a curriculum.

Training

In-domain results

Evaluated on the frozen 500-instance set:

TierBase correctTrained correctΔBase parseableTrained parseable
Easy67.2%94.4%+27.269.6%99.2%
Medium12.0%33.6%+21.634.4%78.4%
Hard0.0%1.6%+1.68.0%32.0%
Expert8.8%22.4%+13.651.2%64.8%
Overall22.0%38.0%+16.040.8%68.6%

Training on easy-tier-only produced double-digit improvements on medium and expert tiers, so the model isn't just memorizing easy-tier patterns. Hard tier, on the other hand, remains effectively zero: 2^7 = 128-row truth tables exceed what a 4B model can reason through reliably, so any transfer from hard instances was always going to be limited. The in-domain generalization story rests on the easy → medium/expert jump.

Two-panel chart showing the BoolMin-RLVR training trajectory across 250 cumulative steps. Left panel: mean reward climbs from around 0.5 at step 0 to approximately 0.9 by step 100 and plateaus near 0.95. Right panel: correctness rate follows a similar arc from about 0.5 to 0.9. A dotted vertical line marks step 50 where training resumed from the trial checkpoint.
250-step in-domain trajectory composed from the trial (steps 0–49) and trial_250 (steps 50–249) logs. Light traces are per-step values; bold lines are 10-step rolling averages. Both reward and correctness climb sharply in the first 50 steps, then continue improving more slowly through step 250, consistent with the in-domain table and the GPQA monotonic-growth argument.

Cross-domain transfer

This is the actual question. Zero-shot evaluation of the trained checkpoint against three reasoning benchmarks:

BenchmarkBase50-step250-stepFinal Δ
MATH-50091.0%90.4%-0.6
GPQA Diamond48.0%49.5%51.5%+3.5
IFEval (strict)84.5%85.4%84.1%-0.4
IFEval (loose)87.8%88.7%87.2%-0.6

The number I came in wanting to see was GPQA Diamond, and it climbed +3.5, in the same ballpark as NP-Engine's +4.1 from training on classical NP problems. The gain also grew with more training (+1.5 at 50 steps, +3.5 at 250), consistent with steady learning rather than a noisy point estimate.

MATH-500 was untouched. Two readings are plausible: (a) the 4B model is ceiling-saturated on MATH at 91%, or (b) Boolean minimization and mathematical reasoning engage genuinely different model capacities. I'd bet on (a) given the small headroom but can't distinguish them from the data.

IFEval showed a small consistent regression: a modest alignment tax. The 50-step checkpoint had a small positive shift on IFEval that disappeared by step 250, suggesting whatever IFEval-aligned behavior emerged early was either noise or got optimized away by the longer training. The size is small enough that I'd believe a second seed could reverse it, but the direction is consistent across both eval modes.

The RNA comparison

The question this experiment was built to answer is whether RLVR transfer is task-agnostic. I ran a parallel experiment on RNA inverse folding with the algorithm, model family, training budget, and eval suite held constant. The in-domain story for RNA was good (perfect-solve rate 30% → 52%; written up here). The cross-domain story was the opposite of BoolMin's:

BenchmarkBaseBoolMin trainedRNA trained
GPQA Diamond48.0%51.5% (+3.5)43.9% (−4.1)
IFEval (strict)84.5%84.1% (−0.4)83.0% (−1.5)
IFEval (loose)87.8%87.2% (−0.6)87.1% (−0.7)

Both runs produced strong in-domain learning. The transfer signs went opposite ways: one helped graduate-level science reasoning, the other actively hurt it.

Framing. The result isn't "RNA is bad for reasoning"; it's evidence that the structural properties of RLVR (verifier, exploration, partial reward) don't automatically produce transfer. The choice of task domain interacts with what the model learns to generalize. Boolean logic seems to share something with GPQA-style reasoning (constraint satisfaction, compositional structure) that RNA folding doesn't. Whether that's about task content or about what the model spends rollouts doing is still open.

Takeaways

  1. Boolean minimization works as an RLVR signal. +27.2pp on easy, +21.6 on medium (from easy-only training), +3.5 on GPQA, at a $42 total budget on a 4B model.
  2. Cross-domain transfer is task-dependent, not algorithm-dependent. Matched-budget runs on two inverse-design tasks produce qualitatively different transfer signs. The implication for anyone designing an RLVR training mix is that "find any task with a fast verifier" isn't sufficient. Task choice carries real selection pressure on what the model generalizes to.
  3. Easy-tier-only training produces meaningful out-of-tier generalization. Medium-tier instances are explicitly out-of-distribution during training, and the model still improved by 21.6pp on them. This is a small data point against the "RLVR just optimizes the training distribution" reading.

Caveats

Open threads

  1. Multi-seed replication of the GPQA result. The +3.5 is the single most-cited number from this experiment and it deserves error bars.
  2. Curriculum execution. Phase 2 (easy + medium) for ~750 additional steps, evaluated against the same suite. If GPQA continues to climb, that's strong evidence the effect scales; if it plateaus or reverses, equally informative.
  3. Disentangling task content from task structure. A shuffled-truth-table control (verifier accepts anything) would test whether the model is learning logic or just learning to produce output the verifier likes. Companion run on a non-NP verifiable task in the same domain.
  4. Scaling to 7B. Hard-tier in-domain performance was near zero at 4B; whether a 7B model can both learn hard instances and produce stronger transfer is the natural scaling question.
  5. Investigating IFEval drift. The 50-step → 250-step IFEval reversal hints at an optimization-pressure mechanism I'd like to characterize; KL divergence from the base over training would tell us whether instruction-following degrades smoothly or in a phase change.

Code & resources