Inferensys

Glossary

Actor-Critic

Actor-Critic is a hybrid reinforcement learning architecture that combines a policy network (the actor) for action selection with a value network (the critic) for evaluating those actions, enabling stable and sample-efficient learning.
Architect reviewing LLM integration architecture on laptop, system diagrams visible, modern technical office setup.
REINFORCEMENT LEARNING ARCHITECTURE

What is Actor-Critic?

Actor-Critic is a foundational hybrid architecture in reinforcement learning that combines two neural networks to enable stable and efficient learning from environmental feedback.

Actor-Critic is a reinforcement learning architecture that combines a policy network (the actor) that selects actions with a value network (the critic) that evaluates those actions, providing a low-variance, bootstrapped signal for policy updates. This hybrid design merges the direct action selection of policy gradient methods with the value estimation of temporal difference learning. The actor proposes actions based on the current policy π(a|s), while the critic estimates the value function V(s) or Q(s,a), judging the actor's choices to reduce the variance of policy updates compared to pure REINFORCE algorithms.

The critic's evaluation, typically the Advantage Function A(s,a) = Q(s,a) - V(s), measures how much better a specific action is than the policy's average. This advantage is used to scale the actor's policy gradient update. Key algorithms like Advantage Actor-Critic (A2C) and Asynchronous Advantage Actor-Critic (A3C) build on this core. In Preference-Based Learning pipelines like RLHF, an actor-critic framework is often used where the reward model serves as the critic, providing preference-derived rewards to fine-tune the policy (actor). This structure is central to Proximal Policy Optimization (PPO), which adds a clipping constraint to ensure stable updates.

ARCHITECTURE

Key Components of an Actor-Critic System

The actor-critic architecture decomposes the reinforcement learning problem into two specialized neural networks that work in tandem: one for action selection and one for evaluation.

01

The Actor (Policy Network)

The actor is a policy network (π(a|s; θ)) that maps the current state (s) to a probability distribution over possible actions (a). Its parameters (θ) are optimized to maximize the expected cumulative reward. The actor's role is pure action selection.

  • Input: State representation (e.g., sensor data, game screen).
  • Output: Action probabilities (for discrete actions) or parameters of a continuous distribution (e.g., mean and variance for a Gaussian).
  • Update Mechanism: Uses the policy gradient, scaled by the critic's evaluation, to adjust its parameters.
02

The Critic (Value Network)

The critic is a value network (V(s; w) or Q(s,a; w)) that estimates the expected future return from a given state (or state-action pair). Its parameters (w) are learned to minimize a temporal difference (TD) error. The critic's role is pure evaluation.

  • Input: State (for V(s)) or state-action pair (for Q(s,a)).
  • Output: A scalar value representing the predicted quality of the state/action.
  • Core Function: Provides a low-variance, baseline signal to the actor, reducing the noise inherent in Monte Carlo returns.
03

Advantage Function (A(s,a))

The advantage function is a central concept, calculated as A(s,a) = Q(s,a) - V(s). It measures how much better a specific action (a) is compared to the average action at that state. It is the primary signal used to update the actor.

  • Interpretation: A(s,a) > 0 means the action is better than average; A(s,a) < 0 means it is worse.
  • Role in Updates: The actor's policy gradient is weighted by the advantage. Actions with positive advantage are made more likely.
  • Estimation: Often approximated directly by networks (e.g., in Advantage Actor-Critic (A2C)) or derived from TD error.
04

Temporal Difference (TD) Error

Temporal Difference (TD) Error (δ) is the fundamental learning signal for the critic and a key component for the actor. For a value critic V(s), it is defined as: δ = r + γV(s') - V(s), where r is the immediate reward, γ is the discount factor, and s' is the next state.

  • Critic Update: The critic's parameters are updated to minimize the squared TD error (δ²).
  • Actor Signal: In many implementations (e.g., one-step actor-critic), the TD error δ serves as an unbiased estimate of the advantage A(s,a).
05

Policy Gradient Theorem & Update

The actor is updated using the policy gradient theorem. The gradient of the expected return with respect to the actor's parameters (θ) is proportional to the expected value of the gradient of the log-policy multiplied by the advantage.

  • Update Rule: Δθ ∝ ∇_θ log π(a|s; θ) * A(s,a)
  • Role of Critic: The critic supplies A(s,a), replacing high-variance Monte Carlo returns with a learned baseline.
  • Algorithm Example: Proximal Policy Optimization (PPO) is a modern, stable actor-critic algorithm that uses a clipped objective to control the size of policy updates.
06

Entropy Regularization

Entropy regularization is a common technique added to the actor's objective function to encourage exploration. It penalizes the policy for becoming too deterministic too early.

  • Formula: The policy's objective becomes: maximize [ expected advantage + β * H(π(·|s)) ], where H is the entropy and β is a hyperparameter.
  • Effect: Increases the randomness of the action distribution, preventing the actor from converging to a suboptimal policy prematurely.
  • Trade-off: Controlled by β; too high encourages random exploration, too low leads to premature exploitation.
ARCHITECTURE COMPARISON

Actor-Critic vs. Other RL Methods

A technical comparison of the Actor-Critic architecture against other foundational reinforcement learning paradigms, highlighting their core mechanisms, training characteristics, and suitability for different problem types.

Architectural Feature / MetricActor-Critic (A2C, A3C, PPO)Value-Based Methods (DQN, C51)Policy Gradient Methods (REINFORCE)Model-Based RL (MuZero, Dreamer)

Core Learning Signal

Advantage Function (A(s,a))

Action-Value Function (Q(s,a))

Monte Carlo Return (G(t))

Model Prediction Error

Policy Representation

Explicit, parameterized policy (Actor)

Implicit, derived from Q-values (ε-greedy)

Explicit, parameterized policy

Can be explicit or implicit

Value Representation

Explicit value function (Critic)

Explicit action-value function (Critic)

None (or baseline for variance reduction)

Explicit value function & dynamics model

Update Variance

Low (uses bootstrapped critic)

Low (uses bootstrapped target)

High (uses full Monte Carlo returns)

Varies with model accuracy

Sample Efficiency

Moderate to High

Low to Moderate

Very Low

Very High (with accurate model)

Handles Continuous Action Spaces

Stable, Incremental Updates

On-Policy / Off-Policy Common Variants

Primarily On-Policy (e.g., PPO), Off-Policy possible (e.g., TD3, SAC)

Primarily Off-Policy

On-Policy

Can be either

Primary Use Case in Preference Learning

Core optimizer for RLHF/RL from Feedback

Rarely used directly

Theoretical foundation, rarely used directly

Not typically used

ACTOR-CRICITC ARCHITECTURES

Common Algorithms and Variants

The Actor-Critic framework is a foundational reinforcement learning architecture. Its core variants optimize the trade-off between bias and variance, sample efficiency, and stability for different problem domains.

01

Advantage Actor-Critic (A2C)

Advantage Actor-Critic (A2C) is the synchronous, deterministic variant of the A3C algorithm. It uses the advantage function—the difference between the state-action value Q(s,a) and the state value V(s)—as the critic's feedback signal.

  • Core Mechanism: The advantage A(s,a) = Q(s,a) - V(s) tells the actor whether an action is better or worse than the average action in that state.
  • Reduced Variance: By subtracting the baseline V(s), the policy gradient updates have lower variance than using raw returns, leading to more stable training.
  • Implementation: Typically uses multiple parallel environments but performs a synchronous update after all workers finish a segment, averaging gradients. This is more efficient for GPU utilization than the asynchronous A3C.
02

Asynchronous Advantage Actor-Critic (A3C)

Asynchronous Advantage Actor-Critic (A3C) is a seminal distributed algorithm where multiple worker agents interact with independent copies of the environment in parallel.

  • Asynchronous Updates: Each worker computes gradients based on its own experience and asynchronously pushes updates to a global shared parameter server. This eliminates the need for an experience replay buffer.
  • Speed & Diversity: Parallel exploration decorrelates the data, making it more i.i.d.-like, which helps convergence. It was groundbreaking for efficiently using multi-core CPUs.
  • N-Step Returns: Workers typically use n-step returns (e.g., 20 steps) to estimate the advantage, blending Monte Carlo and Temporal Difference methods. While largely superseded by more synchronous methods for GPU efficiency, A3C established key distributed RL patterns.
03

Soft Actor-Critic (SAC)

Soft Actor-Critic (SAC) is an off-policy actor-critic algorithm for continuous action spaces that maximizes both expected return and entropy.

  • Maximum Entropy RL: The policy is trained to maximize a trade-off between expected return and the entropy of the policy. This encourages greater exploration and results in more robust policies that can capture multiple modes of optimal behavior.
  • Off-Policy Learning: Uses a replay buffer for sample efficiency, learning from past experiences.
  • Twinned Q-Networks: Employs two separate Q-function (critic) networks and takes the minimum of their predictions to mitigate overestimation bias—a technique borrowed from Twin Delayed DDPG (TD3). SAC is a state-of-the-art model-free algorithm for continuous control benchmarks like MuJoCo.
04

Trust Region Policy Optimization (TRPO) & Proximal Policy Optimization (PPO)

Trust Region Policy Optimization (TRPO) and Proximal Policy Optimization (PPO) are policy optimization algorithms that can be viewed as advanced actor-critic methods with a strong focus on update stability.

  • Trust Region: TRPO theoretically constrains policy updates using the KL divergence between the old and new policy, ensuring monotonic improvement. It's computationally complex, requiring conjugate gradient descent.
  • PPO's Simplicity: Proximal Policy Optimization (PPO) provides a simpler, first-order approximation to TRPO's objective. Its primary mechanism is a clipped surrogate objective that prevents the new policy from moving too far from the old policy.
  • Actor-Critic Core: Both use a value function (critic) to reduce variance. PPO, in particular, is the dominant RLHF optimizer for aligning large language models due to its reliability and ease of implementation.
05

Deep Deterministic Policy Gradient (DDPG)

Deep Deterministic Policy Gradient (DDPG) is an off-policy actor-critic algorithm designed for continuous action spaces.

  • Deterministic Policy: The actor network outputs a single, precise action value for a given state (a deterministic policy), unlike stochastic policies that output a distribution.
  • Critic as Q-Network: The critic is a deep Q-network that estimates Q(s,a). The actor is updated by performing gradient ascent on the critic's estimated Q-value with respect to the actor parameters.
  • Key Techniques: Employs target networks for both actor and critic to stabilize training, and a replay buffer for off-policy learning. It is conceptually an extension of DQN to continuous domains, combined with a deterministic policy gradient theorem.
06

Twin Delayed DDPG (TD3)

Twin Delayed DDPG (TD3) is a direct successor to DDPG that addresses its frequent issue of overestimation bias in the Q-function.

  • Twin Critics: Learns two Q-function networks independently and uses the minimum of the two values for the target in the Bellman update. This clipped double-Q learning reduces overestimation.
  • Target Policy Smoothing: Adds noise to the target action when computing the target Q-value. This regularizes the critic by making it harder to exploit errors in the Q-function around similar actions.
  • Delayed Updates: Updates the policy (actor) less frequently than the value function (critic). This allows the critic to become more accurate before it is used to update the actor, preventing divergence. TD3 is a robust, high-performing baseline for continuous control.
ACTOR-CRITIC

Frequently Asked Questions

Actor-critic is a foundational reinforcement learning architecture that combines two neural networks: one to select actions and another to evaluate them. This FAQ addresses common technical questions about its mechanics, advantages, and role in modern AI systems.

The actor-critic method is a reinforcement learning (RL) architecture that combines two components: a policy network (the actor) that selects actions and a value network (the critic) that evaluates the quality of the selected actions or states. The actor is responsible for the agent's behavior, while the critic provides a low-variance learning signal by estimating the expected future reward (the value function). This separation allows for more stable and efficient policy updates compared to pure policy-gradient or value-based methods alone. The critic's evaluation is used to compute an advantage function, which tells the actor how much better or worse a chosen action was compared to the average action in that state, guiding the policy's improvement.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.