WorksComputer Science
DEFlow: Deep Equilibrium Flow Maximum-Entropy Reinforcement Learning
Abstract
Expressive flow policies can represent multiple high-value actions, but sampling them with few integration steps while retaining tractable action densities remains challenging. We introduce DEFlow, a deep equilibrium flow policy that replaces explicit Euler sampling with implicit Euler integration and solves all intermediate actions jointly as an equilibrium system. We combine implicit differentiation with a discrete change-of-variables formula for the final-action density, enabling off-policy training within soft actor-critic without backpropagating through solver iterations. DEFlow achieves an average relative improvement of approximately 10% in mean successful coverage over the strongest baseline across four Multi-Goal docking variants. It also achieves the highest mean time-averaged return on four of five manipulation tasks, while remaining broadly competitive across five MuJoCo tasks. These results support implicit flow policies for tasks requiring both diversity and precision, at the cost of additional nonlinear and linear solves. Primary
Introduction
Soft actor–critic (SAC) is a strong baseline for continuous control. It combines data-efficient off-policy learning with entropy-driven exploration [7 b]. Its standard actor, however, is a single tanh-squashed diagonal Gaussian. This distribution is easy to sample from and has a closed-form density, but it cannot easily represent several distinct high-value actions at the same state [6]. Diffusion and flow-matching policies offer a more expressive alternative. They generate actions by transforming simple noise through multiple learned steps and can represent complex, multimodal distributions [10] (Wang et al. 2023). The challenge is to gain this expressivity while keeping SAC training practical. Sampling and actor differentiation now involve a multi-step rollout, and the final-action log-density required by the entropy objective may be hard to obtain.
Existing off-policy methods resolve this tension by design compromise. Some give up the maximum-entropy objective altogether: Flow Q-Learning distills a multi-step generator into a one-step actor [12], consistency policies replace the long sampler with one- or few-step generation [4], and Diffusion-QL combines diffusion behavior cloning with value maximization without evaluating the policy likelihood (Wang et al., 2023). Q-score matching (QSM) [13] directly matches the policy score to the critic’s action-gradient and avoids backpropagating through the complete sampler. SAC-Flow (Zhang et al., 2025), the direct parent of this work, treats its explicit -step flow rollout as a sequential model and stabilizes the recurrence with a gated velocity field. DIME retains a multi-step denoising policy and trains its transitions through approximate inference toward a -defined energy-based target [3]. These methods make expressive generative actors trainable off-policy, but leave a separate numerical question: how should a multi-step policy be sampled when its learned velocity field becomes difficult to integrate with a small number of explicit steps? We investigate implicit-Euler sampling as an alternative.
We introduce DEFlow, a flow policy built around implicit-Euler sampling. We retain SAC-Flow’s gated velocity field and multi-step actor, but evaluate each velocity at the unknown next action, replacing the explicit Euler recurrence with implicit-Euler equations [9]. This integration rule is well suited to stiff dynamics, making it a natural alternative when a learned field is poorly resolved by a few explicit steps. To implement the sampler, we collect all intermediate actions into one small deep-equilibrium system and solve for them jointly [1] (Walker & Ni 2011). The forward pass uses a root solver to obtain the trajectory, while the backward pass is formulated through implicit differentiation rather than backpropagation through the solver iterations. Under the stated regularity assumptions, an exact equilibrium also admits a final-action log-density through discrete change of variables. The implementation evaluates the density and implicit gradient along the numerically obtained trajectory.
In summary, our contributions are threefold:
A joint equilibrium formulation of flow policies. We formulate the full implicit-Euler action trajectory as a single deep equilibrium system, providing an alternative to explicit rollouts for expressive policies.
Maximum-entropy policy learning. We train DEFlow within SAC using implicit gradients and a final-action density formula, exact at equilibrium under the stated assumptions.
Comprehensive empirical evaluation. We study DEFlow across precision docking, manipulation, and MuJoCo benchmarks, with matched explicit-Euler baselines, step-count ablations, and numerical density verification. The experiments characterize both the strengths and the limitations of implicit flow sampling.
Background and Related Work
Maximum-Entropy Reinforcement Learning
We consider an infinite-horizon Markov decision process with state , action , transition kernel , reward , and discount , where is the action dimension. Soft actor–critic (SAC) trains a policy off-policy on transitions drawn from a replay buffer to maximize the maximum-entropy return
where the temperature trades reward against entropy [7 b]. With twin critics , the actor balances expected value against the log-density of its sampled actions. The same log-density enters the soft target for the critics. Section 4.2 gives the actor and critic objectives used by DEFlow.
SAC provides the actor–critic framework used in this work. Its standard actor parameterizes a state-conditioned Gaussian distribution whose samples are squashed by tanh to satisfy the action bounds [8]. The underlying Gaussian is unimodal, which limits the policy’s ability to capture complex, multimodal action distributions.
Flow and Diffusion Policies
A flow policy is the expressive actor we adopt. Rather than a single Gaussian draw, it turns base noise into an action by transporting it through a learned velocity field. The state-conditioned transport follows , starting from for . A numerical integrator turns this motion into discrete steps; the endpoint is then squashed to keep the action bounded. Flow matching [10] provides a way to learn such fields from data. By transporting samples from a simple base distribution, a flow can represent complex action distributions with multiple distinct modes.
Representing a richer action distribution, however, does not by itself make the policy easy to optimize with SAC. The standard actor update propagates gradients from the critic through the sampled action to the policy parameters. Flow policies admit this differentiation, but direct optimization requires propagating the learning signal through the entire sequence of sampling steps. This can be computationally expensive and can lead to vanishing or exploding gradients, making stable policy improvement a separate challenge from learning to reproduce an action distribution [12] (Zhang et al. 2025).
Our main comparisons concern expressive policies learned through online interaction. SAC-Flow (Zhang et al., 2025), our direct predecessor, combines a gated velocity field with explicit Euler integration and a surrogate entropy objective within SAC. DIME [3] instead uses a variational maximum-entropy bound, while Q-score matching (QSM) [13] learns the policy score from the critic’s action-gradient without evaluating a density.
Implicit Models and Differentiation
Deep equilibrium (DEQ) models are implicit-layer networks [1]: rather than stack many explicit layers, a DEQ defines its output as the fixed point of a single weight-tied map and computes it with a root-finder. When is a contraction, the iteration converges at a linear rate bounded by its Lipschitz constant. Anderson acceleration (Walker & Ni, 2011) uses a history of iterates and residuals to accelerate this solve.
The gradient follows from the solved equilibrium, without differentiating through the solver iterations. For a continuously differentiable map with nonsingular , implicit differentiation turns the nonlinear forward problem into a linear system in the backward pass. Standard DEQ implementations solve the adjoint system iteratively. Jacobian regularization can improve the convergence of these solves [2]. A complementary perspective treats backpropagation as block-triangular back substitution [5]. We use the equilibrium formulation and implicit differentiation to construct DEFlow in § 4.
The Finite-Step Sampling Problem
At a fixed state, the maximum-entropy optimum [6, 8] is
It can therefore contain several narrow modes corresponding to different valid actions. The tanh-Gaussian actor used by SAC is unimodal before squashing, whereas a flow policy can represent these modes if its finite-step sampler preserves them.
A finite inference budget. At a fixed state, explicit and implicit Euler use
where and . Real-time control limits latency and field evaluations, so the usable may be small and correspondingly large. Solving an implicit step may require multiple field evaluations, increasing its computational cost.
Three distinct numerical effects. Coarse discretization affects (i) the endpoint, (ii) the step map, and (iii) the policy gradient. For the one-step maps and , the step Jacobians are
so the two schemes can have different conditioning on the same field. In the fixed-state mixture analysis of Appendix § 8.§ 1, the exact field is smooth, but its largest derivative grows at least like as the mode width decreases. Writing for the law induced by explicit Euler steps of the exact field and for the two-mode surrogate target of that appendix, explicit Euler incurs
and at its error tends to a positive limit as (Eq. (29)). The same analysis bounds the discrete gradient at no more than a fraction of the exact one for a specified Gaussian subfamily and terminal loss, so it nearly vanishes in the same coarse-grid regime. Coarse explicit integration can introduce errors in both the sampled distribution and its gradients even when every step remains locally invertible.
A coarse-step empirical illustration. Figure 1 shows that implicit Euler achieves more accurate robot reaching than explicit Euler at low step counts for the tested fixed contracting flow. With just two steps, the joint DEQ sampler concentrates endpoints near the target and achieves 97.8% success, versus 1.7% for explicit Euler. This advantage persists at three to five steps, where implicit sampling achieves 100% success and explicit Euler reaches at most 77.8%. The comparison uses a fixed field without a trained neural policy.
Figure 1. Panda reaching errors with explicit Euler (left) and joint implicit Euler (right), using 2–5 flow steps. Percentages show success over 640 paired trials per setting: final 3D error below 8 mm.
Together, the analysis and measurements motivate implicit discretization. Its local sensitivity is governed by rather than , which can preserve concentration when the field contracts toward a target. The accuracy of implicit steps also depends on the conditioning of the underlying solve.
Method
We introduce a deep equilibrium flow policy (DEFlow), defined by implicit Euler integration and trained within soft actor–critic (SAC) (Haarnoja et al., [7]). Following § 3, we sample actions by solving the implicit Euler equations for all integration steps together. We compute policy gradients by implicit differentiation and action log-densities with the change-of-variables formula.
Implicit Flow Policy
For a state , we transform a base sample into an action through a state-conditioned velocity field . We take , and the base distribution is independent of . We write its density as . We parameterize the velocity field using the gated form of Flow-G in SAC-Flow (Zhang et al., 2025),
where is a sigmoid gate, is a scaled tanh output, and denotes elementwise multiplication. Both outputs depend on and share parameters .
Let and . We replace the explicit Euler rollout of SAC-Flow with implicit (backward) Euler (Hairer & Wanner, [9]):
The field is evaluated at the new point . The final squashing transformation follows SAC (Haarnoja et al., [8]), with and enforcing the action bounds. Unless stated otherwise, we use integration steps.
Implicit Euler is a standard choice for stiff dynamics (Hairer & Wanner, [9]). For the scalar linear test equation with , its amplification factor has magnitude at most one for every , whereas explicit Euler requires . The finite-step analysis in § 3 motivates our use of implicit Euler. For strongly contracting dynamics, explicit Euler may require very small integration steps to remain stable. In the scalar linear setting above, implicit Euler remains stable for any positive step size.
Joint Fixed-Point Formulation
Summing the first implicit Euler updates in Eq. (7), with , expresses each intermediate action in terms of the base sample and the accumulated velocity:
We collect the intermediate actions into the vector , where . Define by stacking the right-hand sides of Eq. (8) in the same order. The implicit Euler equations can then be written as a single fixed-point equation:
The solution contains the intermediate actions satisfying all implicit Euler steps. Following the DEQ approach (Bai et al. [1]), we compute this solution with a numerical root finder.
The forward pass searches for a root of . We use Anderson acceleration (Walker & Ni (2011)), initialized with every trajectory block equal to , to approximate this root. Each evaluation of computes the velocities at the current estimates of the intermediate actions and accumulates them along the trajectory. The final block supplies , which is squashed into the environment action by Eq. (7).
Backward Pass
Following the implicit differentiation procedure of Bai et al. [1] (Eqs. (8) and (11)), we compute policy gradients by solving a linear system at the fixed point, without backpropagating through the root-finding iterations. For a differentiable sample loss , let , with derivatives evaluated at for fixed . Assuming a differentiable solution branch and an invertible , we solve for the adjoint vector and evaluate the parameter gradient as
Gradients are column vectors. The direct derivative holds the trajectory fixed and accounts for the explicit parameter dependence of the log-density and Jacobian penalty introduced below. The adjoint solve avoids forming .
In our implementation, we compute with a batched dense linear solve. Appendix § 8.§ 2 gives the derivation, the structure of , and full regularity assumptions. Appendix § 10.§ 1 describes the finite-tolerance evaluation and numerical modifications.
Maximum-Entropy Policy Optimization
To train the implicit flow policy with SAC, we need the log-density of its actions (Haarnoja et al. [8]). We derive this density from the discrete implicit Euler steps and use it in the actor–critic updates below.
Exact Density by Discrete Change of Variables
To obtain the exact density we use the change-of-variables identity for invertible maps (Rezende & Mohamed [14]; Papamakarios et al. [11]): for ,
Under the smoothness and invertibility assumptions in Appendix § 8.§ 3, each implicit step in Eq. (7) defines a locally invertible map around the selected solution. Differentiating gives the differential , so and the one-step Jacobian is
Substituting Eq. (12) into Eq. (11), a single step changes the log-density by . The positive sign follows from the inverse in Eq. (12). Composing the steps into the rollout , the log-density is the base density plus one log-determinant per step. Applying the final squashing transformation gives the environment action (Eq. (7)). Its exact log-density is therefore:
(13) gives the exact action log-density for the selected solution branch under the assumptions above. SAC-Flow uses a joint path log-density over intermediate actions as its entropy term (Zhang et al., 2025), whereas DIME uses a lower bound on the policy entropy [3]. Here, the change-of-variables formula gives the log-density of the final action directly. The implementation uses finite solver tolerances, diagonal shifts, and clipping, which can modify the evaluated log-density and policy gradient. The full derivation is given in Appendix § 8.§ 3.
Actor–Critic Updates
We train DEFlow within the SAC framework [8], using the action samples and log-densities derived above. Let denote an action sampled from the implicit policy. We compute the soft Bellman target as
where , , and is the termination indicator. Here denotes the parameters of target critic , and the action log-density is given by Eq. (13). For terminal transitions, we set . Each critic is trained by minimizing the mean squared error
We update the implicit flow policy by minimizing the SAC actor objective [7 b]:
The log-density is evaluated by Eq. (13). We compute the policy gradient using the implicit backward pass in Eq. (10). In the regularized configuration, we minimize , where weights a per-step Jacobian penalty motivated by Jacobian regularization in DEQ models [2]. Appendix B.§ 1 defines and specifies its hyperparameters.
The target critics are initialized with and updated by exponential moving averages for , where is the target averaging rate [8].
Algorithm
Algorithm 1 in Appendix B summarizes data collection and actor–critic updates following SAC [8]. Each action is obtained by solving Eq. (9) with Anderson acceleration and applying the squashing transformation in Eq. (7). Policy updates use the log-density in Eq. (13) and the implicit gradients in Eq. (10). The pseudocode takes the current temperature and regularization weight as inputs to each update. Numerical evaluation is described in Appendix § 10.§ 1.
Experiments
Experimental Setup
We evaluate DEFlow in three settings: four variants of MultiGoal-4 with different navigation and docking tolerances [6], five MuJoCo locomotion tasks (Todorov et al., 2012), and five manipulation tasks: PickCube and PushCube in ManiSkill (Tao et al., 2025), and ButtonPressWall, PegInsertSide, and PushWall in MetaWorld (Yu et al., 2020). Training budgets are 200k transitions for MultiGoal, 1M environment steps for MuJoCo, and 500k recorded steps for manipulation. Our main comparison methods are SAC [7], SAC-Flow, DIME, and QSM. For ablation studies, we compare DEFlow with a matched explicit-Euler flow on MultiGoal and vary the number of integration steps . All baseline results come from our own implementations and training runs. Evaluation protocols, task-specific configurations, and additional statistical analyses are provided in Appendices B and C.
Benchmark Results
Successful diversity under precision constraints. We extend the four-goal MultiGoal task [6] to test whether an expressive policy can combine diverse goal choices with precise actions. The agent receives a dense distance reward while navigating toward one of four symmetric goals. On entering a goal region, it performs one docking action and receives a bonus if the action is sufficiently close to the goal’s target. We study four variants combining wide or narrow goal regions with loose or tight docking tolerances. Wide goal regions are circles of radius 1, while narrow regions are radial ellipses with semi-axes 1 and 0.20. Docking succeeds when the final action lies within distance 0.12 (loose) or 0.06 (tight) of the target associated with the reached goal. This design varies the precision required during navigation and during the final docking action separately. Figure 5 in Appendix C.2 illustrates the four variants. To maintain several successful strategies, the policy must choose different goals across episodes and concentrate its final action around the target associated with each goal.
Figure 5. Four MultiGoal docking variants. Top: navigation goal regions. Bottom: corresponding docking targets and action tolerances; colors and numbers identify goals.
Our main metric, successful coverage (U4), measures how many distinct goals a policy successfully completes within a small number of attempts. Let be the probability that an episode from the origin reaches goal and docks successfully. For four independent episodes under the same policy,
Here, is the probability of completing goal at least once, so U4 is the expected fraction of distinct goals successfully completed. It rewards both reliable docking and coverage of alternative goals. Always succeeding at one goal gives U4 = 0.25, whereas uniform success across all four goals attains the maximum . We estimate from 1,000 stochastic episodes per trained policy and average U4 across training seeds.
DEFlow achieves the highest mean successful coverage on all evaluated variants (Table 1). On loose docking, it approaches the balanced four-goal ceiling. Its mean successful coverage exceeds that of the second-best method by up to 17%. Thus, DEFlow retains the strongest combination of diversity and successful completion when the final action must be more precise. Figure 2 also shows that DEFlow develops successful coverage early in training. Appendix C.4 and § 5.3 examine the failures of explicit flow and QSM.
Figure 2. Successful coverage during training (mean ± SD). The dotted line marks the maximum U4.
Continuous control. Figure 3 shows learning curves across five MuJoCo tasks, and Table 6 in Appendix § 10.§ 2 summarizes return at the recorded 1M evaluation. We report means and standard deviations across three runs per task. Appendix § 10.§ 2 provides per-seed results, confidence intervals, and sensitivity analyses at alternative evaluation horizons. These tasks do not explicitly require multimodal action selection, and we observe no consistent advantage from greater policy expressivity, with SAC, SAC-Flow, DIME, and DEFlow achieving broadly comparable returns overall and SAC retaining a small lead in the sum of returns across tasks.
Figure 3. MuJoCo learning curves. Lines show run means, bands show ±1 sample SD.
| Environment | SAC | SAC-Flow | DIME | QSM | DEFlow |
| Hopper | 2510 ± 901 | 2955 ± 1055 | 2485 ± 326 | 2474 ± 1284 | 3318 ± 560 |
| Walker2d | 4517 ± 644 | 4513 ± 436 | 4866 ± 348 | 1615 ± 992 | 4973 ± 564 |
| HalfCheetah | 14190 ± 1152 | 11476 ± 1647 | 13476 ± 527 | 5981 ± 791 | 12534 ± 340 |
| Ant | 5995 ± 188 | 6215 ± 458 | 5975 ± 568 | −22 ± 2 | 5673 ± 1340 |
| Humanoid | 5042 ± 334 | 5089 ± 123 | 4981 ± 185 | 4672 ± 191 | 4211 ± 858 |
| Sum | 32253 | 30247 | 31783 | 14721 | 30709 |
Table 6. MuJoCo return at 1M steps, mean ± SD across three runs. Bold and underlined values mark the highest and second-highest means.
Manipulation. Manipulation tasks test how quickly a policy turns contact with an object into useful behavior. We compare SAC, SAC-Flow, DIME, and DEFlow on five tasks from ManiSkill and MetaWorld, with a budget of 500k recorded training steps. Figure 4 shows deterministic evaluation returns, and Table 7 in Appendix § 10.§ 2 summarizes their time average over training. Table 5 in Appendix § 10.§ 2 reports final sampled ever-success: the fraction of evaluation episodes in which the policy completes the task at least once.
Figure 4. Manipulation evaluation returns, mean ± SD across three training seeds. Dashed segments connect an illustrative origin to the first evaluation.
| Task | SAC | SAC-Flow | DIME | DEFlow |
| PickCube | 64.7 ± 56.0 | 5.0 ± 8.7 | 93.0 ± 9.5 | 87.3 ± 8.3 |
| PushCube | 97.0 ± 3.6 | 97.3 ± 3.1 | 99.0 ± 1.7 | 98.7 ± 1.2 |
| ButtonPressWall | 0.0 ± 0.0 | 0.0 ± 0.0 | 3.7 ± 2.1 | 8.7 ± 14.2 |
| PegInsertSide | 72.3 ± 9.8 | 0.0 ± 0.0 | 23.7 ± 41.0 | 39.3 ± 21.5 |
| PushWall | 0.0 ± 0.0 | 10.3 ± 17.9 | 1.0 ± 1.7 | 0.3 ± 0.6 |
| Sum | 234.0 | 112.7 | 220.3 | 234.3 |
Table 5. Final sampled ever-success (%) at 500k steps, mean ± SD across three training seeds. Bold and underlined values mark the top two means.
| Environment | SAC | SAC-Flow | DIME | DEFlow |
| MS PickCube | 25.1 ± 5.9 | 19.0 ± 1.5 | 29.1 ± 3.0 | 33.5 ± 0.5 |
| MS PushCube | 38.4 ± 0.7 | 37.3 ± 1.2 | 37.3 ± 1.5 | 40.8 ± 0.2 |
| MW ButtonPressWall | 641.6 ± 91.1 | 47.2 ± 55.6 | 696.7 ± 30.1 | 755.7 ± 24.9 |
| MW PegInsertSide | 699.1 ± 209.1 | 2.5 ± 0.0 | 298.2 ± 237.4 | 564.3 ± 158.7 |
| MW PushWall | 61.2 ± 39.3 | 28.1 ± 38.5 | 23.4 ± 19.4 | 217.8 ± 334.9 |
| Sum | 1465.4 | 134.0 | 1084.9 | 1612.2 |
Table 7. Time-averaged return over 50k–500k steps, mean ± SD across three seeds. Bold and underlined values mark the top two means.
DEFlow’s main advantage is early learning under the evaluated training recipes. It achieves the highest mean time-averaged return on four of the five tasks. On PickCube, the advantage also appears in task completion: DEFlow reaches higher sampled success at the intermediate checkpoints, before DIME catches up later in training. On PushCube, DEFlow attains high return by the first evaluation and maintains it through the rest of training. The return curves and early success evaluations thus capture gains that a final-checkpoint comparison alone would miss. At the final checkpoint, DIME has the highest sampled-success means on the cube tasks, while SAC leads on PegInsertSide.
Ablation Studies
Implicit vs. explicit flow. To test the role of implicit integration during policy learning, we replace DEFlow’s implicit-Euler updates with explicit Euler while retaining the actor architecture, four integration steps, discrete density objective, and training settings. Both policies are trained independently on the docking tasks. DEFlow achieves higher successful coverage on loose docking (Table 1), and tight docking exposes a further limitation of the explicit variant: it either concentrates on a preferred goal or fails numerically (details in Appendix § 10.§ 4). This comparison strongly supports implicit integration for learning diverse successful behavior under a narrow action tolerance.
| Navigation | Docking | SAC | SAC-Flow | DIME | QSM | Explicit flow | DEFlow |
| Wide | Loose | 0.397 ± 0.127 | 0.522 ± 0.224 | 0.634 ± 0.021 | 0.000 ± 0.000 | 0.507 ± 0.030 | 0.671 ± 0.002 |
| Narrow | Loose | 0.376 ± 0.019 | 0.613 ± 0.032 | 0.632 ± 0.012 | 0.000 ± 0.000 | 0.499 ± 0.100 | 0.661 ± 0.020 |
| Wide | Tight | 0.428 ± 0.105 | 0.481 ± 0.067 | 0.502 ± 0.011 | 0.000 ± 0.000 | 0.412 ± 0.084 | 0.589 ± 0.128 |
| Narrow | Tight | 0.467 ± 0.074 | 0.451 ± 0.084 | 0.491 ± 0.009 | 0.000 ± 0.000 | 0.417 ± 0.153 | 0.552 ± 0.113 |
Table 1. Successful coverage (U4) at 200k transitions: mean ± SD over completed seeds, 1,000 episodes per seed. Bold/underline mark the top two means.
Integrator step-count ablation. On the MultiGoal variant with wide goal regions and tight docking, we freeze two policies trained with and change only the number of docking integration steps. Each policy keeps its own integrator and uses the same states and Gaussian inputs across step counts. At the training depth , the explicit policy achieves only 50.1% balanced docking accuracy on a shared bank of reachable states, with near-zero accuracy for two of the four goals, while DEFlow achieves 94.1%. Even on each policy’s own visited states, changing only the docking integration depth from to reduces explicit success from 99.8% to 0.7%, versus 96.5% to 53.7% for DEFlow, and increasing also degrades the explicit policy. For this pair, DEFlow is more robust to changes in step count (Figure 8 and Figure 9).
Figure 8. Docking actions on shared states as varies. Top: explicit; bottom: DEFlow. Hit averages equally over goals.
Figure 9. Docking actions on each policy’s own trajectories. Hit uses observed goal frequencies; gray targets were not visited.
Limitations and Costs
Training time. In our measured runs, DEFlow had roughly 40% lower effective training throughput than SAC-Flow and took about three times as long as SAC. Its wall-clock cost was of the same order as DIME’s. These comparisons are approximate and depend on workload and shared hardware. Each implicit actor update requires a nonlinear forward solve and a dense linear backward solve.
Exactness is tolerance-limited in training. Equation (13) is exact for a solution of the implicit equations under the assumptions in Appendix § 8.§ 3. The implementation uses finite solver tolerances and numerical modifications (Appendix § 10.§ 1). The trained-policy audit in Appendix § 10.§ 1 measures the resulting discrepancies at final manipulation checkpoints. The audit finds numerical inaccuracy, especially in PushWall actor gradients. Tightening the solver at evaluation reduces these errors, while sampled task success changes little. We use the original solver settings for benchmark evaluations to avoid the extra cost of tighter solves.
Conclusion
We introduced DEFlow, a deep-equilibrium formulation of flow policies for maximum-entropy reinforcement learning. By combining implicit sampling, tractable density evaluation, and implicit differentiation, DEFlow provides an alternative to explicit flow actors. Our experiments highlight its potential for expressive control and the remaining trade-offs in numerical accuracy and computational cost.
Additional Derivations
Finite-Step Analysis
This appendix records the assumptions and proof details behind the claims in § 3. We use integration steps on with and . We fix a state and suppress it from the notation. The actions are unsquashed, the base variable is shared when two rollouts are compared, and the field is the ideal independent-interpolation field. These results isolate the numerical effects of finite-step integration on analytically specified vector fields.
A smooth multimodal target can require a fine grid
Consider
where , , and are standard Gaussians. The variables are mutually independent. Small-width limits keep fixed. The terminal target is . Writing , conditional Gaussian regression gives
The denominator is bounded away from zero, so this field is globally well posed. Its derivative is
For , evaluating at and yields
Thus the exact field remains regular for every fixed , while the near-identity requirement for a discrete step becomes increasingly demanding as the target narrows.
For completeness, let and . If , the triangle and reverse-triangle inequalities give
When for all , multiplication of singular-value bounds gives
The same calculation for an implicit step produces the inverse factor , which is why the two discretizations can have different conditioning on the same field.
Sampling error. For the explicit Euler discretization of (19), define as the law after steps. The linear part of the update contracts the outward fluctuation. An induction gives
Convexity of implies
Now use the 1-Lipschitz function . The envelope gives , while the target satisfies . For any coupling of the numerical and target variables, the reverse triangle inequality in therefore gives
Substitution of (25) proves
At one step, , so and . At two steps, direct substitution gives
As , this converges in to , whereas the target converges to the two-point law on . The limiting Wasserstein error is consequently
This establishes intermodal shape distortion without invoking a singular explicit update.
A fixed budget can distort the policy gradient
The gradient statement in § 3 uses the centered Gaussian subfamily , with , and the terminal loss . The exact flow gives and . For , direct substitution of into the explicit update yields
Hence . Setting , the factors are nondecreasing and their logarithmic derivatives give
Since the exact derivative is , this is the claimed bound on the relative gradient. The statement is deliberately limited to this terminal loss and parameterization; it identifies a possible rollout-sensitivity mechanism rather than characterizing the full SAC actor gradient.
Why architectural stabilization alone is insufficient
Two short counterexamples clarify the scope of the preceding results. First, clipping an optimizer step bounds , but does not bound , the smallest singular value of a step map, or the sampling error. For , explicit Euler gives
The continuous flow is well posed, while makes one step singular and amplifies its sensitivity. A clipped update can be zero at a parameter-space minimizer, so clipping does not exclude this field.
Second, a bounded gated field can keep every Euler state in a bounded range while its gate derivative makes the step Jacobian singular or arbitrarily ill-conditioned. Normalized features and a bounded output head do not remove this possibility. These examples show why the method must expose and control the discrete step structure; they do not imply that the trained actor always enters the counterexample regime.
Implicit Differentiation
We derive the backward pass in § 4.1 following Bai et al. [1]. Fix and let solve Eq. (9). Assume that the velocity field has continuous first and second derivatives in and that each matrix is invertible at this solution, where .
Differentiating the fixed-point equation gives
All derivatives are evaluated at . From Eq. (8), block depends only on actions . The blocks of are therefore
Thus is block lower triangular and invertible under the stated assumptions. The implicit function theorem then gives a locally differentiable solution as varies.
For a differentiable sample loss , the chain rule gives
Solving recovers Eq. (10). This avoids forming either or the full derivative . The direct term includes the dependence of the log-density and Jacobian penalty on with the actions held fixed. Their derivatives involve second derivatives of the velocity field.
To apply this calculation to the expected actor loss, we assume that, for almost every , the selected solution remains differentiable throughout a common neighborhood of the current parameters. We also assume that the sample-loss derivatives in this neighborhood are bounded by a function of with finite expectation. Holding the replay distribution fixed, these conditions allow differentiation under the expectation and justify the minibatch gradient in Algorithm 1. Numerical evaluation of this gradient is described in Appendix C.1.
Action Log-Density
We justify the change-of-variables calculation in § 4.2. Fix a state . Assume that a measurable, deterministic rule selects an implicit trajectory for almost every . On open regions covering these samples up to a set of probability zero, assume that the selected trajectory is continuously differentiable in and that every is invertible.
The log form of the change-of-variables identity in Eq. (11) is
An implicit Euler step has the explicit inverse relation
Consequently, the endpoint determines every preceding action and the base sample: . Two different base samples cannot produce the same selected endpoint. The selected map is therefore one-to-one, even if the step equations admit other solutions. The pre-squash density is defined on the image of this selected map and is zero outside it.
Since , differentiating the inverse map gives
Composing the step maps and applying the log form of change of variables gives
Here, denotes the density before squashing. The final transformation is one-to-one for , with Jacobian determinant . Dividing by this determinant and taking logarithms gives the final-action log-density:
This is Eq. (13), including the action-bound correction used in SAC [8]. This identity concerns an exact solution of the implicit equations. Appendix § 10.§ 1 specifies how it is evaluated at finite solver tolerance.
Implementation Details
Architecture
DEFlow uses the gated velocity field of SAC-Flow (Zhang et al., 2025). Its inputs are the observation, intermediate action, and time embedding. The time embedding maps 32 sinusoidal features through two layers of widths 64 and 32. A shared projection with SiLU and layer normalization feeds separate gate and candidate heads. Each head has one hidden layer and outputs an action-dimensional vector. The gate is sigmoid, and the candidate is a scaled tanh as in Eq. (6). The velocity width is 256, the candidate scale is 4, and the gate output bias is initialized to 1. Actions start from standard Gaussian noise and use four implicit-Euler steps before the final tanh and action-bound scaling.
Jacobian regularization. Motivated by Jacobian regularization for DEQ models [2], we penalize the individual velocity Jacobians:
and minimize . We use and increase from zero to 0.01 over the first 100,000 environment steps.
Temperature updates. In the regularized DEFlow recipe, we update from the actor log-densities. The target is an exponential moving average of negative log-density (weight 0.01) minus 0.7, with floor . The update winsorizes log-densities at the minibatch 5th and 95th percentiles, leaks toward with weight 0.01, and enforces . We also tested fixed-temperature variants, which sometimes reached comparable return but did not provide stable adaptive temperature behavior.
Implementation Details
Algorithm 1 summarizes the SAC updates with DEFlow’s implicit actor. Table 2 gives one reference configuration for the matched-critic MuJoCo comparison. All methods use twin ReLU critics in this comparison. We retain each baseline’s policy class and actor objective: SAC has a squashed Gaussian density [8], SAC-Flow uses its noisy explicit rollout and joint-path entropy term (Zhang et al., 2025), DIME uses its diffusion entropy bound [3], and QSM matches its score to the critic action gradient without a policy log-density [13]. We implement each baseline’s actor and objective in a common training pipeline. Matching critic capacity is necessary to assess actor performance without confounding it with differences in the critic.
| Method | Actor steps | Policy objective or density |
| SAC | — | Gaussian log-density |
| SAC-Flow | 4 | Joint-path entropy |
| DIME | 16 | Diffusion entropy bound |
| QSM | 5 | Q-score matching (no log-density) |
| DEFlow | 4 | Discrete change-of-variables density |
| Shared | twin critics; batch 512; replay ; warm-up 50k; UTD 1. | |
| ; ; actor/critic learning rates . |
Table 2. Reference matched-critic MuJoCo configuration. Method rows retain actor-specific sampling and objectives; full run settings are in the repository.
Benchmark Protocol
The benchmarks comprise MultiGoal-4 [6], five MuJoCo locomotion tasks (Hopper-v4, Walker2d-v4, HalfCheetah-v4, Ant-v4, Humanoid-v4) (Todorov et al., 2012), two Man-
Algorithm 1 DEFlow
Require: Initial policy parameters , critic parameters , minibatch size , target averaging rate .
1: Initialize target parameters for and replay buffer . 2: Reset the environment and observe the initial state . 3: for each iteration do 4: for each environment step do 5: Draw and compute . 6: Execute and observe reward , next state , and termination indicator . 7: Store in . 8: Set , or reset the environment if the episode has ended. 9: end for 10: for each gradient step do 11: Draw a minibatch from . 12: Draw and compute for each . 13: Evaluate using Eq. (13). 14: Compute targets using Eq. (14), with when . 15: Update by minimizing the minibatch critic loss in Eq. (15), holding fixed. 16: if a policy update is due then 17: Draw fresh and compute for each . 18: Evaluate using Eq. (13). 19: Form each sample loss using Eq. (16) and the -weighted penalty in Eq. (40). 20: Solve the adjoint systems in Eq. (10) to compute . 21: Update using . 22: Update . 23: end if 24: Update target parameters for . 25: end for 26: end for
iSkill tasks (PickCube-v1 and PushCube-v1) (Tao et al., 2025), and three MetaWorld tasks (ButtonPressWall, PegInsertSide, PushWall) (Yu et al., 2020). All methods use the same task wrapper and checkpoint schedule within each comparison. MuJoCo and manipulation runs use budgets of 1M and 500k recorded steps, respectively. Manipulation wrappers set task-specific rewards, resets, horizons, and termination rules; their exact settings are provided in the repository’s run configurations.
MuJoCo returns use the recorded evaluation at 1M steps, curves use evaluations every 25k steps. Manipulation returns are evaluated from 50k to 500k steps and averaged over the recorded checkpoints for the time-averaged-return table. We report means and sample standard deviations across three training seeds per task and method. For deterministic DEFlow evaluation, the base sample is , QSM retains stochastic denoising even in its evaluation channel. Final manipulation ever-success is the fraction of sampled episodes in which the task succeeds at least once, measured over 100 episodes per trained policy. These evaluation episodes are not additional training seeds. The exact selected runs and evaluation scripts are linked from the repository’s result manifests.
Fixed-Flow Robot Illustration
Figure 1 isolates discretization in a fixed scalar contraction, , on , initialized with . We compare explicit Euler with a jointly solved implicit-Euler trajectory at and apply to the terminal sample. The implicit solver uses damped Newton with zero initialization, an 80-iteration cap, and normalized local and cumulative fixed-point residual tolerances of and , respectively, in double precision. This diagnostic has no learned velocity field, critic, or policy training; the learned DEFlow policies in § 4 use Anderson acceleration.
The simulator is a custom one-decision Panda waypoint-reaching task in ManiSkill 3. The scalar command specifies a displacement of 0.12u metres along the task axis from the calibrated end-effector anchor. The target uses , the continuous-flow image of after squashing. Each waypoint is held for 40 Cartesian position-control steps at 20 Hz, with the gripper fixed and no early success termination. Success is the final three-dimensional end-effector distance to the target being less than 8 mm; it is not an ever-success metric. The plot shows axial and lateral projections, while its success labels use all three coordinates.
Each method and step count uses 640 trials: 128 trials for each of seeds 0, 1, 2, 3, 4. Simulator states and Gaussian base samples are shared across methods and step counts. The figure reuses recorded endpoints from the descriptive step-count sweep and is not an independent replication. The comparison holds the number of integration steps fixed, without matching field evaluations or wall-clock time. It supports a discretization comparison for this contraction task, without establishing computational efficiency, multimodal sampling accuracy, or performance of a trained policy.
Additional Results
Numerical Verification
DEFlow solves the joint trajectory with Anderson acceleration (Walker & Ni, 2011). The solver stops when the minibatch mean relative residual meets its configured tolerance or the iteration limit is reached, returning the last iterate in either case. Actor updates re-evaluate the field at that iterate and use a dense adjoint solve rather than differentiating through solver iterations. The adjoint and log-determinant matrices receive a shift, and log-determinants are clipped to . Some training recipes also clip actor log-densities to . The reference MuJoCo configuration uses a forward tolerance.
We test how the forward solver affects trained DEFlow policies by comparing each final manipulation policy under two settings: the original Anderson solver with a 25-iteration limit and tolerance, and a tighter solver with a 100-iteration limit and tolerance. Table 3 compares actions, safeguarded log-density readouts, and actor gradients with an independently solved implicit reference; the median and P95 pool matched inputs within each task. Three PushWall inputs without a validated reference are excluded from these discrepancies. Table 4 reports stochastic ever-success on paired environment episodes as the mean sample standard deviation over three training seeds. Both settings use the same 100 evaluation episodes per checkpoint, and the change is Tighter minus Original in percentage points.
| Task | Discrepancy | Original Median | Original P95 | Tighter Median | Tighter P95 |
| PickCube | Action | ||||
| PickCube | Log-density (nat) | ||||
| PickCube | Gradient (%) | 0.00330 | 0.771 | 0.000143 | 0.000980 |
| PushCube | Action | ||||
| PushCube | Log-density (nat) | ||||
| PushCube | Gradient (%) | 0.000930 | 0.00465 | 0.000229 | 0.000642 |
| ButtonPressWall | Action | ||||
| ButtonPressWall | Log-density (nat) | ||||
| ButtonPressWall | Gradient (%) | 0.000630 | 0.00836 | 0.000420 | 0.00178 |
| PegInsertSide | Action | ||||
| PegInsertSide | Log-density (nat) | ||||
| PegInsertSide | Gradient (%) | 0.000523 | 0.00435 | 0.000153 | 0.000390 |
| PushWall | Action | 0.00299 | 0.0375 | 0.000479 | 0.0211 |
| PushWall | Log-density (nat) | 0.0108 | 0.299 | 0.00122 | 0.197 |
| PushWall | Gradient (%) | 13.7 | 96.1 | 2.84 | 50.3 |
Table 3. Numerical discrepancies on trained policies.
| Task | Original | Tighter | Change (pp) |
| PickCube | |||
| PushCube | |||
| ButtonPressWall | |||
| PegInsertSide | |||
| PushWall |
Table 4. Final sampled success under each solver.
The tighter settings reduce the median and P95 discrepancies for every task and quantity in Table 3. Final sampled success changes little on the paired episodes in Table 4. This means that a more accurate solver at evaluation does not improve task success overall. For the iteration limit, the fraction of evaluation calls that reach it averages 47.2% with Original and 13.1% with Tighter across checkpoints. These results measure the sensitivity of final policies to the tested solver change, while errors during learning and the likelihood of the finite-iteration sampler remain open. Original is reevaluated in the same runtime as Tighter and can differ from the earlier benchmark evaluation.
Extended Benchmark Results
Figure 6. MuJoCo continuous-control environments used in our experiments.
Figure 7. Manipulation tasks from ManiSkill (first two) and MetaWorld (last three). ManiSkill images are from the official task demonstrations.
Table 6 reports MuJoCo return at the recorded 1M evaluation. Table 7 reports time-averaged manipulation return over 50k–500k steps. Table 8 reports the last-100k mean, return AUC, and return at 950k for the MuJoCo benchmark. Table 9 reports return at 500k, return AUC over 50k–500k steps, and sampled ever-success for the manipulation benchmark.
| Environment | SAC | SAC-Flow | DIME | QSM | DEFlow |
| Last 100k mean | |||||
| Hopper | |||||
| Walker2d | |||||
| HalfCheetah | |||||
| Ant | |||||
| Humanoid | |||||
| Return AUC | |||||
| Hopper | |||||
| Walker2d | |||||
| HalfCheetah | |||||
| Ant | |||||
| Humanoid | |||||
| Return at 950k | |||||
| Hopper | |||||
| Walker2d | |||||
| HalfCheetah | |||||
| Ant | |||||
| Humanoid |
Table 8. Sensitivity analysis: mean 95% confidence-interval half-width across three training seeds per cell. Return AUC is the time-averaged return over 25k–1M steps.
| Environment | SAC | SAC-Flow | DIME | DEFlow |
| Return at 500k | ||||
| PickCube | ||||
| PushCube | ||||
| ButtonPressWall | ||||
| PegInsertSide | ||||
| PushWall | ||||
| Return AUC | ||||
| PickCube | ||||
| PushCube | ||||
| ButtonPressWall | ||||
| PegInsertSide | ||||
| PushWall | ||||
| Sampled ever-success (%) | ||||
| PickCube | ||||
| PushCube | ||||
| ButtonPressWall | ||||
| PegInsertSide | ||||
| PushWall |
Table 9. Manipulation benchmark results, mean 95% confidence-interval half-width across three training seeds per cell. Return AUC is the time-averaged return over 50k–500k steps.
Ablation Studies
Integrator step-count ablation. Both figures use the wide-goal, tight-docking MultiGoal variant and two frozen policies, each keeping its training integrator (explicit Euler, implicit DEFlow), both trained at (seed 3, 200005 transitions). We vary only the docking step count , keeping navigation and all inputs fixed; this is the only seed with both final checkpoints, since explicit seeds 1 and 2 failed numerically. Figure 8 evaluates both policies on the same 104 reached states with 16 Gaussian inputs each (1664 actions), using balanced [email protected], the per-goal hit rates averaged with equal weights. Figure 9 follows 1000 new stochastic episodes per policy and recomputes only the docking action from each recorded state, Gaussian base sample, and full batch; replaying at reproduces the recorded actions bit-for-bit and matches every recorded episode success. Its Hit is the fraction of the 1000 docking actions within 0.06 of the reached goal’s target, so frequent routes dominate.
On the shared states, DEFlow stays high for (94.1%, 96.5%, 95.1%; 54.9% at ), while the explicit policy reaches 50.1% at its training depth, accurate on only two goals and near zero on the other two, and degrades at smaller and larger step counts (1.4%, 35.1%, 15.1% at ). On its own trajectories, explicit succeeds on 99.8% of episodes at because they visit almost only those two goals, then drops to 0.7% at and 59.1%/28.2% at T = 2. In this pair, DEFlow’s docking is nearly insensitive to the tested step counts, whereas the explicit policy’s accuracy is route-selective and strongly step-dependent (paired illustration, one seed, each policy with its own integrator).
Docking Failure Diagnostics
Explicit flow. The docking audit illustrates the step-map conditioning effect identified in § 3. In the notation of Eq. (4), the explicit-step Jacobian is . Three original explicit-flow runs terminated after detecting non-finite TD targets. At a frozen checkpoint from one of these runs, changes sign between two sampled latent inputs. A float64 probe locates a singularity of this diagonally regularized matrix between them. At the same local , the algebraic implicit counterpart has minimum singular value 1.226. The checkpoint thus exhibits the singular explicit-step regime illustrated by the linear contraction in Appendix § 8.§ 1.
QSM. QSM’s zero docking success is not a failure to reach the goal: 1,374 of 3,000 episodes across three seeds reached the docking state, yet none docked. The failure lies in action generation. At a frozen checkpoint, ideal goal-center observations produced action-box corners in 2,045 of 2,048 samples. An exact replay of the five denoising steps shows that the final learned correction has median magnitude 16.0–21.6 in a box of , pushing both coordinates outside the box in 99.4–100% of samples, so clipping maps the action to a corner. All values are finite and the final step adds no fresh noise. Why the correction is learned so large remains unresolved.
AI Assistance
We used AI tools to assist with writing and polishing the manuscript, to support literature retrieval and discovery of related work, and to draft sections of the paper. The authors reviewed and revised the resulting text and take full responsibility for the final manuscript.
References
- [1]Shaojie Bai, J. Zico Kolter, and Vladlen Koltun. Deep equilibrium models. In Advances in Neural Information Processing Systems, 2019. doi: 10.48550/arXiv.1909.01377. URL https://arxiv.org/abs/1909.01377.
- [2]Shaojie Bai, Vladlen Koltun, and J. Zico Kolter. Stabilizing equilibrium models by jacobian regularization. In Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pp. 554–565. PMLR, 2021. URL https://proceedings.mlr.press/v139/bai21b.html.arxiv.org/abs/2106.14342
- [3]Onur Celik, Zechu Li, Denis Blessing, Ge Li, Daniel Palenicek, Jan Peters, Georgia Chylatzaki, and Gerhard Neumann. DIME: Diffusion-based maximum entropy reinforcement learning. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pp. 6958–6977. PMLR, 2025. URL https://proceedings.mlr.press/v267/celik25a.html.
- [4]Zihan Ding and Chi Jin. Consistency models as a rich and efficient policy class for reinforcement learning. In International Conference on Learning Representations, 2024. doi: 10.48550/arXiv.2309.16984. URL https://arxiv.org/abs/2309.16984.
- [5]Alan Edelman, Ekin Akyürek, and Yuyang Wang. Backpropagation through back substitution with a backslash. SIAM Journal on Matrix Analysis and Applications, 45(1):429–449, 2024. doi: 10.1137/22M1532871. URL https://doi.org/10.1137/22M1532871.
- [6]Tuomas Haarnoja, Haoran Tang, Pieter Abbeel, and Sergey Levine. Reinforcement learning with deep energy-based policies. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 1352–1361. PMLR, 2017. URL https://proceedings.mlr.press/v70/haarnoja17a.html.arxiv.org/abs/1702.08165
- [7]Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 1861–1870. PMLR, 2018a. URL https://proceedings.mlr.press/v80/haarnoja18b.html.arxiv.org/abs/1801.01290
- [8]Tuomas Haarnoja, Aurick Zhou, Kristian Hartikainen, George Tucker, Sehoon Ha, Jie Tan, Vikash Kumar, Henry Zhu, Abhishek Gupta, Pieter Abbeel, and Sergey Levine. Soft actor-critic algorithms and applications, 2018b. URL https://arxiv.org/abs/1812.05905.
- [9]Ernst Hairer and Gerhard Wanner. Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems, volume 14 of Springer Series in Computational Mathematics. Springer, Berlin, Heidelberg, 2 edition, 1996. doi: 10.1007/978-3-642-05221-7.
- [10]Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu, Maximilian Nickel, and Matt Le. Flow matching for generative modeling. In International Conference on Learning Representations, 2023. URL https://arxiv.org/abs/2210.02747.
- [11]George Papamakarios, Eric Nalisnick, Danilo Jimenez Rezende, Shakir Mohamed, and Balaji Lakshminarayanan. Normalizing flows for probabilistic modeling and inference. Journal of Machine Learning Research, 22(57):1–64, 2021.
- [12]Seohong Park, Qiyang Li, and Sergey Levine. Flow q-learning. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pp. 48104–48127. PMLR, 2025. URL https://proceedings.mlr.press/v267/park25f.html.arxiv.org/abs/2502.02538
- [13]Michael Psenka, Alejandro Escontrela, Pieter Abbeel, and Yi Ma. Learning a diffusion model policy from rewards via q-score matching. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 41163–41182. PMLR, 2024. URL https://proceedings.mlr.press/v235/psenka24a.html.arxiv.org/abs/2312.11752
- [14]Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. In Proceedings of the 32nd International Conference on Machine Learning (ICML), volume 37 of PMLR, pp. 1530–1538, 2015.arxiv.org/abs/1505.05770








