# Detecting Silent Faults at the Environment-Trainer Boundary in Reinforcement Learning

PlugRL's step ledger catches silent faults at the environment-trainer boundary

Zuo Gou, Chenhao Lu · arXiv · 2026-11-5

- **Problem** Environments that run outside the trainer can fail silently, and learning curves rarely reveal it. Injected faults at this boundary often left training looking fine, so the faults went unnoticed.
- **Method** PlugRL turns the boundary into a wire protocol. Its step ledger keeps records on both sides and compares them step by step, instead of relying on the learning curve.
- **Results** On Pendulum, the step ledger caught every boundary fault that crossed the wire, while the gain threshold caught 1 of 21 faults at doses up to 10%.

## Why a learning curve can't vouch for the boundary

Reinforcement learning stacks increasingly place the environment and the trainer in different places, and the seam between them is often never designed. Gymnasium keeps the environment in the trainer's process, while RLlib, SRL and RLinf run environments in workers, and robot learning pushes them to other languages, machines and networks.

A fault at that seam often raises no error or warning, and the run keeps training.

A concrete case is Gymnasium 1.3 under SAME\_STEP autoreset. Its vector episode statistics dropped the first reward of every episode after an environment's first and counted each episode's length one short, until version 1.4. Nothing flagged this, and training carried on regardless. For an environment on another machine, the evidence that the boundary was right was simply that the policy still learned.

The study asks whether that evidence holds up when faults are injected on purpose. It also asks whether a check kept on both sides of the boundary can notice faults that outcome checks miss.

## Making the boundary an explicit wire protocol

PlugRL fixes the boundary as a protocol, so each side knows exactly what the other must send. On one machine, a run through the bridge is deterministic. A connection starts with the server sending its metadata: a version, the chunk length H and the features it offers. After that, the client sends three kinds of message, serialized with msgpack and carrying NumPy arrays over a WebSocket.

An infer message holds the observations of n environments, along with their indices and step ids.

The next infer message then carries the reset observation instead. A connection closes with stop when the run is over, or with resync when the client should reconnect at once. The specification fixes one episode-end convention, although Gymnasium offers several.

It then closes the connection rather than repairing the message. The bridge never fills in a missing step, so losing a client stops the run. Each trainer step sends every environment its action and waits until every client has fed back. Because of that lockstep order, two runs through the bridge can be compared byte for byte.

A wrapper at the env client keeps an episode record and half a step ledger on the environment side. The bridge keeps its own bridge log of the rewards it received, on the trainer side of the wire. Adapters present episode ends the way RLinf, Gymnasium with SAME\_STEP and SB3 expect them. So each trainer uses the protocol through the environment interface it already has.

## The faults injected and the checks that judge them

Observations, actions and rewards were overwritten with zeros, with the previous step's value, or with the next environment's value. Values could also be rounded through float16, and an action could be clipped to half its range. Episode ends were invented, and time limits were dropped or sent as terminations. On Hopper, a termination was dropped or sent as a time limit.

Other injected faults skipped a step and filled in its feedback, or changed the trainer's own episode log. The log faults dropped each episode's first reward, or counted its length one short.

Each fault changed one value, 1% of values, or every value it could reach. On Pendulum, the doses also included 0.1% and 10%. The same values were used at every seed, seeds 0 to 2. Fig. 4 in the appendix lays out the boundary and what each check compares. The gain threshold uses gain, the end-of-training mean logged return minus the start-of-training one, against a bar fixed before the runs.

On Pendulum that bar was 500, and the threshold caught at most one run in ten at doses up to 10% of values. Byte identity flags a run whose final weights differ from the fault-free run's weights at the same seed.

![Figure 4: The boundary and the checks. Filled boxes run code; outlines are records; the dashed outline is other runs. Three messages cross the boundary. Faults…](https://refivu.com/papers/120934bf-3f39-44e6-8cb6-8532b7b3c1c5/figures/figure-c10363dd5d19bef9a029ea9fbff98bd2.png?thumb=512)

**Fig. 4** . The boundary and the checks. Filled boxes run code; outlines are records; the dashed outline is other runs. Three messages cross the boundary. Faults (⊗) were injected in the env client, after its episode record, and in the trainer’s log. Each row marks what a check compares; only the episode record and the step ledger reach across the boundary.

[Original paper](https://arxiv.org/abs/2611.08144v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zuo Gou, Chenhao Lu · Detecting Silent Faults at the Environment-Trainer Boundary in Reinforcement Learning · Original paper figure · Extracted the figure area from page 6 of the original PDF.

The episode record flags a run whose trainer log disagrees with the env client's record in count, length or return. The step ledger flags a run when the two sides' records of any step differ.

## Learning curves and clean evaluation miss most faults

The gain threshold was the check the authors had relied on, and it caught little. With every value wrong, the same threshold caught 43%, 35%, 48% and 33% of runs. On Pendulum, it caught 1 of 21 faults at doses up to 10%, and 9 when every value was wrong.

The seed-spread check raised few false alarms, flagging 0, 1, 0 and 0 of ten fault-free seeds. Each fault-free seed was judged against the other nine. Yet at doses below every value, seed spread caught at most 21% of boundary-fault runs. One changed value moved a run's final return by a median of 15, 85, 197 and 0.7. Changing the seed moved the return by standard deviations of 11, 146, 259 and 1.9.

The authors scored each of the 1,060 final policies over 50 deterministic episodes in a fresh environment. Of the 728 boundary-fault runs that passed both curve checks, 723 scored like fault-free runs. 13 fault-free runs can't tell those 5 from a rare bad seed.

The trainer's log can mislead too, because a zeroed reward makes it read 0. That 0 is the best possible return on Pendulum and on Pusher.

## A step ledger on both sides locates faults

The step ledger rests on one idea: if a boundary fault makes the two sides disagree, comparing their records should expose it. One wrapper sits around each environment, outside the env client's code, and records the observation it gave. The same wrapper records the action it was handed and the value it returned. A second wrapper sits around the vector environment SB3 trained on and records what it sent and received.

Each run was flagged at its first changed value and field, so the ledger names where the fault happened. In the 27 runs on each environment with no fault, the ledger found no difference. The ledger was not run on HalfCheetah.

On Pendulum, the two wrappers added a median 3% to training time. That overhead ranged from −5% to +9%, with each run's learn\_s compared against the same run without the wrappers. The wrappers left all 216 runs' weights unchanged. The 3% figure covers Pendulum alone.

It also found no difference in the fault-free run, which ended on other weights than the workstation's run did. So byte identity can't judge across machines, while the ledger can. Every seed passed the gain threshold across machines, but that threshold is weak evidence.

The episode record, not the ledger, caught every log fault in this comparison. It also caught each boundary fault that moved a reward past its tolerance, changed an episode end, or affected some steps.

## Byte identity and what training actually reads

Byte identity compares each run's final weights with the fault-free run at the same seed. Across 900 runs, the final weights differed from the fault-free run's in 888 of them.

On Hopper, the weights changed in 195 of 207 runs. The other 12 Hopper runs kept byte-identical weights, because one final observation changed at a fall.

The bridge rejects two faults, rows out of order and a missing reward, and both raised an error within 10 s. So byte identity can't catch a fault that the bridge already stops, and it needs a fault that reaches the weights. Byte identity can't judge across machines, because the fault-free run on another machine ended on other weights.

Curve checks can't see what these faults do to the record.

## Silent faults found in practice

The authors found some of these faults while building and checking PlugRL. Most of them surfaced through reconciling records or a controlled comparison, not through an error. Other faults came from multi-agent libraries, where agents that take turns or leave early add conventions that are easy to get wrong. Every boundary fault in that set is a kind the authors had already injected themselves.

Under SAME\_STEP autoreset, Gymnasium 1.3's vector episode statistics dropped the first reward of each episode after an environment's first. The same statistics also counted that episode's length one short, until the fix arrived in 1.4. CleanRL, run on Gymnasium 1.3 instead of the 0.29 it pins, logged no episode at all.

In RLlib 2.53, a shared module logged one agent's return rather than the sum of the agents' returns. In RLlib, an agent with no last observation received reward 0 instead of the environment's reward. Tianshou 0.4.2 dropped the rewards earned while the opponent moved. PettingZoo 1.22 cast one-dimensional continuous actions to integers.

SuperSuit let the reset's info overwrite the terminal observation. MAPPO's SMACv2 wrapper trained on dead agents' padded steps as if they were real. The authors' own specification (E44) led a client written from it to have the server log a return of 0.

## Moving the boundary across processes, machines and transports

The protocol itself was tested by moving environments. SB3 trained 16 environments in its own process and then behind the bridge. All 12 Pendulum runs behind a proxy that held each byte for 0 to 25 ms in each direction ended on the in-process weights.

Seeds stop reproducing across machines, since the MuJoCo builds on two machines differ at the last bit of the first step. So byte identity can't serve as a cross-machine check, and the gain threshold was the check that passed. All seeds cleared the gain threshold across machines: the env client ran on a Windows laptop lacking torch, Ray and RLinf, and in a C++ program under 900 lines.

The authors call the gain threshold weak, so they weigh the step ledger's clean cross-machine run more heavily.

Bridge overhead measured 0.4 to 0.6 ms per vector step of 16 state vectors and 2.6 to 3.0 ms for 16 frames. In the authors' runs, the added latency moved when steps happened without changing what they produced.

## What crossing the boundary costs

A single exchange takes 0.1 ms on one machine when only states cross the wire. At 588 KiB, the same exchange on one machine takes under 1 ms. The bridge adds 0.4 to 0.6 ms per step for 16 state vectors. For 16 frames, the bridge adds 2.6 to 3.0 ms per step.

Between two machines, the authors model the time as a latency s plus k copies of the observation's P bytes over bandwidth B. The model is t = s + kP/B, and it predicted the measured times within 3 to 10%. The negotiated reuse-feedback-obs feature lets the protocol skip the second copy of each observation. At 588 KiB, the round trip dropped from 49.8 ms to 27.1 ms.

The weights stayed byte-identical after this change.

![Figure 5: Sending each observation once nearly halves a large exchange between machines. Median round trip per exchange, five runs of 1,000 exchanges each (bar…](https://refivu.com/papers/120934bf-3f39-44e6-8cb6-8532b7b3c1c5/figures/figure-8de1f65084f1f4ba4d4c9bb001a76617.png?thumb=512)

**Fig. 5** . Sending each observation once nearly halves a large exchange between machines. Median round trip per exchange, five runs of 1,000 exchanges each (bars: their range), over one Wi-Fi and Tailscale path at 23.7 MB/s and on one machine (E46). Withoutreuse-feedback-obseach observation is sent twice; with it, negotiated when the connection opens, once. “States only” is plotted at 0.

[Original paper](https://arxiv.org/abs/2611.08144v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

A 184 KiB camera observation crossed the authors' Wi-Fi path in 11.6 ms. That is 12% of the 100 ms measured for one action chunk from openpi's full-size π 0.5. A full-size π 0.5 with LIBERO weights completed one learning step through the protocol. The authors say that step tells nothing about how well RL tunes the policy.

## What a team should keep and report

A team that wants to trust its boundary should keep a step ledger on both sides of the wire. The authors kept one on Pendulum, Hopper and Pusher, and it caught and located every boundary fault they injected. On Pendulum, the step ledger cost a median 3% of training time. The ledger compares what each environment took and gave with what the trainer sent and received, step by step.

The authors also ran it on Pendulum across two machines, so it does not need a fault-free run to work.

The episode record is the second thing to keep, and the authors place it at the environment. Because the record sits on the trainer's side, the trainer's log could agree with it and still hide a fault. So the episode record must be kept at the environment, next to the env client, and the trainer's log checked against it.

If a change does move the weights, the team should say why.

The authors also recommend reporting the boundary itself, so readers can see where the environments ran. It should state the episode-end convention, and it should distinguish stop from resync. A team should never fill in a missing step, because the protocol rejects structural faults instead.

## Scope of the evidence beyond four environments and one trainer

The authors chose the faults themselves, covering every field except info and the ways seen in practice. Their evidence comes from four simulated environments, all with dense rewards and state-based inputs. Only one trainer, SB3's PPO, was used, and only at three seeds. Results beyond this setting fall outside what the paper tests.

The authors leave open whether faults that curves miss stay harmless with sparse rewards or long horizons. They also leave open replay buffers, image inputs and real robots.

Ledgers were compared after each run, which took 150 MB per run on Hopper.

Byte identity can't judge across machines, because the fault-free run on another machine ended on other weights.

## Paper info

- **Authors**: Zuo Gou, Chenhao Lu
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-5
- **Added**: 2026-11-7
- **Updated**: 2026-11-5
- **Version**: v1
- **arXiv**: 2611.08144
- **Category**: cs.RO · cs.LG · cs.SE
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.08144v1) · [PDF ↗](https://arxiv.org/pdf/2611.08144v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Robot reinforcement learning increasingly runs environments outside the trainer: in another process, on another machine, in another language. Many faults at this boundary raise no error. We make the boundary a wire protocol and ask what notices a fault in it. On Pendulum, HalfCheetah, Hopper and a 7-joint arm (Pusher), we injected up to 23 faults into what crosses the wire and 2 into the trainer's log, from one value to every value. Unless every value was wrong, a learning-curve threshold caught at most one run in ten, and a comparison with ten fault-free seeds at most 21%. A clean evaluation of all 1,060 final policies agreed with the curves: of the 728 boundary-fault runs both curve checks passed, 723 scored no more than three standard deviations below fault-free seeds, though nearly all ended on other weights and, for reward faults, logged other returns. Checks of the run itself, not of its outcome, saw every fault. A step ledger kept on both sides and compared step by step caught and located every fault that crossed, on Pendulum, Hopper and Pusher on one machine and on Pendulum across two, with no fault-free run and, on Pendulum, a median 3% more training time. An episode record kept at the environment caught the faults in the trainer's log. We list such faults found in practice, in Gymnasium 1.3 and our own code and, reported by others, in five multi-agent libraries, and recommend a step ledger and episode counts kept at the environment.

## Quote from the paper

Zuo Gou, Chenhao Lu (2026). Detecting Silent Faults at the Environment-Trainer Boundary in Reinforcement Learning. arXiv:2611.08144v1. https://arxiv.org/abs/2611.08144v1

**BibTeX**

```
@misc{gou2026detecting,
  title = {{Detecting Silent Faults at the Environment-Trainer Boundary in Reinforcement Learning}},
  author = {Zuo Gou and Chenhao Lu},
  year = {2026},
  eprint = {2611.08144},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.08144v1}
}
```

## Other paper commentary

- [Off-Policy Deep Reinforcement Learning without Exploration](https://refivu.com/en/papers/997f4405-73fe-49b5-a89f-243df2c90604-off-policy-deep-reinforcement-learning-without-exploration.md)
- [Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models](https://refivu.com/en/papers/7e2537c1-771a-440a-8d0f-51287b1afd57-deep-reinforcement-learning-in-a-handful-of-trials.md)
- [Rainbow: Combining Improvements in Deep Reinforcement Learning](https://refivu.com/en/papers/b98e78e1-7a51-4f55-b8c6-f920fb30d547-rainbow-combining-improvements-in-deep-reinforcement.md)
- [Deep Reinforcement Learning with Double Q-learning](https://refivu.com/en/papers/f2b03deb-df54-4587-b32e-077bd6c02e5b-deep-reinforcement-learning-with-double-q-learning.md)
- [When to Trust Your Model: Model-Based Policy Optimization](https://refivu.com/en/papers/c30bd870-19cb-4a6e-8e2b-d348ea953f92-when-to-trust-your-model-model-based-policy.md)
- [Addressing Function Approximation Error in Actor-Critic Methods](https://refivu.com/en/papers/88b36232-904a-4e73-a6d0-c363af4ff547-addressing-function-approximation-error-in-actor-critic.md)
- [On k-nearest-neighbor regression in metric spaces](https://refivu.com/en/papers/b2afe947-e002-422f-aeb8-4b45afe4c8ac-on-k-nearest-neighbor-regression-in-metric-spaces.md)
- [MemU-Bench: Benchmarking GUI Agents on Long-Horizon User Interactions](https://refivu.com/en/papers/04d81424-d9d1-4a88-8852-ad3790e5a7bd-memu-bench-benchmarking-gui-agents-on-long-horizon.md)
- [Unsatz: Evaluating Scientific Discovery Without a Given Ansatz](https://refivu.com/en/papers/b143d872-0d21-4ae2-af14-070fdb4b449f-unsatz-evaluating-scientific-discovery-without-a-given.md)
- [From Natural Images to Medical Scans: Transferability of Diffusion Models for Medical Image Generation](https://refivu.com/en/papers/1c7517ae-6cfe-4649-8d27-3bcb27c3fdd7-from-natural-images-to-medical-scans-transferability-of.md)
- [How many sorted projections determine n points in k dimensions?](https://refivu.com/en/papers/56ddc92f-406c-48d0-903d-def2129a08e3-how-many-sorted-projections-determine-n-points-in.md)
- [Reasoning-Trace Overflow in Code Generation: An Empirical Study of Explicit Reasoning Models](https://refivu.com/en/papers/341947d7-6234-48fc-bf19-74e8c2056166-reasoning-trace-overflow-in-code-generation-an-empirical.md)

## Terms in this paper

- [RL](https://refivu.com/en/terms/e264aa32da6c-rl)
- [Hopper](https://refivu.com/en/terms/82cdf1ba4bfa-hopper)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/120934bf-3f39-44e6-8cb6-8532b7b3c1c5-detecting-silent-faults-at-the-environment-trainer-boundary)
