Introduction
Reinforcement learning (RL) agents are typically designed to maximize a specific reward function. However, if this function is too narrow, agents may achieve their goals while causing unintended "side effects" in the environment. For example, a robot tasked with moving a box might break a vase in its path if the reward function only accounts for the box's position. This paper proposes a method to penalize such side effects by measuring the reduction in relative reachability of environment states compared to a stepwise inaction baseline.
The Side Effects Problem
The "side effects problem" arises when an agent's actions irreversibly alter the environment in ways not captured by the primary reward. Previous attempts to penalize these changes often introduced "bad incentives":
- Interference: Agents might stop natural environment changes (e.g., preventing a human from eating) to keep the state "pristine."
- Offsetting: Agents might perform a task and then immediately undo it to match a "do-nothing" baseline.
- Magnitude Insensitivity: Binary reachability measures treat small accidents (breaking one vase) the same as catastrophes (breaking many), as both make the original state unreachable.
Proposed Methodology
The authors decouple the side-effect penalty into two components: the baseline state and the deviation measure.
The Stepwise Inaction Baseline
Instead of comparing the current state to the initial state ($s_0$), the authors propose a stepwise inaction baseline. This baseline compares the agent's actual state ($s_t$) to a counterfactual state ($s_t^{(t-1)}$) representing what would have happened if the agent had taken a "no-op" action at the current step, given its previous history.
This approach prevents the agent from trying to "fix" the past or interfere with natural dynamics, as the baseline evolves with the environment.
Relative Reachability (RR)
To address magnitude insensitivity, the authors introduce Relative Reachability. Unlike standard unreachability, which is binary, RR calculates the average reduction in reachability across all possible states in the environment. This ensures that actions causing widespread irreversibility receive higher penalties. The authors also compare this to Attainable Utility (AU), which measures the reduction in the agent's ability to achieve any potential future reward function.
Experimental Evaluation
The method was tested on the AI Safety Gridworlds suite, a set of diagnostic environments designed to isolate specific safety failures.
- Sushi Environment: Tests if the agent interferes with a human eating sushi (interference).
- Vase Environment: Tests if the agent is incentivized to undo its work to match a baseline (offsetting).
- Box Environment: Tests for sensitivity to the magnitude of irreversible changes (magnitude sensitivity).
Key Results
The combination of the stepwise inaction baseline and Relative Reachability was the only configuration to successfully avoid all three bad incentives across all test environments.
- Baseline Impact: Using a starting state baseline led to interference in the Sushi environment, as the agent tried to "preserve" the sushi from being eaten.
- Measure Impact: Simple unreachability failed the Box environment because it couldn't distinguish between different degrees of irreversibility; once the box was moved, the penalty was maxed out regardless of the path taken.
Conclusion and Future Work
By separating the baseline from the measure, this research clarifies that interference and offsetting are baseline issues, while magnitude sensitivity is a measurement issue. While effective in gridworlds, future work must address the scalability of computing reachability in high-dimensional spaces and the definition of "inaction" in safety-critical continuous environments where "doing nothing" might itself be dangerous.
Summary updated