r/reinforcementlearning • • 3h ago

P [Paper + code] Deployment-time plasticity in a compact recurrent RL agent, with pre-registered decision rules and the failures reported

33 Upvotes

We're a small team in Rawalpindi/Islamabad, Pakistan. We just released the code and data behind our paper "Deployment-Time Plasticity and Experience-Driven Memory in a Compact Recurrent Reinforcement Learner: An Empirical Study with Pre-Specified Decision Rules".

Repo: https://github.com/zOthix/mimi-brain4-paper

Setup

- The agent (libbrain4) is a compact recurrent learner in C, meta-trained, then evaluated on lives it has never seen. Each life is 12,000 steps, with 32 lives per task family.

- It has a failure memory: a fixed hash table keyed by rounded observations. It stores actions that failed in each place (no observation change, or negative reward through a fading trace) and leans the next action away from them. It is reset every life.

- Baselines: PPO, recurrent PPO and an RL2-style learner (Stable-Baselines3 / sb3-contrib), tuned with successive halving and trained to 77M steps.

- For a fair comparison, we ported the same failure memory to the baselines in Python, with a unit test checking that it matches the C header on recorded streams.

- Every experiment's pass/fail rule was committed before its first run. CPU evaluation is bit-identical on the same platform and build.

Results

- 10 held-out families, 10 meta-trained minds, 3 fresh seed blocks: mean 0.498 (95% CI 0.480 to 0.515). Best tuned baseline without memory: PPO, 0.0977. Best baseline with the same failure memory: PPO+memory, 0.271. Pass.

- 8 task families written blind to our results by a separate process and sealed before evaluation: agent 0.067 vs PPO 0.057. Pass, but narrow.

- DareFightingICE: pre-registered tests passed against PyThunder and ERHEA_PI. The other conditions were inconclusive.

- Omniglot 5-way 1-shot: 0.883 vs 0.963 for a prototypical network. Fail.

- XLand-MiniGrid: 3.66 vs 5.33 for RL2. Fail.

- A revised failure memory, tested as a follow-up and not pre-registered, improved the blind families from 0.063 to 0.118, but made no real difference on the held-out families (+0.0015).

Reproducing

- Every verdict can be re-read from the committed result files in minutes, with standard-library Python.

- A check of about 1 minute on 4 threads re-runs one mind's lives and diffs them against the published output.

- Not included (available on request): the baseline checkpoints (about 2 GB) and the end-of-fight minds.

Where we'd value critique

  1. Is the memory-wrapped PPO a fair enough baseline for the failure memory, or would you want something like an episodic-control baseline?
  2. The gap shrinks a lot on the blind families (0.067 vs 0.057). What would you read into that?
  3. Which public benchmark should come next? Atari 100k at 10 seeds is on our roadmap.

The code is under a non-commercial licence (free for research). If you want to support the compute: https://labs.khive.io/fund


r/reinforcementlearning • • 7h ago

Robot Motubrain 2.0: From large-scale World Action Model pre-training to recursive self-improvement

2 Upvotes

motubrain 2.0 released its 20B World Action Model, trained on 2M hours of internet videos and 500K hours of embodied data.

they livestreamed 25 days of training, covering pre-training, post-training, agent development, and early experiments with RSI.

they also conducted over 10000 real-robot task trials and evaluated different model checkpoints on real robots.

model weights, code, data resources, processing tools, and training notes are now available.

some questions:

  • How much does large-scale video pre-training contribute to robot policy generalization?
  • How can robots use their own experience to improve their policies?
  • What are the main challenges in building a continuous self-improvement loop?

hope to discuss🙌

Technical blog: https://www.motubrain.cn/en/blog/motubrain-2/


r/reinforcementlearning • • 8h ago

On-policy distillation vs. GRPO and SFT on Qwen3-0.6B (GSM8K): dense reverse KL vs. sparse reward & single-TPU constraints

2 Upvotes

Ran an empirical comparison of on-policy distillation (student generates rollouts, frozen teacher scores every token with per-token reverse KL log p_teacher - log p_student and zero discount) against GRPO and SFT on teacher samples over ~1M tokens each on a single Colab TPU v5e (15.75 GiB), using Qwen3-0.6B (student), Qwen3-1.7B (teacher), and Tunix 0.1.7 (JAX/Flax NNX, LoRA rank=16, alpha=32 across all 7 projections).

Why compare them side-by-side:

  • GRPO relies on sparse outcome rewards on student rollouts, which made stopping behavior and learning rate sensitivity immediately visible.
  • SFT trains off-policy on teacher completions, risking distribution mismatch when the student goes off-script.
  • On-policy distillation gives dense per-token signal on states the student actually visits without the teacher authoring the trajectories.

RL & training observations on GSM8K (1,312 test problems, 640-token cap, greedy eval with 95% bootstrap CIs vs. untrained Qwen3-0.6B at 65.5%**; teacher at** 82.0%**):**

  • Tight accuracy cluster: Across ~1M tokens, on-policy distillation across two seeds (66.9%, 68.1%), SFT warm-started distillation (67.3%), SFT (67.8%), filtered SFT (67.2%), and lr=3e-5 GRPO (68.0%) all landed within +1.4 to +2.6 points of the untrained student, with 95% intervals touching zero and a 1.2-point gap between identical distillation seeds.
  • KL went down while accuracy stayed flat: Mean per-token reverse KL dropped consistently from ~0.34 to 0.24 nats/token across seeds, so the student aligned closer to teacher token distributions/style than raw pass@1 gains reflected.
  • GRPO reward & LR traps: Rewarding only final boxed correctness led the model to stop emitting <|im_end|> and hit the token cap; requiring completion fixed stopping, while lr=1e-4 collapsed to a short-answer shortcut (36.9% pass@1) vs. 68.0% at lr=3e-5.
  • Sampling & memory gotchas: In Tunix 0.1.7, setting temperature=1.0 without top_p=1.0 still decoded greedily (zeroing rollout diversity for GRPO until top_p=1.0 and per-step seeds were set), and batch_size=32 with a 512-token KV cache (16,384 positions) fit cleanly while 32,768 positions hit decode memory limits.

Narrow setup (single model pair, GSM8K, ~1M tokens, mostly single seeds on a single TPU chip), so treat it as a practical single-chip check rather than a general claim.

Repo with code, configs, and logs: https://github.com/Brayanbrayan/on-policy-distillation