MARL, Part 2: Cooperation and Credit Assignment

On this page

Part 1 allowed agents to have different rewards. Here they share one reward, but sharing it does not show how each action contributed. We ask two questions: how can an actor compare its action with alternatives, and when can separate agent decisions maximize a learned team value? COMA compares an action with its alternatives while holding teammates' actions fixed. VDN and QMIX instead build a team value from agent-specific scores.

Recap: Why a policy-score baseline can cancel

For a fixed state and a positive differentiable policy, the score identity is

∑aπθ(a∣s)∇θlog⁡πθ(a∣s)=∇θ∑aπθ(a∣s)=0.\sum_a\pi_\theta(a\mid s)\nabla_\theta\log\pi_\theta(a\mid s) =\nabla_\theta\sum_a\pi_\theta(a\mid s)=0.

It permits subtracting a baseline that is fixed while this action is averaged. In a team, we must check whether that cancellation remains valid when the baseline also depends on teammates' actions.

1. One reward, several decisions

Consider a finite, fully observed, simultaneous-move cooperative Markov game. There are NN agents, state s∈Ss\in\mathcal S, joint action a∈∏iAi\boldsymbol a\in\prod_i\mathcal A_i, and one bounded realized reward Rt+1R_{t+1} received by every agent. The environment is fixed, with joint next-state/reward kernel

(St+1,Rt+1)∣Ht,At∼K(⋅∣St,At).(S_{t+1},R_{t+1})\mid H_t,\boldsymbol A_t \sim K(\cdot\mid S_t,\boldsymbol A_t).

Here HtH_t contains the observed history through StS_t; write P(s′∣s,a)P(s'\mid s,\boldsymbol a) for the state marginal and r(s,a)=E(S′,R)∼K(⋅∣s,a)[R]r(s,\boldsymbol a)=\mathbb E_{(S',R)\sim K(\cdot\mid s,\boldsymbol a)}[R]. Take 0≤γ<10\le\gamma<1 and a fixed initial law ρ0\rho_0. Agents use separate parameter vectors θi\theta_i and positive, continuously differentiable stationary policies, with independent private randomization conditional on the state:

πθ(a∣s)=∏i=1Nπi,θi(ai∣s).\boldsymbol\pi_\theta(\boldsymbol a\mid s) =\prod_{i=1}^N\pi_{i,\theta_i}(a_i\mid s).

The trajectory law PθP_\theta is generated by

S0∼ρ0,At∣St∼πθ(⋅∣St),(St+1,Rt+1)∣St,At∼K(⋅∣St,At).S_0\sim\rho_0,\qquad \boldsymbol A_t\mid S_t\sim\boldsymbol\pi_\theta(\cdot\mid S_t),\qquad (S_{t+1},R_{t+1})\mid S_t,\boldsymbol A_t\sim K(\cdot\mid S_t,\boldsymbol A_t).

All policy expectations below average over this action and environment randomness, keeping K,ρ0K,\rho_0 fixed. Write PθsP_\theta^s for the same trajectory construction with S0=sS_0=s fixed, including states outside the support of ρ0\rho_0. Suppress the parameter subscript on individual policies when unambiguous. Define

J(θ)=Eτ∼Pθ[∑t≥0γtRt+1],Vθ(s)=Eτ∼Pθs[∑t≥0γtRt+1],Qθ(s,a)=r(s,a)+γ∑s′P(s′∣s,a)Vθ(s′).\begin{aligned} J(\theta)&=\mathbb E_{\tau\sim P_\theta} \left[\sum_{t\ge0}\gamma^tR_{t+1}\right],\\ V^\theta(s)&=\mathbb E_{\tau\sim P_\theta^s} \left[\sum_{t\ge0}\gamma^tR_{t+1}\right],\\ Q^\theta(s,\boldsymbol a) &=r(s,\boldsymbol a)+\gamma\sum_{s'}P(s'\mid s,\boldsymbol a)V^\theta(s'). \end{aligned}

Every agent maximizes JJ, but the shared reward alone does not distinguish the contribution of each current action. Agents may also settle at a suboptimal coordination equilibrium, as Part 1's common-reward matrix showed.

Original Sunehag et al. Figure 3 contains three Fetch and Switch maps and a Checkers map. Gray obstacles create corridors. Colored agents and goals require coordinated movement; green apples and orange lemons in Checkers create different roles for teammates.
Figure 1. Cooperative tasks in the original VDN paper. Original figure from Sunehag et al. (2017), Value-Decomposition Networks For Cooperative Multi-Agent Learning, Figure 3. These are the source's task maps, not new simulations. Local observation windows are outlined in the lower-left panel; the note's initial proofs use full-state policies instead. Full resolution ↗Figure excerpt for discussion; copyright remains with the authors/rightsholder.

The original VDN tasks illustrate the issue: agents may need to yield in a corridor, coordinate collection and delivery, or clear a path for a teammate. Their reward can depend on actions that work only in combination. The source uses local observations, while our proofs first assume full states. We do not assume that a local observation contains all the information needed to predict the next state and reward.

2. Difference rewards: what changes when one action changes?

At a fixed state ss, choose a reference action cic_i and hold the other agents' actions a−i\boldsymbol a_{-i} fixed. An immediate difference reward is

Di(s,a)=r(s,a)−r(s,(ci,a−i)).D_i(s,\boldsymbol a) =r(s,\boldsymbol a)-r\bigl(s,(c_i,\boldsymbol a_{-i})\bigr).

For two possible actions ai,ai′a_i,a_i', direct subtraction gives

Di(s,(ai,a−i))−Di(s,(ai′,a−i))=r(s,(ai,a−i))−r(s,(ai′,a−i)).\begin{aligned} &D_i\bigl(s,(a_i,\boldsymbol a_{-i})\bigr) -D_i\bigl(s,(a_i',\boldsymbol a_{-i})\bigr)\\ &\qquad=r\bigl(s,(a_i,\boldsymbol a_{-i})\bigr) -r\bigl(s,(a_i',\boldsymbol a_{-i})\bigr). \end{aligned}

Thus the reference preserves immediate action rankings at that fixed context. Computing it may require a reward model or a simulator. Foerster et al., Section 4 use difference rewards to motivate a counterfactual critic baseline.

This identity does not justify replacing every reward in a sequential problem by its current-action difference. For example, let S0=0S_0=0, A0∈{0,1}A_0\in\{0,1\}, R1=0R_1=0, and S1=A0S_1=A_0. At the final decision there is only a no-op, and R2=S1R_2=S_1. Then

J(A0=a)=γa.J(A_0=a)=\gamma a.

Both immediate difference rewards are zero: the first reward is always zero, while the second is independent of the current no-op. Replacing the rewards this way would therefore erase the earlier action's delayed benefit. COMA instead keeps the environment's reward sequence and subtracts a baseline inside its policy-gradient estimator.

3. Counterfactual multi-agent policy gradients

From the team objective to an agent's gradient

Define the normalized discounted occupancy and its joint state-action law:

dθ(s)=(1−γ)∑t≥0γtPτ∼Pθ(St=s),νθ(s,a)=dθ(s)πθ(a∣s),ψi(s,ai)=∇θilog⁡πi(ai∣s).\begin{aligned} d_\theta(s)&=(1-\gamma)\sum_{t\ge0}\gamma^t \mathbb P_{\tau\sim P_\theta}(S_t=s),\\ \nu_\theta(s,\boldsymbol a)&=d_\theta(s)\boldsymbol\pi_\theta(\boldsymbol a\mid s),\\ \psi_i(s,a_i)&=\nabla_{\theta_i}\log\pi_i(a_i\mid s). \end{aligned}

Sampling (S,A)∼νθ(S,\boldsymbol A)\sim\nu_\theta means S∼dθS\sim d_\theta, followed by A∣S∼πθ\boldsymbol A\mid S\sim\boldsymbol\pi_\theta. It does not mean independent sampling from marginal state and action distributions.

To obtain the gradient, differentiate Vθ(s)=∑aπθ(a∣s)Qθ(s,a)V^\theta(s)=\sum_{\boldsymbol a}\boldsymbol\pi_\theta(\boldsymbol a\mid s)Q^\theta(s,\boldsymbol a). Only the policy and continuation value depend on θi\theta_i:

gi(s):=∇θiVθ(s)=hi(s)+γ∑s′Pθ(s,s′)gi(s′),hi(s)=∑aπθ(a∣s)ψi(s,ai)Qθ(s,a),Pθ(s,s′)=∑aπθ(a∣s)P(s′∣s,a).\begin{aligned} g_i(s):=\nabla_{\theta_i}V^\theta(s) &=h_i(s)+\gamma\sum_{s'}P^\theta(s,s')g_i(s'),\\ h_i(s)&=\sum_{\boldsymbol a}\boldsymbol\pi_\theta(\boldsymbol a\mid s) \psi_i(s,a_i)Q^\theta(s,\boldsymbol a),\\ P^\theta(s,s')&=\sum_{\boldsymbol a}\boldsymbol\pi_\theta(\boldsymbol a\mid s)P(s'\mid s,\boldsymbol a). \end{aligned}

The product policy gives ∇θiπθ=πθψi\nabla_{\theta_i}\boldsymbol\pi_\theta=\boldsymbol\pi_\theta\psi_i. Next, use the convergent Bellman inverse, as in the policy-gradient note:

gi=(I−γPθ)−1hi=∑t≥0γt(Pθ)thi,∇θiJ=∑t≥0γtρ0⊤(Pθ)thi=11−γ∑sdθ(s)hi(s).\begin{aligned} g_i&=(I-\gamma P^\theta)^{-1}h_i =\sum_{t\ge0}\gamma^t(P^\theta)^th_i,\\ \nabla_{\theta_i}J &=\sum_{t\ge0}\gamma^t\rho_0^\top(P^\theta)^th_i\\ &=\frac{1}{1-\gamma}\sum_s d_\theta(s)h_i(s). \end{aligned}

Therefore

∇θiJ=11−γE(S,A)∼νθ[ψi(S,Ai)Qθ(S,A)].\boxed{ \nabla_{\theta_i}J =\frac{1}{1-\gamma} \mathbb E_{(S,\boldsymbol A)\sim\nu_\theta} [\psi_i(S,A_i)Q^\theta(S,\boldsymbol A)]. }

Finite states/actions, bounded rewards, and a fixed parameter point with positive differentiable policies justify these derivatives. This is a partial derivative with other agents' parameters fixed, not a convergence claim for concurrent updates.

Why an own-action-independent baseline cancels

Let bi(s,a−i)b_i(s,\boldsymbol a_{-i}) be any finite baseline. Under the product policy,

Ai∣S=s,A−i=a−i∼πi(⋅∣s).A_i\mid S=s,\boldsymbol A_{-i}=\boldsymbol a_{-i} \sim\pi_i(\cdot\mid s).

First, sum the conditional score over this distribution:

EAi∼πi(⋅∣s)[ψi(s,Ai)]=∑aiπi(ai∣s)∇θilog⁡πi(ai∣s)=∑ai∇θiπi(ai∣s)=∇θi∑aiπi(ai∣s)⏟1=0.\begin{aligned} \mathbb E_{A_i\sim\pi_i(\cdot\mid s)}[\psi_i(s,A_i)] &=\sum_{a_i}\pi_i(a_i\mid s)\nabla_{\theta_i}\log\pi_i(a_i\mid s)\\ &=\sum_{a_i}\nabla_{\theta_i}\pi_i(a_i\mid s)\\ &=\nabla_{\theta_i}\underbrace{\sum_{a_i}\pi_i(a_i\mid s)}_{1}=0. \end{aligned}

Next, conditional on (S,A−i)(S,\boldsymbol A_{-i}), the baseline is fixed. The tower property yields

Eνθ[ψibi]=ES∼dθ, A−i∼π−i(⋅∣S)[bi(S,A−i)EAi∼πi(⋅∣S)[ψi(S,Ai)]⏟0]=0.\mathbb E_{\nu_\theta}[\psi_i b_i] =\mathbb E_{S\sim d_\theta,\,\boldsymbol A_{-i}\sim\boldsymbol\pi_{-i}(\cdot\mid S)} \left[b_i(S,\boldsymbol A_{-i}) \underbrace{\mathbb E_{A_i\sim\pi_i(\cdot\mid S)}[\psi_i(S,A_i)]}_{0}\right]=0.

Here π−i(a−i∣s)=∏j≠iπj(aj∣s)\boldsymbol\pi_{-i}(\boldsymbol a_{-i}\mid s)=\prod_{j\ne i}\pi_j(a_j\mid s), and Eνθ\mathbb E_{\nu_\theta} abbreviates the joint expectation already defined. Consequently QθQ^\theta may be replaced by Qθ−biQ^\theta-b_i without changing the expected gradient. The conditional product assumption is essential to this cancellation with a baseline that depends on teammates' actions.

COMA's choice of baseline

Counterfactual Multi-Agent Policy Gradients (COMA) chooses

biCF(s,a−i)=∑u∈Aiπi(u∣s)Qθ(s,(u,a−i)),AiCF(s,a)=Qθ(s,a)−biCF(s,a−i).\begin{aligned} b_i^{\mathrm{CF}}(s,\boldsymbol a_{-i}) &=\sum_{u\in\mathcal A_i}\pi_i(u\mid s) Q^\theta\bigl(s,(u,\boldsymbol a_{-i})\bigr),\\ A_i^{\mathrm{CF}}(s,\boldsymbol a) &=Q^\theta(s,\boldsymbol a)-b_i^{\mathrm{CF}}(s,\boldsymbol a_{-i}). \end{aligned}

The index on AiCFA_i^{\mathrm{CF}} denotes an advantage, not the random action AiA_i. At fixed s,a−is,\boldsymbol a_{-i}, this advantage has conditional mean zero. It compares the sampled action against agent ii's policy-weighted alternatives, holding teammates' current actions and the future policy fixed.

Original Foerster et al. Figure 1 has three panels: two decentralized actors interacting with an environment and a centralized critic; a recurrent actor network; and a critic producing a vector of values for all actions of one agent while holding other agents' actions fixed, followed by the COMA advantage calculation.
Figure 2. COMA's actors and counterfactual critic. Original figure from Foerster et al. (2018), Counterfactual Multi-Agent Policy Gradients, Figure 1. The source uses u for actions and local-history actors. Red components are used in centralized training; the derivation in this note specializes to fully observed state-based policies. Full resolution ↗Figure excerpt for discussion; copyright remains with the authors/rightsholder.

In the original figure, panel (c) evaluates all own-action alternatives in one critic pass; the paper writes actions as uu and uses local histories in the actors. The calculation above is its fully observed specialization. This is a critic-based counterfactual, not a uniquely defined allocation of team reward, a Shapley value, or identification of causal effects from observational data. See Foerster et al., Equation (4).

What an approximate critic does not preserve

For a fitted critic Q^\widehat Q, define b^iCF\widehat b_i^{\mathrm{CF}} by the same conditional sum. At a fixed policy and fixed critic, its baseline still cancels exactly. However,

g^i=11−γEνθ[ψi(Q^−b^iCF)],g^i−∇θiJ=11−γEνθ[ψi(Q^−Qθ)],∥g^i−∇θiJ∥≤{Eνθ∥ψi∥2}1/2{Eνθ(Q^−Qθ)2}1/21−γ.\begin{aligned} \widehat g_i&=\frac{1}{1-\gamma} \mathbb E_{\nu_\theta}[\psi_i(\widehat Q-\widehat b_i^{\mathrm{CF}})],\\ \widehat g_i-\nabla_{\theta_i}J &=\frac{1}{1-\gamma}\mathbb E_{\nu_\theta}[\psi_i(\widehat Q-Q^\theta)],\\ \left\|\widehat g_i-\nabla_{\theta_i}J\right\| &\le\frac{ \{\mathbb E_{\nu_\theta}\|\psi_i\|^2\}^{1/2} \{\mathbb E_{\nu_\theta}(\widehat Q-Q^\theta)^2\}^{1/2} }{1-\gamma}. \end{aligned}

The Cauchy–Schwarz bound shows which error remains after the baseline cancels: the critic's error in predicting action values. If the critic was fitted on data, these expectations condition on it and use a fresh on-policy draw; reusing dependent training samples needs a separate argument. During the actor update, we treat the critic and baseline as fixed multipliers, even if their values depend on θ\theta.

4. A worked variance calculation

Consider a one-decision team with independent A1∼Bernoulli⁡(p)A_1\sim\operatorname{Bernoulli}(p) and A2∼Bernoulli⁡(q)A_2\sim\operatorname{Bernoulli}(q), where

R=A1+4A2,p=14,q=12.R=A_1+4A_2,\qquad p=\tfrac14,\quad q=\tfrac12.

For agent 1, take p=sigmoid⁡(θ1)p=\operatorname{sigmoid}(\theta_1), so its scalar score is ψ1=A1−p\psi_1=A_1-p. Since J=p+4qJ=p+4q,

∂J∂θ1=p(1−p)=316.\frac{\partial J}{\partial\theta_1}=p(1-p)=\frac{3}{16}.

The COMA baseline is b1CF(A2)=p+4A2b_1^{\mathrm{CF}}(A_2)=p+4A_2. Thus

R−b1CF=A1−p,ZCF:=ψ1(R−b1CF)=(A1−p)2,E[ZCF]=p(1−p),Var⁡(ZCF)=p(1−p)4+(1−p)p4−p2(1−p)2=p(1−p)(1−2p)2=364.\begin{aligned} R-b_1^{\mathrm{CF}}&=A_1-p,\\ Z_{\mathrm{CF}}:=\psi_1(R-b_1^{\mathrm{CF}})&=(A_1-p)^2,\\ \mathbb E[Z_{\mathrm{CF}}]&=p(1-p),\\ \operatorname{Var}(Z_{\mathrm{CF}}) &=p(1-p)^4+(1-p)p^4-p^2(1-p)^2\\ &=p(1-p)(1-2p)^2=\frac{3}{64}. \end{aligned}

All expectations and variances in this section use the stated joint Bernoulli law at fixed p,qp,q. Enumerating its four outcomes gives:

Baseline bb in Z=ψ1(R−b)Z=\psi_1(R-b)E[Z]\mathbb E[Z]Var⁡(Z)\operatorname{Var}(Z)
003/163/16555/256555/256
V=E[R]=9/4V=\mathbb E[R]=9/43/163/1651/6451/64
b1CF=1/4+4A2b_1^{\mathrm{CF}}=1/4+4A_23/163/163/643/64
b1∗=3/4+4A2b_1^*=3/4+4A_23/163/1600

COMA removes variation due to A2A_2 in this example. The final row also shows that its baseline need not minimize variance.

The variance-minimizing conditional baseline

Fix s,a−is,\boldsymbol a_{-i} and let only Ai∼πi(⋅∣s)A_i\sim\pi_i(\cdot\mid s) vary. Write ψ=ψi(s,Ai)\psi=\psi_i(s,A_i) and Q=Qθ(s,(Ai,a−i))Q=Q^\theta(s,(A_i,\boldsymbol a_{-i})). Because E[ψ(Q−b)]\mathbb E[\psi(Q-b)] is independent of bb, minimizing the trace of its covariance is equivalent to minimizing

F(b)=EAi∼πi(⋅∣s)[∥ψ∥2(Q−b)2].F(b)=\mathbb E_{A_i\sim\pi_i(\cdot\mid s)}[\|\psi\|^2(Q-b)^2].

Differentiate this finite quadratic:

F′(b)=2bE[∥ψ∥2]−2E[∥ψ∥2Q],bi∗=E[∥ψ∥2Q]E[∥ψ∥2].F'(b)=2b\mathbb E[\|\psi\|^2]-2\mathbb E[\|\psi\|^2Q], \qquad \boxed{b_i^*=\frac{\mathbb E[\|\psi\|^2Q]}{\mathbb E[\|\psi\|^2]}}.

This formula assumes a positive denominator. If it is zero, the score contribution is identically zero. COMA uses E[Q]\mathbb E[Q] instead, so the two baselines need not agree.

COMA also need not reduce variance relative to a zero baseline. With one Bernoulli action and R=A1−(1−p)R=A_1-(1-p), the unadjusted score contribution is the constant p(1−p)p(1-p). COMA instead gives (A1−p)2(A_1-p)^2, which has positive variance when p≠1/2p\ne1/2.

5. Counterfactual actor updates

The following is the actor-gradient calculation, not the complete COMA critic-training procedure. Assume episodic trajectories reach a genuine terminal state with finite expected length, followed by an absorbing zero-reward state. No arbitrary rollout cutoff is inserted.

Algorithm 1 On-policy counterfactual actor-gradient estimate

Input: Frozen policy πθ\boldsymbol\pi_\theta; frozen critic Q^\widehat Q; nn independent episodes τk∼Pθ\tau_k\sim P_\theta; discount γ\gamma.

Output: Gradient estimates g^i\widehat g_i, one for each agent.

  1. Initialize g^i←0\widehat g_i\gets0 for every agent ii.
  2. for k=1,…,nk=1,\ldots,n do
  3. for t=0,…,Tk−1t=0,\ldots,T_k-1 do
  4. for each agent ii do
  5. Evaluate qu←Q^(Skt,(u,A−i,kt))q_u\gets\widehat Q(S_{kt},(u,\boldsymbol A_{-i,kt})) for every u∈Aiu\in\mathcal A_i.
  6. Set bi←∑uπi(u∣Skt)qub_i\gets\sum_u\pi_i(u\mid S_{kt})q_u and A^i←qAi,kt−bi\widehat A_i\gets q_{A_{i,kt}}-b_i.
  7. Accumulate g^i←g^i+n−1γt∇θilog⁡πi(Ai,kt∣Skt)A^i\widehat g_i\gets\widehat g_i+n^{-1}\gamma^t\nabla_{\theta_i}\log\pi_i(A_{i,kt}\mid S_{kt})\widehat A_i, holding qu,biq_u,b_i fixed.
  8. end for
  9. end for
  10. end for
  11. return {g^i}i=1N\{\widehat g_i\}_{i=1}^N.

With Q^=Qθ\widehat Q=Q^\theta, the episode-average expectation is

E(τ1,…,τn)∼Pθ⊗n[g^i]=∑t≥0γtEτ∼Pθ[ψi(St,Ai,t)AiCF(St,At)]=∇θiJ.\mathbb E_{(\tau_1,\ldots,\tau_n)\sim P_\theta^{\otimes n}}[\widehat g_i] =\sum_{t\ge0}\gamma^t\mathbb E_{\tau\sim P_\theta} [\psi_i(S_t,A_{i,t})A_i^{\mathrm{CF}}(S_t,\boldsymbol A_t)] =\nabla_{\theta_i}J.

The time sum already contains discounting, so no extra 1/(1−γ)1/(1-\gamma) factor is needed. A fitted critic instead has the error described above. Off-policy episodes would require a separate distribution-correction argument. Critic fitting, training/execution information, and concurrent-update stability belong to the later MARL parts.

6. VDN: learning an additive team value

An alternative is to learn action values whose maximization separates across agents. Value-Decomposition Networks (VDN) use

Qtot,w(s,a)=∑i=1Nqi,wi(s,ai).Q_{\mathrm{tot},w}(s,\boldsymbol a)=\sum_{i=1}^N q_{i,w_i}(s,a_i).

The qiq_i are learned utilities, not necessarily expected returns from individual rewards. Sunehag et al., Section 3 learn them from a single team reward. Their recurrent networks use local histories; here we use state inputs to isolate the additive argument.

Original Sunehag et al. Figure 2 shows two recurrent agent networks processing local observation histories. Their learned utilities Q-tilde one and Q-tilde two feed a joint Q node, while each network separately selects its agent's action.
Figure 3. VDN combines utilities into one team value. Original figure from Sunehag et al. (2017), Value-Decomposition Networks For Cooperative Multi-Agent Learning, Figure 2. Only Figure 2 is excerpted; the neighboring independent-learning Figure 1 is not included. The source utilities are learned from the team reward, not prescribed individual rewards. Full resolution ↗Figure excerpt for discussion; copyright remains with the authors/rightsholder.

Why independent greedy actions maximize the sum

Fix ss and let ai∗∈arg⁡max⁡aiqi(s,ai)a_i^*\in\arg\max_{a_i}q_i(s,a_i). For every joint action,

∑iqi(s,ai)≤∑imax⁡uiqi(s,ui)=∑iqi(s,ai∗).\sum_iq_i(s,a_i) \le\sum_i\max_{u_i}q_i(s,u_i) =\sum_iq_i(s,a_i^*).

Conversely, if one coordinate is not a utility maximizer, replacing it strictly improves the sum. Hence the full sets agree, including ties:

arg⁡max⁡aQtot(s,a)=∏iarg⁡max⁡aiqi(s,ai).\boxed{ \arg\max_{\boldsymbol a}Q_{\mathrm{tot}}(s,\boldsymbol a) =\prod_i\arg\max_{a_i}q_i(s,a_i). }

Independent maximization therefore recovers a maximum of the fitted additive value. Whether that value can represent the true optimal team value is a separate approximation question.

How one team error trains several utilities

Let Z=(S,A,R,S′)∼μZ=(S,\boldsymbol A,R,S')\sim\mu denote a draw from a fixed replay-buffer distribution; condition on the realized buffer. With frozen target parameters w−w^-, set

y(Z)=R+γ∑imax⁡uiqi,wi−(S′,ui),L(w)=12EZ∼μ[{Qtot,w(S,A)−y(Z)}2],∇wiL(w)=EZ∼μ[(Qtot,w−y)∇wiqi,wi(S,Ai)].\begin{aligned} y(Z)&=R+\gamma\sum_i\max_{u_i}q_{i,w_i^-}(S',u_i),\\ \mathcal L(w)&=\frac12\mathbb E_{Z\sim\mu} \left[\{Q_{\mathrm{tot},w}(S,\boldsymbol A)-y(Z)\}^2\right],\\ \nabla_{w_i}\mathcal L(w) &=\mathbb E_{Z\sim\mu} \left[(Q_{\mathrm{tot},w}-y)\nabla_{w_i}q_{i,w_i}(S,A_i)\right]. \end{aligned}

The continuation term is zero at genuine terminals. The last line uses separate utility parameters and a fixed target; differentiating the square distributes one team prediction error to each utility. This is not a policy-gradient estimator, and replay samples do not have law νθ\nu_\theta in general.

Nor are utilities uniquely identified: adding c(s)c(s) to q1q_1 and subtracting it from q2q_2 leaves QtotQ_{\mathrm{tot}} and greedy actions unchanged. A useful value decomposition is not a unique causal attribution of reward.

7. QMIX: a monotonic rather than additive restriction

QMIX replaces the sum with a state-dependent mixing function:

Qtot(s,a)=ms(q1(s,a1),…,qN(s,aN)),∂ms∂qi≥0.Q_{\mathrm{tot}}(s,\boldsymbol a) =m_s\bigl(q_1(s,a_1),\ldots,q_N(s,a_N)\bigr), \qquad \frac{\partial m_s}{\partial q_i}\ge0.

The mixer is nondecreasing in each utility when the others are fixed. For a differentiable mixer on a box-shaped domain, the displayed derivative condition ensures this property. Nonnegative mixing weights and nondecreasing activations enforce it. Networks called hypernetworks generate those weights from the state. The mixer need not be monotonic in the state. See Rashid et al., Section 4.

Original Rashid et al. Figure 2 shows a mixing network with absolute-value constrained nonnegative weights supplied by state-conditioned hypernetworks, the combination of N agent utilities into Q-total, and a recurrent agent network that produces action utilities from local observations and previous actions.
Figure 4. QMIX's state-conditioned monotonic mixing network. Original figure from Rashid et al. (2018), QMIX: Monotonic Value Function Factorisation for Deep Multi-Agent Reinforcement Learning, Figure 2. All three architecture panels are retained. Monotonicity concerns the utility inputs at fixed state, not the state input itself; the source actors use local histories. Full resolution ↗Figure excerpt for discussion; copyright remains with the authors/rightsholder.

Again fix ss, so the mixer and its state-conditioned parameters do not change during action comparison. If each ai∗a_i^* maximizes qiq_i, coordinatewise replacement yields

ms(q1(s,a1),…,qN(s,aN))≤ms(q1(s,a1∗),q2(s,a2),…,qN(s,aN))≤⋯≤ms(q1(s,a1∗),…,qN(s,aN∗)).\begin{aligned} m_s(q_1(s,a_1),\ldots,q_N(s,a_N))\\ &\le m_s(q_1(s,a_1^*),q_2(s,a_2),\ldots,q_N(s,a_N))\\ &\le\cdots\le m_s(q_1(s,a_1^*),\ldots,q_N(s,a_N^*)). \end{aligned}

Thus decentralized greedy selection is sufficient:

∏iarg⁡max⁡aiqi(s,ai)  ⊆  arg⁡max⁡aQtot(s,a).\boxed{ \prod_i\arg\max_{a_i}q_i(s,a_i) \;\subseteq\;\arg\max_{\boldsymbol a}Q_{\mathrm{tot}}(s,\boldsymbol a). }

With nonstrict monotonicity, set equality need not hold: ms(u1,u2)=u1m_s(u_1,u_2)=u_1 ignores agent 2, so even its nongreedy actions can maximize QtotQ_{\mathrm{tot}}. The inclusion above states exactly the greedy guarantee needed here.

More expressive than a sum, but not unrestricted

For two binary actions, consider the team action-value table

M=(1224).M=\begin{pmatrix}1&2\\2&4\end{pmatrix}.

An additive table Mab=xa+ybM_{ab}=x_a+y_b must satisfy M11−M10−M01+M00=0M_{11}-M_{10}-M_{01}+M_{00}=0. Here that contrast is 11, so VDN cannot represent the table exactly. However, qi(0)=1q_i(0)=1, qi(1)=2q_i(1)=2, and m(u1,u2)=u1u2m(u_1,u_2)=u_1u_2 represent it and are monotonic on [1,2]2[1,2]^2. This demonstrates the larger monotonic function class, not exact representation by every finite QMIX network.

Now return to Part 1's coordination table:

C=(2001).C=\begin{pmatrix}2&0\\0&1\end{pmatrix}.

If q1(0)>q1(1)q_1(0)>q_1(1), monotonicity forces C00≥C10C_{00}\ge C_{10} and C01≥C11C_{01}\ge C_{11}; the latter is false. Reversing the utility ordering contradicts the first column. Equal utilities force equal rows. No fixed scalar utility ordering for agent 1 can represent this entire table through a monotonic mixer.

Nevertheless, the optimal joint action (0,0)(0,0) is perfectly decentralized. Failure to represent all action values does not imply failure to express an optimal joint choice. Monotonic mixing is sufficient, not necessary, for greedy consistency. The original QMIX analysis studies this representational restriction rather than claiming that all cooperative games satisfy it.

8. What each construction preserves

ConstructionWhat is compared or learned?Established property
Immediate difference rewardOne action versus a reference, at fixed state and teammates' actionsPreserves immediate action rankings at that context
COMAOne action versus its policy-weighted alternatives in a joint criticPreserves the expected on-policy gradient with an exact critic
VDNAdditive utilities fitted to a team value targetIndependent utility maxima are exactly the sum's joint maxima
QMIXUtilities combined by a monotonic mixerIndependent utility maxima give a joint maximum of the fitted value

The first two compare an agent's action with alternatives; the latter two constrain a value representation. None alone proves global convergence or supplies a unique division of team reward. Part 3 examines which information the agents may use during training and execution; Part 4 develops multi-agent actor–critic updates.

References

The Bernoulli calculations, delayed-reward counterexample, and small matrix examples above are worked examples for this note, not experimental results from these papers.