2
$\begingroup$

Q-function approximators based on neural networks tend to overestimate the Q-function. Accordingly, reinforcement learning algorithms such as Soft Actor-Critic (SAC) and Twin Delayed DDPG (TD3) use two separate critic networks which have single scalar output per sample and take minimum of their predictions to compensate for the inherent overestimation.

Why do they use separate networks with scalar output as opposed to a single network with vector output per sample, where, as a last step, minimum is taken across this vector? Isn't this equivalent, but more efficient?

$\endgroup$

1 Answer 1

1
$\begingroup$

Let's consider a critic $Q_\theta(s,a)$ implemented as a simple MLP with multiple hidden layers and some sort of nonlinear activation after each layer. Instead of thinking of the critic as one block, we can decompose it into a feature extractor $\phi(s,a)$ comprising everything except the last layer, plus the final linear layer $w$, i.e. $Q_\theta(s,a) = w^T\phi(s,a)$.

Why do they use separate networks with scalar output as opposed to a single network with vector output per sample, where, as a last step, minimum is taken across this vector? Isn't this equivalent, but more efficient?

When using double critics, we typically train them from scratch with two different random initializations, i.e. both critics will have separate feature extractors $\phi_1(s,a)$ and $\phi_2(s,a)$, as well as separate final layers $w_1$ and $w_2$.

What you're considering by having a vectorial output would mean having two output vectors [$w_1$,$w_2$] with the same, shared feature extractor $\phi(s,a)$, so it is definitely not equivalent.

The motivation for the double critics is to have two different "independent" estimators that "balance each other out" (in a very vague sense). Having two different outputs achieves this somewhat, but they are less "independent" than having two entirely different models.

I would encourage you to try it out in practice, it will definitely save compute and even if it performs a bit worse it would still be an interesting finding!

$\endgroup$
2
  • $\begingroup$ no, it's not independence that they are trying to achieve, but to counterbalance the overestimation due to the nature of Q learning $\endgroup$
    – Alberto
    Commented Sep 10, 2023 at 12:38
  • $\begingroup$ Yes, that's why I wrote in a very vague sense and added quotation marks. Of course, the two estimators are anything but independent, being trained on exactly the same data. $\endgroup$ Commented Sep 11, 2023 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.