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.
Scroll to see the full equation →
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 N agents, state s∈S, joint action a∈∏iAi, and one bounded realized reward Rt+1 received by every agent. The environment is fixed, with joint next-state/reward kernel
(St+1,Rt+1)∣Ht,At∼K(⋅∣St,At).
Scroll to see the full equation →
Here Ht contains the observed history through St; write P(s′∣s,a) for the state marginal and r(s,a)=E(S′,R)∼K(⋅∣s,a)[R]. Take 0≤γ<1 and a fixed initial law ρ0. Agents use separate parameter vectors θi and positive, continuously differentiable stationary policies, with independent private randomization conditional on the state:
All policy expectations below average over this action and environment randomness, keeping K,ρ0 fixed. Write Pθs for the same trajectory construction with S0=s fixed, including states outside the support of ρ0. Suppress the parameter subscript on individual policies when unambiguous. Define
Every agent maximizes J, 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.
Click to enlarge · Scroll sideways on small screens
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 s, choose a reference action ci and hold the other agents' actions a−i fixed. An immediate difference reward is
Di(s,a)=r(s,a)−r(s,(ci,a−i)).
Scroll to see the full equation →
For two possible actions ai,ai′, direct subtraction gives
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=0, A0∈{0,1}, R1=0, and S1=A0. At the final decision there is only a no-op, and R2=S1. Then
J(A0=a)=γa.
Scroll to see the full equation →
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:
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) be any finite baseline. Under the product policy,
Ai∣S=s,A−i=a−i∼πi(⋅∣s).
Scroll to see the full equation →
First, sum the conditional score over this distribution:
Here π−i(a−i∣s)=∏j=iπj(aj∣s), and Eνθ abbreviates the joint expectation already defined. Consequently Qθ may be replaced by Qθ−bi without changing the expected gradient. The conditional product assumption is essential to this cancellation with a baseline that depends on teammates' actions.
The index on AiCF denotes an advantage, not the random action Ai. At fixed s,a−i, this advantage has conditional mean zero. It compares the sampled action against agent i's policy-weighted alternatives, holding teammates' current actions and the future policy fixed.
Click to enlarge · Scroll sideways on small screens
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 u 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, define biCF by the same conditional sum. At a fixed policy and fixed critic, its baseline still cancels exactly. However,
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 θ.
4. A worked variance calculation
Consider a one-decision team with independent A1∼Bernoulli(p) and A2∼Bernoulli(q), where
R=A1+4A2,p=41,q=21.
Scroll to see the full equation →
For agent 1, take p=sigmoid(θ1), so its scalar score is ψ1=A1−p. Since J=p+4q,
All expectations and variances in this section use the stated joint Bernoulli law at fixed p,q. Enumerating its four outcomes gives:
Baseline b in Z=ψ1(R−b)
E[Z]
Var(Z)
0
3/16
555/256
V=E[R]=9/4
3/16
51/64
b1CF=1/4+4A2
3/16
3/64
b1∗=3/4+4A2
3/16
0
COMA removes variation due to A2 in this example. The final row also shows that its baseline need not minimize variance.
The variance-minimizing conditional baseline
Fix s,a−i and let only Ai∼πi(⋅∣s) vary. Write ψ=ψi(s,Ai) and Q=Qθ(s,(Ai,a−i)). Because E[ψ(Q−b)] is independent of b, minimizing the trace of its covariance is equivalent to minimizing
F(b)=EAi∼πi(⋅∣s)[∥ψ∥2(Q−b)2].
Scroll to see the full equation →
Differentiate this finite quadratic:
F′(b)=2bE[∥ψ∥2]−2E[∥ψ∥2Q],bi∗=E[∥ψ∥2]E[∥ψ∥2Q].
Scroll to see the full equation →
This formula assumes a positive denominator. If it is zero, the score contribution is identically zero. COMA uses 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), the unadjusted score contribution is the constant p(1−p). COMA instead gives (A1−p)2, which has positive variance when p=1/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.
The time sum already contains discounting, so no extra 1/(1−γ) 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=1∑Nqi,wi(s,ai).
Scroll to see the full equation →
The qi 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.
Click to enlarge · Scroll sideways on small screens
Conversely, if one coordinate is not a utility maximizer, replacing it strictly improves the sum. Hence the full sets agree, including ties:
argamaxQtot(s,a)=i∏argaimaxqi(s,ai).
Scroll to see the full equation →
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′)∼μ denote a draw from a fixed replay-buffer distribution; condition on the realized buffer. With frozen target parameters w−, set
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 νθ in general.
Nor are utilities uniquely identified: adding c(s) to q1 and subtracting it from q2 leaves Qtot 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:
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.
Click to enlarge · Scroll sideways on small screens
Again fix s, so the mixer and its state-conditioned parameters do not change during action comparison. If each ai∗ maximizes qi, coordinatewise replacement yields
Thus decentralized greedy selection is sufficient:
i∏argaimaxqi(s,ai)⊆argamaxQtot(s,a).
Scroll to see the full equation →
With nonstrict monotonicity, set equality need not hold: ms(u1,u2)=u1 ignores agent 2, so even its nongreedy actions can maximize Qtot. 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).
Scroll to see the full equation →
An additive table Mab=xa+yb must satisfy M11−M10−M01+M00=0. Here that contrast is 1, so VDN cannot represent the table exactly. However, qi(0)=1, qi(1)=2, and m(u1,u2)=u1u2 represent it and are monotonic on [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).
Scroll to see the full equation →
If q1(0)>q1(1), monotonicity forces C00≥C10andC01≥C11; 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) 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
Construction
What is compared or learned?
Established property
Immediate difference reward
One action versus a reference, at fixed state and teammates' actions
Preserves immediate action rankings at that context
COMA
One action versus its policy-weighted alternatives in a joint critic
Preserves the expected on-policy gradient with an exact critic
VDN
Additive utilities fitted to a team value target
Independent utility maxima are exactly the sum's joint maxima
QMIX
Utilities combined by a monotonic mixer
Independent 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
Foerster, J. N., Farquhar, G., Afouras, T., Nardelli, N., and Whiteson, S. (2018). Counterfactual Multi-Agent Policy Gradients. AAAI. Section 4 defines the counterfactual advantage and gives the baseline cancellation; Figure 1 shows the architecture.
Sunehag, P., Lever, G., Gruslys, A., Czarnecki, W. M., Zambaldi, V., Jaderberg, M., Lanctot, M., Sonnerat, N., Leibo, J. Z., Tuyls, K., and Graepel, T. (2017). Value-Decomposition Networks For Cooperative Multi-Agent Learning. Section 3 of the linked first-version PDF gives the additive construction; Figures 2–3 show the architecture and tasks.
The Bernoulli calculations, delayed-reward counterexample, and small matrix examples above are worked examples for this note, not experimental results from these papers.