DDPG and TD3 address continuous actions by learning a deterministic policy that amortizes the operation. But deterministic policies have a fundamental limitation: they require external exploration noise (Gaussian perturbations in TD3) and can converge to suboptimal deterministic behaviors without adequate coverage of the state-action space.
Gradient estimators make stochastic actors trainable, while regularized dynamic programming specifies the stochastic policy they should approach. Can these pieces avoid both the continuous-action integral in the soft Bellman equation and the repeated optimization of a hard maximum?
The smoothing chapter presents an alternative: entropy-regularized MDPs, where the agent maximizes expected return plus a bonus for policy randomness. This yields stochastic policies with exploration built into the objective itself. The smooth Bellman operator replaces the hard max with a soft-max:
where is the inverse temperature and is the entropy regularization weight. For finite action spaces, this log-sum-exp is easy to compute. But for continuous actions , the sum becomes an integral:
This integral is intractable. We face an infinite-dimensional sum over the continuous action space. The very smoothness that gives us stochastic policies creates a new computational barrier, distinct from but analogous to the problem in standard FQI.
From Intractable Integral to Tractable Expectation¶
How can the continuous-action log-partition integral be rewritten as an expectation under the policy being learned?
Soft actor-critic (SAC) Haarnoja et al., 2018Haarnoja et al., 2018 exploits an equivalence between the intractable integral and an expectation. The optimal policy under entropy regularization is the Boltzmann distribution . Under this policy, the soft value function becomes:
This converts the intractable integral into an expectation we can estimate by sampling. SAC learns a parametric policy that approximates the Boltzmann distribution, enabling fast action selection via a single forward pass. For bootstrap targets, SAC samples and computes:
The minimum over twin Q-networks applies the clipped double-Q trick from TD3. Exploration comes from the policy’s stochasticity rather than external noise.
Learning the Policy: Matching the Boltzmann Distribution¶
Which divergence or equivalent stochastic objective moves the actor toward the Boltzmann distribution induced by the soft Q-function?
The Q-network update assumes a policy that approximates the Boltzmann distribution . Training such a policy presents a problem: the Boltzmann distribution requires the partition function , the very integral we are trying to avoid. SAC sidesteps this by minimizing the KL divergence from the policy to the (unnormalized) Boltzmann distribution:
Since does not depend on , this reduces to:
This pushes probability toward high Q-value actions while the term penalizes concentrating probability mass, maintaining entropy. The entropy bonus comes from the KL divergence structure rather than from an explicit regularization term.
To estimate gradients of this objective, we face a technical problem: the policy parameters appear in the sampling distribution , making difficult to compute. SAC uses a Gaussian policy with the reparameterization trick. Express samples as a deterministic function of parameters and independent noise:
This moves out of the sampling distribution and into the integrand:
We can now differentiate through and the Q-network, as DDPG differentiates through a deterministic policy. SAC extends this by sampling noise at each gradient step rather than outputting a single deterministic action.
The algorithm interleaves three updates. The Q-networks (lines 7-10) follow fitted Q-iteration with the soft Bellman target: sample a next action from the current policy, compute the entropy-adjusted target , and minimize squared error. The minimum over twin Q-networks mitigates overestimation as in TD3. The policy (lines 12-13) updates to match the Boltzmann distribution induced by the current Q-function, using the reparameterization trick for gradient estimation. Target networks update via EMA (lines 15-16) to stabilize training.
The stochastic policy serves the same amortization purpose as in DDPG and TD3: it replaces the intractable operation with a fast network forward pass. SAC’s entropy regularization produces exploration through the policy’s inherent stochasticity rather than external noise. This makes SAC more robust to hyperparameters and eliminates the need to tune exploration schedules.
Path Consistency Learning (PCL)¶
Can a soft-optimal policy be trained by enforcing multi-step consistency directly rather than constructing one-step Bellman targets?
DDPG, TD3, and SAC all follow the same solution template from fitted Q-iteration: compute Bellman targets using the current Q-function, fit the Q-function to those targets, repeat. This is successive approximation, the function iteration approach from the projection methods chapter.
Path Consistency Learning (PCL) Nachum et al., 2017 solves the Bellman equation differently. Instead of iterating the operator, it directly minimizes a residual. This is the least-squares approach from projection methods: solve by minimizing . The method exploits special structure (smooth Bellman operators under deterministic dynamics) that conventional methods cannot leverage.
The Path Consistency Property¶
Consider the entropy-regularized Q-function Bellman equation from the smoothing chapter. Under general stochastic dynamics, it involves an expectation over next states:
Suppose the dynamics are deterministic: . The next state is uniquely determined, so the expectation disappears:
The value function relates to Q-functions through the soft-max:
Contrast two cases: general policies versus the optimal Boltzmann policy.
For general policies, the value equals an expectation:
This is an average. For a single observed action , we have:
where is sampling error with . Individual actions give noisy estimates that fluctuate around the mean.
For the optimal policy under entropy regularization, the Boltzmann structure produces an exact pointwise identity. The optimal policy is:
Taking logarithms and rearranging:
This holds exactly for every action , not just in expectation. There is no sampling error. The advantage is encoded in the log-probability: suboptimal actions have low but also large (low probability means large negative log-probability), and these terms balance exactly to give .
Now take a trajectory segment where each transition follows the deterministic dynamics . Start with and use equation (15) to substitute exactly:
Substitute :
Continue this telescoping for steps. Each substitution is exact:
Apply equation (15) once more to get :
Rearranging gives the path consistency residual:
The telescoping produces an exact identity: for every action sequence, not just in expectation. The behavior policy never appears because the constraint holds as a deterministic identity for any observed . This enables off-policy learning without importance sampling.
Remark 1 (Contrasting General Policies and Optimal Boltzmann Policies)
The distinction between equations (12) and (15) is subtle but crucial.
For general policies (equation (12)), the value is an average over actions sampled from the policy. Individual actions give noisy estimates: if we draw , then where is a zero-mean random variable. We need to average many samples to estimate accurately. Multi-step telescoping would accumulate these sampling errors , producing noisy residuals even at the true solution. Off-policy learning would require importance weights to correct for using actions from a different behavior policy.
For the optimal entropy-regularized policy (equation (15)), the Boltzmann structure collapses the expectation to a pointwise identity. The relationship holds exactly for every action , optimal or not. A suboptimal action has low (low expected return) and low (low probability), making large. These terms balance precisely to give . No sampling error exists. The telescoping is exact, producing a residual that equals zero for every action sequence, not just in expectation. Off-policy learning works because the constraint holds as a deterministic identity for any observed path.
This property is unique to soft-max operators. For hard-max, holds only when is optimal. Suboptimal actions satisfy , an inequality that cannot be used to construct a residual.
Structural Requirements: Deterministic Dynamics and Entropy Regularization¶
PCL’s two structural requirements (deterministic dynamics and entropy regularization) are not arbitrary design choices. Each addresses a fundamental theoretical issue.
Deterministic Dynamics: Avoiding the Double Sampling Problem¶
Under stochastic dynamics, the Q-function Bellman equation has an expectation over next states:
The exact relationship (15) still holds, so we can write the path consistency constraint. But now consider what PCL minimizes: the squared residual where
At the true optimum , the constraint is , which implies . But PCL minimizes , and by Jensen’s inequality:
with equality only when has zero variance. Under stochastic dynamics, even at optimality, individual trajectory residuals are random variables with mean zero but positive variance (due to transition noise). Minimizing to zero would require driving , which is impossible and pushes the solution away from the true optimum.
This is Baird’s double sampling problem Baird, 1995. To get an unbiased gradient of , we need:
This requires two independent samples of the next state from the same pair: one for estimating and one for . With a simulator, this is possible. With real trajectories, it is not.
Under deterministic dynamics, is deterministic (no transition noise), so and Jensen’s inequality holds with equality. Minimizing the squared residual is equivalent to solving .
Entropy Regularization: Enabling All-Action Consistency¶
Attempt the same path consistency derivation with the hard-max Bellman operator. Under deterministic dynamics, the Q-function satisfies:
where and the optimal policy is (deterministic).
Now try to relate to an arbitrary observed action . For the optimal action , we have:
But for a suboptimal action :
This is an inequality, not an equation. There is no formula expressing in terms of for suboptimal actions.
Attempt the multi-step telescoping. Start with . To continue, we need to express using the observed action . But we only have:
with equality only if happens to be optimal at . We cannot substitute this into the Q-function equation to get an exact telescoping. The derivation breaks at the first step.
Compare this to the soft-max case. The Boltzmann structure gives equation (15): for all actions . The log-probability term compensates exactly for suboptimality: low-probability actions have large , which adds to the low to recover . This enables exact substitution at every step:
The telescoping proceeds without inequalities or restrictions on which actions were chosen. Multi-step hard-max Q-learning lacks theoretical justification for off-policy data because when we observe a trajectory with suboptimal actions, we cannot write an exact path consistency constraint.
Both requirements are structural:
| Requirement | Addresses |
|---|---|
| Deterministic dynamics | Double sampling bias: ensures |
| Entropy regularization | All-action consistency (equation (15)) |
Without deterministic dynamics, residual minimization is biased. Without entropy regularization, the constraint holds only for optimal actions.
The Learning Objective¶
Equation (20) provides a constraint that the optimal must satisfy: the residual equals zero for every observed path. For parametric approximations that are not yet optimal, the residual is nonzero:
PCL minimizes the squared residual over observed path segments:
This is the least-squares residual approach from the projection methods chapter. SAC computes targets and fits to them (successive approximation). PCL directly minimizes the residual without computing targets or performing a separate fitting step.
Gradient descent gives:
where . Large residuals drive larger updates.
The algorithm collects trajectories from the current policy and stores them in a replay buffer. At each iteration, it samples a trajectory (possibly old) and performs gradient descent on the path residual for all -step segments. The replay buffer enables off-policy learning: trajectories from old policies, expert demonstrations, or exploratory behavior all provide valid training signals.
Unified Parameterization: Single Q-Network¶
Algorithm 2 uses separate networks for policy and value. But we can use a single Q-network and derive both:
The path residual becomes:
and the gradient combines both value and policy contributions through the same parameters. This unified architecture eliminates the actor-critic separation: one Q-network serves both roles.
Connection to Existing Methods¶
Single-step case (): The path residual becomes . For unified parameterization where exactly, this becomes , the soft Bellman residual. Minimizing is equivalent to soft Q-learning, though SAC solves this via successive approximation (compute targets, fit) rather than direct residual minimization.
No entropy (): The residual becomes , the negative -step advantage. But unlike A2C/A3C where tracks the current policy’s value, PCL’s value converges to because the residual couples policy and value through the optimality condition.
Multi-step with hard-max: No analog exists. The hard-max Bellman operator does not have an exact pointwise relationship like equation (15). Multi-step telescoping would accumulate errors from the max operator, making the constraint valid only in expectation under the optimal policy. The soft-max structure enables exact off-policy path consistency.
PCL vs SAC: Residual Minimization vs Successive Approximation¶
Both methods solve entropy-regularized MDPs but use fundamentally different solution strategies:
| Aspect | SAC | PCL |
|---|---|---|
| Solution method | Successive approximation: compute targets , fit to targets | Residual minimization: minimize directly |
| Update structure | Target computation + regression step | Single gradient step on squared residual |
| Target networks | Required (mark outer-iteration boundaries) | None (residual constraint, not target fitting) |
| Temporal horizon | Single-step TD: | Multi-step paths: accumulate over steps |
| Off-policy handling | Replay buffer with single-sample bias | No importance sampling (works for any trajectory) |
| Dynamics requirement | General stochastic transitions | Deterministic transitions |
| Architecture | Twin Q-networks + policy network | Single Q-network (unified parameterization) |
PCL requires deterministic dynamics. It gains multi-step telescoping and off-policy learning without importance weights, but only for deterministic systems (robotic manipulation, many control tasks). SAC works for general stochastic MDPs.
PCL as Amortization¶
PCL amortizes at a different level than DDPG/TD3/SAC. Those methods amortize the action maximization: learn a policy network that outputs directly. PCL amortizes the solution of the Bellman equation itself. Instead of repeatedly applying the Bellman operator (which requires at every iteration), PCL samples path segments and minimizes their residual. The computational cost of verifying optimality across all states and path lengths is distributed across training through sampled gradient updates.
Model Predictive Path Integral Control¶
How does online trajectory optimization compare with amortizing action selection into a learned policy?
The MPPI development constructs a distribution over finite control sequences by exponentially tilting a reference distribution toward low-cost trajectories. A shifted Gaussian proposal makes these trajectories easier to sample. Importance weights then correct for the change of proposal, and their weighted perturbations update the nominal sequence. The controller applies its first action and shifts the remaining sequence to initialize the next optimization.
This calculation shares an exponential form with the policies derived from entropy regularization, but the distributions and optimization problems require separate definitions. SAC regularizes a state-conditional action policy. The information-theoretic MPPI construction regularizes a distribution over trajectories relative to a specified reference law Williams et al., 2017. In the separate continuous-time path-integral derivation, the reference law is generated by an uncontrolled diffusion, and the quadratic control cost must match its noise covariance. Neither derivation identifies an arbitrary MPPI implementation with SAC or PCL’s soft Bellman solution.
The Gaussian mean update fits the tilted trajectory distribution by minimizing KL divergence from that distribution to the Gaussian family. It need not minimize the original expected-cost objective over Gaussian policies. Its sampled implementation also has discretization and finite-sampling error. The aircraft example also estimates each candidate’s expected cost across possible wind futures. For the matched stochastic-control model, the Brownian passage examples compare sampled feedback with analytic and numerical reference solutions.
Online Optimization and Amortization¶
An actor network distributes computation across training examples and returns an action through a forward pass. MPPI spends model evaluations at the current state, with a warm start from the previous plan. A new cost function can be used in its next optimization, although finite computation and a poor proposal can still prevent a useful update.
The computational comparison separates where effort is spent from the errors that remain:
| Aspect | Learned actor | MPPI |
|---|---|---|
| Action selection | Policy-network evaluation | Repeated batches of model rollouts |
| Reuse across decisions | Trained parameters | Shifted nominal control sequence |
| Model use at deployment | Often unnecessary | A rollout model is required |
| Approximation sources | Policy and value approximation, estimation, optimization | Model error, discretization, restricted proposal, finite sampling |
| Changed objective | Usually requires further training | Enters subsequent rollout costs |
For a deterministic rollout model, one MPPI iteration with sequences and time steps uses transition evaluations. Estimating each sequence’s expected cost across disturbance scenarios increases that count to . These evaluations can be batched across sequences and scenarios, while each trajectory still advances through time. The practical choice depends on model cost, available parallel computation, and the accuracy required at each decision.
An Alternative: Euler Equation Methods¶
Can first-order optimality eliminate the value function and yield a functional equation directly in the policy?
The methods developed in this chapter all parameterize policies, but they remain rooted in the Bellman equation. NFQCA, DDPG, TD3, and SAC learn Q-functions through successive approximation, then derive policies by maximizing these Q-functions. PCL minimizes a path residual derived from the soft Bellman equation. The policy serves as an amortized optimizer for a value-based objective.
There is a different approach, developed in computational economics Judd, 1992Rust, 1996Judd, 1998, that also parameterizes policies but solves an entirely different functional equation. Consider a control problem with continuous states and actions, deterministic dynamics , and differentiable reward . The optimal action satisfies the first-order condition:
This Euler equation expresses optimality through derivatives rather than through the max operator. For problems with special structure (the Euler class, where dynamics are affine in the controlled state), envelope theorems eliminate entirely, yielding a closed functional equation in the policy alone.
With a parameterized policy , we can discretize via collocation or Galerkin projection:
This is root-finding, not fixed-point iteration. Newton-type methods replace the successive approximation of fitted Q-iteration. The Euler operator is not a contraction, so convergence guarantees are problem-dependent.
What does this mean for reinforcement learning? The Euler approach shares the amortization idea: learn a policy network that directly outputs actions. But the training objective comes from first-order optimality conditions rather than from Bellman residuals or Q-function maximization. This raises questions worth considering. Could Euler-style objectives provide useful training signals for actor-critic methods? When dynamics are known or learned, could first-order conditions offer advantages over value-based objectives? The connection between these traditions remains underexplored.
Summary¶
SAC converts the soft value integral into an expectation under a learned stochastic policy. PCL instead minimizes a multi-step consistency residual, and MPPI updates a finite-horizon trajectory distribution at each decision. The Euler approach supplies a further alternative: solve a first-order policy equation rather than a Bellman fixed point.
MPPI avoids a persistent actor approximation by performing online sampling and optimization. Its exponential weights resemble those of entropy-regularized policies, but its reference distribution, horizon, and sampling assumptions define a different optimization problem. Finite computation and model error remain in either approach.
All of these objectives retain an optimality equation derived from a value or path-consistency relation. Can expected return be differentiated directly without first treating a Bellman equation as the training objective? Policy gradients and actor-critic methods use the trajectory score and bring value functions back as variance-reducing critics.
Self-checks¶
Solution to Exercise 1
MPPI spends many model rollouts at every decision and avoids a persistent actor approximation, but retains model, discretization, proposal, and finite-sampling errors. An actor is cheap online but can introduce error because its parameters only approximate the desired decision rule. A warm-started MPPI sequence and a trained actor reuse computation in different ways.
- Haarnoja, T., Zhou, A., Abbeel, P., & Levine, S. (2018). Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. Proceedings of the 35th International Conference on Machine Learning (ICML), 1861–1870.
- Haarnoja, T., Zhou, A., Hartikainen, K., Tucker, G., Ha, S., Tan, J., Kumar, V., Zhu, H., Gupta, A., Abbeel, P., & Levine, S. (2018). Soft actor-critic algorithms and applications. arXiv Preprint arXiv:1812.05905.
- Nachum, O., Norouzi, M., Xu, K., & Schuurmans, D. (2017). Bridging the Gap Between Value and Policy Based Reinforcement Learning. Advances in Neural Information Processing Systems, 30, 2775–2785.
- Baird, L. (1995). Residual algorithms: Reinforcement learning with function approximation. Proceedings of the Twelfth International Conference on Machine Learning, 30–37.
- Williams, G., Drews, P., Goldfain, B., Rehg, J. M., & Theodorou, E. A. (2017). Information Theoretic Model Predictive Control: Theory and Applications to Autonomous Driving. 10.48550/arXiv.1707.02342
- Judd, K. L. (1992). Projection methods for solving aggregate growth models. Journal of Economic Theory, 58(2), 410–452.
- Rust, J. (1996). Chapter 14 Numerical dynamic programming in economics. In Handbook of Computational Economics (pp. 619–729). Elsevier. 10.1016/s1574-0021(96)01016-7
- Judd, K. L. (1998). Numerical Methods in Economics. MIT Press.