Value Forcing

A robot arm learns from a log of past attempts, one small reward per move. Value Forcing learns the whole spread of returns a move can lead to, and checks the Bellman equation at every noise level of a flow. With 10% of the data it reaches 48% success, the best explicit method in the paper.

Drag the noise level τ from 0 to 1 and watch pure noise turn into a distribution of returns. Then switch to Endpoint-only and see the spread pinch. Below, we build each piece from zero: the return, the Bellman equation, the flow, and the one extra noise term that makes them agree.

You need what a reward is and a rough idea of a probability distribution. We build the rest from zero.

Paper: Value Forcing: Aligning Return Distributions at All Noise Levels by Chongyi Zheng, Zhiyuan Zhou, Qiyang Li, Benjamin Eysenbach and Sergey Levine (Princeton University and UC Berkeley), arXiv 2611.02160, November 2026. Code. Every idea is re-taught here in our own words and devices.

Grow a return distribution

1.00
32

A real training run in your browser, not a drawing. Toy setup (illustrative): an 8-state chain with discount γ = 0.95, a coin-flip reward at state 1 (0 or 0.8) and a risky reward at state 7 (−1.2 with chance 0.45, else 1.0). Each state’s velocity field is a small 11 by 11 table trained with 200,000 updates on either loss. The blue curve is the exact answer, smoothed by the same 0.09 kernel as the learned curve. The narrowing here is milder than the collapse the paper measures with large networks (its Figure 2).

Chapter 0

Why Value Learning Starves

See why a learner that gets one reward per step struggles to know what an action is worth, and what the paper does about it

A robot arm sits over a table with three cubes. Its job is to stack them. It may take up to 1,000 small moves, and after each move it gets a single number, a reward, between −3 and 0. That is the paper’s cube-triple task, and that is all the feedback there is.

Now the arm must choose its next move. Some moves lead to a stack 200 steps later. Some lead to a cube on the floor. The reward for the move itself says almost nothing about which is which. What the arm needs is the long-term worth of each move. Learning that worth from logged moves alone is the problem this paper attacks.

The return: one number for a whole future

Add up all the rewards from now on and you get the return. We count a reward that comes later as worth a little less, by a factor γ (gamma, the discount) per step. Think of γ as patience: at γ = 0.9 a reward one step away counts 90% as much as a reward now.

Gt
The return from time step t: every future reward, discounted, added up. It is random, because the future is random.
rt
The reward the agent gets at time step t. The paper writes it r(s, a): it depends on the state and the action.
γ
The discount, a number from 0 up to (not including) 1. A reward k steps away is multiplied by γk. The paper uses γ = 0.999 on OGBench.

A worked case. Rewards −1, −1, 0, 0 and then nothing, with γ = 0.9:

G = −1 + 0.9 × (−1) + 0.81 × 0 + 0.729 × 0 = −1.9

Why discount at all? Two reasons. A sum of endless rewards could grow without limit, and γ < 1 keeps it finite. And a sooner reward is usually more certain. With γ = 0.999 the agent looks about 1/(1 − γ) = 1,000 steps ahead, which matches a 1,000-step task.

Value, and the equation that links one step to the next

The value V(s) of a state s is the average return you get if you start there and keep following your policy (your rule for picking actions). The Q value Q(s, a) is the same average, but you fix the first action a. A critic is the network that estimates these numbers.

Look at the return again. Everything after the first reward is itself a return, one step later and multiplied by γ:

Gt = rt + γ (rt+1 + γ rt+2 + …) = rt + γ Gt+1

Average both sides over what can happen, and the average of Gt+1 is the value of the next state. That gives the Bellman equation:

V(s)
The value of the current state s: the average return from here.
𝔼[ · ]
“The average over”: over the action the policy picks and the next state the world produces.
r
The reward of this one step. It is the only number the data gives us directly.
V(s′)
The value of the next state s′ (read “s prime”). We do not know it either: we must estimate it too.

The equation says: the worth of here equals one step of reward plus the discounted worth of there. Drop the r and every value becomes 0. Drop the γ and the sum of an endless future can blow up.

Learning from your own guess

Here is the catch. Nobody hands us V(s′). So temporal-difference learning (TD learning) uses the critic’s own current guess in its place. From one logged step (s, r, s′) it builds a target y = r + γ V(s′) and nudges V(s) part of the way there, by a learning rate α:

V(s) ← V(s) + α ( r + γ V(s′) − V(s) )

Using your own guess as the target is called bootstrapping, like lifting yourself by your own boot straps. It works, but slowly: a reward at the end must travel back one state per update. Watch it crawl.

Watch a reward crawl backward

Ten states in a row. Only the last step pays a reward of 1. Each sweep runs one TD update per state, from s0 to s9, in the order the steps were logged. Press Run one sweep a few times and compare the bars (your estimates) to the outlines (the true values).

0.50

Toy chain (illustrative): γ = 0.95 and one reward of 1 on the step out of s9, so the true value of state i is 0.959−i, which is 0.63 at s0. The updates are the exact TD rule above, applied in logged order.

With α = 1, each sweep moves the reward exactly one state back. So s0 hears about the reward only on the tenth sweep. Lower α and it takes longer still, because every step passes on only part of what it learned. Now picture 1,000 steps instead of 10, and a dataset where many states appear only a few times. The paper names this plainly: supervision for value is limited and indirect.

Squeeze more out of each step

If data is scarce, you can collect more. The paper asks a different question: can each logged step teach the critic more? Its answer comes in three moves, and this lesson builds each one.

  1. Learn the whole distribution of returns, not only its average. A distribution is a much richer target than one number.
  2. Represent that distribution with flow matching, a generative model that turns random noise into samples step by step, through a dial called the noise level τ (tau).
  3. Check the Bellman equation at every noise level, not only at the end of the flow. That is Value Forcing, and it needs one extra term that earlier methods missed.

The hero at the top of the page is the third move in miniature. The bell of noise at τ = 0 becomes a return distribution at τ = 1. The endpoint-only critic checks only the far end and comes out too narrow. Value Forcing checks every level and keeps the spread.

The road

  1. Returns are distributions: same average, different futures, and the distributional Bellman equation.
  2. A flow over returns: noise, the straight path, the velocity target, and the noise level τ in the hero.
  3. Where earlier methods put the target: endpoint-only, clean Bellman at every level, shared-noise paths.
  4. The flow Bellman equation: the Gaussian correction, and why it has one fixed point at every τ.
  5. Two velocities, two losses: the V and Q flows, the velocity target, reward scaling, the shapes.
  6. VF and IVF: from return flows to actions, by rejection sampling or by expectiles.
  7. What the experiments show: return accuracy, 26 tasks, four data sizes, ablations.
  8. Train it here: the hero’s toy, opened up, with four objectives side by side.
  9. Field Guide: the numbers, the terms, a checklist, the core code.
Why does TD learning need many updates before the first state of a long chain learns about a reward at the end?

Chapter 1

Returns Are Distributions

Replace one average with the whole spread of outcomes, and back the whole spread up through the Bellman equation

You stand at a fork with two doors. Behind door A you always get nothing: a return of exactly 0. Behind door B a coin is flipped: heads gives +1, tails gives −1. Which door is better?

On average, neither. Both have an average return of 0, so both have the same Q value. A critic that learns only averages cannot tell them apart. Yet they are clearly different futures, and a robot would care: one is safe, the other sometimes drops the cube. The paper opens with exactly this example.

The return as a random variable

The return is random, because the world and the policy are random. So instead of one number, we can learn its full distribution: for every possible return, how likely it is. A random variable is a quantity whose value is drawn by chance, like the result of a die roll. The paper writes the return as a random variable Zπ(s, a), and the Q value is just its average: Q(s, a) = 𝔼[Z(s, a)]. Learning Z instead of Q is called distributional reinforcement learning (distributional RL).

Think of Q as the height of the centre of a sand pile. Z is the whole pile: its centre, its width, its lumps. Two piles can have the same centre and very different shapes.

The Bellman equation for a whole distribution

Recall the step from Chapter 0: Gt = rt + γ Gt+1. That line is true for every single future, before any averaging. So it also holds for the whole distribution. This is the distributional Bellman equation, the paper’s Equation 1:

Zπ(s, a)
The random return if you start in state s, take action a, then follow policy π.
=d
“Equal in distribution”: both sides have the same spread of outcomes with the same chances. They need not be equal sample by sample.
r(s, a)
The reward for this step. In the paper it is a fixed number for each (s, a). It shifts the whole distribution.
γ
The discount. It shrinks the next distribution toward 0: every outcome is multiplied by γ.
Zπ(S′, A′)
The return from the next state and action. Capital letters mean they are random too, so the target mixes over every next state.

Read it as three moves on a shape. Take the next state’s distribution. Shrink it by γ. Shift it by r. If the next state is random, mix the shapes of all next states by their chances. Try it.

Back up a whole distribution

The grey outline is the next state’s return distribution Z′. The blue shape is the target r + γZ′. Pick a shape, then drag the reward and the discount. Press Play the backup to see the shrink, then the shift.

0.50
0.90

Illustrative shapes, drawn as sums of narrow bell curves so they can be seen. The backup itself is exact: every bump’s centre becomes r + γ × centre and its width becomes γ × width.

A worked backup

Take the coin flip as Z′: −1 or +1, each with chance 0.5. Let r = 0.5 and γ = 0.9.

  1. Shrink: γZ′ is −0.9 or +0.9.
  2. Shift: r + γZ′ is 0.5 − 0.9 = −0.4, or 0.5 + 0.9 = 1.4.
  3. Average: 0.5 × (−0.4) + 0.5 × 1.4 = 0.5, which is r + γ × 0, the ordinary Bellman answer.
  4. Spread: the outcomes sit 0.9 from the average, so the standard deviation (the typical distance from the average) is 0.9 = γ × 1.

So the average follows the old Bellman equation, and the spread shrinks by exactly γ. Now switch the shape to Always 0. The target becomes a single spike at 0.5. Same average, spread 0. A scalar critic sees the same number, 0.5, for both. A distributional critic sees two different shapes, and it gets a different target from each one.

How far apart are two distributions?

To say a learned distribution is “close” to the truth, the paper uses the Wasserstein distance W1. Picture each distribution as a pile of sand. W1 is the least average distance you must move grains to turn one pile into the other. For two lists of equal size, sort both and average the gaps between matching entries. The coin flip {−1, +1} and the spike {0, 0} are W1 = 1 apart: every grain moves 1.

Now back both up with the same r and γ. The coin becomes {r − γ, r + γ} and the spike becomes {r, r}. Their distance is now γ. The shift by r moves both piles together, so it adds nothing. The shrink by γ scales every gap by γ. This is why the distributional Bellman operator is a γ-contraction: one backup brings any two guesses at least a factor γ closer. Apply it again and again, and every starting guess converges to one fixed point, the true Z. Chapter 4 reuses this exact argument.

How earlier methods stored the shape

A distribution is an infinite object, so a network must store it somehow. C51 stores 51 probabilities on a fixed grid of return values. QR-DQN and IQN store a set of quantiles (the return below which 10%, 20%, and so on of outcomes fall). Both work, but the grid or the quantile set limits what shapes fit. The paper’s choice is a generative model that can draw samples of any shape, a flow. That is the next chapter. For the classic methods, see the distributional RL lesson.

The next state’s return is −2 or +2 with equal chance. With r = 1 and γ = 0.5, what is the backed-up target distribution?

Chapter 2

A Flow Over Returns

Turn a bell of random noise into samples of the return, by learning which way each sample should move at each noise level

A train station has one entrance. Everyone walks in through the same door, a crowd bunched in the middle. Ten minutes later they stand spread along the platforms, two big groups at the two busiest trains. Nobody teleported. Each person walked, and at every moment their speed depended on where they stood and what time it was.

That is a flow. The crowd at the door is random noise. The crowd on the platforms is the distribution we want, here the return Z(s, a). The rule “at this spot, at this time, walk this fast in this direction” is a velocity field. If we can learn the velocity field, we can turn fresh noise into fresh samples of the return, as many as we like.

Noise, a clock, and a velocity

The noise is the standard Gaussian N(0, 1): the bell curve with average 0 and spread 1. The clock is the noise level τ, which runs from 0 (pure noise) to 1 (a clean return sample). The paper uses t for time steps of the robot and τ for this clock, so the two never get mixed up.

A sample z starts at a noise draw z0 and moves by the velocity v(z | τ). In symbols this is an ordinary differential equation (ODE): a rule that gives the speed of a point at each moment, like a sat-nav that says “at this spot, go this fast”. It is the paper’s Equation 2: dz/dτ = v(z | τ). To follow it on a computer, take small Euler steps: z ← z + h × v(z | τ), then τ ← τ + h, with h = 1/(number of steps).

The straight path trick

How do we learn v when we never see the true field? Flow matching uses a trick. Pick one noise draw x0 and one real sample x1. Join them with a straight line, the interpolation path:

xτ
The noisy sample at noise level τ: a point part way along the line.
1 − τ
How much noise is left. It is 1 at the start and 0 at the end.
x0
A draw from the noise N(0, 1).
τ
How much of the real sample is mixed in. It is 0 at the start and 1 at the end.
x1
A real sample from the target distribution, for us one return.

A point moving along this line has a constant speed: differentiate in τ and you get x1 − x0. So for this one pair, the velocity we want at xτ is x1 − x0. Train a network v to match it, over many random pairs and random τ. That is the conditional flow-matching loss, Equation 3:

𝔼[ · ]
The average over a noise draw x0, a real sample x1, and a noise level τ drawn evenly from 0 to 1.
v(xτ | τ)
The network’s velocity at that point and noise level. For returns it also reads the state and action: v(zτ | s, a, τ).
x1 − x0
The velocity target: the speed of the straight line through this one pair.

A worked pair. Let x0 = −0.6, x1 = 1.4 and τ = 0.25.

x0.25 = 0.75 × (−0.6) + 0.25 × 1.4 = −0.45 + 0.35 = −0.10    target = 1.4 − (−0.6) = 2.0

So at the point −0.10 and noise level 0.25, this pair asks the network for a velocity of 2.0. If the network says 1.2, the loss for this pair is (1.2 − 2.0)2 = 0.64.

Why many straight lines make one good field

Many pairs pass through the same point at the same τ, each asking for a different speed. A squared loss settles on their average. So the trained network learns u(x | τ) = 𝔼[x1 − x0 | xτ = x]: the average speed of every line through that point. The key fact, the paper’s Lemma 1, is that this averaged field moves the whole crowd correctly. Start with the bell and follow u, and at every τ the crowd has exactly the spread of the straight-line mixture (1 − τ)x0 + τx1.

Lemma 1 is more general than straight lines, and the paper leans on that. Take any random process X(τ) that starts at the noise and ends at the target. Regress a network onto its speed dX/dτ. The result generates the same crowd as the process at every τ. Chapter 5 will build processes that are not straight lines at all.

Walk the noise to the returns

Left: the bell of noise at τ = 0. Right: the target returns at τ = 1. Thin lines are 41 samples following the exact averaged field. Arrows show the field at the cursor. Drag τ, change the target, then try 1 Euler step.

0.50

The field is the exact averaged velocity for a target made of bell curves, so no network is trained here. The hero’s four bumps are the exact return distribution of the hero’s chain from s0. The training pair is the worked one above: −0.6 to 1.4.

The failure: one big step

Pick 1 step. Every sample lands on the same spot. That is the symptom: a spike. The read-out measures it, a spread near 0. The cause is in the field at τ = 0. There, the averaged velocity at a point x is 𝔼[x1] − x, because x1 is unrelated to the noise. One step of size 1 moves x to x + (𝔼[x1] − x) = 𝔼[x1]: the average return, for every sample.

The fix for sampling is more steps; the paper uses 10. But notice the bonus. One step gives the average return exactly, and the average is the Q value. So during training the paper estimates Q cheaply with a single step, z0 + v(z0 | s, a, 0). At test time it uses 10 steps to rank actions.

What the network sees

For returns, the flow lives in one dimension. The Q-velocity network reads the state s, the action a (a chunk of 5 actions in the paper’s tasks), the noisy return zτ (one number) and τ (as a 16-number sinusoidal code). It outputs one number, the velocity. With a batch of B = 1,024 transitions, the input is [B, dim s + dim a + 1 + 16] and the output is [B]. The Q value is the average endpoint over M noise draws.

A pair has noise x0 = 1.0 and return x1 = −1.0. At τ = 0.5, where is the noisy point and what velocity does the pair ask for?

Chapter 3

Where Earlier Methods Put the Target

Compare three ways to feed the Bellman equation into a flow, and find where each one checks it, skips it, or gets it wrong

We now have two tools. Chapter 1 gave the distributional Bellman equation: the return at s equals r plus γ times the return at s′. Chapter 2 gave a flow: a velocity field that walks noise into returns over the noise level τ. Put them together and one question decides everything: at which noise levels does the critic get told about the Bellman equation?

Picture one logged step: state s, action a, reward r = 0.5, next state s′, and γ = 0.9. Say the next state’s flow already works. We want to train the flow at s. Here are the three answers earlier papers gave.

Answer 1: check only the far end

FlowCritic, DFC, FlowIQN and Dual-Flow RL run the next state’s flow all the way to τ = 1. That gives one clean return sample z1. They form a clean target y = r + γz1. Then they train the flow at s with plain flow matching toward y, from a fresh noise draw. This is endpoint-only supervision.

Every noise level still gets a velocity target, but only the straight line to one bootstrapped sample. The Bellman equation is checked at τ = 1 and nowhere else. Everything the next state’s flow knows at τ = 0.3 or 0.7, its whole velocity field, is thrown away. One logged step yields one number from the next state.

Answer 2: apply the clean equation at every level

Value Flows and EVOR go further. They use the next state’s flow at the same noise level τ, and its velocity, as the target. In effect they demand Z(s, τ) = r + γ Z(s′, τ) at every τ. That is far denser supervision. But check the very start, τ = 0:

  1. At τ = 0 every flow is pure noise, so Z(s, 0) is N(0, 1): average 0, spread 1.
  2. The right side is r + γ × N(0, 1): average r = 0.5, spread γ = 0.9.
  3. So the equation asks the start of the flow to be N(0.5, 0.92), while the flow must start at N(0, 1). The average is off by 0.5 and the spread by 0.1.

No flow can satisfy that, because the start is fixed. The paper says it plainly: omitting the correction term (Chapter 4) “results in an incorrect equation”. The critic gets a contradiction at low τ and must compromise somewhere.

Answer 3: share the starting noise

PCBF draws one noise z0 and uses it for two straight paths: one to the next state’s sample z′, one to r + γz′. The second path starts at the correct noise, and the Bellman link holds along each coupled pair. But the coupling ties the two paths by their shared start.

Now step back and look at the whole crowd at a middle τ, pooled over all noise draws. The paper calls this the marginal distribution: the spread you see when you ignore which noise each sample came from. The paper’s point is that this pooled crowd is not forced to obey a Bellman equation. Supervision is along matched paths, not on each crowd.

Try the first two answers next to Value Forcing, which Chapter 4 derives.

Check each target at every noise level

Top: the next state’s flow, with the part each method reads highlighted. Bottom: the distribution the flow at s must have at τ (blue) and the target the method builds there. The ribbon colours every τ by how far off the target is. Pick a method, then drag τ to 0.

0.00

Illustrative transition: r = 0.5, γ = 0.9, next-state returns of −1 (chance 0.45) or +1 (chance 0.55) with small spreads. Targets are computed exactly as distributions; the distance is W1 from 200 quantiles. The endpoint-only target matches on average but each update carries one end sample; its ribbon is grey where no Bellman check happens.

Drag τ to 0 with the clean equation selected. The orange target sits to the right of the blue bell and is too narrow: W1 about 0.5. Slide τ up and the gap shrinks, because the noise share 1 − τ shrinks, until at τ = 1 the two agree. So the clean equation is right at the end and wrong everywhere before it, worst at the start.

Now pick endpoint-only. The bottom curves agree, because straight lines to correct end samples do produce the correct crowd on average. The ribbon is grey: the next state’s flow is consulted only at its end. Pick Value Forcing: the curves agree at every τ, and the next state is consulted at every τ. That is both properties at once.

MethodFull distribution?Starts at a Gaussian?Bellman at middle τ?Bellman at τ = 1?
Floqno (scalar)nonoyes
FlowCriticyesyesnoyes
Value Flowsyesnoyes, but not consistent at the startyes
PCBFyesyesalong coupled paths onlyyes
VF / IVFyesyesyesyes

From the paper’s Table 1 (FlowIQN and EVOR omitted for space).

What it looks like in practice

The symptom the paper reports is collapse: the learned return distribution shrinks toward a single value. It measured this at one state in each of four OGBench domains, with 1,000 held-out returns as ground truth (Figure 2). Value Flows and FlowCritic pile their predictions into narrow peaks. On humanoidmaze-giant their W1 distances to the truth are 462 and 127, against 13 for Value Forcing. Their flow paths bunch together late, around τ = 0.9, while Value Forcing spreads its paths early, around τ = 0.25 (Figure 7). Chapter 7 has the full numbers.

The fix the paper proposes is not more data. It is a target that is dense like Value Flows and correct like the endpoint, at every τ. Chapter 4 derives it.

Why can the clean equation Z(s, τ) = r + γZ(s′, τ) not hold at τ = 0?

Chapter 4

The Flow Bellman Equation

Derive the one Bellman equation that holds at every noise level, and see why its extra Gaussian term makes it exact

Chapter 3 left us with a wish list. We want an equation that links the flow at s to the flow at s′, at the same noise level τ, like Value Flows. At τ = 0 it must say “noise equals noise”. At τ = 1 it must say the distributional Bellman equation. And in between it must describe the crowd the flow really has. We will derive it, not guess it.

Start from what the crowd must be

Chapter 2 told us what the flow at s carries at noise level τ: the straight-path mixture of fresh noise and the clean return. Write N0 for a noise draw, independent of the return:

Z(s, τ) =d (1 − τ) N0 + τ Z(s)

Now use Chapter 1 inside it: Z(s) =d r + γ Z(s′). Multiply out the τ:

Z(s, τ) =d (1 − τ) N0 + τ r + γ τ Z(s′)

We want the right side to use the next state’s own noisy crowd, Z(s′, τ) = (1 − τ) N′ + τ Z(s′). Multiply that by γ: you get γτZ(s′), the piece we need, plus a noise part γ(1 − τ) N′. Compare the noise:

Variances of independent Gaussians add. So fill the gap with a fresh, independent Gaussian N whose spread is (1 − τ)√(1 − γ2). That is the Gaussian correction, and it completes the paper’s Equation 5, the flow Bellman equation:

Z(s, a, τ)
The noisy return at noise level τ: what the flow for (s, a) carries part way along. At τ = 1 it is the return itself.
τ r(s, a)
The reward, scaled by τ. The reward is part of the clean return, and only a share τ of the clean return is mixed in at level τ.
γ Z(S′, A′, τ)
The next state’s noisy return at the same level τ, shrunk by γ. This is the bootstrap: the next flow’s middle, not just its end.
(1 − τ)√(1 − γ2) N
The Gaussian correction. N ~ N(0, 1) is fresh noise, independent of everything else. It puts back the noise variance that the shrink by γ took away.

Check both ends

At τ = 0 the reward term vanishes, and both flows are pure noise: Z(s, a, 0) =d γN′ + √(1 − γ2) N. Two independent Gaussians with variances γ2 and 1 − γ2 add to variance 1: a standard Gaussian, exactly right. At τ = 1 the correction vanishes and we get r + γZ(S′, A′), the distributional Bellman equation. Both items on the wish list hold.

A worked middle point. Let γ = 0.9, r = 0.5, τ = 0.5, and let the next return be always 1. Then Z(s′, 0.5) is 0.5 × N′ + 0.5: average 0.5, spread 0.5.

  1. τ r = 0.25.
  2. γ Z(s′, 0.5): average 0.45, variance 0.81 × 0.25 = 0.2025.
  3. Correction: spread 0.5 × √0.19, so variance 0.25 × 0.19 = 0.0475.
  4. Total: average 0.25 + 0.45 = 0.70, variance 0.2025 + 0.0475 = 0.25, spread 0.5.
  5. Check: the true return at s is 0.5 + 0.9 = 1.4, so Z(s, 0.5) = 0.5N0 + 0.7: average 0.70, spread 0.5. They match.

Build it yourself, one term at a time, and switch the correction off to see what breaks.

Build the target, one term at a time

The blue shape is what the flow at s must carry at τ. Step through the terms. The bar below splits the noise variance into the part from γZ(s′, τ) and the part from the correction. Then switch the correction off.

0.30
0.90

Illustrative transition as in Chapter 3: r = 0.5 and next-state returns of −1 or +1. Every shape is computed exactly; variances of independent terms add.

The failure without the correction

Switch the correction off and set τ = 0. The symptom: the built target is a bell that is too narrow. The read-out measures it: spread γ = 0.90 where 1.00 is required. The variance bar shows the missing slice, 1 − γ2 = 19% of it. At γ = 0.999, the paper’s setting, the slice is only 0.2%, yet it compounds: the target keeps asking every state’s flow to be a little narrower than its own start. The fix is the one term. The paper adds that a different starting noise, for example uniform on [0, 1], would need a different correction.

One fixed point at every noise level

Is this a sound target to bootstrap from? Call the right side the flow Bellman operator Tτ: it takes a guess for every state’s noisy return and returns a new guess. The paper proves (Remark 1, Appendix A.1) that Tτ is a γ-contraction in the Wasserstein distance, at every τ. The proof is the Chapter 1 argument with one more line:

  1. Take two guesses. Pair their samples by rank: lowest with lowest, and so on. This pairing achieves their Wp distance.
  2. Push both through Tτ with the same reward and the same correction draw N.
  3. Subtract: τr cancels, the correction cancels, and only γ × (the gap) is left.

So any two guesses get at least a factor γ closer per backup. Two guesses 1.0 apart are at most 0.9 apart after one backup with γ = 0.9, and at most 0.910 = 0.35 apart after ten. By the contraction mapping theorem (Banach, 1922), repeated backups from any start reach one and the same answer, the unique fixed point. At τ = 1 that is the true return distribution. At every other τ it is the straight-path crowd we started from.

Split into a state part and an action part

In practice the paper learns two flows. The V-return ZV(s, τ) averages over the policy’s action. The Q-return ZQ(s, a, τ) fixes the action. Equation 7 splits Equation 5 in two: ZV(s, τ) =d ZQ(s, A, τ), and ZQ(s, a, τ) =d τr + γZV(S′, τ) + (1 − τ)√(1 − γ2) N. Chapter 5 turns these two lines into two losses.

With γ = 0.6, what spread must the Gaussian correction have at τ = 0?

Chapter 5

Two Velocities, Two Losses

Turn the flow Bellman equation into regression targets a network can fit, and trace one training step with real numbers and shapes

We have an equation about whole distributions. A network, though, outputs one number at a time: a velocity at a point. How do we turn “these two crowds have the same spread at every τ” into a squared error we can minimise with gradient descent? Chapter 2 already handed us the tool, Lemma 1. Build a random process with the right crowds. Take its speed. Regress the network onto that speed.

The Q-velocity target, derived

First, a word. A random process here is a recipe: draw a few random numbers, and the recipe gives one position for every τ from 0 to 1. Lemma 1 says that if a recipe has the right crowd at every τ, its speed is a valid velocity target. Equation 7 says the Q-return at (s, a, τ) has the same crowd as this recipe. Draw a next state S′ from the data, a noise draw NV for the next state’s V-flow, and a fresh correction draw N. Then:

XQ(τ) = τ r + γ φV(NV | S′, τ) + (1 − τ) √(1 − γ2) N

Here φV(NV | S′, τ) is where the next state’s V-flow carries that noise draw by level τ. Now differentiate in τ, term by term:

  1. d/dτ of τr is r.
  2. d/dτ of γφV is γ times the V-velocity at that point. That is just the flow’s own rule, Equation 2.
  3. d/dτ of (1 − τ)√(1 − γ2) N is −√(1 − γ2) N.

So the speed of the process is r + γuV(zτ | s′, τ) − √(1 − γ2) N. By Lemma 1, a Q-velocity regressed onto that speed, at the process’s position, generates exactly the right crowds. With the true uV replaced by the network vV, and the reward scaled (more on that below), this is the paper’s Equation 13:

L(vQ)
The Q-velocity loss, averaged over logged steps (s, a, r, s′), a noise level τ drawn evenly from [0, 1], a correction draw ε ~ N(0, 1), and zτ drawn from the next state’s V-flow at level τ.
vQ( · | s, a, τ)
The Q-velocity network, the thing being trained, read at one point.
τ(1−γ)r + γzτ + (1−τ)√(1−γ2) ε
The point: a sample of the right side of the flow Bellman equation. It is where the process sits at level τ.
(1−γ)r + γvV(zτ | s′, τ) − √(1−γ2) ε
The velocity target: the process’s speed there. It reads the next state’s velocity at the same τ. No gradient flows through it.

Note the pairing: the same ε appears in the point and in the target, with opposite roles. The point uses (1 − τ)√(1 − γ2)ε, and the target uses its derivative, −√(1 − γ2)ε. Drop ε from both and you get the “no correction” variant of Chapter 4, with its too-narrow crowds.

The V-velocity target

The V-flow is easier. Its process is: pick an action from the policy, run the Q-flow to level τ. Its speed is the Q-velocity at that point. So Equation 12 regresses vV(zτ | s, τ) onto vQ(zτ | s, a, τ), with a from the policy and zτ drawn from the Q-flow at (s, a, τ). The V-velocity becomes the action-average of the Q-velocity, point by point.

Neither true velocity is known, so each network is the other’s target. The paper alternates the two updates, holding one fixed while it trains the other, like Fitted Q-Evaluation for scalar critics. The V update reads a slow copy of the Q network, a moving average of its weights updated at rate 0.005 (Algorithm 1).

Reward scaling: put noise and returns on one ruler

Why the (1 − γ) in front of r? With γ = 0.999 and rewards between −3 and 0, raw returns can reach about −3,000. The noise is a bell of spread 1. The flow would spend all its effort on a huge shift and see the noise as nothing. Multiplying every reward by 1 − γ = 0.001 rescales the return back into [−3, 0], the range of a single reward, the same scale as the noise. It is not cosmetic: removing it drops VF’s success from about 86% to 11% and IVF’s from 76% to 11% in the paper’s ablation (Figure 5).

One step, by hand

A worked step with γ = 0.9, a raw reward r = −1, τ = 0.4, noise draw z0 = 0.5 for the next state, and ε = −1.2.

  1. Scale the reward: (1 − γ)r = 0.1 × (−1) = −0.1.
  2. Run the next state’s V-flow from 0.5 to τ = 0.4. Say it lands at zτ = 0.35 with V-velocity −0.60 there.
  3. Point: 0.4 × (−0.1) + 0.9 × 0.35 + 0.6 × 0.436 × (−1.2) = −0.040 + 0.315 − 0.314 = −0.039.
  4. Target: −0.1 + 0.9 × (−0.60) − 0.436 × (−1.2) = −0.1 − 0.54 + 0.523 = −0.117.
  5. If vQ says 0.20 at the point, the loss is (0.20 + 0.117)2 = 0.10, and the gradient pushes that velocity down.

Run one training step

Grey lines: the next state’s V-flow. Press Next stage to draw τ, follow one noise draw to zτ, build the point and the target, and compare with the network’s current velocity. New sample draws fresh noise.

Illustrative: γ = 0.9, raw reward −1, the next state’s returns are two bumps at −0.6 and 0.4 (in scaled units), and the untrained Q network believes a narrow spike at 0. The worked example fixes zτ = 0.35 and vV = −0.60 as in the prose. The arithmetic is Equation 13 exactly.

The data flow, with shapes

For a batch of B = 1,024 logged steps, one VF update moves these tensors:

s [B, ds] a [B, 5·da] (a chunk of 5 actions) r [B] s′ [B, ds] τ ~ U[0,1] [B] z0 ~ N(0,1) [B] ε ~ N(0,1) [B] Q update zτ = Euler(vV, s′, z0, 0 → τ) [B] (each row has its own τ) point = τ(1−γ)r + γzτ + (1−τ)√(1−γ²)ε [B] target = stop_grad((1−γ)r + γvV(zτ|s′,τ) − √(1−γ²)ε) [B] L(vQ) = mean((vQ(point|s,a,τ) − target)²) scalar V update aπ = best of K = 16 behaviour-cloning candidates [B, 5·da] zτ = Euler(target vQ, s, aπ, z0, 0 → τ) [B] L(vV) = mean((vV(zτ|s,τ) − target vQ(zτ|s,aπ,τ))²)

The networks are 4-layer MLPs of width 1,024 with GELU and layer normalisation, trained with Adam at learning rate 3 × 10−4 for 500,000 steps (Table 6).

In the Q-velocity target, why does the correction appear as −√(1 − γ2) ε while the point contains +(1 − τ)√(1 − γ2) ε?

Chapter 6

VF and IVF: From Return Flows to Actions

Turn a critic that draws return distributions into a policy, by picking the best of a few safe candidates or by leaning toward the better logged actions

The critic can now draw the spread of returns for any state and action. The robot still has to move. Chapter 5 trained the V-flow on actions “from the policy”, but which policy? This chapter answers that twice. VF keeps an explicit policy. IVF (implicit VF) never builds one during training.

The trap of offline RL

Both answers are shaped by one danger. In offline RL the agent learns only from a fixed log of past behaviour. It never tries anything new during training. So the critic has never seen what happens after an action far from the log. Its Q value there is a guess, and a policy that maximises Q will find the guesses that are too high. This is extrapolation error, and both VF and IVF are built to stay inside the log. For the background, see the offline RL lesson.

First, a number from a flow

To rank actions we need the average return, Q. The paper defines it from the flow as Q(s, a) = 𝔼z0[∫01 vQ(zτ | s, a, τ) dτ]. The integral of the velocity is the total distance a sample travels, z1 − z0. The noise has average 0, so this is the average endpoint: the average return. In practice it is estimated with M noise draws. V(s) is defined the same way from the V-flow.

VF: the best of 16 safe candidates

VF trains a behaviour cloning policy πβ: a flow over action chunks that imitates the log, trained with the plain flow-matching loss of Chapter 2. Behaviour cloning only proposes actions that look like logged ones. Then VF picks among them, by rejection sampling (Equation 14):

π(a | s)
The policy VF acts with, and the one whose actions feed the V-flow loss.
arg max
“The candidate that scores highest”. It returns an action, not a score.
a1, …, aK ~ πβ
K = 16 candidate action chunks drawn from the behaviour cloning flow, so all of them stay close to the log.
Q(s, ai)
Each candidate’s average return from the Q-flow. Training uses a one-step estimate; testing uses 10 Euler steps and M = 16 noise draws, shared across candidates so they are compared fairly.

Think of a chess player who only considers moves a strong human might play, then calculates which of those is best. The candidates keep the choice safe. The critic keeps it good. The paper tried a different extractor, a one-step actor trained to maximise Q while staying close to behaviour cloning, and success dropped by 44% (Figure 4). Dropping the separate V-velocity and bootstrapping the Q-velocity from itself changed little.

IVF: never ask an unseen action

IVF goes one step further in caution. In the V-flow loss it uses only the logged action a, never a policy sample. But plain regression onto logged actions would learn the value of the logging behaviour, average actions included. So IVF weights each logged action by how it compares with the current value (Equation 15):

wμ(s, a)
The weight on this logged step in the V-flow loss (Equation 16 multiplies the squared velocity error by it).
μ
The expectile, from 0.5 up to (not including) 1. The paper uses 0.8 or 0.9 depending on the domain.
1( Q(s, a) ≥ V(s) )
1 if this logged action beats the current value of its state, else 0. It compares two scalars, the averages from the two flows.

With μ = 0.9, logged actions that beat V count 9 times as much as ones that fall short. The value V settles where the weighted pulls balance: the μ-expectile of the Q values. At μ = 0.5 that is the plain average. As μ rises toward 1 it climbs toward the best logged action. Drag it.

Lean toward the better logged actions

Five actions logged at one state, with their Q values. The green line is V, solved so the weighted pulls balance. Bars above V get weight μ, bars below get 1 − μ. Drag μ.

0.90

Illustrative Q values (−2.4, −1.7, −1.1, −0.6, −0.3) with equal logging chances. V is the exact fixed point of the weighted average. The implicit policy is the logging policy times the weight, rescaled (the paper’s Equation 24).

A worked balance at μ = 0.9. Guess that V lies between −1.1 and −0.6. Then −0.6 and −0.3 get weight 0.9 and the other three get 0.1:

V = [0.9 × (−0.6 − 0.3) + 0.1 × (−2.4 − 1.7 − 1.1)] / (2 × 0.9 + 3 × 0.1) = −1.33 / 2.1 = −0.63

And −0.63 does lie between −1.1 and −0.6, so the guess is consistent. The value sits well above the average, −1.22, without ever asking about an action outside the log.

The paper proves two things about this loss (Appendix A.2), assuming training converges. At the fixed point, V is exactly the μ-expectile of Q, as in implicit Q-learning. And as μ → 1, V approaches the best value reachable using only actions the log supports, V*β. Hidden inside is a policy: the logging policy reweighted by w, which leans toward better logged actions.

The failure: weighting the wrong thing

Why compare scalars Q and V, and not the velocities themselves? The symptom of the obvious alternative shows up in the ablation: weighting by the velocity residual, or by return quantiles, gives much lower success (Figure 4, right). The paper explains why with a short argument (Appendix D.5). An expectile of velocities, taken point by point, tends to the upper envelope of the Q-velocities. Integrated, that gives 𝔼[∫ max v] instead of max 𝔼[∫ v]: the best speed at every moment, stitched from different actions, which no single action achieves. The fix is the one IVF uses: decide the weight once per action from the integrated scalars, then apply it to the whole velocity error.

In IVF, what happens to V(s) as the expectile μ rises from 0.5 toward 1?

Chapter 7

What the Experiments Show

Read the paper’s three tests: how close the learned distributions are, how often the robots succeed as data shrinks, and which design choices matter

The paper asks three questions. Does Value Forcing estimate the return distribution more accurately? Do VF and IVF beat earlier methods, especially with less data? And which of its design choices carry the gains? Every number below is from the paper.

Test 1: is the distribution right?

To check a return distribution you need the true one, and in a real task nobody has it. So the paper builds one. In each of four OGBench domains it restores one state, runs a fixed first action chunk, then lets a fixed data-collection policy finish the episode. It does this 1,000 times for training and 1,000 more times for evaluation. The 1,000 held-out discounted returns are the ground truth.

Every method trains on the 1,000 training episodes, bootstrapping with the logged actions. That is SARSA-style evaluation (named for the five things each update reads: state, action, reward, next state, next action): no policy improvement, just “what is this policy worth?”. Each method then draws 5,000 return samples, and the paper measures the W1 distance to the truth. An Oracle fits the realised returns directly with plain flow matching. It needs no bootstrapping, so it shows the error left from everything else: network fit, optimisation, finite samples.

VF has the lowest distance of the four bootstrapping methods in all four domains. It cuts PCBF’s distance by 81% on puzzle-4x4 and by 89% on humanoidmaze-giant. On cube-triple and puzzle-4x4 it is close to the Oracle. Pictures matter here too: Value Flows and FlowCritic pile their samples into narrow peaks, and the paper calls the earlier methods biased. Its Figure 7 shows why: VF spreads its flow paths early, around τ = 0.25, while the baselines bunch until about τ = 0.9.

Explore the paper’s numbers

Pick a test. Then pick a domain or a dataset size. Value Forcing’s bars are green, earlier methods are warm, the Oracle is blue.

Return accuracy: mean 1-Wasserstein distance with its standard deviation (Figure 2, lower is better). Success: overall average success rate in percent over 20 OGBench or 6 OCBench tasks, mean of 4 seeds (Tables 2 to 5); OCBench runs used only the methods shown. Reward scaling: approximate mean success read from the text of Section 6.3.

Test 2: does it win when data is scarce?

The control tasks are long. OGBench’s cube-triple and cube-quadruple allow 1,000 steps, puzzle-4x4 500, and humanoidmaze-giant 4,000. Each domain has 5 tasks, and the full datasets hold 100 million transitions. The paper keeps 10%, 25%, 50% or 100% of the trajectories, sampling them with a softmax over each trajectory’s average reward. Six more tasks come from OCBench, at 25% and 100%. Policies act in chunks of 5 actions, which makes value learning harder.

Three findings stand out in the overall averages:

  1. VF leads the explicit methods at 10% (48% success, against 43% for the scalar QC) and at 25% (54% against IQN’s 48%). With more data it stays level with the best: 57% against 52% at 100%.
  2. The earlier flow critics fall below the scalar critic at 10%: FlowCritic 34%, Value Flows 36%, PCBF 29%, QC 43%. A richer model with the wrong supervision did worse than no distribution at all.
  3. VF degrades gently: from 57% at full data to 48% at 10%. IVF leads the implicit methods at every reduced size: 43% against 27% at 10%, 61% against 46% at 25%, and is level at full data (65% against Implicit C51’s 66%).

How is success counted? Every method trains for 500,000 gradient steps. On OGBench each task has a fixed goal, and an episode succeeds if the agent reaches it before the time limit. The paper evaluates every 100,000 steps on 10 episodes per task and reports the final evaluation, as a mean and standard deviation over 4 random seeds. Hyperparameters are tuned per domain on tasks 2 and 4 with the full data, then reused for every task and every data size. VF itself was not tuned.

OCBench is a second check on different tasks: one block-lite-single task, two block-lite-double tasks and three chamber-lite-easy tasks, with 7-dimensional actions at 10 Hz and 500 evaluation episodes per task. At 25% of the data VF reaches 67% against Value Flows’ 60%, C51’s 58% and QC’s 45%. At full data VF reaches 92% and C51 91%. IVF leads the implicit methods at full data (91% against 86%) and is level at 25% (58% against Implicit QC’s 57%).

One honest wrinkle hides in the per-domain tables. On humanoidmaze-giant, VF scores between 0% and 1% at every data size and most explicit methods are near 0%, while the implicit ones succeed (IVF 40% at 10% of the data). The domain average, not Value Forcing alone, decides which family to use there.

Test 3: which choices matter?

The ablations run on tasks 2 and 4 of cube-triple and puzzle-4x4. Reward scaling is essential: without it VF falls from about 86% to 11%, and IVF from 76% to 11%. For VF, the policy extractor matters (a one-step actor costs 44%), while the separate V-velocity is optional. For IVF, weighting by the scalar advantage beats weighting by velocity residuals or by quantiles. And two knobs barely matter: the number of return-flow steps, and the number of return samples M, give similar success (Figure 8). Even 1 flow step works, which fits Chapter 2: one step already gives the average that ranks actions.

What does the Oracle in the return-accuracy test tell you?

Chapter 8

Train It Here

Open up the hero’s toy, train four critics on the same logged data, and measure where each one goes wrong

The hero ran two training jobs. Here you get the whole bench: the same 8-state chain, four objectives, two table sizes, any amount of logged data, and three states to inspect. Every bar and curve below comes from a training run in your browser, not from the paper. It is a toy, and it is honest about what a toy can and cannot show.

The setup

The chain runs s0 → s1 → … → s7 → end, with γ = 0.95. Two steps pay random rewards: s1 pays 0 or 0.8 on a coin flip, and s7 pays −1.2 (chance 0.45) or 1.0, plus a little jitter. So the return from s0 has four bumps: near −0.84, −0.08, 0.70 and 1.46. The data is a log of N reward draws for each state. A small N means a rough picture of the reward odds, just like a small dataset.

Each state’s velocity field is a table over noise level × return, 11 cells by 11 (coarse) or 11 by 41 (fine), read between cells by blending the four nearest cells by distance (bilinear interpolation). One training update draws a logged step, a noise level and the noise each objective needs, builds that objective’s point and target, and nudges the four nearest table cells. The four objectives:

  1. Endpoint-only: run the next flow to τ = 1, form y = r + γz1, flow-match a straight line to y (Chapter 3, answer 1).
  2. Clean Bellman everywhere: Value Flows’ same-τ target r + γzτ plus its endpoint loss (answer 2).
  3. No correction: Value Forcing with the Gaussian correction deleted from the point and the target (Chapter 4’s failure).
  4. Value Forcing: Equation 13 as written, without reward scaling (the toy’s returns already live near the noise scale).

Train four critics on one log

Choose an objective and press Train, or press Train all four. Top: learned flow paths at the chosen state, with the exact returns at the right edge. Bottom: each trained objective’s distance to the exact answer. Then change the data or the table size.

32
1.00

Toy, illustrative, run live: 200,000 updates per objective, learning rate 0.08 decaying to 0.008, 8 Euler steps inside training and 20 for drawing, the same seed and the same log for all four. Distances are W1 from 240 quantiles of the learned flow against the exact mixture. None of these numbers are the paper’s.

What to try, and what you should see

  1. Inspect s7 first. Train all four. The last step has no next state, so every objective reduces to plain flow matching onto the logged rewards. The four bars are nearly the same height: any gap elsewhere comes from bootstrapping.
  2. Inspect s0 with the coarse table. In our runs the endpoint-only paths bunch together: spread about 0.68 against an exact 0.86, and a W1 of about 0.40 to 0.45, the largest of the four. Value Forcing keeps the four bumps apart; it comes out a little too wide (about 0.95), with W1 about 0.22 to 0.33, below endpoint-only at every data size. Clean Bellman lands in between (spread about 0.79). This is the hero’s story, with seven bootstraps for errors to pile up.
  3. Look at No correction. It is too wide at every table size: spread about 1.1 against 0.86. At τ = 1 its bumps still sit in roughly the right places. Drag τ to 0.5: there it is the worst of the four, about 0.23 against 0.15 or less. Chapter 4 predicted this: every target in the middle asks for less noise than the flow carries. Samples near the edges of the bell never land where a target was built, so they keep their noise and the result comes out too wide.
  4. Switch to the fine table. At τ = 1 the four land close together, W1 about 0.23 to 0.30. A table with a private cell for every state and noise level has room to fit almost anything. The paper’s large gaps come from networks that share weights across millions of transitions, which a toy table cannot imitate.
  5. Drag the data down to 2. All four get worse together, because the log itself now misstates the reward odds. No critic can learn odds the data does not contain.

Reading the toy honestly

The toy reproduces the mechanism, not the size of the effect. Endpoint-only training narrows here because each bootstrapped target is one end sample from a slightly blurred next flow, and the blur compounds over seven steps. Value Forcing reads the next flow’s velocity at every τ, so less is re-learned per step, and the spread survives.

The toy also shows a cost the paper’s networks hide. In a table, noise in each state’s middle-τ velocities is copied backward by the dense bootstrap, so Value Forcing’s middle crowds come out wider than exact. Dense supervision propagates errors as well as signal. The correction term keeps the propagation consistent; it cannot make a crude function approximator precise.

That is the right takeaway for an engineer. Value Forcing is not magic accuracy. It is a target with the right fixed point at every noise level, which is what lets a good network use all of the signal in each logged step.

Chapter 9

Field Guide

Keep the whole paper on one page: the numbers, the terms, a build checklist, the core code, and where to go next

A critic that learns only the average return wastes most of what each logged step could teach it. Value Forcing learns the whole return distribution with a flow, and it checks the Bellman equation at every noise level of that flow. The check needs one extra term, a Gaussian correction of spread (1 − τ)√(1 − γ2), without which the equation is false everywhere below τ = 1. With it, the flow Bellman operator is a γ-contraction with one fixed point at every τ. Turned into velocity regression, it gives VF (best of 16 behaviour cloning candidates) and IVF (expectile-weighted, dataset actions only). Both learn more accurate return distributions and lead their families when only 10% or 25% of the data is available.

The numbers

QuantityValueSource
Tasks20 OGBench + 6 OCBenchSection 6
Full OGBench dataset100M transitionsSection 6, D.1
VF success at 10% / 25% / 100% data48% / 54% / 57%Tables 2, 3, 5
Best explicit rival at 10% (QC)43%Table 2
IVF success at 10% / 25% / 100%43% / 61% / 65%Tables 2, 3, 5
Return W1, humanoidmaze-giant: VF / PCBF / Value Flows13 / 122 / 462Figure 2
W1 cut versus PCBF: puzzle-4x4 / humanoidmaze-giant81% / 89%Section 6.1
Without reward scaling: VF / IVF success86% → 11% / 76% → 11%Figure 5
One-step actor instead of rejection sampling−44% successFigure 4
Discount γ0.999 (OCBench 0.9999)Table 6
Candidates K / return samples M (train, test)16 / 1, 16D.3
Return-flow Euler steps10Table 6
Network, optimiser, steps, batchMLP 4 × 1,024, Adam 3e−4, 500K, 1,024Table 6
Target update rate, action chunk0.005, 5 actionsTable 6
IVF expectile μ0.8 or 0.9 by domainTable 7

The terms

TermMeaning
Return Z(s, a)The random discounted sum of future rewards. Its average is Q(s, a).
Distributional Bellman equationZ(s, a) has the same distribution as r + γZ(S′, A′): shrink, shift, mix.
Noise level τThe flow’s clock: 0 is pure Gaussian noise, 1 is a clean return.
Velocity v(z | s, a, τ)Which way and how fast a noisy return moves at level τ. The network’s output.
Endpoint-only supervisionBootstrapping from clean samples at τ = 1 only (FlowCritic and kin).
Flow Bellman equationZ(s, a, τ) = τr + γZ(S′, A′, τ) + (1 − τ)√(1 − γ2)N, in distribution.
Gaussian correctionThe fresh noise term that restores the variance the shrink by γ removes.
V-flow, Q-flowReturn flows for a state (action averaged) and for a state and action.
Rejection samplingDraw K candidates from a behaviour cloning flow, keep the one with the highest Q.
Expectile μA weighted average that leans toward high values; μ → 1 approaches the best logged action.
W1 distanceThe least average distance to move one distribution’s mass onto another’s.

A build checklist

  1. Scale every reward by 1 − γ so returns and noise share a scale.
  2. Use one standard Gaussian as the start of every return flow. A different start needs a different correction.
  3. Draw τ uniformly per row. Run the next state’s V-flow from its own noise to that τ.
  4. Use the same ε in the point and in the target, with the signs of Equation 13.
  5. Stop gradients through the target. Alternate the V and Q updates; keep a slow copy of the Q network.
  6. Estimate Q by the average endpoint: one Euler step in training, 10 steps and M = 16 at test time, with noise shared across candidates.
  7. VF: act and train V with the best of K = 16 behaviour cloning candidates. IVF: train V on logged actions with weight μ or 1 − μ from the scalar comparison Q ≥ V.

The core, as code

python
import jax, jax.numpy as jnp

def euler(v, cond, z0, tau_end, steps=10):
    # follow dz/dtau = v(z | cond, tau) from 0 to tau_end (one tau per row)
    h, z = tau_end / steps, z0
    for k in range(steps):
        z = z + h * v(z, cond, k * h)
    return z

def q_loss(vQ, vV, s, a, r, s2, key, gamma):           # Equation 13
    k1, k2, k3 = jax.random.split(key, 3)
    B = r.shape[0]
    tau = jax.random.uniform(k1, (B,))
    z0, eps = jax.random.normal(k2, (B,)), jax.random.normal(k3, (B,))
    r = (1 - gamma) * r                                  # reward scaling
    c = jnp.sqrt(1 - gamma ** 2)                           # Gaussian correction
    zt = euler(vV, s2, z0, tau)                            # next-state V-flow to level tau
    point = tau * r + gamma * zt + (1 - tau) * c * eps
    target = jax.lax.stop_gradient(r + gamma * vV(zt, s2, tau) - c * eps)
    return jnp.mean((vQ(point, (s, a), tau) - target) ** 2)

def v_loss(vV, vQ_slow, s, a, key, w=1.0):              # Equations 12 and 16
    k1, k2 = jax.random.split(key)
    B = s.shape[0]
    tau = jax.random.uniform(k1, (B,))
    zt = euler(vQ_slow, (s, a), jax.random.normal(k2, (B,)), tau)
    target = jax.lax.stop_gradient(vQ_slow(zt, (s, a), tau))
    return jnp.mean(w * (vV(zt, s, tau) - target) ** 2)
    # VF: a = best of K policy candidates, w = 1.  IVF: a = logged action, w = expectile weight

def expectile_weight(Q, V, mu):                          # Equation 15
    return jnp.where(Q >= V, mu, 1 - mu)

def q_value(vQ, s, a, z0):                                   # z0: [M, B] shared noise
    ones = jnp.ones(z0.shape[1])
    z1 = jax.vmap(lambda z: euler(vQ, (s, a), z, ones))(z0)
    return z1.mean(0)                                       # average return = Q(s, a)

def act(bc_sample, vQ, s, key, K=16, M=16):               # Equation 14, one state
    k1, k2 = jax.random.split(key)
    cands = bc_sample(s, K, k1)                              # [K, chunk * dim_a]
    z0 = jax.random.normal(k2, (M, K))                       # the same noise for every candidate
    q = q_value(vQ, jnp.repeat(s[None], K, 0), cands, z0)      # [K]
    return cands[jnp.argmax(q)]

A compact sketch of the losses in the paper’s notation, written for this lesson. The authors’ JAX implementation is at github.com/chongyi-zheng/value-forcing.

Limits the paper names, and one we saw

Where it sits, and where to go next

The takeaway. Check the Bellman equation wherever your model makes a claim. A flow makes a claim at every noise level, so a flow critic should be checked at every noise level, with the one noise term that makes the check true.

Now teach it back: open Teach and derive the Gaussian correction on the whiteboard from the straight-path crowd, or flip through the Sparks cards. Then go back to the hero, switch to endpoint-only, and drag the data down: you now know why its returns bunch together, and what one term changes.

Credit: Chongyi Zheng, Zhiyuan Zhou, Qiyang Li, Benjamin Eysenbach and Sergey Levine, “Value Forcing: Aligning Return Distributions at All Noise Levels”, Princeton University and UC Berkeley, arXiv 2611.02160 (2026). Project page. All figures and tables cited here are the paper’s; all devices are this lesson’s own.

Value Forcing: Aligning Return Distributions at All Noise Levels
Read the paper · Back to Veanors