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.
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
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.
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.
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.
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:
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.
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.
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).
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.
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.
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.
Chapter 1
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 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.
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:
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.
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.
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.
Take the coin flip as Z′: −1 or +1, each with chance 0.5. Let r = 0.5 and γ = 0.9.
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.
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.
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.
Chapter 2
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.
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).
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:
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:
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.
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.
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.
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.
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.
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.
Chapter 3
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.
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.
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:
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.
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.
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.
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.
| Method | Full distribution? | Starts at a Gaussian? | Bellman at middle τ? | Bellman at τ = 1? |
|---|---|---|---|---|
| Floq | no (scalar) | no | no | yes |
| FlowCritic | yes | yes | no | yes |
| Value Flows | yes | no | yes, but not consistent at the start | yes |
| PCBF | yes | yes | along coupled paths only | yes |
| VF / IVF | yes | yes | yes | yes |
From the paper’s Table 1 (FlowIQN and EVOR omitted for space).
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.
Chapter 4
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.
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:
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.
Build it yourself, one term at a time, and switch the correction off to see what breaks.
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.
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.
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.
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:
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.
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.
Chapter 5
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.
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:
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:
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-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).
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).
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.
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.
For a batch of B = 1,024 logged steps, one VF update moves these tensors:
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).
Chapter 6
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.
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.
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 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):
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 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):
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.
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 μ.
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.
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.
Chapter 7
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.
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.
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.
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:
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.
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.
Chapter 8
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 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:
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.
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.
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
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.
| Quantity | Value | Source |
|---|---|---|
| Tasks | 20 OGBench + 6 OCBench | Section 6 |
| Full OGBench dataset | 100M transitions | Section 6, D.1 |
| VF success at 10% / 25% / 100% data | 48% / 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 Flows | 13 / 122 / 462 | Figure 2 |
| W1 cut versus PCBF: puzzle-4x4 / humanoidmaze-giant | 81% / 89% | Section 6.1 |
| Without reward scaling: VF / IVF success | 86% → 11% / 76% → 11% | Figure 5 |
| One-step actor instead of rejection sampling | −44% success | Figure 4 |
| Discount γ | 0.999 (OCBench 0.9999) | Table 6 |
| Candidates K / return samples M (train, test) | 16 / 1, 16 | D.3 |
| Return-flow Euler steps | 10 | Table 6 |
| Network, optimiser, steps, batch | MLP 4 × 1,024, Adam 3e−4, 500K, 1,024 | Table 6 |
| Target update rate, action chunk | 0.005, 5 actions | Table 6 |
| IVF expectile μ | 0.8 or 0.9 by domain | Table 7 |
| Term | Meaning |
|---|---|
| Return Z(s, a) | The random discounted sum of future rewards. Its average is Q(s, a). |
| Distributional Bellman equation | Z(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 supervision | Bootstrapping from clean samples at τ = 1 only (FlowCritic and kin). |
| Flow Bellman equation | Z(s, a, τ) = τr + γZ(S′, A′, τ) + (1 − τ)√(1 − γ2)N, in distribution. |
| Gaussian correction | The fresh noise term that restores the variance the shrink by γ removes. |
| V-flow, Q-flow | Return flows for a state (action averaged) and for a state and action. |
| Rejection sampling | Draw 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 distance | The least average distance to move one distribution’s mass onto another’s. |
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.
humanoidmaze-giant the explicit VF scores near 0% where implicit methods succeed.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.