Learning to Look Before You Pour: Irreversible Virtual Labs as a Reinforcement Learning Source for General Reasoning

Language models trained with reinforcement learning on automatically checkable problems, such as math with known answers or code with unit tests, often get better at unrelated tasks too. Yet the "simulation" problems used in these multi-domain studies are static: predict what a Python snippet prints. A real laboratory differs in ways that seem to matter for reasoning. You act on a world whose state you cannot fully see. Mistakes can be undone only at a cost, and sometimes not at all. The feedback you get is the result of your own earlier actions. Human medical training offers a suggestive precedent: students who ran one emergency simulation later performed better in a clinically unrelated one, and the gain came from procedural habits rather than domain knowledge (Simulation-based training in asthma exacerbation). We ask whether the same holds for language models.

We propose to train an open-weight model with reinforcement learning inside a text-driven virtual chemistry and molecular-simulation laboratory. Some actions in this lab are irreversible: a reagent consumed by a wrong addition cannot be recovered, and failed runs cost budget. Faults are injected on purpose. The claim to test is specific. Rewarding the agent for succeeding under irreversibility teaches a transferable habit of checking before committing, and this habit, rather than lab knowledge or multi-turn interaction as such, is what transfers to logic, science and tabular reasoning. The decisive experiment trains on the same lab with an "undo" button enabled. If the transfer disappears when mistakes become free, irreversibility is the active ingredient. If it does not, the hypothesis is wrong.

Core Claim

Multi-domain reinforcement learning with verifiable rewards (RLVR, where a program checks answers and supplies reward, typically optimized with GRPO, a policy-gradient method that compares a group of sampled answers instead of training a critic) has established two things. First, underrepresented domains such as logic, simulation and tables need in-domain training to be acquired at all (Revisiting RL for LLM Reasoning from a Cross-Domain Perspective, the GURU study). Second, the transferability of a domain can be measured from how well its gradients align with those of other domains (Transferability for General Reasoning / TAC).

Both studies define "simulation" as static code input/output prediction. Interactive lab systems, by contrast, are evaluated only inside their own environment. LabUtopia benchmarks embodied manipulation policies. MDAgent/DynaMate and Agent Laboratory run commercial models through prompting loops with no weight updates.

Our claim is that a closed-loop lab domain with costly, irreversible actions is a better transfer source than static simulation or reversible interactive domains such as code debugging. We further claim its gains come from a measurable behavior: the agent verifies before it acts irreversibly.

Research Program

The environment. We build a text-interface virtual lab with two task families.

The first is wet-chemistry protocols. These are grounded in LabUtopia's 200-substance PubChem database, which records molar mass, pH, color and physical state. We replace LabUtopia's GPT-4o reaction oracle with deterministic rule tables for reactions, precipitation and pH, so rewards are exact and cannot be gamed by persuading a judge model. We deliberately reuse LabUtopia's data and task structure, not its 3D physics.

The second family is molecular-dynamics setup tasks modeled on DynaMate. Here the agent issues GROMACS, AmberTools or OpenBabel commands. Success is verified by the tools' own logs: topology built, minimization converged, equilibration stable.

Agents observe partial state. They must spend actions to inspect things, for example measuring pH or reading a log. Each episode carries a finite budget of reagents and compute. Faults are injected procedurally, following the spirit of DynaMate's intentional BRD4_UNL naming error. Examples include mislabeled bottles, contaminated glassware, residue-name mismatches and wrong box sizes.

Two switches for ablation. The environment has an irreversibility switch. When it is on, consumed reagents and failed runs are gone. When it is off, an undo action restores the previous state at no cost. The environment also has an open-loop mode, in which the agent submits a complete plan at once and is scored on the final state. These switches let us separate three candidate sources of transfer: interaction, error recovery, and cost of error.

Training. Following the GURU recipe, we start from Qwen2.5-7B base with no supervised warm-up and train with GRPO using multi-turn rollouts. Reward is binary task success with a small penalty for wasted budget. Training uses thousands of procedurally generated protocols, and whole protocol templates are held out for evaluation.

Analysis. Beyond accuracy, we log two quantities:

  • the fraction of irreversible actions preceded by an inspection action, measured inside the lab;
  • the analogous rate in external reasoning traces, i.e. how often the model explicitly checks a candidate before committing to it, rated by blind annotators on sampled traces.

We also compute TAC-style projected-gradient cosine similarity between lab updates and each GURU domain. This tests whether the lab behaves like the "hub" domains (tables) or like isolated math.

Baselines

The naive reference is the Qwen2.5-7B base model evaluated with no further training, plus the same model after a matched amount of GRPO on GURU math only. The math-only run tests whether our lab does better than the default, and supposedly least-transferable, source.

The strongest existing method is GURU's six-domain RLVR mixture. The file reports a 17-task average of 43.29% for GURU-7B and Zebra Puzzle accuracy rising from 0.07% to 39.4% (Cheng et al.). It is the strongest competitor because it already contains a simulation arm and already shows that underrepresented domains need targeted RL. We rerun it ourselves on the same base model, the same GRPO implementation, the same rollout-token budget and the same hyperparameter search. Our treatment replaces GURU's Code I/O simulation share with lab episodes, holding total tokens fixed.

Beating GURU means a higher 17-task average whose gain is concentrated in held-out logic, tabular and science tasks rather than math, confirmed over at least three seeds. Instruction-following must not degrade. In Huan et al., IFEval moved from 69.2 at base to 70.0 under RL, but fell to 42.3 under supervised fine-tuning.

We also run TAC's curriculum over the augmented domain set, so the comparison is not just against uniform mixing. For TAC we cite a reported +9.8 points on Zebra Puzzle over random sampling with Qwen3-1.7B.

The key-ingredient ablation is the identical lab run with irreversibility off, at matched budget. The open-loop lab and a fault-free lab are secondary ablations.

A supervised baseline fine-tunes on successful lab trajectories generated by a strong model. Finally, a reversible interactive control trains with RL on code repair with test feedback. This domain is interactive and error-driven but mistakes cost nothing.

Why not just…?

Why not just prompt a strong model inside the lab loop? DynaMate and Agent Laboratory show prompting works for frontier APIs on standard cases. However, DynaMate reports that open-weight models such as Llama 3.3 struggled with tool sequencing, and that every agent reached 0% on the multi-ligand system 5KB6. More importantly, prompting changes nothing about the model's behavior outside the loop. Our question concerns transfer, which prompting cannot produce by construction. We still include a prompted base-model agent in the in-lab evaluation, so the gain from training on lab tasks themselves is visible.

Why not just fine-tune on expert lab traces? In Huan et al., supervised fine-tuning on the same math data gave a Transferability Index of −104.1, versus +52.2 for RL. AbstRaL found that supervised training alone learns surface format. Expert traces also rarely contain the failed-then-recovered episodes our hypothesis depends on. Our supervised-trace baseline will show directly whether this holds in the lab setting.

Why not just use more code debugging, which is already interactive with error feedback? This is the real threat. If reversible code repair transfers as well as the irreversible lab at matched compute, then "interactive error recovery" is the whole story and the lab adds nothing. The reversible-control and undo-switch runs settle this together:

  • The irreversible lab wins only if it beats both.
  • If the lab with undo equals code repair, and both trail the irreversible lab, the cost of error is the ingredient.

We will report whichever outcome occurs.

Why not just add more diverse static data? One-example RLVR and TAC's finding that random mixing underperforms gradient-aware curricula both suggest volume is not the bottleneck. Our matched-token design, which swaps lab episodes in rather than adding them, controls for this directly.

Proposed Experiments

Transfer evaluation. All models are scored on the full GURU 17-task evaluation, on GPQA and BigBenchHard, and on IFEval for retention, using Huan et al.'s Transferability Index. For reference, CPL reports +8.6% on GPQA from math-only planning RL. That was measured on a different base model, so it gives an order of magnitude rather than a direct comparison.

In-lab evaluation. We measure success on held-out protocol templates as a function of protocol length. This asks whether RL training bends the decay curve LabUtopia documented, where a 7-step cleaning protocol fell from 99.3% success at step 1 to 1.6% by the final step. We also attempt the multi-ligand MD setups, where no reported agent has succeeded.

Decisive checks. Three results would support the claim together:

  1. The irreversible lab beats the GURU mixture on held-out logic, tabular and science tasks at matched compute.
  2. The same lab with undo enabled loses most of that advantage.
  3. The external verify-before-commit rate rises with training and predicts per-task transfer gains.

If lab gradients align with GURU's table and logic domains rather than math, that would further explain why the gains appear where they do.

Failure on the first check, with the lab no better than Code I/O, would mean interactive labs are useful only for building lab agents. That negative result would still sharpen the GURU account of which domains need in-domain training.