AdaptFlow: State-Anchored Modulation with Flow Matching for Offline Goal-Conditioned RL

Jaeseok Joo, Insoon YangNeurIPS 2026

TL;DR

In reinforcement learning, teaching an agent to reach arbitrary goals usually involves gluing the goal state onto the current state and feeding both into a neural network. This paper shows that how you inject that goal into the network is actually a massive, overlooked bottleneck. By borrowing feature modulation tricks from image generators—and anchoring them to the agent’s evolving state—the authors unlock dramatic performance leaps across complex robotics tasks without needing elaborate hierarchical architectures.

What Problem Does This Paper Address?

Imagine navigating a winding maze toward a red star. Even though the star never moves, what it means for your next step changes constantly: at the bottom of the maze, "go to the star" means walking right; near the top, it means walking left.

In offline goal-conditioned reinforcement learning (GCRL), we train a single policy to reach any goal using a fixed, pre-collected dataset of trajectories (no live trial-and-error allowed). Historically, researchers have poured their energy into building better value functions—essentially teaching the agent better ways to estimate "how close am I?" Meanwhile, the policy architecture itself has remained an afterthought: almost everyone uses in-context conditioning, simply concatenating the current state $s$ and goal $g$ at the network's front door.

Meanwhile, generative image models (like Stable Diffusion 3) long ago realized that feature modulation—scaling and shifting internal network activations via adaptive layer normalization (adaLN)—beats simple input concatenation. However, porting this to RL hits two snags:

  1. Noisy goals: Goals sampled from raw state spaces often contain task-irrelevant clutter.
  2. Shifting context: Unlike a static text prompt like "a dog in space," a fixed goal's operational meaning shifts at every timestep as the agent moves. If you modulate features using only the goal, the agent stubbornly tries to walk straight through walls toward the target.
Effect of state anchoring in a 2D maze

Methods

To solve both snags, the authors introduce two contributions: a plug-and-play architectural mechanism and a full offline RL framework.

  • State-Anchored Goal Conditioning (SAGC): Instead of concatenating inputs, SAGC maps raw states and goals into a learned latent space ($\phi(s)$ and $\psi(g)$) to strip away task-irrelevant noise. Crucially, it feeds both representations into a dedicated modulation generator $G_{\text{mod}}$ to compute element-wise scale ($\alpha$) and shift ($\beta$) parameters for adaptive layer normalization inside the policy backbone. Supplying $\phi(s)$ acts as a state anchor, dynamically re-interpreting the fixed goal at every control step.
Figure 1: In-Context Goal Conditioning and State-Anchored Goal Conditioning. (a) In-context goal conditioning concatenates the state s with the goal representation ψ(g) at the policy input. (b) SAGC instead uses the modulation generator Gmod to derive modulation parameters α and β jointly from the state representation ϕ(s) and the goal representation ψ(g). SAGC adapts feature modulation to the evolving state–goal relationship at each control step. LayerNorm is omitted for clarity.
  • AdaptFlow: The authors embed SAGC inside an expressive flow-matching policy—a cousin of diffusion models that learns a continuous vector field to transport random Gaussian noise into actions. AdaptFlow jointly trains three pieces: value-aware latent encoders (via expectile regression, a standard offline RL trick), a Q-function critic, and the SAGC-modulated flow policy. To keep test-time inference fast, the multi-step flow model is distilled into a snappy one-step generator that outputs actions in a single forward pass while maximizing Q-values. Importantly, the policy backbone also receives a direct embedding of the raw state so fine-grained motor details aren't lost in the latent compression.

Datasets

The authors evaluate their methods on OGBench, an offline goal-conditioned RL benchmark spanning 27 diverse locomotion and robotic manipulation tasks—including point-masses, multi-legged ants, and humanoids navigating mazes (including ant soccer!), alongside robotic arms manipulating multiple cubes and solving sliding puzzles. No new datasets are introduced.

Key Insights and Ideas

  • It’s the wiring, not the parameter count: Adding a modulation generator naturally adds weights. Yet when the authors scaled up standard concatenation baselines to match (and slightly exceed) SAGC's parameter count, SAGC still won on 4 out of 5 tested tasks. Dedicated context modulation genuinely changes how easily policies learn.
  • Drop the anchor, hit the wall: Removing the state representation from the modulation pathway—modulating features using the goal alone—crashes AdaptFlow's average success rate on ablation tasks from 87% down to 33%, proving empirically that goal conditioning in sequential decisions must be anchored to where you currently stand.
  • Policy-only modulation is the sweet spot: Applying SAGC to the value network severely degrades performance, and applying it to both policy and value networks offers no consistent edge over modulating the policy alone.
  • Simplicity rivals structural priors: Many top GCRL methods rely on heavy domain priors like subgoal hierarchies or quasimetric geometry. AdaptFlow matches or beats them using flat, standard value learning paired with better policy conditioning.

Key Results

  • As a plug-in upgrade: Slotting SAGC into an existing algorithm (GCIVL) across 13 OGBench tasks boosted average success rates across three different representation-learning objectives by 2.40× (15% $\rightarrow$ 36%), 1.79× (19% $\rightarrow$ 34%), and 1.29× (41% $\rightarrow$ 53%). On tough humanoidmaze tasks, success rates jumped over 20× (e.g., from 2% to 47%).
  • Full framework: AdaptFlow outperforms or matches all competing baselines on 23 out of 27 OGBench tasks (at 1M training steps). Standout leaps include cube-double-play (72% vs. the next best 46%) and puzzle-4x4-play (95% vs. 32%).

Limitations and Future Work

AdaptFlow stumbles on ultra-long-horizon "stitching" tasks (large-stitch and giant-stitch), where an agent must piece together many short, suboptimal trajectory snippets to reach distant goals (scoring 0% on humanoidmaze-giant-stitch vs. 34% for hierarchical baselines). Better goal conditioning alone doesn't solve long-horizon credit assignment. Furthermore, visual task evaluations were limited to a small subset in the appendix, and real-world robot deployment remains untested. Combining AdaptFlow with hierarchical planning or quasimetric value functions is a natural next frontier.

Summary updated

Abstract

Offline goal-conditioned reinforcement learning (GCRL) aims to learn a single policy that adapts its behavior to arbitrary goals from a fixed dataset, making how to inject goal information into the policy network a central design question. While substantial effort has been devoted to improving value learning and policy extraction in GCRL, this policy-side architectural question remains comparatively underexplored. We highlight two key challenges for effective goal conditioning: (i) goals can contain task-irrelevant information; and (ii) in sequential decision making, the decision-relevant context of a fixed goal shifts as the state evolves. Motivated by these observations, we propose State-Anchored Goal Conditioning (SAGC), a modulation-based goal conditioning mechanism that derives its scale and shift parameters jointly from state and goal representations in a learned latent space. We further introduce AdaptFlow, an offline GCRL framework that instantiates SAGC within an expressive conditional flow policy. Across three representation learning objectives, SAGC improves GCIVL's average success rate over the corresponding in-context goal conditioning baseline on 13 locomotion and manipulation tasks in OGBench. With SAGC at its core, AdaptFlow outperforms or matches all baselines on 23 of 27 OGBench tasks.
BibTeX
@inproceedings{joo2026adaptflow,
  author = {Jaeseok Joo and Insoon Yang},
  title = {{AdaptFlow: State-Anchored Modulation with Flow Matching for Offline Goal-Conditioned RL}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=9H4BX9fISD},
}
Figure