2022-10-27
We look at the value of a two-player zero-sum game as a function of its payoff matrix. We see that even if that matrix is a smooth function of some parameter, the value of the game is not differentiable.
I was surprised today by the following. Consider a K×M matrix, A(λ) where each entry is given by a nice (say infinitely differentiable) function Ai,j(λ). Let us interpret A(λ) as the payoff matrix of a two-player zero-sum game, and let us investigate the value function V(λ) = minp∈△Kmaxq∈△M ∑i,jpiqjAi,j(λ). Here, we ask if V(λ) is a nice function of λ. We will see that it is continuous but not differentiable. Not even when the Ai,j(λ) are linear in λ.
In the below figure we investigate the situation for A(λ) = λ(0.130.212.75−0.631.45−2.0−1.020.56−0.52−1.7−1.36−1.5)+(1−λ)(−0.831.240.250.981.291.47−1.050.11.452.221.47−1.29) These coefficients were drawn at random until a pleasing plot appeared. The fact that this only took about 10 resamplings indicates that the situation illustrated by the plot below is not rare at all.
And just for good measure, here is a second example where the value function has a local minimum (which in fact consists of two local minima straddling a local maximum).
We see that even when the payoffs are each linear functions of a scalar parameter λ, the value of the game is not differentiable. Is that surprising? Maybe. How about the following? Let p∗(λ) and q∗(λ) be the saddle point for A(λ) (which is indeed typically unique). Then by the rule for differentiating optima and by the chain rule, ∇λV(λ) = ∇λ(p∗(λ)⊺ The first and last contribution are in fact zero. Why? Because optimality of p in V(p,A,q) requires V^{(1)}(p,a,q) = 0. It is actually a bit more complicated, as p(\lambda) sums to one, and hence \nabla_\lambda p(\lambda) sums to zero. Moreover, A(\lambda)q^*(\lambda) is a constant. So the non-differentiability in the derivative \nabla_\lambda V(\lambda) is not due to nondifferentiability of the entries in A(\lambda). It is due to the optimal weights jumping. This can clearly be seen in the first figure. For example, the jump up in the derivative at \lambda = 0.45 is caused by a jump in q^*(\lambda).
Why is all this interesting or relevant? Well, for example because when training GANs one optimises the parameters of an objective that is of min-max shape. As illustrated above, such objectives are complex to optimise. Even in one dimension.