Evaluation lab · San Francisco · London · Zürich
Reinforced Labs Request a briefing
Glossary

Entropy bonus

Also called: entropy regularization, entropy regularisation, maximum entropy RL

An entropy bonus adds the policy's entropy to the RL objective, rewarding randomness so the policy keeps exploring instead of collapsing too early.

An entropy bonus is a term added to a reinforcement learning objective that rewards the policy for keeping its action distribution spread out. It discourages the policy from becoming deterministic too early, which keeps exploration going and makes optimisation more stable.

Definition

The entropy of a policy in state is . With a bonus coefficient , the objective becomes

In many implementations, such as A3C and PPO, the bonus is simply an extra loss term averaged over visited states, with around 0.01. Maximum-entropy RL, as in soft actor-critic, puts the entropy inside the return itself and tunes the coefficient (called the temperature) automatically to hit a target entropy.

Worked example

With two actions, a uniform policy has entropy nats; a policy with probabilities 0.9 and 0.1 has about 0.325 nats. With , collapsing from uniform to 0.9/0.1 costs of objective per step. The policy will make that move only if it gains more than 0.037 in expected reward per step. Small gains from a lucky early estimate are not enough, so the policy keeps sampling the other action until the evidence is stronger.

What it does

  • Exploration: keeps probability on actions whose value is still uncertain. It is undirected, though: it spreads probability evenly, not toward the most informative actions.
  • Optimisation: smooths the objective and prevents the softmax from saturating, where gradients vanish.
  • Hedging against model error: maximum-entropy policies hedge across near-optimal actions instead of betting everything on one.

Relation to the KL penalty

An entropy bonus is a KL penalty toward the uniform distribution, up to a constant. The KL penalty used in RLHF instead pulls toward a reference language model, because for text the uniform distribution over tokens is meaningless. For language models an explicit entropy bonus is uncommon, but entropy is still monitored: a rapid collapse in token entropy during RL often precedes a loss of output diversity.

Why it matters

Premature convergence is one of the most common failure modes of policy gradient training. The entropy bonus is the cheapest defence, and watching the policy's entropy over training is one of the most informative diagnostics you can log.

Sources

  1. Volodymyr Mnih, Adrià Puigdomènech Badia, Mehdi Mirza, Alex Graves, Timothy P. Lillicrap, Tim Harley, David Silver, Koray Kavukcuoglu. Asynchronous Methods for Deep Reinforcement Learning, 2016. arxiv.org
  2. Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, Sergey Levine. Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor, 2018. arxiv.org

Know the number before you ship.

A 45-minute working session with an evaluation engineer. Bring one use case; leave with a threat model, a draft eval plan with sample sizes, and an honest read on where you stand.