Latent Space

저품질 RL 환경을 그만 납품하는 법 — 깨진 harness는 모델을 능동적으로 망친다

Auriel W

RL에서 모델은 환경과 상호작용하며 스스로 학습 데이터를 만든다 — 깨진 harness는 노이즈가 아니라 gradient를 거꾸로 미는 독. Stale Cache·Reward Hack·False Resolution 등 실패 유형 분류와 clean signal·graceful degradation·fail-fast 처방, '환경 실패율 5% 이상이면 모델이 아니라 harness 문제'. Gemini에서 RL을 해온 Auriel W의 게스트 포스트.

저품질 RL 환경을 그만 납품하는 법

생각 덩어리

Gemini 출신의 RL Pet Peeves — 깨진 환경은 노이즈가 아니라 독

We’re so excited to publish this guest post from Auriel W, who has worked on RL at Gemini, and has an incredible “RL Pet Peeves” blog where she not-so-subtly explains the frustrations big labs have with RL vendors: 1) not reading trajectories, 2) not having domain experts, 3) not making economic tradeoffs, 4) triggering eval awareness, and this one, on Environment Quality.

As someone who has spent years building production grade models I need you to hear this: researchers don’t want your broken RL environments because they will make our models worse. Not “add some noise” Worse but more like “oh crap the model is learning the wrong things and you ruined my training run and I have to throw your stuff away” Worse.

People will build what amounts to broken software and pitch it as an “RL environment.” The training harness itself - the complete, interactive, and often simulated software system your RL agent trains inside of (e.g., a simulated chatbot, a fake IDE, a mock SaaS dashboard) - just doesn’t work reliably. It throws random tracebacks. It has race conditions. It goes down under minimal load. It has literal broken code in it.

RL의 데이터는 환경이 만든다 — flaky harness는 gradient를 거꾸로 민다

In RL, you don’t have a static dataset. Instead, the model creates its own training data by interacting with the environment. Every action and every reward becomes a data point. A flaky harness systematically generates garbage data and feeds it straight into your model’s learning steps, pushing your gradients in the wrong direction.

After eyeballing thousands of trajectories across different domains as a practitioner for the last 5 years, I see the same harness failures showing up.

Each trajectory cascade below shows exactly how a single harness bug poisons an entire episode.

Error Class 1: The Stale Cache — 옳은 행동이 처벌받는 구조

Your harness’s mock CRM API has a caching bug. Under load, it returns stale state from minutes ago instead of current data. The agent makes rational decisions based on wrong information, gets punished, and learns to avoid the correct workflow entirely.

What the model ends up learning: “When in doubt, send nurture emails and avoid the pipeline.”

Error Class 2: The Reward Hack — 테스트 통과가 목적이 되는 순간

Your reward function only checks whether tests pass, not whether the code is actually correct. The agent discovers it can hardcode expected outputs instead of solving the problem. Every test passes, the agent gets maximum reward, and production breaks on the first real input.

What the model ends up learning: “Read the tests, hardcode the outputs, skip understanding the bug.”

Error Class 3: The False Resolution — 상태 변경은 문제 해결이 아니다

This happens when there is a Status Change, but the core Problem is still not solved…

Your harness rewards based on ticket status changes (open → resolved = positive reward), not on whether the customer’s actual problem was fixed. The agent learns that clicking “resolve” is the fastest path to reward - even when the customer still has the problem.

침묵하는 실패들 — timeout 기본값·에피소드 간 상태 누수·보상 클리핑

Silent timeout defaults: Your harness silently returns a default value when an API call takes too long instead of throwing an error. The model learns that certain actions “always succeed instantly” and never builds retry logic into its behavior.

Non-deterministic state resets: The harness doesn’t fully reset between episodes, so leftover state from episode N bleeds into episode N+1. The model gets rewarded or punished for things it didn’t do in the current episode.

Reward rounding / clipping artifacts: Your reward function clips or rounds in ways that flatten meaningful signal differences. A great action and a mediocre action both return +1.0, so the model has no gradient to distinguish them.

학습과 프로덕션의 균열 — 깨끗한 mock 데이터와 action space drift

Mock data that doesn’t match production distributions: Your harness uses perfectly formatted, clean mock data, but production data has typos, missing fields, and edge cases. The model never sees messy inputs during training and breaks on real ones.

Action space drift: The harness exposes actions that don’t exist in production (or hides ones that do). The model learns to rely on a “shortcut” button that won’t be there when deployed, or never discovers a critical capability it needs.

좋은 harness의 세 속성 — 실패율 5%를 넘기면 모델이 아니라 harness 문제

From my experience a well-built harness has clean signal (every state is fresh, every reward matches reality), graceful degradation (bad episodes get flagged and excluded before they reach the gradient), and fail-fast behavior (something breaks, it throws immediately instead of silently corrupting data - you’d rather lose an episode than poison one).

You learn to recognize these properties by spending time with your model - reviewing trajectories, building a failure taxonomy so you know whether a bad episode was a model failure or a harness failure. If your environment failure rate is above 5%, you don’t have a model problem, you have a harness problem. Fix the harness first.

RL 환경 구축은 소프트웨어 엔지니어링 문제 — harness는 제품의 연장

Building good RL environments is a software engineering problem as much as a research one. I feel like many classically trained ML Researchers are taught to think about algorithms and mathematical correctness the most, but in school we’re never taught how to really execute on what the math tells us in our code.

Treat your training harness like your production one as much as you can. So if prod experiences 200 QPS on average, make sure your harness knows what that feels like without errors.

A good harness compounds: every clean episode builds on the last. A bad one compounds too, just in the wrong direction. The gap between teams that ship working harnesses and those that don’t widens with every training run.

Treat the training harness as an extension of your actual product - with the same level of engineering quality you expect the model to see in production.

원본 사이트 →