Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Entropy-Regularized Dynamic Programming

Infinite-horizon dynamic programming selects actions with a hard maximum. That operator is nondifferentiable at ties and produces a deterministic greedy choice. Can a modified control objective produce both a smooth Bellman operator and a stochastic optimal policy? Convex regularization supplies the link.

While the standard Bellman optimality equations use the max operator to determine the best action, an alternative formulation known as the smooth or soft Bellman optimality equations replaces it with a smooth approximation of the maximum. The history of these equations runs across two communities that rarely read each other. They appear in the work of the structural econometrician John Rust on the replacement of bus engines Rust (1987), together with an inverse problem and an algorithm to solve it. Ng & Russell (2000), who are usually credited with introducing inverse reinforcement learning, cite Rust, but the connection was then largely lost. Ziebart et al. (2008) rediscovered the same equations as maximum entropy inverse reinforcement learning, named after the maximum entropy principle. Haarnoja et al. (2017) built on Ziebart to obtain soft Q-learning, and soft actor-critic Haarnoja et al. (2018), one of the most widely used deep RL algorithms for continuous control, followed a year later.

In the infinite-horizon setting, the smooth Bellman optimality equations take the form:

vγ⋆(s)=1βlog⁡∑a∈Asexp⁡(β(r(s,a)+γ∑j∈Sp(j∣s,a)vγ⋆(j)))v_\gamma^\star(s) = \frac{1}{\beta} \log \sum_{a \in A_s} \exp\left(\beta\left(r(s, a) + \gamma \sum_{j \in S} p(j | s, a) v_\gamma^\star(j)\right)\right)

Adopting an operator-theoretic perspective, we can define a nonlinear operator Lβ\mathrm{L}_\beta such that the smooth value function of an MDP is then the solution to the following fixed-point equation:

(Lβv)(s)=1βlog⁡∑a∈Asexp⁡(β(r(s,a)+γ∑j∈Sp(j∣s,a)v(j)))(\mathrm{L}_\beta \mathbf{v})(s) = \frac{1}{\beta} \log \sum_{a \in \mathcal{A}_s} \exp\left(\beta\left(r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j)\right)\right)

As β→∞\beta \to \infty, Lβ\mathrm{L}_\beta converges to the standard Bellman operator L\Bellman. Furthermore, it can be shown that the smooth Bellman operator is a contraction mapping in the supremum norm, and therefore has a unique fixed point. However, as opposed to the usual “hard” setting, the fixed point of Lβ\mathrm{L}_\beta is associated with the value function of an optimal stochastic policy defined by the softmax distribution:

π(a∣s)=exp⁡(β(r(s,a)+γ∑j∈Sp(j∣s,a)vγ⋆(j)))∑a′∈Asexp⁡(β(r(s,a′)+γ∑j∈Sp(j∣s,a′)vγ⋆(j)))\pi(a|s) = \frac{\exp\left(\beta\left(r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v_\gamma^\star(j)\right)\right)}{\sum_{a' \in \mathcal{A}_s} \exp\left(\beta\left(r(s,a') + \gamma \sum_{j \in \mathcal{S}} p(j|s,a') v_\gamma^\star(j)\right)\right)}

Despite the confusing terminology, the above “softmax” policy is the smooth counterpart of the argmax in the original optimality equation, not of the max: it is a soft-argmax. The smooth counterpart of the max is the log-sum-exp. The same policy is also called a Boltzmann or Gibbs policy. As the temperature 1/β1/\beta goes to zero, the softmax concentrates on the maximizing actions and we recover the greedy policy and the hard Bellman equation.

Stochastic Policies: Exploration and the Partition Function

Moving from the argmax to the softmax turns deterministic policies into stochastic ones, which is both useful and costly. It is useful because noise in the actions is a way to explore. In RL the agent usually gathers its own data, and if it always took the action it currently believes best it would never learn about the others. The problem is not specific to RL. An engineer identifying a model of a plant must also choose inputs that reveal the dynamics, and in system identification this is called exciting the system: a persistently exciting input is one rich enough for the parameters to be identifiable from the data.

It is costly when the action set is continuous. The softmax policy is then a density π(a∣s)∝exp⁡(βq(s,a))\pi(a \mid s) \propto \exp(\beta q(s,a)) whose normalizing constant, the partition function ∫exp⁡(βq(s,a)) da\int \exp(\beta q(s,a))\, da, is an integral with no closed form in general. The log-sum-exp value has the same problem, since it is the logarithm of that integral. This is the intractable partition function familiar from energy-based models and probabilistic graphical models. Numerical quadrature is an option in low dimension but is rarely used. Haarnoja et al. (2017) sampled from the softmax policy over continuous actions with amortized Stein variational gradient descent, which proved expensive; soft actor-critic Haarnoja et al. (2018) instead fits a tractable parametric policy to the softmax, an idea we return to in the chapters on fitted value methods and policy learning.

This formulation is interesting for several reasons. First, smoothness is a desirable property from an optimization standpoint. Unlike γ\gamma, we view β\beta as a hyperparameter of our algorithm, which we can control to achieve the desired level of accuracy.

Second, we presented the equations pragmatically, by replacing the max with the log-sum-exp (a smooth maximum) and the argmax with the softmax (a smooth argmax). The same equations come out of two other starting points, and this chapter follows all three routes:

  1. Smoothing the operator. Replace every max by a log-sum-exp, as above. This is the route of the next subsection, and the justification is computational: a smooth operator has gradients everywhere.

  2. Noise on the rewards. Keep the hard Bellman equation, but suppose that each action’s reward is perturbed by independent Gumbel noise that the decision maker sees and the modeler does not. Integrating the noise out gives the log-sum-exp (Gumbel Noise on the Rewards). This is how Rust (1987) motivated the equations, following the discrete choice models of econometrics.

  3. Entropy regularization. Keep the rewards, but add a bonus proportional to the entropy of the policy in every state. The regularized Bellman equation is again the log-sum-exp equation (Regularized Markov Decision Processes). This is the reading behind maximum entropy RL and soft actor-critic.

Each route brings its own tools: smoothness gives differentiability, the noise model gives a likelihood for observed behavior, and the regularization view gives convex duality. A fourth reading, close to the third, starts from the energy-based models of supervised learning, where a softmax turns unnormalized scores into a distribution; this is essentially what Ziebart et al. (2008) did. It connects to probabilistic graphical models, where finding an optimal smooth policy becomes an inference problem. This is the idea of control as inference, whose converse, inference as control, is now used to derive samplers and amortized inference methods with RL Levine et al. (2018).

Smooth Value Iteration Algorithm

Before iterating Lβ\mathrm{L}_\beta, we should check that iterating it is the right thing to do, that is, that it is a contraction. It is, in the sup-norm and with the same factor γ\gamma as the hard Bellman operator. The proof uses the same three facts as for L\Bellman. The log-sum-exp is monotone, it commutes with adding a constant to all of its arguments, and Lβ\mathrm{L}_\beta maps a uniform shift c1c\mathbf{1} of vv into a shift γc1\gamma c\mathbf{1} of Lβv\mathrm{L}_\beta v. From v≤u+∥v−u∥∞1v \le u + \|v-u\|_\infty\mathbf{1} we get Lβv≤Lβu+γ∥v−u∥∞1\mathrm{L}_\beta v \le \mathrm{L}_\beta u + \gamma\|v-u\|_\infty\mathbf{1}, and exchanging uu and vv gives the contraction. A word of caution about the converse: failing to show that an operator is a contraction does not mean that its fixed point fails to exist or that no algorithm finds it. Contraction is a convenient sufficient condition, and other fixed-point theorems cover other cases.

Successive approximation applied to Lβ\mathrm{L}_\beta is smooth value iteration. It has the structure of value iteration, with a log-sum-exp wherever value iteration had a max and a softmax policy at the end where value iteration returned a greedy one.

Differences from standard value iteration:

What the stopping rule guarantees. Because Lβ\mathrm{L}_\beta is a γ\gamma-contraction, the a posteriori bound of the Banach fixed-point theorem applies unchanged, and the stopping test of line 9 guarantees ∥v−vβ⋆∥∞≤ε/2\|v - v^\star_\beta\|_\infty \le \varepsilon/2. The proof that value iteration returns an ε\varepsilon-optimal policy also carries over, with one change of meaning. The softmax policy satisfies Lπ,Ωv=Lβv\mathrm{L}_{\pi,\Omega} v = \mathrm{L}_\beta v for the entropy-regularized evaluation operator of Regularized Bellman Operators, with regularizer Ω(π(⋅∣s))=1β∑aπ(a∣s)log⁡π(a∣s)\Omega(\pi(\cdot|s)) = \frac{1}{\beta}\sum_a \pi(a|s)\log\pi(a|s),, just as a greedy policy satisfies Lπv=Lv\mathrm{L}_\pi v = \Bellman v. Repeating the proof of Proposition 2 with these operators shows that the returned policy is ε\varepsilon-optimal for the entropy-regularized objective. How far is that from optimal for the original rewards? Since max⁡axa≤1βlog⁡∑aeβxa≤max⁡axa+log⁡∣A∣β\max_a x_a \le \frac{1}{\beta}\log\sum_a e^{\beta x_a} \le \max_a x_a + \frac{\log|\mathcal{A}|}{\beta}, where ∣A∣|\mathcal{A}| is the largest number of actions in any state, the two fixed points satisfy

vγ∗  ≤  vβ⋆  ≤  vγ∗+log⁡∣A∣β(1−γ)1,v^*_\gamma \;\le\; v^\star_\beta \;\le\; v^*_\gamma + \frac{\log |\mathcal{A}|}{\beta(1-\gamma)}\mathbf{1},

and the softmax policy returned by the algorithm loses at most ε+log⁡∣A∣β(1−γ)\varepsilon + \frac{\log|\mathcal{A}|}{\beta(1-\gamma)} against the optimal value of the unregularized MDP. The temperature therefore adds a bias that does not shrink with more iterations; it is the price of smoothness and of exploration.

Gumbel Noise on the Rewards

Why does adding independent Gumbel perturbations to action rewards produce a log-sum-exp value before the perturbation is observed?

We can obtain the smooth Bellman equation by considering a setting in which we have Gumbel noise added to the reward function. This derivation provides theoretical insight and also connects to practical modeling scenarios where rewards have random perturbations.

Step 1: Define the Augmented MDP with Gumbel Noise

At each time period and state ss, we draw an action-indexed shock vector:

ϵt(s)=(ϵt(s,a))a∈As,where ϵt(s,a) i.i.d.∼Gumbel(μϵ,1/β)\boldsymbol{\epsilon}_t(s) = \big(\epsilon_t(s,a)\big)_{a \in \mathcal{A}_s}, \quad \text{where } \epsilon_t(s,a) \text{ i.i.d.} \sim \mathrm{Gumbel}(\mu_\epsilon, 1/\beta)

These shocks are independent across time periods, states, and actions, and are independent of the MDP transition dynamics p(⋅∣s,a)p(\cdot | s, a).

The Gumbel distribution with location parameter μ\mu and scale parameter 1/β1/\beta has probability density function:

f(x;μ,β)=βexp⁡(−β(x−μ)−exp⁡(−β(x−μ)))f(x; \mu, \beta) = \beta\exp\left(-\beta(x-\mu)-\exp(-\beta(x-\mu))\right)

To generate a Gumbel-distributed random variable, we can use inverse transform sampling: X=μ−1βln⁡(−ln⁡(U))X = \mu - \frac{1}{\beta} \ln(-\ln(U)) where UU is uniform on (0,1)(0,1).

We now define an augmented MDP with:

The transition factorizes because the next shock vector ϵ′\boldsymbol{\epsilon}' is drawn independently of the current state and action (conditional independence).

Step 2: The Hard Bellman Equation on the Augmented State Space

The Bellman optimality equation for the augmented MDP is:

v~(s,ϵ)=max⁡a∈As{r(s,a)+ϵ(a)+γEs′,ϵ′[v~(s′,ϵ′)∣s,a]}\tilde{v}(s, \boldsymbol{\epsilon}) = \max_{a \in \mathcal{A}_s} \left\{ r(s,a) + \epsilon(a) + \gamma \mathbb{E}_{s', \boldsymbol{\epsilon}'}\left[\tilde{v}(s', \boldsymbol{\epsilon}') \mid s, a\right] \right\}

Here the expectation is over the next augmented state (s′,ϵ′)(s', \boldsymbol{\epsilon}'), which includes both the next state s′∼p(⋅∣s,a)s' \sim p(\cdot | s, a) and the next shock vector ϵ′∼p(⋅)\boldsymbol{\epsilon}' \sim p(\cdot).

This is a perfectly well-defined Bellman equation, and an optimal stationary policy exists:

π(s,ϵ)∈argmax⁡a∈As{r(s,a)+ϵ(a)+γEs′,ϵ′[v~(s′,ϵ′)∣s,a]}\pi(s, \boldsymbol{\epsilon}) \in \operatorname{argmax}_{a \in \mathcal{A}_s} \left\{ r(s,a) + \epsilon(a) + \gamma \mathbb{E}_{s', \boldsymbol{\epsilon}'}\left[\tilde{v}(s', \boldsymbol{\epsilon}') \mid s, a\right] \right\}

However, this equation is computationally intractable because:

We never solve this equation directly. Instead, we use it as a mathematical device to derive the smooth Bellman equation.

Step 3: Define the Ex-Ante (Inclusive) Value Function

The idea here is to consider the expected value before observing the current shocks. We define what some authors in econometrics call the inclusive value or ex-ante value:

v(s):=Eϵ[v~(s,ϵ)]v(s) := \mathbb{E}_{\boldsymbol{\epsilon}}\big[\tilde{v}(s, \boldsymbol{\epsilon})\big]

This is the value of being in state ss before we observe the current-period shock vector ϵ\boldsymbol{\epsilon}.

Step 4: Separate the Deterministic and Random Components

Now we take the expectation of the augmented Bellman equation with respect to the current shocks only (everything that does not depend on the current ϵ\boldsymbol{\epsilon} can be pulled out).

First, note that by the law of iterated expectations and independence of shocks across time:

Eϵ′[v~(s′,ϵ′)]=v(s′)\mathbb{E}_{\boldsymbol{\epsilon}'}\big[\tilde{v}(s', \boldsymbol{\epsilon}')\big] = v(s')

This follows from our definition of vv and the fact that the next shock is independent of everything else.

Now define the deterministic part of the right-hand side:

xa(s):=r(s,a)+γ∑j∈Sp(j∣s,a)v(j)x_a(s) := r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j)

This is the expected return from taking action aa in state ss without the shock. Using this notation, the augmented Bellman equation becomes:

v~(s,ϵ)=max⁡a∈As{xa(s)+ϵ(a)}\tilde{v}(s, \boldsymbol{\epsilon}) = \max_{a \in \mathcal{A}_s} \left\{ x_a(s) + \epsilon(a) \right\}

Taking the expectation over ϵ\boldsymbol{\epsilon} on both sides:

v(s)=Eϵ[max⁡a∈As{xa(s)+ϵ(a)}]v(s) = \mathbb{E}_{\boldsymbol{\epsilon}}\left[\max_{a \in \mathcal{A}_s} \left\{ x_a(s) + \epsilon(a) \right\}\right]

Step 5: Apply the Gumbel Random Utility Identity

We now invoke a result from extreme value theory:

Applying this identity to our problem (with mean-zero shocks):

v(s)=Eϵ[max⁡a∈As{xa(s)+ϵ(a)}]=1βlog⁡∑a∈Asexp⁡(βxa(s))v(s) = \mathbb{E}_{\boldsymbol{\epsilon}}\left[\max_{a \in \mathcal{A}_s} \{x_a(s) + \epsilon(a)\}\right] = \frac{1}{\beta} \log \sum_{a \in \mathcal{A}_s} \exp(\beta x_a(s))

Substituting the definition of xa(s)x_a(s):

v(s)=1βlog⁡∑a∈Asexp⁡(β(r(s,a)+γ∑j∈Sp(j∣s,a)v(j)))v(s) = \frac{1}{\beta} \log \sum_{a \in \mathcal{A}_s} \exp\left(\beta\left(r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j)\right)\right)

We have arrived at the smooth Bellman equation.

Step 6: Summary of the Derivation

To recap the logical flow:

  1. We constructed an augmented MDP with state (s,ϵ)(s, \boldsymbol{\epsilon}) where shocks perturb rewards

  2. We wrote the standard Bellman equation for this augmented MDP (hard max, but over an infinite-dimensional state space)

  3. We defined the ex-ante value v(s)=Eϵ[v~(s,ϵ)]v(s) = \mathbb{E}_{\boldsymbol{\epsilon}}[\tilde{v}(s, \boldsymbol{\epsilon})] to eliminate the continuous shock component

  4. We separated deterministic and random terms: v~(s,ϵ)=max⁡a{xa(s)+ϵ(a)}\tilde{v}(s, \boldsymbol{\epsilon}) = \max_a \{x_a(s) + \epsilon(a)\}

  5. We applied the Gumbel identity to evaluate Eϵ[max⁡a{⋯ }]\mathbb{E}_{\boldsymbol{\epsilon}}[\max_a \{\cdots\}] in closed form as a log-sum-exp

The augmented MDP with shocks exists only as a mathematical device. We never approximate v~\tilde{v}, never discretize ϵ\boldsymbol{\epsilon}, and never enumerate the augmented state space. The only computational object we work with is v(s)v(s) on the original (finite) state space, which satisfies the smooth Bellman equation.

Deriving the Optimal Smooth Policy

Now that we have derived the smooth value function, we can also obtain the corresponding optimal policy. The question is: what policy should we follow in the original MDP (without explicitly conditioning on shocks)?

In the augmented MDP, the optimal policy is deterministic but depends on the shock realization:

π(s,ϵ)∈argmax⁡a∈As{r(s,a)+ϵ(a)+γ∑j∈Sp(j∣s,a)v(j)}\pi(s, \boldsymbol{\epsilon}) \in \operatorname{argmax}_{a \in \mathcal{A}_s} \left\{ r(s,a) + \epsilon(a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j) \right\}

However, we want a policy for the original state space ss (not the augmented state). We obtain this by marginalizing over the current shocks, essentially asking: “what is the probability that action aa is optimal when we average over all possible shock realizations?”

Define an indicator function:

Ia(ϵ)={1if a∈argmax⁡a′∈As{xa′(s)+ϵ(a′)}0otherwiseI_a(\boldsymbol{\epsilon}) = \begin{cases} 1 & \text{if } a \in \operatorname{argmax}_{a' \in \mathcal{A}_s} \left\{ x_{a'}(s) + \epsilon(a') \right\} \\ 0 & \text{otherwise} \end{cases}

where xa(s)=r(s,a)+γ∑j∈Sp(j∣s,a)v(j)x_a(s) = r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j) as before.

The ex-ante probability that action aa is optimal at state ss is:

π(a∣s)=Eϵ[Ia(ϵ)]=Pϵ(a∈argmax⁡a′{xa′(s)+ϵ(a′)})\pi(a|s) = \mathbb{E}_{\boldsymbol{\epsilon}}[I_a(\boldsymbol{\epsilon})] = \mathbb{P}_{\boldsymbol{\epsilon}}\left(a \in \operatorname{argmax}_{a'} \left\{ x_{a'}(s) + \epsilon(a') \right\}\right)

This is the probability that action aa achieves the maximum when utilities are perturbed by Gumbel noise.

Applying this result to our problem:

π(a∣s)=exp⁡(βxa(s))∑a′∈Asexp⁡(βxa′(s))=exp⁡(β(r(s,a)+γ∑j∈Sp(j∣s,a)v(j)))∑a′∈Asexp⁡(β(r(s,a′)+γ∑j∈Sp(j∣s,a′)v(j)))\pi(a|s) = \frac{\exp\left(\beta x_a(s)\right)}{\sum_{a' \in \mathcal{A}_s} \exp\left(\beta x_{a'}(s)\right)} = \frac{\exp\left(\beta\left(r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a)v(j)\right)\right)}{\sum_{a' \in \mathcal{A}_s} \exp\left(\beta\left(r(s,a') + \gamma \sum_{j \in \mathcal{S}} p(j|s,a')v(j)\right)\right)}

This is the softmax policy or Gibbs/Boltzmann policy with inverse temperature β\beta.

Properties:

This completes the derivation: the smooth Bellman equation yields a value function v(s)v(s), and the corresponding optimal policy is the softmax over Q-values.

Regularized Markov Decision Processes

Which convex penalty on action distributions generates a desired smooth maximum through conjugate duality?

Regularized MDPs Geist et al. (2019) provide another perspective on how the smooth Bellman equations come to be. This framework offers a more general approach in which we seek to find optimal policies under the infinite horizon criterion while also accounting for a regularizer that influences the kind of policies we try to obtain.

Let’s set up some necessary notation. First, recall that the policy evaluation operator for a stationary policy with decision rule π\pi is defined as:

Lπv=rπ+γPπv\BellmanPi \mathbf{v} = \mathbf{r}_\pi + \gamma \mathbf{P}_\pi \mathbf{v}

where rπ\mathbf{r}_\pi is the expected reward vector under policy π\pi, γ\gamma is the discount factor, and Pπ\mathbf{P}_\pi is the state transition probability matrix under π\pi. A complementary object to the value function is the q-function (or Q-factor) representation:

qγπ(s,a)=r(s,a)+γ∑j∈Sp(j∣s,a)vγπ(j)vγπ(s)=∑a∈Asπ(a∣s)qγπ(s,a)\begin{align*} q_\gamma^{\pi}(s, a) &= r(s, a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v_\gamma^{\pi}(j) \\ v_\gamma^{\pi}(s) &= \sum_{a \in \mathcal{A}_s} \pi(a | s) q_\gamma^{\pi}(s, a) \end{align*}

The policy evaluation operator can then be written in terms of the q-function as:

[Lπv](s)=⟨π(⋅∣s),q(s,⋅)⟩[\BellmanPi v](s) = \langle \pi(\cdot | s), q(s, \cdot) \rangle

Legendre-Fenchel Transform

The workhorse behind the theory of regularized MDPs is the Legendre-Fenchel transform, also known as the convex conjugate. For a strongly convex function Ω:ΔA→R\Omega: \Delta_{\mathcal{A}} \rightarrow \mathbb{R}, its Legendre-Fenchel transform Ω∗:RA→R\Omega^*: \mathbb{R}^{\mathcal{A}} \rightarrow \mathbb{R} is defined as:

Ω∗(q(s,⋅))=max⁡π(⋅∣s)∈ΔA⟨π(⋅∣s),q(s,⋅)⟩−Ω(π(⋅∣s))\Omega^*(q(s, \cdot)) = \max_{\pi(\cdot|s) \in \Delta_{\mathcal{A}}} \langle \pi(\cdot | s), q(s, \cdot) \rangle - \Omega(\pi(\cdot | s))

An important property of this transform is that it has a unique maximizing argument, given by the gradient of Ω∗\Omega^*. This gradient is Lipschitz and satisfies:

∇Ω∗(q(s,⋅))=arg⁡max⁡π⟨π(⋅∣s),q(s,⋅)⟩−Ω(π(⋅∣s))\nabla \Omega^*(q(s, \cdot)) = \arg\max_\pi \langle \pi(\cdot | s), q(s, \cdot) \rangle - \Omega(\pi(\cdot | s))

An important example of a regularizer is the negative entropy, which gives rise to the smooth Bellman equations as we are about to see.

Regularized Bellman Operators

How do the regularizer and its convex conjugate alter Bellman evaluation, policy improvement, and their contraction properties?

With these concepts in place, we can now define the regularized Bellman operators:

  1. Regularized Policy Evaluation Operator (Lπ,Ω)(\mathrm{L}_{\pi,\Omega}):

    [Lπ,Ωv](s)=⟨q(s,⋅),π(⋅∣s)⟩−Ω(π(⋅∣s))[\mathrm{L}_{\pi,\Omega} v](s) = \langle q(s,\cdot), \pi(\cdot | s) \rangle - \Omega(\pi(\cdot | s))
  2. Regularized Bellman Optimality Operator (LΩ)(\mathrm{L}_\Omega):

    [LΩv](s)=[max⁡πLπ,Ωv](s)=Ω∗(q(s,⋅))[\mathrm{L}_\Omega v](s) = [\max_\pi \mathrm{L}_{\pi,\Omega} v ](s) = \Omega^*(q(s, \cdot))

It can be shown that the addition of a regularizer in these regularized operators still preserves the contraction properties, and therefore the existence of a solution to the optimality equations and the convergence of successive approximation.

The regularized value function of a stationary policy with decision rule π\pi, denoted by vπ,Ωv_{\pi,\Omega}, is the unique fixed point of the operator equation:

find v such that v=Lπ,Ωv\text{find $v$ such that } \enspace v = \mathrm{L}_{\pi,\Omega} v

Under the usual assumptions on the discount factor and the boundedness of the reward, the value of a policy can also be found in closed form by solving for v\mathbf{v} in the linear system of equations:

(I−γPπ)v=rπ−Ωπ(\mathbf{I} - \gamma \mathbf{P}_\pi) \mathbf{v} = \mathbf{r}_\pi - \boldsymbol{\Omega}_\pi

where [Ωπ](s)=Ω(π(⋅∣s))[\boldsymbol{\Omega}_\pi](s) = \Omega(\pi(\cdot|s)) is the vector of regularization terms at each state.

The associated state-action value function qπ,Ωq_{\pi,\Omega} is given by:

qπ,Ω(s,a)=r(s,a)+∑j∈Sγp(j∣s,a)vπ,Ω(j)vπ,Ω(s)=∑a∈Asπ(a∣s)qπ,Ω(s,a)−Ω(π(⋅∣s))\begin{align*} q_{\pi,\Omega}(s, a) &= r(s, a) + \sum_{j \in \mathcal{S}} \gamma p(j|s,a) v_{\pi,\Omega}(j) \\ v_{\pi,\Omega}(s) &= \sum_{a \in \mathcal{A}_s} \pi(a | s) q_{\pi,\Omega}(s, a) - \Omega(\pi(\cdot | s)) \end{align*}

The regularized optimal value function vΩ∗v^*_\Omega is then the unique fixed point of LΩ\mathrm{L}_\Omega in the fixed point equation:

find v such that v=LΩv\text{find $v$ such that } v = \mathrm{L}_\Omega v

The associated state-action value function qΩ∗q^*_\Omega is given by:

qΩ∗(s,a)=r(s,a)+∑j∈Sγp(j∣s,a)vΩ∗(j)vΩ∗(s)=Ω∗(qΩ∗(s,⋅))\begin{align*} q^*_\Omega(s, a) &= r(s, a) + \sum_{j \in \mathcal{S}} \gamma p(j|s,a) v^*_\Omega(j) \\ v^*_\Omega(s) &= \Omega^*(q^*_\Omega(s, \cdot))\end{align*}

An important result in the theory of regularized MDPs is that there exists a unique optimal regularized policy. Specifically, if πΩ∗\pi^*_\Omega is a conserving decision rule (i.e., πΩ∗=arg⁡max⁡πLπ,ΩvΩ∗\pi^*_\Omega = \arg\max_\pi \mathrm{L}_{\pi,\Omega} v^*_\Omega), then the randomized stationary policy π=const(πΩ∗)\boldsymbol{\pi} = \mathrm{const}(\pi^*_\Omega) is the unique optimal regularized policy.

In practice, once we have found vΩ∗v^*_\Omega, we can derive the optimal decision rule by taking the gradient of the convex conjugate evaluated at the optimal action-value function:

π∗(⋅∣s)=∇Ω∗(qΩ∗(s,⋅))\pi^*(\cdot | s) = \nabla \Omega^*(q^*_\Omega(s, \cdot))

Recovering the Smooth Bellman Equations

Under this framework, we can recover the smooth Bellman equations by choosing Ω\Omega to be the negative entropy, and obtain the softmax policy as the gradient of the convex conjugate. Let’s show this explicitly:

  1. Using the negative entropy regularizer:

    Ω(d(⋅∣s))=∑a∈Asd(a∣s)ln⁡d(a∣s)\Omega(d(\cdot|s)) = \sum_{a \in \mathcal{A}_s} d(a|s) \ln d(a|s)
  2. The convex conjugate:

    Ω∗(q(s,⋅))=ln⁡∑a∈Asexp⁡q(s,a)\Omega^*(q(s, \cdot)) = \ln \sum_{a \in \mathcal{A}_s} \exp q(s,a)
  3. Now, let’s write out the regularized Bellman optimality equation:

    vΩ∗(s)=Ω∗(qΩ∗(s,⋅))v^*_\Omega(s) = \Omega^*(q^*_\Omega(s, \cdot))
  4. Substituting the expressions for Ω∗\Omega^* and qΩ∗q^*_\Omega:

    vΩ∗(s)=ln⁡∑a∈Asexp⁡(r(s,a)+γ∑j∈Sp(j∣s,a)vΩ∗(j))v^*_\Omega(s) = \ln \sum_{a \in \mathcal{A}_s} \exp \left(r(s, a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v^*_\Omega(j)\right)

This matches the form of the smooth Bellman equation we derived earlier, with the log-sum-exp operation replacing the max operation of the standard Bellman equation.

Furthermore, the optimal policy is given by the gradient of Ω∗\Omega^*:

d∗(a∣s)=∇Ω∗(qΩ∗(s,⋅))=exp⁡(qΩ∗(s,a))∑a′∈Asexp⁡(qΩ∗(s,a′))d^*(a|s) = \nabla \Omega^*(q^*_\Omega(s, \cdot)) = \frac{\exp(q^*_\Omega(s,a))}{\sum_{a' \in \mathcal{A}_s} \exp(q^*_\Omega(s,a'))}

This is the familiar softmax policy we encountered in the smooth MDP setting.

Smooth Policy Iteration Algorithm

Now that we’ve seen how the regularized MDP framework leads to smooth Bellman equations, we present smooth policy iteration. Unlike value iteration which directly iterates the Bellman operator, policy iteration alternates between policy evaluation and policy improvement steps.

Key properties of smooth policy iteration:

  1. Entropy-regularized evaluation: The policy evaluation step (line 12 of Algorithm 2) accounts for the entropy bonus αH(π(⋅∣s))\alpha H(\pi(\cdot|s)) where α=1/β\alpha = 1/\beta

  2. Stochastic policy improvement: The policy improvement step (lines 12-14 of Algorithm 3) uses softmax instead of deterministic argmax, producing a stochastic policy

  3. Temperature parameter:

    • Higher β\beta produces policies closer to deterministic (lower entropy)

    • Lower β\beta produces more stochastic policies (higher entropy)

    • As β→∞\beta \to \infty, the method recovers standard policy iteration

  4. Convergence: Like standard policy iteration, this algorithm converges to the unique optimal regularized value function and policy

  5. Partial improvement: As in the hard case, the improvement does not need to be applied in every state for the method to make progress. The policy-iteration loops hidden inside actor-critic methods make use of this.

Smooth Policy Iteration Is Newton’s Method

The link between policy iteration and the Newton-Kantorovich method (Newton-Kantorovich and Policy Iteration) is easier to see here than in the hard case, because Lβ\mathrm{L}_\beta is differentiable everywhere and there are no ties to worry about. The derivative of the log-sum-exp with respect to its arguments is the softmax, so the Fréchet derivative of Lβ\mathrm{L}_\beta at vv is

Lβ′(v)=γPπv,πv(a∣s)=exp⁡(βqv(s,a))∑a′exp⁡(βqv(s,a′)),qv(s,a)=r(s,a)+γ∑jp(j∣s,a)v(j),\mathrm{L}_\beta'(v) = \gamma \mathbf{P}_{\pi_v}, \qquad \pi_v(a \mid s) = \frac{\exp(\beta q_v(s,a))}{\sum_{a'}\exp(\beta q_v(s,a'))}, \quad q_v(s,a) = r(s,a) + \gamma\sum_j p(j\mid s,a) v(j),

the transition matrix of the softmax policy. A Newton step on v−Lβv=0v - \mathrm{L}_\beta v = 0 solves

(I−γPπv) vnew=Lβv−γPπvv.(\mathbf{I} - \gamma\mathbf{P}_{\pi_v})\, v_{\text{new}} = \mathrm{L}_\beta v - \gamma\mathbf{P}_{\pi_v} v.

At the softmax policy the log-sum-exp equals the expected qq plus the entropy bonus, Lβv=rπv+γPπvv+1βHπv\mathrm{L}_\beta v = \mathbf{r}_{\pi_v} + \gamma\mathbf{P}_{\pi_v} v + \frac{1}{\beta}\mathbf{H}_{\pi_v}. The right-hand side is therefore rπv+1βHπv\mathbf{r}_{\pi_v} + \frac{1}{\beta}\mathbf{H}_{\pi_v}, and the Newton step is exactly the entropy-regularized evaluation of the softmax policy. Smooth policy iteration is the Newton-Kantorovich method applied to the smooth Bellman equation, without the semismooth machinery that the hard max requires.

Rust (1987) solved his smooth Bellman equation this way. He did not call it policy iteration. He recognized an operator equation, a root-finding problem in a function space, and applied Newton-Kantorovich to it, after a few rounds of successive approximation to get close enough for Newton’s method to converge quickly.

Equivalence Between Smooth Bellman Equations and Entropy-Regularized MDPs

We have now seen two distinct ways to arrive at smooth Bellman equations. Earlier in this chapter, we introduced the logsumexp operator as a smooth approximation to the max operator, motivated by analytical tractability and the desire for differentiability. Just now, we derived the same equations through the lens of regularized MDPs, where we explicitly penalize the entropy of policies. These two perspectives are mathematically equivalent: solving the smooth Bellman equation with inverse temperature parameter β\beta yields exactly the same optimal value function and optimal policy as solving the entropy-regularized MDP with regularization strength α=1/β\alpha = 1/\beta. The two formulations are not merely similar. They describe identical optimization problems.

To see this equivalence clearly, consider the standard MDP problem with rewards r(s,a)r(s,a) and transition probabilities p(j∣s,a)p(j|s,a). The regularized MDP framework tells us to solve:

max⁡πEπ[∑t=0∞γtr(st,at)]+αEπ[∑t=0∞γtH(π(⋅∣st))],\max_\pi \mathbb{E}_\pi \left[ \sum_{t=0}^\infty \gamma^t r(s_t, a_t) \right] + \alpha \mathbb{E}_\pi \left[ \sum_{t=0}^\infty \gamma^t H(\pi(\cdot|s_t)) \right],

where H(π(⋅∣s))=−∑aπ(a∣s)ln⁡π(a∣s)H(\pi(\cdot|s)) = -\sum_a \pi(a|s) \ln \pi(a|s) is the entropy of the policy at state ss, and α>0\alpha > 0 is the entropy regularization strength.

We can rewrite this objective by absorbing the entropy term into a modified reward function. Define the entropy-augmented reward:

r~(s,a,π)=r(s,a)+αH(π(⋅∣s)).\tilde{r}(s,a,\pi) = r(s,a) + \alpha H(\pi(\cdot|s)).

However, this formulation makes the reward depend on the entire policy at each state, which is awkward. We can reformulate this more cleanly by expanding the entropy term. Recall that the entropy is:

H(π(⋅∣s))=−∑aπ(a∣s)ln⁡π(a∣s).H(\pi(\cdot|s)) = -\sum_a \pi(a|s) \ln \pi(a|s).

When we take the expectation over actions drawn from π\pi, we have:

Ea∼π(⋅∣s)[H(π(⋅∣s))]=∑aπ(a∣s)[−∑a′π(a′∣s)ln⁡π(a′∣s)]=−∑a′π(a′∣s)ln⁡π(a′∣s),\mathbb{E}_{a \sim \pi(\cdot|s)} [H(\pi(\cdot|s))] = \sum_a \pi(a|s) \left[-\sum_{a'} \pi(a'|s) \ln \pi(a'|s)\right] = -\sum_{a'} \pi(a'|s) \ln \pi(a'|s),

since the entropy doesn’t depend on which action is actually sampled. But we can also write this as:

H(π(⋅∣s))=−∑aπ(a∣s)ln⁡π(a∣s)=Ea∼π(⋅∣s)[−ln⁡π(a∣s)].H(\pi(\cdot|s)) = -\sum_a \pi(a|s) \ln \pi(a|s) = \mathbb{E}_{a \sim \pi(\cdot|s)}[-\ln \pi(a|s)].

This shows that adding αH(π(⋅∣s))\alpha H(\pi(\cdot|s)) to the expected reward at state ss is equivalent to adding −αln⁡π(a∣s)-\alpha \ln \pi(a|s) to the reward of taking action aa at state ss. More formally:

Eπ[∑t=0∞γtr(st,at)]+αEπ[∑t=0∞γtH(π(⋅∣st))]=Eπ[∑t=0∞γtr(st,at)]+αEπ[∑t=0∞γtEat∼π(⋅∣st)[−ln⁡π(at∣st)]]=Eπ[∑t=0∞γt(r(st,at)−αln⁡π(at∣st))].\begin{align*} &\mathbb{E}_\pi \left[ \sum_{t=0}^\infty \gamma^t r(s_t, a_t) \right] + \alpha \mathbb{E}_\pi \left[ \sum_{t=0}^\infty \gamma^t H(\pi(\cdot|s_t)) \right] \\ &= \mathbb{E}_\pi \left[ \sum_{t=0}^\infty \gamma^t r(s_t, a_t) \right] + \alpha \mathbb{E}_\pi \left[ \sum_{t=0}^\infty \gamma^t \mathbb{E}_{a_t \sim \pi(\cdot|s_t)}[-\ln \pi(a_t|s_t)] \right] \\ &= \mathbb{E}_\pi \left[ \sum_{t=0}^\infty \gamma^t \left( r(s_t, a_t) - \alpha \ln \pi(a_t|s_t) \right) \right]. \end{align*}

The entropy bonus at each state, when averaged over the policy, becomes a per-action penalty proportional to the negative log probability of the action taken. This reformulation is more useful because the modified reward now depends only on the state, the action taken, and the probability assigned to that specific action by the policy, not on the entire distribution over actions.

This expression shows that entropy regularization is equivalent to adding a state-action dependent penalty term −αln⁡π(a∣s)-\alpha \ln \pi(a|s) to the reward. Intuitively, this term amounts to paying a cost for low-entropy (deterministic) policies.

Now, when we write down the Bellman equation for this entropy-regularized problem, at each state ss we need to find the decision rule d(⋅∣s)∈Δ(As)d(\cdot|s) \in \Delta(\mathcal{A}_s) (a probability distribution over actions) that maximizes:

v(s)=max⁡d(⋅∣s)∈Δ(As)∑ad(a∣s)[r(s,a)+γ∑j∈Sp(j∣s,a)v(j)−αln⁡d(a∣s)].v(s) = \max_{d(\cdot|s) \in \Delta(\mathcal{A}_s)} \sum_a d(a|s) \left[ r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j) - \alpha \ln d(a|s) \right].

Here Δ(As)={d(⋅∣s):d(a∣s)≥0,∑ad(a∣s)=1}\Delta(\mathcal{A}_s) = \{d(\cdot|s) : d(a|s) \geq 0, \sum_a d(a|s) = 1\} denotes the probability simplex over actions available at state ss. The optimization is over randomized decision rules at each state, constrained to be valid probability distributions.

This is a convex optimization problem with a linear constraint. We form the Lagrangian:

L(d,λ)=∑ad(a∣s)[r(s,a)+γ∑j∈Sp(j∣s,a)v(j)−αln⁡d(a∣s)]−λ(∑ad(a∣s)−1),\mathcal{L}(d, \lambda) = \sum_a d(a|s) \left[ r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j) - \alpha \ln d(a|s) \right] - \lambda \left(\sum_a d(a|s) - 1\right),

where λ\lambda is the Lagrange multiplier enforcing the normalization constraint. Taking the derivative with respect to d(a∣s)d(a|s) and setting it to zero:

r(s,a)+γ∑j∈Sp(j∣s,a)v(j)−α(1+ln⁡d∗(a∣s))−λ=0.r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j) - \alpha(1 + \ln d^*(a|s)) - \lambda = 0.

Solving for d∗(a∣s)d^*(a|s):

d∗(a∣s)=exp⁡(1α(r(s,a)+γ∑j∈Sp(j∣s,a)v(j)−λ)).d^*(a|s) = \exp\left(\frac{1}{\alpha}\left(r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j) - \lambda\right)\right).

Using the normalization constraint ∑ad∗(a∣s)=1\sum_a d^*(a|s) = 1 to solve for λ\lambda:

∑aexp⁡(1α(r(s,a)+γ∑j∈Sp(j∣s,a)v(j)))=exp⁡(λα).\sum_a \exp\left(\frac{1}{\alpha}\left(r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j)\right)\right) = \exp\left(\frac{\lambda}{\alpha}\right).

Therefore:

λ=αln⁡∑aexp⁡(1α(r(s,a)+γ∑j∈Sp(j∣s,a)v(j))).\lambda = \alpha \ln \sum_a \exp\left(\frac{1}{\alpha}\left(r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j)\right)\right).

Substituting this back into the Bellman equation and simplifying:

v(s)=αln⁡∑aexp⁡(1α(r(s,a)+γ∑j∈Sp(j∣s,a)v(j))).v(s) = \alpha \ln \sum_a \exp\left(\frac{1}{\alpha}\left(r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j)\right)\right).

Setting β=1/α\beta = 1/\alpha (the inverse temperature), this becomes:

v(s)=1βln⁡∑aexp⁡(β(r(s,a)+γ∑j∈Sp(j∣s,a)v(j))).v(s) = \frac{1}{\beta} \ln \sum_a \exp\left(\beta\left(r(s,a) + \gamma \sum_{j \in \mathcal{S}} p(j|s,a) v(j)\right)\right).

We recover the smooth Bellman equation we derived earlier using the logsumexp operator. The inverse temperature parameter β\beta controls how closely the logsumexp approximates the max: as β→∞\beta \to \infty, we recover the standard Bellman equation, while for finite β\beta, we have a smooth approximation that corresponds to optimizing with entropy regularization strength α=1/β\alpha = 1/\beta.

The optimal policy is:

π∗(a∣s)=exp⁡(βq∗(s,a))∑a′exp⁡(βq∗(s,a′))=softmaxβ(q∗(s,⋅))(a),\pi^*(a|s) = \frac{\exp\left(\beta q^*(s,a)\right)}{\sum_{a'} \exp\left(\beta q^*(s,a')\right)} = \text{softmax}_\beta(q^*(s,\cdot))(a),

which is exactly the softmax policy parametrized by inverse temperature.

The derivation establishes the complete equivalence: the value function v∗v^* that solves the smooth Bellman equation is identical to the optimal value function vΩ∗v^*_\Omega of the entropy-regularized MDP (with Ω\Omega being negative entropy and α=1/β\alpha = 1/\beta), and the softmax policy that is greedy with respect to this value function achieves the maximum of the entropy-regularized objective. Both approaches yield the same numerical solution: the same values at every state and the same policy prescriptions. The only difference is how we conceptualize the problem: as smoothing the Bellman operator for computational tractability, or as explicitly trading off reward maximization against policy entropy.

This equivalence has important implications. When we use smooth Bellman equations with a logsumexp operator, we are implicitly solving an entropy-regularized MDP. Conversely, when we explicitly add entropy regularization to an MDP objective, we arrive at smooth Bellman equations as the natural description of optimality. This dual perspective will prove valuable in understanding various algorithms and theoretical results. For instance, in soft actor-critic methods and other maximum entropy reinforcement learning algorithms, the connection between smooth operators and entropy regularization provides both computational benefits (differentiability) and conceptual clarity (why we want stochastic policies).

Entropy-Regularized Dynamic Programming Algorithms

While the smooth Bellman equations (using logsumexp) and entropy-regularized formulations are mathematically equivalent, it is instructive to present the algorithms explicitly in the entropy-regularized form, where the entropy bonus appears directly in the update equations.

Features:

Features:

Rust’s Bus Engines and Inverse Reinforcement Learning

What can we learn about a decision maker’s goals from records of what they did?

Rust’s 1987 paper is worth reading for three reasons: it contains the smooth Bellman equation, it poses what is now called inverse reinforcement learning, and it solves that problem with a bilevel method that relies on implicit differentiation, a tool that became popular in machine learning three decades later for hyperparameter optimization.

The problem. Harold Zurcher was the superintendent of maintenance at the Madison Metropolitan bus company. Rust had his maintenance records: for each bus, the odometer reading each month, and the months in which Zurcher replaced the engine. Replacing an engine is expensive, while keeping an old engine running costs more and more as the mileage grows. The question was how Zurcher decided when to replace. Rust is a structural econometrician. Structural econometrics does not stop at predicting behavior; it posits a mechanism that generates it, here a decision maker solving an MDP, and fits the parameters of that mechanism to data. The fitted mechanism can then answer questions the data alone cannot, such as how behavior would change if the price of an engine changed.

The model. The state ss is the mileage since the last replacement, discretized into bins. Each month there are two actions, keep (a=0a=0) or replace (a=1a=1). Keeping costs c(s;θ)c(s;\theta), increasing in ss; replacing costs a fixed amount RCRC and resets the mileage. With parameters θ\theta collecting RCRC and those of cc, the reward is rθ(s,0)=−c(s;θ)r_\theta(s,0) = -c(s;\theta) and rθ(s,1)=−RC−c(0;θ)r_\theta(s,1) = -RC - c(0;\theta), and the mileage transitions are estimated directly from the odometer data. The data contradict any deterministic policy: two buses with the same mileage are sometimes treated differently. Rust’s answer was the Gumbel model of Gumbel Noise on the Rewards. Zurcher sees, in addition to ss, a shock ϵ(a)\epsilon(a) for each action that the econometrician does not see, and acts optimally given both. Integrating out the shocks gives the smooth Bellman equation and the softmax choice probabilities

vθ=Lβ,θ vθ,πθ(a∣s)=exp⁡(βqθ(s,a))∑a′exp⁡(βqθ(s,a′)).v_\theta = \mathrm{L}_{\beta,\theta}\, v_\theta, \qquad \pi_\theta(a \mid s) = \frac{\exp(\beta q_\theta(s,a))}{\sum_{a'}\exp(\beta q_\theta(s,a'))}.

This is the second, deeper reason Rust used these equations. Besides being smooth, they follow from the random-utility models of McFadden (1974), the standard statistical basis of discrete choice in econometrics, in the same way that least squares follows from assuming Gaussian noise. In machine learning terms, McFadden’s conditional logit is multiclass logistic regression with a structural interpretation.

The estimator. Given observed pairs (st,at)(s_t, a_t), maximize the log-likelihood ℓ(θ)=∑tlog⁡πθ(at∣st)\ell(\theta) = \sum_t \log \pi_\theta(a_t \mid s_t). Every evaluation of ℓ\ell requires solving the smooth Bellman equation for the current θ\theta, so the problem is bilevel: an outer maximization over θ\theta around an inner fixed-point problem. Rust called his algorithm the nested fixed point (NFXP) algorithm. The gradient of ℓ\ell needs ∂vθ/∂θ\partial v_\theta / \partial\theta, which the implicit function theorem provides without differentiating through the iterations of the inner solver. Differentiating vθ=Lβ,θvθv_\theta = \mathrm{L}_{\beta,\theta} v_\theta and using the derivative of Lβ\mathrm{L}_\beta from Smooth Policy Iteration Is Newton’s Method,

∂vθ∂θ=(I−γPπθ)−1 ∂rπθ∂θ,∂rπθ∂θ(s)=∑aπθ(a∣s) ∂rθ(s,a)∂θ.\frac{\partial v_\theta}{\partial \theta} = (\mathbf{I} - \gamma\mathbf{P}_{\pi_\theta})^{-1}\, \frac{\partial \mathbf{r}_{\pi_\theta}}{\partial\theta}, \qquad \frac{\partial \mathbf{r}_{\pi_\theta}}{\partial\theta}(s) = \sum_a \pi_\theta(a\mid s)\, \frac{\partial r_\theta(s,a)}{\partial \theta}.

The matrix to invert is the one of policy evaluation, already factored by the Newton steps of the inner solver. For rewards linear in the parameters, rθ(s,a)=θ⊤ϕ(s,a)r_\theta(s,a) = \theta^\top\phi(s,a), this derivative is the vector of expected discounted feature counts under the softmax policy, the quantity that Ziebart et al. (2008) matches to the empirical feature counts. The score of one observation is then

∇θlog⁡πθ(a∣s)=β(∇θqθ(s,a)−∑a′πθ(a′∣s) ∇θqθ(s,a′)),∇θqθ(s,a)=∇θrθ(s,a)+γ∑jp(j∣s,a) ∂vθ∂θ(j).\nabla_\theta \log\pi_\theta(a\mid s) = \beta\Big(\nabla_\theta q_\theta(s,a) - \sum_{a'}\pi_\theta(a'\mid s)\,\nabla_\theta q_\theta(s,a')\Big), \qquad \nabla_\theta q_\theta(s,a) = \nabla_\theta r_\theta(s,a) + \gamma\sum_j p(j\mid s,a)\,\frac{\partial v_\theta}{\partial \theta}(j).

What the model assumes. The setup is a strong one, and naming its assumptions explains why inverse RL is hard in general.

Summary and Outlook

Entropy regularization replaces hard action selection with a smooth conjugate operator and produces a stochastic optimal policy. Gumbel perturbations, log-sum-exp Bellman updates, and regularized policy iteration describe the same construction from probabilistic, variational, and algorithmic viewpoints. Smooth policy iteration is Newton’s method on the smooth Bellman equation, and Rust’s nested fixed-point estimator uses the same derivative to recover reward parameters from observed behavior.

The same log-sum-exp form appears over whole trajectories in continuous time. Path-integral stochastic control examines systems driven by Gaussian disturbances whose Hamilton--Jacobi--Bellman equation becomes linear under a logarithmic transformation, so that optimal feedback can be estimated from weighted trajectories.

Smoothness changes the operator but does not remove the need to represent its unknown value function. How can an infinite-dimensional functional equation be reduced to finitely many coefficients and test conditions? Weighted-residual methods provide the general approximation machinery.

Self-checks

Solution to Exercise 1

Its probability concentrates on the maximizing action, so the soft policy approaches the ordinary greedy deterministic policy.

Solution to Exercise 2

Log-sum-exp is differentiable and blends information from all actions. A hard maximum is nondifferentiable at ties and passes local gradient information only through selected maximizers.

References
  1. Rust, J. (1987). Optimal Replacement of GMC Bus Engines: An Empirical Model of Harold Zurcher. Econometrica, 55(5), 999–1033.
  2. Ng, A. Y., & Russell, S. J. (2000). Algorithms for Inverse Reinforcement Learning. Proceedings of the 17th International Conference on Machine Learning, 663–670.
  3. Ziebart, B. D., Maas, A. L., Bagnell, J. A., & Dey, A. K. (2008). Maximum Entropy Inverse Reinforcement Learning. Proceedings of the 23rd AAAI Conference on Artificial Intelligence, 1433–1438.
  4. Haarnoja, T., Tang, H., Abbeel, P., & Levine, S. (2017). Reinforcement Learning with Deep Energy-Based Policies. Proceedings of the 34th International Conference on Machine Learning, 70, 1352–1361.
  5. 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.
  6. Levine, S., Kumar, A., Tucker, G., & Fu, J. (2018). Reinforcement Learning as a Framework for Control: A Survey. arXiv Preprint arXiv:1806.04222.
  7. Geist, M., Scherrer, B., & Pietquin, O. (2019). A Theory of Regularized Markov Decision Processes. In K. Chaudhuri & R. Salakhutdinov (Eds.), Proceedings of the 36th International Conference on Machine Learning (Vol. 97, pp. 2160–2169). PMLR. https://proceedings.mlr.press/v97/geist19a.html
  8. McFadden, D. (1974). Conditional Logit Analysis of Qualitative Choice Behavior. In P. Zarembka (Ed.), Frontiers in Econometrics (pp. 105–142). Academic Press.
  9. Ng, A. Y., Harada, D., & Russell, S. J. (1999). Policy Invariance under Reward Transformations: Theory and Application to Reward Shaping. Proceedings of the 16th International Conference on Machine Learning, 278–287.