Q-Map Fusion: Recovering Shared World Models from Frozen Value Functions

Fangzhou Lin, Shuo Xing, Xin Li, Wenbin He, Zhengzhong Tu, Liu RenarXiv 2026

TL;DR

Value functions in reinforcement learning (RL) are notoriously single-minded: a Q-function trained to reach one goal is useless if the goal moves or a new safety hazard appears. Q-Map Fusion solves this by treating frozen, pre-trained Q-functions from different tasks as complementary linear measurements of the same underlying world. By stacking these measurements together, it recovers a single shared transition model—without ever touching training trajectories or interacting with the environment—allowing an agent to plan for brand-new objectives, safety constraints, and even shifted state coordinates.

What Problem Does This Paper Address?

In RL, a Q-function summarizes the expected long-term return of taking an action, which means it entangles the environment's physical dynamics with a specific reward function and termination rule. When a downstream task changes the goal, introduces a new hazard that ends the episode, or defines rewards over different state variables, previously learned policies and value functions cannot be applied directly.

At the same time, specialist agents trained on different tasks in the same domain have all experienced the same underlying transition law. Sharing raw interaction trajectories from every specialist is often costly or infeasible, whereas the trained Q-networks themselves are compact and readily available.

Existing methods that combine value functions directly (like generalized policy improvement) do not recover an explicit transition model, so they struggle when new tasks require multi-step detours around new obstacles. While Bellman inversion can infer transition dynamics from a single Q-function, a single task often leaves the dynamics underdetermined: if two candidate next states yield the exact same backup value for the source task, shifting probability mass between them leaves the source Q-values unchanged—potentially reversing the optimal action for a new task.

Methods

Q-Map Fusion resolves this single-task ambiguity by combining multiple frozen Q-functions (a Q bank) into a joint system of linear Bellman constraints on the unknown transition law.

Figure 1. Q-Map Fusion recovers a shared transition model from separately learned Q-functions. (a) An anchor bank and a supplemental bank contain frozen Q-functions trained for different source goals in the same environment. (b) Each Q-function supplies a linear Bellman constraint on the unknown transition law. Stacking these constraints across banks jointly fits a shared dynamics model without accessing training trajectories. (c) The recovered model remains fixed and supports planning under new goals and newly introduced safety constraints.
  1. Finite-state recovery: Each source Q-function provides a linear measurement constraining the expected next-state value. Because learned Q-functions contain approximation errors, their Bellman equations may be mutually inconsistent. The authors formulate recovery as rowwise $\ell_1$ minimization of the Bellman residuals across all source records—solved via linear programming over the probability simplex for stochastic dynamics, or column matching for deterministic dynamics.
  2. Continuous-state recovery: In continuous spaces, tabular rows are replaced by a shared deterministic successor network $f_\theta(s, a) \to s'$ that predicts the next state. Keeping the source Q-networks frozen, the authors fit $\theta$ by minimizing the expected weighted $\ell_1$ Bellman residual, backpropagating through the frozen Q-networks and known rewards with respect to their state inputs.
  3. Replanning: Once the shared transition model is fitted, it is held fixed. Any new bounded reward and termination indicator can then be plugged into standard value iteration to plan a new policy.

Datasets

Rather than static offline datasets, the paper evaluates Q-Map Fusion across two suites of RL benchmarks:

  • Tabular FourRooms (68 accessible cells in an $11 \times 11$ grid): Evaluated under three dynamics variants—Deterministic, Windy (local stochastic dispersion), and Teleporting (nonlocal jumps to 16 interior cells of the diagonally opposite room). Held-out test tasks introduce unseen goals and new unsafe cells that terminate the episode with zero reward.
  • Continuous-state, discrete-action control: MountainCar, Pendulum, and a planar two-link Reacher (4D joint angles and velocities, 9 torque actions). Held-out tasks test unseen objectives such as speed limits (Gentle car in MountainCar), upright balance criteria (Pendulum), and shifted state coordinates like joint-angle targets instead of fingertip $(x, y)$ positions (Reacher).

Key Insights and Ideas

  • You don't need full model identification to plan well: Proposition 1 proves that even when the number of source tasks is smaller than the number of candidate next states (leaving the full transition matrix unidentified), one-step Bellman backup errors for a new task are controlled as long as the new task's next-state value function is well-approximated by a linear combination of the source Bellman measurements plus a constant offset.
  • Task diversity beats redundant data—and resists noise: In approximate Q-functions, estimation errors enter on both sides of the Bellman equation (both the current state-action value and the successor values). Adding repeated or nearly collinear tasks provides little new constraint information while requiring large linear representation coefficients $\|c\|_\infty$, which amplify this two-sided noise. Fusing diverse, complementary tasks keeps coefficients moderate and resolves transition ambiguities cleanly.

Key Results

  • FourRooms: Fusing supplemental goal banks reduces full-kernel transition MSE by 81.8% in Windy (4 source tasks) and 93.2% in Teleporting (20 source tasks over 68 states). This boosts normalized return on held-out tasks with new goals and hazards from 0.598 to 0.997 (Windy) and 0.740 to 1.000 (Teleporting).
  • Continuous Control: Jointly fitting a single dynamics network to two specialist Q banks (trained separately on disjoint pairs of goals) matches or outperforms a model recovered from a single agent trained on all four goals, improving mean normalized return across MountainCar (+0.0416), Pendulum (+0.0006), and Reacher (+0.0254).
Figure 5. Model fusion can turn missed goals into arrivals and reach goals earlier. Paired rollouts from identical initial states are shown at the Two-bank (Ours) policy’s first goal arrival, alongside full-cohort return outcome distributions across all initial states.
  • Matched-budget & noise studies: At matched transition samples and Q-update budgets in Windy FourRooms, learning new source goals cuts transition MSE by 50.7% compared to relearning existing goals (0.995 vs. 0.913 return). Under controlled two-sided Gaussian Q-value noise ($\sigma = 0.1$), distinct source tasks retain 0.990 return, whereas nearly redundant tasks degrade to 0.675.

Limitations and Future Work

  • Nonconvexity in continuous spaces: Because parameter sharing in the continuous-state successor network $f_\theta$ couples queries into a nonconvex optimization problem, the paper's rowwise finite-state theoretical guarantees do not automatically transfer to the parametric setting.
  • Assumptions: The continuous-state realization assumes deterministic transition dynamics, and model recovery across all settings requires aligned state and action spaces along with known reward and termination functions for the source tasks.

Summary updated

BibTeX
@misc{lin2026q,
  author = {Fangzhou Lin and Shuo Xing and Xin Li and Wenbin He and Zhengzhong Tu and Liu Ren},
  title = {{Q-Map Fusion: Recovering Shared World Models from Frozen Value Functions}},
  year = {2026},
  eprint = {2612.02901},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.02901},
}
Figure