SandHouse
Pages and contents

Compositional Transduction

Compositional Transduction with Latent Analogies for Offline Goal-Conditioned Reinforcement Learning

⋮⋮
Field
Offline goal-conditioned reinforcement learning, compositional generalization
⋮⋮
Authors
Junseok Kim, Dohyeong Kim, Mineui Hong, Songhwai Oh
⋮⋮
Year
2026
⋮⋮
Venue
ICML 2026, PMLR 306
⋮⋮
Link / arXiv
https://arxiv.org/abs/2605.20609
⋮⋮
Code
No direct GitHub link is given in the PDF; project page: https://rllab-snu.github.io/projects/CTA/

Problem
Offline goal-conditioned reinforcement learning (GCRL) tries to learn an agent that can reach arbitrary goals from a fixed dataset of past interactions. Because the agent cannot gather new data, it must recombine behaviors already present in the dataset to solve state-goal combinations that were never observed directly. Existing methods often approach this through trajectory stitching: if one trajectory reaches some intermediate state and another continues from there to the goal, their behaviors can effectively be connected. This is useful for constructing longer behaviors, but does not directly handle another important form of compositionality: reusing the same task transformation in a different surrounding context.

For example, suppose the dataset shows the robot opening a drawer while a window is open, and separately contains states where the window is closed. At test time the agent may be asked to open the drawer while the window is closed even though that exact task-context combination never occurred in the dataset. The important part of the earlier experience is not the whole trajectory, including the window state, but the underlying change corresponding to opening the drawer. The paper calls this reusable transformation a task-endogenous analogy, while factors such as the window state that do not need to change are task-exogenous context. Applying a learned analogy such as "open drawer" to a new context is called analogy transduction.

This creates an out-of-combination (OOC) generalization problem. Both ingredients may have appeared independently during training, but their particular combination has not. In the drawer example, the agent has encountered the "open drawer" analogy and the "window closed" context, but perhaps never together. The paper therefore needs to solve two problems: first, find a representation that captures the task-relevant transformation while ignoring context; second, construct value functions and policies that can deliberately generalize to unseen analogy-context combinations.

Background
Temporal Distance

The paper describes goal reaching through the optimal temporal distance between states. For the standard absorbing goal reward r(s,g)=𝟏s=g , the goal-conditioned value is

Vπ(s,g)=𝔼π[∑t=0∞γtr(st,g)∣s0=s].

The corresponding temporal distance is

dπ(s,g)=logγ⁡Vπ(s,g),d∗(s,g)=logγ⁡V∗(s,g).

In a deterministic environment, d∗(s,g) reduces to the number of steps on the shortest path from s to g . More generally it gives a control-aware notion of distance: two visually similar states can be far apart if the dynamics make one difficult to reach from the other. Temporal distance is a quasimetric, meaning that it need not be symmetric; reaching g from s may take a different amount of time than reaching s from g .

The central insight of the paper is that an individual scalar d∗(s,g) is not rich enough to describe a task. Many unrelated transformations can require the same number of steps. Instead, the authors compare how s and g relate to every other state in the temporal-distance geometry.

Task-Endogenous and Task-Exogenous State

The theoretical framework is a goal-conditioned extension of the block controlled Markov process called GCE-BCMP. A state-goal pair is assumed to contain task-endogenous components zen and task-exogenous components zex . Endogenous components determine what must change to solve the task, while exogenous components describe contextual variation that does not affect the task-relevant transition dynamics.

For an "open drawer" task, the drawer and robot arm may be endogenous while the state of a separate window is exogenous. Importantly, this decomposition is relative to the state-goal pair rather than being a single globally fixed decomposition of every observation. The same physical feature could therefore matter for one goal and be irrelevant for another.

The key theoretical assumption is that the transition of the task-endogenous component depends only on the current task-endogenous state and the chosen action, not on the task-exogenous context. Under this assumption, opening the drawer represents the same task-level transformation whether the window is open or closed.

Method
Temporal Distance Difference Fields
The paper's main representation is the temporal distance difference field

α(s,g)(x)=d∗(x,g)−d∗(x,s).

Instead of asking only how far s is from g , this representation considers every possible probe state x and asks: "relative to x , how much easier or harder is it to reach g than to reach s ?" The collection of these differences over the state space becomes a signature of the transformation from s to g .

This addresses the degeneracy of a single temporal distance. Suppose both "open drawer" and "press button" happen to require three actions. Their scalar distances could therefore be identical. Their relationships to other states, however, will generally be different, so their full distance-difference fields distinguish the two transformations.

Under the paper's GCE-BCMP assumptions, Proposition 4.4 shows that α(s,g) has two important properties. First, it captures the task-endogenous displacement, so state-goal pairs representing the same task under different irrelevant contexts have the same analogy. Second, it retains enough information to choose an optimal goal-reaching policy. Formally, a valid analogy a(s,g) must describe the endogenous displacement and permit some policy π~ such that

Vπ~(s,g)=V∗(s,g).

This is the theoretical justification for treating α(s,g) as the reusable object that should be moved between contexts. Figure 2 and Sections 4.1-4.2 are particularly useful for understanding this argument.

Dual Analogies

Computing the entire function x↦α(s,g)(x) is impossible in large or continuous state spaces. The authors therefore learn a factorization of temporal distance using two encoders φ,ϕ:S→ℝd :

d∗(s,g)≈φ(s)⊤ϕ(g).

The distance-difference field then becomes

α(s,g)(x)=φ(x)⊤ϕ(g)−φ(x)⊤ϕ(s)=φ(x)⊤(ϕ(g)−ϕ(s)).

All dependence on the transformation from s to g is therefore contained in one vector,

α∨(s,g)=ϕ(g)−ϕ(s),

which the authors call the dual analogy. Rather than explicitly storing the distance difference to every possible probe state x , the vector α∨(s,g) implicitly specifies the entire field because any probe can recover its distance difference through φ(x)⊤α∨(s,g) .

This is similar in spirit to classical vector analogies such as the relation encoded by differences between word embeddings. Here, however, the vector difference is learned from the geometry created by optimal control rather than linguistic co-occurrence. Ideally, opening a drawer under several different window configurations produces nearby or identical dual analogy vectors because ϕ(g)−ϕ(s) captures the change associated with opening the drawer rather than the surrounding context.

Learning the Dual Analogy

The authors learn φ and ϕ using a goal-conditioned IQL objective. For this practical learning procedure they use a per-step reward r~(s,g)=−𝟏s≠g , encouraging the learned value representation to reflect the number of remaining steps.

The temporal-distance encoders and Q \-function are jointly trained with

ℒ(φ,ϕ)=𝔼s,a,g[ℓ2ι(φ(s)⊤ϕ(g)−Q‾(s,a,g))],
ℒ(Q)=𝔼s,a,s′,g[(Q(s,a,g)+𝟏s≠g−γφ‾(s′)⊤ϕ‾(g))2].

Here Q‾ , φ‾ , and ϕ‾ denote target networks. The expectile loss is

ℓ2ι(x)=|ι−𝟏x<0|x2.

After this stage, the model can construct α∨(s,g)=ϕ(g)−ϕ(s) for arbitrary state-goal pairs. The important point is that the analogy representation is not separately supervised with task labels such as "drawer opening." Task semantics emerge from learning the temporal-distance geometry.

Analogy Transduction and OOC Generalization

An analogy by itself does not guarantee compositional generalization. A normal neural network could learn that a certain analogy occurs with certain contexts and still fail when presented with a combination absent from the training data. CTA therefore treats goal reaching as an anchor-displacement problem: the current state s is the anchor and α∨(s,g) is the desired displacement.

The architecture uses bilinear transduction, which deliberately separates representations of the anchor and displacement before combining them. Its value function is

V(s,g)=Ω1(s)⋅Ω2(α∨(s,g)),

where Ω1(s),Ω2(α∨)∈ℝb and b≪d . The low-dimensional bilinear bottleneck imposes a low-rank factorization of context and analogy. The intended effect is that if the model has learned a particular context and a particular analogy separately, their interaction can still be estimated when their exact pairing was never observed.

CTA trains this value function with an action-free IQL-style expectile objective:

ℒ(Ω1,Ω2)=𝔼s,s′,g[ℓ2κ(−𝟏s≠g+γV‾(s′,g)−V(s,g))].

This bilinear parameterization is one of the most important differences between simply providing an analogy representation to an existing goal-conditioned policy and actually performing analogy transduction. The latter architecture is explicitly designed for unseen context-analogy combinations.

Hierarchical Policy

CTA is hierarchical. The high-level policy does not directly choose primitive actions. Given the current state and total goal analogy α∨(st,g) , it predicts a smaller k \-step analogy α∨(st,st+k) . The low-level policy then receives that local analogy and chooses the primitive action necessary to realize it.

Conceptually,

πh:(st,α∨(st,g))→α∨(st,st+k),
πℓ:(st,α∨(st,st+k))→at.

Both policies use the same bilinear anchor-displacement structure as the value function. Their Gaussian means take the form

μh(s,α)=ω1h(s)⋅ω2h(α),μℓ(s,α)=ω1ℓ(s)⋅ω2ℓ(α).

The policies are trained with advantage-weighted regression. Define

A(s,s′,g)=V(s′,g)−V(s,g).

The high-level objective weights observed k \-step analogies according to whether they make progress toward the final goal:

𝒥h=𝔼[exp⁡(βhA(st,st+k,g))log⁡πh(α∨(st,st+k)∣st,α∨(st,g))].

The low-level policy similarly learns which primitive actions successfully realize a short-range analogy:

𝒥ℓ=𝔼[exp⁡(βℓA(st,st+1,st+k))log⁡πℓ(at∣st,α∨(st,st+k))].

Breaking a long goal into k \-step analogies is important because long-horizon state-goal transformations are relatively sparse in an offline dataset, while many short reusable transformations are available. During inference the high-level policy repeatedly proposes a local analogy and the low-level policy executes it. Sections 4.3 and 5 contain the core practical method and are the portions most worth reading closely after these notes.

Results

The main experiments use eight OGBench manipulation tasks based on reward-free play datasets. These include scene, which requires sequential object interaction; cube, which requires block rearrangement; and puzzle, which requires increasingly combinatorial button configurations. CTA is compared with behavior cloning, quasimetric and contrastive RL methods, goal-conditioned IQL/value learning, HIQL, and versions of several methods using prior dual goal representations.

Environment
Best non-CTA score
CTA
⋮⋮
scene-play
87
90
⋮⋮
cube-single-play
89
86
⋮⋮
cube-double-play
60
50
⋮⋮
cube-triple-play
18
17
⋮⋮
puzzle-3x3-play
95
94
⋮⋮
puzzle-4x4-play
50
84
⋮⋮
puzzle-4x5-play
14
17
⋮⋮
puzzle-4x6-play
12
12
⋮⋮
Average
39.6
56.3

CTA improves average performance from 39.6 for the strongest baseline to 56.3, approximately a 42% improvement. Its advantage is especially large on the puzzle tasks, where the number of possible state combinations grows rapidly and therefore directly observing every useful task-context pair is impractical. On puzzle-4x4, for example, CTA scores 84 compared with 50 for the strongest baseline.

The authors specifically test whether this gain really comes from OOC extrapolation. They remove selected direct task-context combinations from the training data while leaving both the task and context individually represented elsewhere. On scene, CTA achieves a direct success rate of 73±9 , compared with 51 for the strongest baseline; on puzzle-4x4, it reaches 80±8 , compared with 66. Many other agents can still solve these goals indirectly by moving through combinations that occurred during training, while CTA more frequently executes the direct unseen composition. This provides evidence that the bilinear transduction architecture is doing more than ordinary trajectory stitching.

The learned representation also shows the intended semantic structure qualitatively. Figure 4 projects 20,000 dual analogies from scene-play using t-SNE. Nearest analogies tend to represent the same transformation, such as closing the drawer, even when contextual properties like window or button states differ. An additional comparison in the appendix replaces the dual analogy with a goal-conditioned bisimulation analogy; average performance collapses from 56.3 to 1.4, supporting the authors' argument that their optimal temporal-distance construction is much better suited to noisy and suboptimal offline data.


The largest theoretical limitation is the assumption that task-endogenous dynamics can be separated from task-exogenous context. This is natural in the paper's examples: opening a drawer does not depend on whether an unrelated window is open. Real environments can contain interactions where contextual variables directly alter the dynamics, however, so there may be no clean task-context factorization. Assumption 4.3 and its discussion in Appendix B are worth reading carefully because most of the theoretical invariance result depends on this structure.

There is also an important gap between the temporal distance difference field and its practical dual analogy representation. The theory establishes invariance and goal-reaching sufficiency for the complete field α(s,g)(x) , not directly for the learned coordinate vector α∨(s,g)=ϕ(g)−ϕ(s) . The inner-product parameterization is expressive enough to represent the field, but this does not guarantee that the learned vector itself is uniquely identifiable, minimal, or perfectly invariant to context. The paper explicitly identifies improving this connection between the theoretical object and its learned surrogate as future work.

CTA is most useful when there is substantial recombination between clearly separable tasks and contexts. In environments with little task-exogenous variation, such as ordinary maze navigation, there are fewer unseen combinations for analogy transduction to exploit, so its advantage is smaller. The authors report that CTA remains competitive in these environments, but its main strength lies in settings where many task transformations must be reused under changing contexts.

The closest conceptual predecessors are trajectory stitching, goal-conditioned bisimulation analogies, dual goal representations, and bilinear transduction. Trajectory stitching composes behavior primarily along time, whereas CTA composes a task transformation with a new context. Dual goal representations from Park et al. (2026) provide much of the practical distance-factorization machinery, but CTA interprets the difference ϕ(g)−ϕ(s) as a transferable task analogy and explicitly builds the policy around OOC composition. Bilinear transduction from Netanyahu et al. (2023) supplies the low-rank anchor-displacement structure that makes extrapolation to unseen combinations possible.

For a deeper read, the most important sections are 4.1-4.3 for the analogy representation and its theoretical motivation, Section 5 for the CTA architecture and training objectives, Section 6.3 for the direct OOC experiments, and Appendix B for the assumptions underlying the theoretical results.