r/MachineLearning • u/nullforce999 • 3d ago
Project envscan: static checks for reward hacks in RL environments [P]
We just open sourced envscan, a static scanner we built while auditing 90 public RL environments by hand.
It reads an environment's source, never runs it, and flags places where a policy could earn reward without doing the task: graders running in the agent's sandbox, answer keys the agent can read, substring checks that a list of every option passes. When it says "likely", it was right 35 of 36 times on the envs we audited by hand, and it finds about two thirds of what a person found.
Try it: pip install git+https://github.com/ALLENDE123X/envscan, then envscan owner/name
Writeup with every number: https://aginno.dev/blog/we-tried-to-pass-90-rl-environments/
I'd love to hear what you think: what it misses, what it flags that it shouldn't, and what environment formats it should read next.