A reinforcement learning agent compresses what it sees into an internal state description, and it usually learns that description from the experience its own behavior generates. When the agent's goal or strategy changes, the description can become wrong. One fix is to make the whole representation independent of the policy. Another is to accept that it will be policy-dependent and re-learn it. We think both treat the representation as one undifferentiated object, and that this is a mistake. Some distinctions between states are about the world itself, such as which room you are in or whether a wall separates two places. These should look the same under any reasonable behavior. Other distinctions are fine-grained details that matter only for what the agent is currently trying to do. Our hypothesis is that policy dependence is concentrated at fine scales. If that holds, the right representation is organized by scale: coarse distinctions are learned conservatively and kept, and fine distinctions are learned from current behavior and re-learned freely.
Hierarchical binary decomposition supplies the structure for this. It replaces one big multi-way decision with a tree of yes/no splits. We encode each state as a soft path down a binary tree. Shallow splits separate states that differ a lot in behavior, and deep splits separate states that differ only slightly. Two states that share a long path are behaviorally similar. The depth at which their paths diverge then works as an ultrametric, a distance defined by the size of the smallest shared group. We build on Beyond Softmax: A Natural Parameterization for Categorical Random Variables. That paper shows a tree of binary splits gives a diagonal Fisher information matrix, the matrix that measures how sensitive the predicted distribution is to each parameter. Diagonal here means updates to one branch do not distort the others. For transfer, this is the property we want: re-learning the deep, policy-dependent splits should leave the shallow, policy-invariant ones untouched.
Core Claim
The claim has two parts, and the first can be tested before anything is built.
The empirical part concerns how states are partitioned when they are clustered hierarchically by a behavioral distance. Partitions built under different policies should agree strongly at coarse depths and diverge at fine depths. Partitions built from a policy-independent distance should agree with policy-dependent ones at coarse depths and differ mainly at fine depths.
The methodological part follows from that. Suppose an encoder is trained so its binary tree uses a conservative, policy-independent distance at shallow depths and an on-policy distance at deep depths. When the reward changes, we freeze the shallow splits and re-learn the deep ones. Such an encoder should transfer faster and more stably than either a fully policy-independent encoder or a fully policy-dependent one.
This connects the two directions differently from existing work. Catnat uses the binary tree only as the actor's action distribution, never as a state representation, and has nothing on behavioral metrics or transfer. Hierarchical Successor Representation for Robust Transfer motivates the idea: it finds that coarse, parts-based structure such as rooms and doorways stabilizes transfer. However, its hierarchy is temporal (options) and spatial (non-negative factorization), it is tabular, and it has no binary tree. Near-Optimal Representation Learning for Hierarchical Reinforcement Learning learns a flat continuous goal space and has to add reward regularization to stop drift. We instead give stability to the coarse levels by construction.
Research Program
Two distances. The first is the conservative state-action discrepancy (DSA) from Policy-Independent Behavioral Metric-Based Representation for Deep Reinforcement Learning. It scores the worst-case difference in reward sequences over shared future action sequences, so it does not depend on the current policy. The second is a policy-dependent distance in the style of MICo or $\pi$-bisimulation, computed under the current policy.
That paper shows the policy-dependent distances give noisy signals when the policy is poor. It therefore constrains us: we do not use them at coarse scales. Learning Actionable Representations with Goal-Conditioned Policies argues the opposite, that representations should reflect exploratory behavior to expose functional structure. We treat this disagreement as a question about scale rather than picking a side. Conservative distances govern coarse structure, and behavior-driven distances govern fine structure.
The tree head. The encoder's continuous trunk feeds a tree head of depth $D$. Each node is a sigmoid split parameterized as in Catnat, so each state gets a proper categorical distribution over the $2^D$ leaves, and over the $2^d$ nodes at each depth $d$. Let $c_d(s,s')$ be the probability that states $s$ and $s'$ land in the same node at depth $d$. This is the inner product of their depth-$d$ node distributions. Training minimizes
$$ \mathcal{L}=\sum_{d=1}^{D}\mathbb{E}_{(s,s')}\Big[\mathrm{BCE}\big(c_d(s,s'),\ \mathbb{1}[m_d(s,s')<\tau_d]\big)\Big]. $$
Here $\mathrm{BCE}$ is binary cross-entropy. $m_d$ is the DSA estimate for depths $d\le k$ and the on-policy distance for $d>k$. The threshold $\tau_d$ shrinks with depth and is set to the replay-buffer quantile that makes depth-$d$ splits roughly balanced. The handoff depth $k$ is a hyperparameter whose best value is itself a finding.
The actor and critic read the trunk features concatenated with the node distributions. The loss is an auxiliary objective next to Soft Actor-Critic for continuous control, or PPO for discrete control. On a task change, we freeze nodes at depth $\le k$ and re-initialize and train the deeper nodes.
Cascading errors. The hierarchical classification literature warns that early mistakes in a hard tree cannot be fixed further down (Evolutionary Framework with Binary Decision Diagram for Multi-Classification: A Human-Inspired Approach). HD-CNN: Hierarchical Deep Convolutional Neural Networks for Large Scale Visual Recognition avoids this with overlapping soft routing, which couples parameters. Our paths are soft, so no state is committed to one branch. They are still products of independent binary splits, so the Catnat decoupling is kept rather than traded away.
Baselines
The naive reference is plain SAC on DeepMind Control, or PPO on Procgen and the gridworlds, with no auxiliary representation loss. On transfer it is fine-tuned end to end. Anything we propose must beat this by a clear margin. Otherwise the representation machinery is not earning its compute.
The strongest existing competitor is $Q^2$-learning from Policy-Independent Behavioral Metric-Based Representation for Deep Reinforcement Learning. It trains a flat encoder with the DSA distance as an auxiliary loss to SAC, and it is the most direct existing answer to policy dependence. Its authors report that it consistently beats SAC, MICo, DBC and DBC-normed on DeepMind Control in both clean and cluttered-background settings. However, no reported result found on Lacuna for its per-task returns, so we will re-run it ourselves. It will use the same encoder trunk, the same environment-step budget, the same number of seeds, and the same hyperparameter search budget as our method. We count it as beaten if the tree encoder matches its single-task return and reaches a target return after a reward change in significantly fewer steps, across seeds.
On Procgen, the strongest competitor is CTRL from Cross-Trajectory Representation Learning for Zero-Shot Generalization in RL, trained on 200 easy levels for 8 million steps. No reported result found on Lacuna for its per-game scores, so it too will be re-run under the shared protocol. MICo and DBC serve as policy-dependent flat references.
For the parameterization, Catnat's reported Seaquest return under PPO (2164 versus 1875 for softmax, from Beyond Softmax) is the only directly comparable number in the file. We therefore include Catnat applied only to the policy head. This separates any gain that comes from a better action distribution from gains that come from the state representation.
Four ablations isolate the key ingredients:
- No binary factorization. The same leaf targets, but one flat softmax over $2^D$ leaves. This tests whether the decoupling between branches matters.
- DSA at every depth. Tests whether the policy-dependent fine levels help.
- On-policy distance at every depth. Tests whether the conservative coarse levels help.
- Frozen-shallow transfer versus full fine-tuning. Run within our own model.
Why not just…?
Why not just use $Q^2$-learning's flat policy-independent encoder? If policy independence were sufficient, fine-grained but task-relevant detail would be lost or blurred. Each new task would then pay the same adaptation cost. The all-DSA ablation is exactly this hypothesis in tree form. If it matches the graded model on transfer, our second claim fails and only the diagnostic finding survives.
Why not just concatenate a DSA embedding and a MICo embedding, then freeze the first on transfer? This is the most serious threat, because it gets scale separation without any tree. We will run it with matched dimensionality. The tree's claimed advantages are specific. Its fine splits are nested inside coarse cells, so on-policy re-learning is local to the cells the new policy visits. A flat embedding has no such locality, so updates to the fine embedding can reorganize distinctions in states the new policy never reaches. If concatenation matches on transfer speed and on the stability of coarse partitions, we will report that the tree is unnecessary and that the contribution is the scale-graded objective.
Why not just cluster trajectories into discrete groups as CTRL does, plus a continuous embedding? CTRL's single-level Sinkhorn clustering is flat. It does not separate coarse from fine, and it inherits the circularity of learning from the agent's own trajectories that the DSA paper criticizes. Including CTRL on Procgen tests this directly.
Why not just scale the network? Leveraging Procedural Generation to Benchmark Reinforcement Learning found that a 16-times wider network helped on Procgen but did not close the generalization gap, which still required around 10,000 training levels. We will report a parameter-matched wider SAC so that capacity is not confounded with structure.
Proposed Experiments
Diagnostic (gridworlds). The first check is cheap and can kill the project. We use four-room and procedurally generated mazes as in HSR. Distances can be computed exactly there. We compute exact DSA, and exact $\pi$-bisimulation under many policies: random, goal-directed toward different goals, and partially trained. For each distance we build an agglomerative binary hierarchy. At each depth, we measure partition agreement across policies with the adjusted Rand index, an agreement score between two clusterings that is corrected for chance.
The prediction is high cross-policy agreement at shallow depth that decays with depth. We also predict that DSA partitions agree with every $\pi$-bisimulation partition at shallow depth. If the agreement curve is flat, policy dependence is not scale-concentrated and the method has no basis.
Transfer in gridworlds. We then train the graded tree encoder in the same mazes. Goals move every 20 trials, following the protocol of Better Transfer Learning with Inferred Successor Maps. We measure steps to optimal performance after each change. HSR's significant transfer-speed advantage over standard successor representations ($p<0.001$) is a qualitative reference only, since its setting is tabular with given options.
DeepMind Control. We use the clean and natural-video-background settings of DeepMind Control Suite. Transfer pairs share a body and change the reward, for example walker walk to run, and cheetah running to running at a different target speed. We report single-task return at a fixed step budget, area under the return curve after the switch, and steps to 90% of the from-scratch final return. Separately, we report coarse-partition stability across the switch, measured by adjusted Rand index between node assignments on held-out states before and after transfer.
Procgen. We use the 200-easy-level protocol for zero-shot test return, comparing against CTRL and PPO.
Decisive checks. The proposal succeeds if three things hold together. First, the gridworld agreement curve decays with depth. Second, the graded tree beats $Q^2$-learning on post-switch learning speed while matching it on single-task return. Third, both the flat-softmax-leaf ablation and the concatenation baseline lose on post-switch speed or on coarse-partition stability. The best handoff depth $k$ should also roughly track the depth where the diagnostic agreement curve drops. That would tie the method's tuning to a measurable property of the environment instead of leaving it as a free parameter.
References
- Beyond Softmax: A Natural Parameterization for Categorical Random Variables
- Hierarchical Successor Representation for Robust Transfer
- Near-Optimal Representation Learning for Hierarchical Reinforcement Learning
- Policy-Independent Behavioral Metric-Based Representation for Deep Reinforcement Learning
- Learning Actionable Representations with Goal Conditioned Policies
- Evolutionary Framework with Binary Decision Diagram for Multi-Classification: A Human-Inspired Approach
- HD-CNN: Hierarchical Deep Convolutional Neural Networks for Large Scale Visual Recognition
- Cross-Trajectory Representation Learning for Zero-Shot Generalization in RL
- Leveraging Procedural Generation to Benchmark Reinforcement Learning
- Better Transfer Learning with Inferred Successor Maps
- DeepMind Control Suite