Focused Skill Discovery: Learning to Control Specific State Variables while Minimizing Side Effects

Jonathan Colaço Carr, Qinyi Sun, Cameron Allen

TL;DR

Standard unsupervised skill discovery algorithms encourage agents to reach diverse states, but often ignore the factored structure of environments—causing skills to change unintended state variables and create destructive side effects. This paper introduces Focused Skill Discovery, a general framework that rewards agents for altering target state variables while explicitly penalizing changes to non-target variables. Across diverse baseline methods, this approach triples state exploration efficiency, solves downstream tasks where baseline skills fail, and naturally shields agents from reward hacking under underspecified goals.

What Problem Does This Paper Address?

In hierarchical reinforcement learning, unsupervised skill discovery aims to pre-train a diverse library of reusable behaviors without task-specific rewards. Typically, algorithms maximize mutual information between states and skill latents (e.g., VIC, DIAYN) or maximize geometric distances traveled (e.g., LSD).

However, real-world problems are naturally factored into distinct state variables (such as an agent's position, object locations, or inventory status). Traditional skill discovery treats the environment state as an undifferentiated whole. As a result:

  1. Poor modularity and exploration: Skills change multiple variables simultaneously, making it hard to cleanly chain skills together (e.g., picking up a wrench and then a hammer).
  2. Negative side effects: In pursuit of target subgoals, agents routinely modify irrelevant state variables.
  3. Reward hacking under underspecified objectives: If a downstream task provides an incomplete "proxy" reward (e.g., "reach the exit" without explicitly specifying "don't destroy the room on your way"), unconstrained skills will cause catastrophic side effects.

Prior attempts to address this (notably DUSDi) penalize the mutual information between skills and non-target variables. However, minimizing mutual information only forces skills to affect non-target variables in the same way—for example, a set of manipulation skills might all knock over a nearby coffee cup identically, yielding zero mutual information despite causing permanent side effects.

Methods

The authors propose Focused Skill Discovery, which modifies any standard skill discovery reward $r$ into a focused variant:

$$r_{\text{focused}}(z, h_t) = \left[ \sum_{i \in \mathcal{V}_z} r_i(z, h^i_t) \right] - \ell(h_t, \mathcal{V}_z^c)$$

  • Target Reward Component ($\sum r_i$): Restricts the base discovery objective (discriminator log-likelihood or metric displacement) strictly to the designated target variables $\mathcal{V}_z$.
  • Explicit Side Effects Penalty ($\ell$): Penalizes any displacement on non-target variables $\mathcal{V}_z^c$. Specifically, the authors implement this via a normalized, weighted $L_2$-norm: $\|s_0 - s_t\|_{\lambda_{\mathcal{V}=0}}$.

Because this formulation operates directly on the reward function rather than mutual information bounds, it is algorithm-agnostic. The authors demonstrate instantiations on:

  • Focused VIC (Variational Intrinsic Control; trajectory-end mutual information)
  • Focused DIAYN (Diversity Is All You Need; dense per-step mutual information)
  • Focused LSD (Lipschitz-constrained Skill Discovery; distance maximization)

Datasets / Environments

Experiments evaluate tabular agents across three custom factored gridworld environments:

  1. FourRooms with Tools: The classic FourRooms environment augmented with four collectable tools. Reaching states with all four tools requires visiting every room.
  2. ForageWorld: The agent must gather yellow resources while avoiding delicate, non-regenerating plants (green cells).
  3. MudWorld (Entangled State Variables): The agent must retrieve a treasure by traversing a mud patch. Mud sticks to the agent and tracks onto vacant tiles unless the agent visits a puddle to clean off, which increases the tracked mud count unless done carefully.

Key Insights and Ideas

  • Mutual information penalties do not prevent side effects: DUSDi fails in entangled environments because it allows skills to alter non-target variables as long as all skills do so uniformly. An explicit metric penalty forces skills to clean up after themselves (e.g., picking up an item and returning to the starting point, or navigating to a puddle after tracking mud).
  • Focused skills unlock combinatorial exploration: When skills modify single variables independently, chaining skills of length $L$ yields exponential coverage over factored state spaces, reaching states baseline skills cannot discover within reasonable execution horizons.
  • Safety buffers against proxy rewards: In downstream tasks with incomplete reward functions (e.g., reward given only for reaching the destination regardless of destroyed plants or mud footprint), policies composed of focused skills naturally preserve the environment because their underlying primitive motions avoid collateral damage.

Key Results

  • Exploration Efficiency: In FourRooms, focused skills improved state coverage area-under-the-curve (AUC) by an average of $3.67\times$ over baseline counterparts ($5.3\times$ for VIC, $2.7\times$ for DIAYN, and $3.0\times$ for LSD).
  • Downstream Task Completion: In ForageWorld and MudWorld, baseline algorithms and primitive actions failed to solve the downstream tasks. Focused skill variants achieved the target goals in under 40 steps, significantly outperforming DUSDi. In MudWorld, focused skills were the only methods capable of completing the task while satisfying mud constraints.
  • Underspecified Tasks: When agents were trained exclusively on proxy rewards, focused skills still achieved near-optimal true reward performance, whereas DUSDi and standard baselines collapsed to aggressive reward hacking.

Limitations and Future Work

  • Handcrafted State Factorization: The framework assumes an a priori factored state representation where variables are known in advance. Extending this to learned latent factorizations or raw pixel inputs remains future work.
  • Discrete / Tabular Domain: Experiments were conducted on discrete 2D gridworlds. While the underlying base algorithms (LSD, DIAYN) scale to continuous high-dimensional systems, empirical verification on complex robotic benchmarks is left for future work.
  • Theoretical Safety Guarantees: While empirical results show strong resistance to reward hacking, establishing formal theoretical guarantees bounding attainable utility loss under focused skill discovery remains an open problem.

Summary updated

BibTeX
@inproceedings{carr2025focused,
  author = {Jonathan Colaço Carr and Qinyi Sun and Cameron Allen},
  title = {{Focused Skill Discovery: Learning to Control Specific State Variables while Minimizing Side Effects}},
  booktitle = {RLC},
  year = {2025},
  url = {https://openreview.net/forum?id=eM5ZtMijef},
}
Figure